9 Коммиты bd9f2b32cb ... 68a6cc6eb6

Автор SHA1 Сообщение Дата
  Oliver Jaison 68a6cc6eb6 debugging pipeline 4 лет назад
  Oliver Jaison 9ebca1fd91 debugging pipeline 4 лет назад
  Oliver Jaison eeced5cec8 debugging pipeline 4 лет назад
  Oliver Jaison db4730fb75 debugging pipeline 4 лет назад
  Oliver Jaison 7a13726de3 Merge branch 'master' into Oliver_FPA 4 лет назад
  Oliver Jaison 4f7fcbca22 Merge branch 'master' of https://gogs.infcof.com/4ycp/altera_devel into Oliver_FPA 4 лет назад
  Oliver Jaison 8725693d61 adding pipelines yet again 4 лет назад
  Oliver Jaison a67e2bb430 fix? 4 лет назад
  Oliver Jaison c09c9b7289 pipelined stages and abstracted overflow limit 4 лет назад
1 измененных файлов с 7 добавлено и 7 удалено
  1. 7 7
      src/FPA_module_test.sv

+ 7 - 7
src/FPA_module_test.sv

@@ -30,7 +30,7 @@ module floating_add #(parameter N=16, M=4)(input_1, input_2, sum, diff, clk, res
 			D0[6] = 0; // abs
 			D0[7] = 0; // res
 		end
-	pipe pipe0(.clk(clk), .reset(reset), .D(D0), .Q(Q0));
+	pipe#(.N(N-1), .K(7)) pipe0(.clk(clk), .reset(reset), .D(D0), .Q(Q0));
 	
 	
 	always_comb
@@ -72,7 +72,7 @@ module floating_add #(parameter N=16, M=4)(input_1, input_2, sum, diff, clk, res
 		end
 		
 		//Second pipeline stage 1
-		pipe pipe1(.clk(clk), .reset(reset), .D(Q0), .Q(Q1));
+		pipe#(.N(N-1), .K(7)) pipe1(.clk(clk), .reset(reset), .D(Q0), .Q(Q1));
 		
 	always_comb
 		begin
@@ -145,7 +145,7 @@ module floating_add #(parameter N=16, M=4)(input_1, input_2, sum, diff, clk, res
 		end
 		
 		// Final pipeline stage 
-		pipe pipe2(.clk(clk), .reset(reset), .D(Q1), .Q(Q2));
+		pipe#(.N(N-1), .K(7)) pipe2(.clk(clk), .reset(reset), .D(Q1), .Q(Q2));
 		assign sum = Q2[2];
 		assign diff = Q2[3];
 endmodule : floating_add
@@ -178,14 +178,14 @@ module floating_product #(parameter N=16, M=4)(input_1, input_2, product, clk, r
 			D0[4] = 0; // mult
 		end
 		
-	pipe pipe0(.clk(clk), .reset(reset), .D(D0), .Q(Q0));
+	pipe#(.N(2*(N-3-M)), .K(4)) pipe0(.clk(clk), .reset(reset), .D(D0), .Q(Q0));
 
 	// We have assigned an {M+1} bit exponent so we must have a 2^{M} offset
 	assign Q0[3] = Q0[0][N-2:N-2-M] + Q0[1][N-2:N-2-M];
 	assign Q0[2][N-2:N-2-M] = Q0[3] - (1'b1 << M) + 2;
 	
 	// Second pipeline stage
-	pipe pipe1(.clk(clk), .reset(reset), .D(Q0), .Q(Q1));
+	pipe#(.N(2*(N-3-M)), .K(4)) pipe1(.clk(clk), .reset(reset), .D(Q0), .Q(Q1));
 
 	always_comb
 		begin
@@ -196,8 +196,8 @@ module floating_product #(parameter N=16, M=4)(input_1, input_2, product, clk, r
 				Q1[2][N-1] = Q1[0][N-1] ^ Q1[1][N-1];
 		end
 	
-	// Third pipeline stage
-	pipe pipe2(.clk(clk), .reset(reset), .D(Q1), .Q(Q2));
+	//Final Pipeline stage
+	pipe#(.N(2*N-3-M), .K(4)) pipe2(.clk(clk), .reset(reset), .D(Q1), .Q(Q2));
 	assign product = Q2[2][N-1:0];
 endmodule : floating_product