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

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now