The zip module can input words from a 4-bit port, and output words to a 4-bit port as if these were four 1-bit ports.
Function that outputs 4 words to a single 4-bit buffered port.
Each word is output to one of the 4 bits serialised.
Parameters: |
|
---|
Function that inputs 4 words from a single 4-bit buffered port.
Each word is input from one of the 4 bits serialised.
Parameters: |
|
---|---|
Returns: | the four words, the first word is bit 0, the 4th return value is bit 3 |
An example program is shown below. An input and/or output ports should be declared as buffered ports:
A function is called to output data, or to input data:
If you want to do both simultaneously, you will need to manually interleave the source code of the two functions.