Linking Modules Instantiations

Guest #4771611
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
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).
Moderator (Company: Titel) #4771717
Benjamin L. wrote:
> out1 doesn't have a value at the beginning
Of course it has.
It has a undefined or (if you have been clever) any initialized value...

> out1 hasn't been calculated from the first module.
What kind of "module" ist that? Is it combinatorial or is it registered?

Reply

A question of your own? This thread is over 10 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

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.