Hot take: The proper Verilog template for synchronously reset flip-flops looks like this. always @(posedge clk) begin [non-reset code here] if (reset) begin [reset code here] end end
-
-
Now I don't do Verilog, In VHDL I would tackle the 'some bits reset only' by using an array of std_logic in stead of a std_log_vector or perhaps a record mixing std_logic and std_logic_vector. There must be (System)Verilog equivalents?
-
There are. It's actually pretty easy to do. But still easier is the idiom I suggested in the OP.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.