10.6. Direct Input and Output Ports

Two of the Diamond 570T CPU core’s unique features are its 32-bit direct input and output ports, which are the same I/O ports found on the Diamond 108Mini processor core. The input and output wires on these ports connect directly to special software-visible registers in the processor core and can be used for general-purpose signaling, interrupt generation, serial communications, pulse-width modulation, and other sorts of status and control functions on the SOC. Special instructions read and manipulate the contents of these port registers. Table 10.6 lists these port instructions.

Table 10.6. Input- and output-port register instructions
InstructionDefinition
CLRB_EXPSTATEClear any bit in the output-port register. Leave other bits unchanged.
SETB_EXPSTATESet any one bit of the 32-bit output-port register. Leave other bits unchanged.
READ_INPWIRERead the 32-bit value of the input-port register and place result in a general-purpose register-file entry.
RUR_EXPSTATERead the 32-bit value of the output-port register and place the result in a general-purpose register-file entry.
WRMASK_EXPSTATEWrite a masked bit pattern to the output-port register.
WUR_EXPSTATEWrite a 32-bit value to the output-port register.

The input and output ports can be accessed in one cycle just like simple 32-bit registers attached to one of the processor’s local-memory buses, but without the speculation-related read side effects to deal with. (Note: All RISC processors must contend with speculation-related side effects; it’s the nature of pipeline-based RISC processor architecture.) The special input-and output-port instructions mask the processor’s speculative operations so that firmware developers can completely ignore the issue when using these ports.

The 32-bit input and output ports on the Diamond 570T CPU have no handshaking lines. Devices driving the processor’s input-port wires cannot determine when the processor has read the state of these wires. Similarly, there is no output signal to alert devices that the output-port wires have changed state. They simply change state. Consequently, external devices connected to the Diamond 570T processor core’s direct input and output ports are somewhat uncoupled from the timing of the firmware manipulating those ports. In this sense, the Diamond 570T processor core’s input and output ports are like the direct input and output lines on a block of custom-designed RTL logic and are intended to be used the same way.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.98.190