S
Seb
Guest
Mike Treseler wrote:
process( clk )
begin
if rising_edge( clk ) then
ok(0) <= '0';
end if;
end process;
process( clk )
begin
if rising_edge( clk ) then
ok(1) <= '1';
end if;
end process;
Surely that should not work either. signal "ok" has two drivers, I
should get 'U'. Why does it work? Is that due to the simulator
implementation? (It even works when ok is decalred as std_ulogic_vector)
Unfortunately, I often drive a vector (but different elements of it)
from different processes generated by generate statements:
gen: generate for i in 0 to NB
process(clk)
begin
....
sig(i) <=
So I really should move away from that, no?
Often it is easy to replace the generate by a for loop inside the
process, but when it also uses variables, it is not that easy.
Thanks for your responses Mike.
Seb.
Ok, fair enoug, but not let's go back to the simple case:If you move your architecture-scoped procedure into
the scope of each process, modelsim will catch
the driver problem:
process( clk )
begin
if rising_edge( clk ) then
ok(0) <= '0';
end if;
end process;
process( clk )
begin
if rising_edge( clk ) then
ok(1) <= '1';
end if;
end process;
Surely that should not work either. signal "ok" has two drivers, I
should get 'U'. Why does it work? Is that due to the simulator
implementation? (It even works when ok is decalred as std_ulogic_vector)
Unfortunately, I often drive a vector (but different elements of it)
from different processes generated by generate statements:
gen: generate for i in 0 to NB
process(clk)
begin
....
sig(i) <=
So I really should move away from that, no?
Often it is easy to replace the generate by a for loop inside the
process, but when it also uses variables, it is not that easy.
Thanks for your responses Mike.
Seb.