M
Marty
Guest
Hi c.l.vhdl,
I've always coded my flip-flops in Verilog with a bit of delay for
simulation purposes. This is done when you infer your regs and is ignored
in synthesis. For example:
always @(posedge clk or negedge resetb)
if (!resetb)
flop_q <= 1'b0;
else
flop_q <= #1 1'b1;
I can achieve the same thing in VHDL as follows:
process (clk, resetb)
begin
if (resetb = '0') then
flop_q <= '0';
elsif clk'event and clk = '1' then
flop_q <= '1' after 1 ns;
end if;
end process;
Is that the correct way to achieve the same thing that I'm doing in Verilog
with the #1 delay?
Just curious...
--
Marty
I've always coded my flip-flops in Verilog with a bit of delay for
simulation purposes. This is done when you infer your regs and is ignored
in synthesis. For example:
always @(posedge clk or negedge resetb)
if (!resetb)
flop_q <= 1'b0;
else
flop_q <= #1 1'b1;
I can achieve the same thing in VHDL as follows:
process (clk, resetb)
begin
if (resetb = '0') then
flop_q <= '0';
elsif clk'event and clk = '1' then
flop_q <= '1' after 1 ns;
end if;
end process;
Is that the correct way to achieve the same thing that I'm doing in Verilog
with the #1 delay?
Just curious...
--
Marty