mux2s_sc
Project Library Model Name Kind
sca_basic_libraries arithmetic_sc mux2s_sc SystemC Module

Ports

Name Interface Type Description
sc0_i sc_core::sc_in T input 0
sc1_i sc_core::sc_in T input 1
ctrl_i sc_core::sc_in bool control input
sc_o sc_core::sc_out T output

Description

multiplexer with 2 inports controlled by signal

Long Description

Discrete event module of a multiplexer from two inports to one outport switched by a control signal. If the value read from the  inport ctrl_i is false the module writes at each event at the input port 0 (sc0_i) to the outport sc_o. If the value read from ctrl_i is true the input value is read from input 1 (sc1_i) and written to sc_o.

The ports are of the type of the template parameter T. For the type T the assignment operator must be available.