| |||
| Home > Creating a New Component > Behavior section > Master port | |||
The character doubler component requires a master port to initiate incoming requests from the slave port and forward them to the connected slave port of another component.
The only action required in the code is declaring the master port:
master port<SerialData> out;
Remove or comment out any behavior definitions in the master
port section in SerialCharDoubler.lisa.
The actual connection is done using connection mode in the Block Diagram view.
The master port uses the same protocol as the slave port.
This is not a requirement, but is useful here because only one behavior
is implemented, dataTransmit, and the rest is just
forwarded.