Linking Modules Instantiations

Guest #4771611
Rate this post
• ▲ useful
▼ not useful
In my code I have two instantiations of different modules:

module1 myModule1 (in1, out1);
module2 myModule2 (out1, out2);

As you can see, my main goal is to make the input on my second module be 
dependent on the result of the output of my first module. However, to my 
understanding, out1 doesn't have a value at the beginning since 
everything happens at the same time and out1 hasn't been calculated from 
the first module. How am I supposed to go about this in code?
#4771697
Rate this post
• ▲ useful
▼ not useful
If you give all storage elements (e.g. registers, memories) an initial 
value and you have all inputs well defined, everything is OK.

If not (i.e. you'll get unknown or undefined signals in your simulation) 
track the signals down to where they origin from and give initial 
values.

Even if you don't give initial values for the storage elements, they 
should eventually end up in defined states in a good design (inputs are 
mandatory to be well-defined, of course).

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.