The aim of today's class is to read/write values from/to memory mapped device. Use following template:
#define t0 $8 #define t1 $9 #define t2 $10 #define s0 $16 #define s1 $17 #define s2 $18 .globl start .set noat .set noreorder .ent start start: // Your code here nop .end start
Work in Mips.exe simulator. 8-bit I/O port is memory mapped on address 0xBF900000.
s1
on output device (LEDs).
array: .word 1, 2, 4, 8, 16, 32, 65, 48, 66, 51, 54, 65, 80, 79, 1, 2, 3
s1
.
Circuit realization of I/O device on PCI and more modern is too complex for the introductory course like ours. For our educational purposes it is more suitable to show you circuit realization of old ISA bus.
lspci
utility display PCI devices in your computer.
lspci -xxx
display config space of given PCI device and for selected devices find out:
In lectures you have seen examples of building blocks usable for PCI device, including control finite state automaton. Extend this design to add a configuration read and write. (A diagram for config read and write: )
lspci
utility