Producer/Consumer Model: Master Module
Master programs Producer to send a given number of packets to Consumer, and Consumer to expect that many packets from Producer.
I/O ports Master is connected to Producer and Consumer via 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). Master sends register read and write commands to Producer and Consumer over output register buses, defined in bus_types.hpp. Upon a register read, Master expects to receive the content of that register over an input register data bus. Master also expects to receive a Boolean done signal from Consumer, over an input bus, after Consumer has received all expected packets from Producer. Threads Master has a single parallel thread: - controller() programs Producer to send a given number of packets, and Consumer to await those packets. Master then waits for Consumer to send a done signal. Upon which, Master repeats this activity once more. Register files Master instantiates Producer and Consumer register-files, in order to prepare register commands. |
Print control Master has print-control functionality to select which type of print-out debug messages are shown. Implemented in: master_print_ctrl.cpp/.hpp |