Implemented By
NS16450, NS16550, eth-transceiver, i2c-bus, i8254, mii-management-bus, mii-transceiver, ppc405gp, ppc405gp-emac, ppc405gp-iic, ppc405gp-mal, ppc405gp-uic, ppc440gp, ppc440gp-dma, ppc440gp-ebc, ppc440gp-emac, ppc440gp-iic, ppc440gp-mal, ppc440gp-plb, ppc440gp-uic, ppc440gx, ppc440gx-dma, ppc440gx-ebc, ppc440gx-emac, ppc440gx-iic, ppc440gx-mal, ppc440gx-opb, ppc440gx-plb, ppc440gx-uic, ppc603e, ppc7400, ppc7447, ppc7450, ppc7457, ppc750, ppc750fx, ppc750gx, ppc970fx, signal-bus
Interface to model a signal, such as a reset or interrupt.

The signal initiator should call signal_raise() to raise the signal level to its active level. Signals are always active high in Simics. Once raised, the same initiator may not call signal_raise() again without an intervening call to signal_lower().

The implementer must increment a level counter on every signal_raise() call, and decrement it on signal_lower(). The signal can not be treated as lowered until the counter reaches zero again. This allows multiple sources of the signal.

The signal target should handle the case where a signal is lowered directly when after it has been raised and treat it as a valid pulse. The target should also allow the signal to remain raised for some time before it is lowered.

An object that does lookup of the signal interface in another object should have an attribute that can be set in the configuration to the target object. This attribute should either be of the Sim_Val_Object kind, or a list with two entries, one Sim_Val_Object and one Sim_Val_String. If the object only format is used in the configuration, the interface should be looked up using SIM_get_interface(), and if the list format it used the interface should be obtained with SIM_get_port_interface().

A class that wishes to implement several signal inputs should use named interfaces.

Note: The signal interface should be used instead of the simple-interrupt, pin and reset interfaces when writing new classes.

struct signal_interface {
        void (*signal_raise)(conf_object_t *NOTNULL obj);
        void (*signal_lower)(conf_object_t *NOTNULL obj);

#define SIGNAL_INTERFACE "signal"