CPE 315 SIM Documentation
Hierarchical Modules



SIM Manual Table of Contents

In building simulation models for digital systems that include more than a few gates, it is desirable to:

  1. Hide complexity of a component
    e.g. There is no reason to display the insides of an adder
  2. Reuse components without knowledge of the implementation
    e.g. If you need an adder, call the adder constructor and ignore the details of the implementation.

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.


Last updated on 9/10/04