Related questions
Passing parameters to Verilog modules
I am in the process of writing some Verilog modules for an FPGA design. I looked around the internet to find out how I best parametrize my modules. I see two different methods occurring often. I included an example hereunder …
Incrementing a counter variable in verilog: combinational or sequential
I am implementing an FSM controller for a datapath circuit. The controller increments a counter internally. When I simulated the program below, the counter was never updated.
reg[3:0] counter;
//incrementing counter in combinational block
counter = counter + 4'b1;
However, on creating …
Triggering signal on both edges of the clock
Design requires a signal to be activated at specific circumstance on rising edge of the clock, and deactivated at another circumstance on falling edge of clock. Here's what I think:
always@(posedge CLK) begin
signal1 <= 1'b0; // reset flag
if(…