The Raptor-16 Microprocessor has 5 User Ports that can be used to transfer data in and out of the Microprocessor or used has additional Data Registers.
- By keeping a Port_Dout and a Port_Din unconnected a Port can be used has a set of 16 inputs and 16 outputs.
- By feeding a Port_Dout output into a Port_Din input a Port can be used has an additional Data Register.
It should be noted that when a Port_Dout and Port_Din are kept separate any instructions that performs a read-modify-write will probably not make much sense, this is due to a Port's input being totally unrelated to its output.
When a Port is to be used to output data only it is best configured in the feedback mode.
The external configuration of a Port does not effect the Microprocessor in any way, but it should effect the way code is written for it!
Beside the Din and Dout each Port has two additional signals associated with it, these being Read and Write. When the Microprocessor reads its source operand data from a Port (Port_Din) it will pulse the Read output, likewise when the Microprocessor writes its destination operand data to a Port (Port_Dout) it will pulse the Write output. The timing for these pulses are shown below:-
The above timing could well be generated from the execution of an instruction such as Move P0,P0. When the Microprocessor reads in the P0 source operand the read pulse will be high, and when the Microprocessor writes out the P0 destination operand the write pulse will be high.
If a Port's Read and Write signals are to be used in a handshake mechanism then the data on the Din input can be changed after the cycle where the Read Pulse is high and the data on the Dout output can be registered by the external logic in the cycle where the Write pulse is high.