|
|
|
|
I/O Devices
This page describes the included I/O Device components.
These components are used to allow your processor to interact with the
outside world in useful ways.
Module: SerialUART
This module allows the processor to
communicate with a PC to recieve programs via the RS232 serial port.
The BIOS for the processor has been configured to recieve an entire
program, then launch it by jumping to the program's start point. You
can also use the serial port to send data back to the PC, where it will
be displayed if you are running the bootloader software or some other
serial terminal software. It is meant to be used in conjunction with
Memory_Toplevel or some other memory management unit.
To use the serial controller, use the following addresses:
- 0 - LW/LB returns 1 if the serial device has input waiting to be read, 0 otherwise
- 1 - LB returns the byte at the front of the recieve queue
- 2 - LB returns 1 if the serial device can accept input to send, 0 otherwise
- 3 - SB to this address to tell the serial component to remove an item from the front of the queue
- 4 - SB to this address to send a byte back to another serial device
The pins with names starting with "RS232" should be connected to output pins with the same names on your top level design.
Port Description:
|
|
Name |
Dir |
Width |
Description |
clk |
In |
1 |
Clock that the processor is running on |
reset |
In |
1 |
Resets the Serial I/O Component. Must be used once to prepare for recieving data. |
InAddress |
In |
6 |
Address to access - controls the functionality of the component |
InData |
In |
32 |
The data to send back to another serial device |
InWE |
In |
2 |
Write
enable for the serial component |
DataOut |
Out |
32 |
Data retrieved from the Serial I/O Component |
RS232_TX_DATA |
Out |
1 |
Outgoing data to another serial device |
RS232_CTS_OUT |
Out |
1 |
RS232 flow control pin |
RS232_RX_DATA |
In |
1 |
Incoming data from another serial device |
RS232_RTS_IN |
In |
1 |
RS232 flow control pin |
|
|
|
Symbol:
|
|
![](io_files/memorymappedserial.gif)
|
|
Module: MemoryMappedBoardIO
This module countrols the LEDs and
gets signals from the buttons on the board. If you store a number to
the LEDs, the lowest 4 bits will be represented on the LEDs. You can
load data from this location to determine if a button has been pushed.
The addresses to use with this module are as follows:
- 0 - Returns/Sets the status of the LEDs. The lowest 4 bits of the number stored are represented on the LEDs.
- 4 - Polls button 1, returns 1 if pressed, 0 otherwise. (Corresponds to the UP button on the board)
- 8 - Polls button 2, returns 1 if pressed, 0 otherwise. (Corresponds to the DOWN button on the board)
- 12 - Polls button 3, returns 1 if pressed, 0 otherwise. (Corresponds to the LEFT button on the board)
- 16 - Polls button 4, returns 1 if pressed, 0 otherwise. (Corresponds to the RIGHT button on the board)
- 20 - Polls button 5, returns 1 if pressed, 0 otherwise. (Corresponds to the ENTER button on the board)
Port Description:
|
|
Name |
Dir |
Width |
Description |
CLK |
In |
1 |
Clock pin |
IOAddress |
In |
6 |
The address to determine which functionality to poll/write to. |
IOData |
In |
32 |
The data to write to the device. Only the lower 4 bits are used, and only when storing to address 0. |
IOWE |
In |
2 |
Write Enable signal for the LEDs. Only used when address provided is 0. |
Reset |
In |
1 |
Resets the registers in this module |
IODataOut |
Out |
32 |
Data returned by the module. It corresponds to the button's status or the status of the LEDs depending on the address provided. |
nLEDBus |
Out |
4 |
The signals for the LEDs. These have already been inverted, so if a bit is set to 1, the LED will light up. |
|
|
Symbol:
|
|
![](io_files/memorymappedio.gif)
|
|
Module: VGA_Output
This module allows the processor to
control a VGA display such as the monitors that we have connected to the boards. The control of the display is divided into
two sections - the color plane and character plane. In order to set a particular location on the screen, store a byte to the
character plane to place an ASCII character on the screen, then store a byte to the color plane in the same location to set the
color of the character. Each plane has 75 rows and 100 columns, and addresses increase from left to right across rows.
The VGA controller character plane starts at 0x8000C000 and ends at 0x8000DD4B while the color plane starts at
0x8000E000 and ends at 0x8000FD4B. In order to write to these planes, you must use a SB command. SW commands are not supported
by the VGA controller.
To set a color, store one of the following values to a location on the color plane:
- BLACK = 0x0
- NAVY = 0x1
- GREEN = 0x2
- TEAL = 0x3
- MAROON = 0x4
- PURPLE = 0x5
- OLIVE = 0x6
- SILVER = 0x7
- GREY = 0x8
- BLUE = 0x9
- LIMEGREEN = 0xA
- CYAN = 0xB
- RED = 0xC
- MAGENTA = 0xD
- YELLOW = 0xE
- WHITE = 0xF
Port Description:
|
|
Name |
Dir |
Width |
Description |
CLK |
In |
1 |
Clock that the processor is running on |
VGAClock |
In |
1 |
Clock that the VGA controller runs on |
reset |
In |
1 |
Resets the component. |
AddressIn |
In |
6 |
Location on the character or color plane to write data to |
DataIn |
In |
32 |
Data to write to either the character or color plane |
CharWE |
In |
2 |
Write enable for the character plane |
ColorWE |
In |
2 |
Write enable for the color plane |
CSYNCH |
Out |
1 |
Color synchronization signal |
HSYNCH |
Out |
1 |
Horizontal synchronization signal |
VSYNCH |
Out |
1 |
Vertical synchronization signal |
BLANK_Z |
Out |
1 |
Signals to clear screen |
Px_CLK |
Out |
1 |
Pixel Clock signal |
VGA_OUT_BLUE |
Out |
8 |
Controls blue channel output |
VGA_OUT_GREEN |
Out |
8 |
Controls green channel output |
VGA_OUT_RED |
Out |
8 |
Controls red channel output |
|
|
|
Symbol:
|
|
![](io_files/vgaoutput.gif)
|
|
|