Network Model: Router Module
A Router directs transactions that it receives on its input ports to its output ports.
The number of input and output ports is programmable during build time. I/O ports Node is connected to blocking FIFO ports. A thread accessing such a port will be paused, if the FIFO is empty (on a read) or full (on a write). Threads Router spawns as many parallel threads as there are input ports: - in_controller() receives transactions on an input port. Router spawns as many pairs of parallel threads as there are output ports: - out_picker() selects a single transaction at a time among all those available in all the input Buffers, and forwards it to its out_controller() counterpart. - out_controller() sends transactions out through an output port. The method of spawning these parallel threads is explained in https://sclive.wordpress.com/2008/01/10/systemc-tutorial-threads-methods-and-sc_spawn/ Configuration file Router configuration determines: - Whether router is enabled - Each of its input Buffer depth - Node IDs, that are connected to the output ports. - Picker delay. |
Print control Router has print-control functionality to select which type of print-out debug messages are shown. Implemented in: router_print_ctrl.cpp/.hpp |