Altera_Forum
Honored Contributor
9 years agoDelaying output of a module to close timing
I've created a module where two numbers are multiplied and the output is provided in a number of clock cycles. However, the output of the module (pdt1_out) is failing timing in that the setup slack at the output is -9.450 ns.
I don't need the output until at least 10 ns (or later) after assignment of the inputs. Is there a way to delay the output so that timing can be successfully closed? Here is a short snippet of Verilog code showing how I've attempted to pipeline the output (two clock cycles). However, there are still issues with closing timing and the setup slack remains negative. TimeQuest is measuring the time taken for the output pdt1_out, whereas I don't need the output until pdt1 is updated. This can be pipelined further with more registers.// pipelined multiplier 64-bit in, 64 bit out
reg am1 = 0;
reg bm1 = 0;
reg pdt1 = 64'd0;
reg pdt1_out0 = 64'd0;
wire pdt1_out;
unsigned_mult64 unsigned_mult64
( .a(am1),
.b(bm1),
.clk(mult_clk), // run this on a slower clock
.out(pdt1_out)
); // end
// pipeline (2 clock cycles)?
always @(posedge clk) begin
pdt1_out0 <= pdt1_out;
pdt1 <= pdt1_out0;
end