VHDL help with adding modules

Hey guys, I'm fairly new to vhdl. Trying to test a small portion of an mp3 player to work. Seems that If I add my synchronizer only, Model Sim will show in the simulation that the signals are assigned to the correct values as it should. However If I add another module (bit reservoir) all the signals go to 'U' (undefined) except for clk and reset. However the modules do not share any outputs so that is not a problem. Portion of my code below. Any ideas? thanks.

component synchronizer port( clk : in std_logic; rst : in std_logic; start : in std_logic; done : out std_logic; gr : in std_logic; si : in stream_in_type; so : out stream_out_type; bri : in br_out_type; bro : out br_in_type; frm : out frame_type ); end component;

component bitreservoir port( clk : in std_logic; rst : in std_logic; start : in start_type; bro : out br_out_type; bri : in br_in_array_type ); end component;

begin sync_unit: synchronizer port map( clk => clk, rst => rst, start => start.synchronize, done => done.synchronize, gr => start.granule, si => si, so => so_sync, bri => bri, bro => bro(0), frm => frame );

br: bitreservoir port map( clk => clk, rst => rst, start => start, bro => bri, bri => bro );

-----------------------------clock generator

----------------------------- process begin loop clk

Reply to
walterwang
Loading thread data ...

Walter,

Based on your description, it sounds like bitreservoir is propogation 'U' via one of it's outputs that is fed to synchronizer. You should start there, making sure all the signals in bitresrvoir have reset states and are driven. Also, note that if you had contention, the signals would be 'X', and never 'U'. I wasn't sure you understood that from your description.

John

Reply to
John M

Hi walter... i think john is right... If u do not initialize ur signals properly you do get 'U' in simulation. This is a problem that all of us face. make sure u initialize all the signals to some known value. Then in the testbench start with a reset. Do something like this in ur module... signal a,b : std_logic; signal c : std_logic_vector(7 downto 0); process(clk,reset) if reset ='1' then a

Reply to
CODE_IS_BAD

Its righ

By the Simaulation must your entry signals have I defined state

And for real use it can but musn't be

Reply to
digi

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.