Forum Discussion

DBarn22's avatar
DBarn22
Icon for New Contributor rankNew Contributor
5 years ago
Solved

Maths Error

I have a block that is occasionally giving an error. I'm fairly sure it is due to timing, but I do not understand the problem. The following are relevant snippets. reg enc_reg; reg [31:0] e...
  • ak6dn's avatar
    ak6dn
    5 years ago

    Why not do a fully synchronous design with all the registers clocked on posedge clk ?

    Create an enable signal for the data processing block and include all the logic inside that block within it:

    always @ (posedge clk) begin
    if (enable_enc) begin
    ... do stuff ...
    end
    end