Altera_Forum
Honored Contributor
16 years agoWhy QuartusII sysnthesis tool interpreting this verilog code as a latch?
I have question about the verilog code causing Latch and not flip-flop. Your suggestions are welcome. I can add more register stage to this but that can affect the performance.
I am not sure why the QuartusII synthesis tool is considering ReqInFifoDataIn[72] a latch and not a flip-flop? ReqInFifoData[72] is clearly defined as part of synchronous always block. It is getting used by wTag signal - Here I am anding the D input of the Flip-Flop and Qn output of the same D flip-flop. The purpose of this is to generate one clock wide wTag pulse. input [81:0] RxStreamData0, wire wTag = RxStreamData0[72] & ~ReqInFifoDataIn[72]; reg [81:0] ReqInFifoDataIn; always @(posedge AppClk or negedge PcieRstN) begin if (!PcieRstN) begin ReqInFifoDataIn <= 96'b0; ReqInFifoDataValid <= 1'b0; ReqInFifoDataVal <= 1'b0; end else begin ReqInFifoDataIn[81:0] <= RxStreamData0[81:0]; ReqInFifoDataValid <= RxStreamValid0; ReqInFifoDataVal <= ReqInFifoRd; end end