This preview shows page 1. Sign up to view the full content.
Unformatted text preview: rface
hardware (e.g., registers), try to share registers if possible but
beware of unwanted interactions if a signal goes to more than one
If out of ports, must force sharing by adding hardware to make a
dedicated port sharable (e.g., adding registers and enable signals
for the registers)
If still run out of ports, then most encode signals to increase
bandwidth (e.g., use decoders)
If all else fails, then backup position is memory-mapped I/O, i.e.,
what we would have done if we had a bare microprocessor " %+ 5 % $ .
0 ' %+ .
0 & We need 8 8-bit registers to store/write the 64 bits Suppose we wanted a 64-bit I/O port
If EN is true, then we have an output pin
If EN is false, then we have an input pin Select the EN addresses to be $...000 to $...007
Select OUT addresses to be $...010 to $...017 Read 15th bit
load value at address $...011 (2nd set of OUT regs)
logical AND with 0x80
bit position 7 of result is 15th bit Write the 47th bit
read OUT register at $...015
set bit position 7 to desired value ( or with 0x80)
store in $...015
load EN re...
View Full Document
This document was uploaded on 04/04/2014.
- Fall '09