Variables, signals: behavioral and post-route simulation

I'm learning the diff between variables and signals, and I've found this site:

formatting link
with a corresponding picture here:
formatting link

I've changed the source file to this

library ieee; use ieee.std_logic_1164.all;

entity sig_var is port ( d1, d2, d3 : in std_logic; res1, res2, res3 : out std_logic); end sig_var;

architecture behv of sig_var is signal sig_s1: std_logic; signal sig_s2: std_logic;

begin

proc1: process(d1,d2,d3) variable var_s1: std_logic;

begin var_s1 := d1 and d2; res1

Reply to
aleksazr
Loading thread data ...

There's an error in your proc2 - sig_s1 should be in the sensitivity list,

regards Alan

--
Alan Fitch
Reply to
Alan Fitch

Yes, that fixed it. Now both simulations show the same. Too bad ISE doesn't support the ALL keyword. (sig_s1 is missing in the original file as well, and ISE didn't warn me about it)

Thanks

Reply to
aleksazr

Yes, it's interesting that Isim (the Xilinx Simulator) seems to have some VHDL 2008 support. It'll be interesting to see what the language support for synthesis is like in Vivado,

Alan

--
Alan Fitch
Reply to
Alan Fitch

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.