Altera_Forum
Honored Contributor
14 years agoBest way to code flop w/asynch reset?
Hi - I've lots of experience in Verilog, but am learning VHDL.
Question: Is this... process(clk,rst_l) begin if rst_l = '0' then sig <= '0'; elsif rising_edge(clk) then sig <= expression; end if; end process; the best way to do the equivalent of always @(posedge clk or negedge rst_l) begin if (!rst_l) sig <= 0; else begin sig <= expression; end end (i.e., flop with asynch reset) I'm asking because in Verilog it's sort of by convention that if you do it -just that way- then all the synthesizers infer you want an asynch flop and the else expression is clocked. I want to make sure I'm doing it the most general way (i.e., least likely for a synth to mis-interpret) for VHDL. THANKS! /j