Guest
While I was trying to generate a clock signal in the test bench I
noticed a strange behavior
signal clk : std_logic_vector := '0';
begin
clk <= not clk after 5 ns;
The above code works fine but the below code generates only 'U' in the
wave form.
signal clk : std_logic_vector';
begin
clk <= '0';
clk <= not clk after 5 ns;
I thought changing clk <= '0' to clk <= '0' after 2 ns would work but
it didn't. I am new to VHDL and appreciate if anyone explains this.
I know concurrent statements execute whenever any of the RHS signal or
variable changes value but what will happen if we have concurrent
statement like x <= '0' or x <= '0' after 5 ns; where '0' is a literal
value. When will it execute?
BReddy
noticed a strange behavior
signal clk : std_logic_vector := '0';
begin
clk <= not clk after 5 ns;
The above code works fine but the below code generates only 'U' in the
wave form.
signal clk : std_logic_vector';
begin
clk <= '0';
clk <= not clk after 5 ns;
I thought changing clk <= '0' to clk <= '0' after 2 ns would work but
it didn't. I am new to VHDL and appreciate if anyone explains this.
I know concurrent statements execute whenever any of the RHS signal or
variable changes value but what will happen if we have concurrent
statement like x <= '0' or x <= '0' after 5 ns; where '0' is a literal
value. When will it execute?
BReddy