In building simulation models for digital systems that include more
than a few gates, it is desirable to:
The
8 bit adder example
demonstrates the creation and use of modules in SIM.
Both the full adder and 8 bit adder are SIM modules.
Note the form of schematic descriptor constructor used. For example,
Or SD(sd,"1d"), ...constructs the Or gate inside the Module and doesn't display it unless the Or gate modularization is removed. See SIM interactive control for details on how to display the inside of a module.
If you hard-code the SD of a component inside a module ("1d"), SIM will display the component outside the module. This might be useful for debugging purposes but is otherwise confusing.