next up previous contents
Next: Protected Members Up: The Wire Class Previous: The Wire Class

Public Members

tex2html_wrap_inline7610 Wire(const char *name): The Wire constructor accepts a name which represents the wire and passes it to its base class, Connector for initialization. An initial signal is then added to the wire's signal list by the constructor using the add_signal() member function.

tex2html_wrap_inline7610 Signal get_signal(ckt_time time): During simulation, components must be able to obtain the value of a signal that travelled along the wire at a specified time. The get_signal() method performs this task by traversing its linked list of signals for the correct signal. Checks are made during the search to ensure that the client code is not attempting to look for a signal which has not yet occurred.

tex2html_wrap_inline7610 void send_signal(Signal sig): When the Wire object receives this message, it adds the signal to its signal list by calling its add_signal() member function. It then attempts to propagate the signal to all the components in its fan-out list by invoking the propagate() method of its base Connector class.

tex2html_wrap_inline7610 void show_signals(): This method will display an output stanza header and the signal values and times currently residing on the wire by calling the private display_signals() function. It is invoked indirectly by the show_outputs() member function of the Component class after a simulation has been completed.

tex2html_wrap_inline7610 void add_signal(Signal sig): This method will append the specified signal to the signal list maintained by the wire. The implementation of this function ensures that the signal is in time-order with respect to the last signal in the signal list; if not, then a diagnostic warning will be displayed. This function is used during the initialization of the wire and by the send_signal() member function. It is also used by the Runtime_Component class to add the initial signals to the primary input wires during the construction of the component.


next up previous contents
Next: Protected Members Up: The Wire Class Previous: The Wire Class

Donald Craig
Mon Jul 8 12:05:35 NDT 1996