lowRISC Minion internals

This lowRISC release introduces Minion cores, allowing I/O tasks to be offloaded from the Rocket. This goal is important because it provides a flexible platform to allow new and unusual devices to be supported. From Chapter 3: extract from Pulpino databook

Drawing

RISCV core overview from Pulpino databook

The Pulpino as delivered from ETH Zurich is a complete microcontroller, and as such is too large to support our FPGA platform. AXI-compatible busses and peripherals increase the size by 2-3 times. Consequently the decision was taken to only use the core of the previous system, now combined with some key new peripherals:

NameAddressOperationReset valueDescription
Program RAM0x00000000Read/WriteBoot programThe initial bootstrap program that can talk to the Rocket
Data RAM0x00100000Read/WriteBitstreamAny static data the bootstrap program might need
UART control0x00200000Read/WritezeroThe UART can only be used if a separate POD interface is purchased
UART status0x00300000Read/Writezero
SD RX FIFO0x00400000Read/WritezeroSD-card data will be received via this FIFO
SD TX FIFO/stat0x00500000Read/WritezeroSD-card data will be pre-loaded via this FIFO before a transaction
SD control/stat0x00600000Read/WritezeroThe SD-card IO subsystem is controlled via these registers
LED ctrl/DIP sw0x00700000Read/WritezeroWrite to LED and/or read from DIP switches
Shared memory0x00800000Read/WritezeroAn 8K byte window that can be read/written by Minion and Rocket
Keyboard intf0x00900000Read/WritezeroThe PS/2 keyboard may be polled or read at this address
VGA text buffer0x00A00000Read/WritezeroThe least significant byte in each 32-bit word is usable
N/A0x00B00000Read/Writezero
N/A0x00C00000Read/Writezero
N/A0x00D00000Read/Writezero
N/A0x00E00000Read/Writezero
Reserved0x00F00000Read/Writezero

To prevent problems with speculative pre-fetching, no auto incrementing on peripherals is supported. Therefore an I/O address must be written to before it will yield its first item of data. Although I/O addresses are described as R/W, to save unnecessary hardware, most will not read back what was written.

NameAddressOperationReset valueDescription
UART transmit0x00200000WritezeroAdd a byte to the UART transmit FIFO (2K entries)
UART baud rate`0x00200004Write87The UART baud rate is dependent on the overall system clock (20MHz)
UART advance FIFO0x00300000WritezeroThe UART receive FIFO advances when this register is written to
UART status0x00300000Read/Writezero

The built-in UART (only accessible via extra PMOD device), uses a simple protocol. Only the receive side is buffered in this version. Majority voting is implemented to reduce the impact of noise in the environment.

NameAddressOperationReset valueDescription
Key FIFO status0x00900000Read/WritezeroThe PS/2 keyboard may be polled or read at this address
Key FIFO output0x00900000Read/WritezeroThe PS/2 keyboard may be polled or read at this address

The keyboard FIFO has a 512 word buffer on input, and returns the scan code as its LSB, ASCII representation (British keyboards only), as MSB. The conversion to international alphabets may be done under Linux using its usual facilities. No provision to overwrite the code page is provided in this release, though it would be trivial to implement in hardware. The status output gives the number of keys pending and other FIFO information (see minion_soc.sv). Writing an arbitrary value to this address advances the FIFO to the next character.

NameAddressOperationReset valueDescription
VGA text buffer0x00A00000Read/WritezeroThe least significant byte in each 32-bit word is usable

The VGA compatible text display is straightforward in operation. No facility for hardware scrolling is offered, the font is a fixed ASCII-font without non-Roman support. No support for overwriting the font is provided though again, it would be trivial in hardware. The output is a fixed 1024x768 at 75Hz. The buffer is a fixed 16K bytes with a 64K memory map, of which only the LSB is used.

NameAddressOperationReset valueDescription
Shared memory0x00800000Read/WritezeroAn 8K byte window that can be read/written by Minion and Rocket

The shared memory is 8K bytes, operated as 32-bit quantities on both sides of the interface. No provision for collision detection or interrupts is included in this release. The shared memory appears as an extension to the block memory of the Rocket, consequently it starts at 0x40010000 with the standard Chisel memory map. No detection of the presence of the shared memory is made by the Boot ROM, consequently to detect the presence of the Minion

NameAddressOperationReset valueDescription
SD rx current FIFO0x00400000ReadzeroThe SD receive FIFO returns its top item when this register is read
SD rx advance FIFO0x00400000WritezeroThe SD receive FIFO advances when this register is written to
SD rx status0x00500000ReadzeroThe SD-card status is returned (legacy location)
SD tx load FIFO0x00500000WritezeroThe SD transmit FIFO receives data when this register is written to
SD align reg0x00600000WritezeroSector align register (not currently used)
SD clock din0x00600004WritezeroThe data input pin for the SD-clk divider protocol
SD argument0x00600008WritezeroThe SD-card command argument (such as sector offset for reads)
SD command0x0060000CWritezeroThe SD-card command number (such as reset/inquire/read/write)
SD setting0x00600010WritezeroThe SD-card setting (short/long/with data/read/write)
SD start0x00600014WritezeroThe SD-card command start register
SD reset0x00600018WritezeroThe SD-card reset control (clock, data or command)
SD blkcnt0x0060001CWritezeroThe SD-card number of blocks (currently ignored)
SD blksize0x00600020WritezeroThe SD-card block size (must be 512 except for inquiry commands)
SD timeout0x00600024WritezeroThe SD-card timeout for command and data responses (in clocks)
SD clock crtl0x00600028WritezeroThe SD-card clock divider control register (not supported in s/w)
SD resp[38:7]0x00600000ReadzeroThe SD-card response register
SD resp[70:39]0x00600004ReadzeroThe SD-card response register
SD resp[102:71]0x00600008ReadzeroThe SD-card response register
SD resp[133:103]0x0060000CReadzeroThe SD-card response register
SD cmd wait0x00600010ReadzeroThe SD-card actual waiting time for the last command
SD status0x00600014ReadzeroThe SD-card FIFO and state-machine status
SD packet[31:0]0x00600018ReadzeroThe SD-card last command packet sent (including CRC)
SD packet[47:32]0x0060001CReadzeroThe SD-card last command packet sent (including CRC)
SD data wait0x00600020ReadzeroThe SD-card actual waiting time for the last data transfer
SD transf cnt0x00600024ReadzeroThe SD-card number of 32-bit words transferred in a transaction
SD rx FIFO stat0x00600028ReadzeroThe SD-card receive FIFO status
SD tx FIFO stat0x0060002CReadzeroThe SD-card transmit FIFO status
SD card detect0x00600030ReadzeroThe SD-card present status
N/A0x00600034Read0xDEADBEEFUnused
N/A0x00600038Read0xDEADBEEFUnused
SD clock dout0x0060003CReadzeroThe SD-card clock divider response register (not supported in s/w)
SD align reg0x00600040ReadzeroThe SD-card delayed alignment register readback
SD clock din0x00600044ReadzeroThe SD-card delayed clock divider data input readback
SD argument0x00600048ReadzeroThe SD-card delayed argument readback
SD command0x0060004CReadzeroThe SD-card delayed command readback
SD setting0x00600050ReadzeroThe SD-card delayed setting readback
SD start0x00600054ReadzeroThe SD-card delayed start readback
SD reset0x00600058ReadzeroThe SD-card delayed reset readback
SD blkcnt0x0060005CReadzeroThe SD-card delayed block count readback
SD blksize0x00600060ReadzeroThe SD-card delayed block size readback
SD timeout0x00600064ReadzeroThe SD-card delayed timeout readback
SD clock ctrl0x00600068ReadzeroThe SD-card delayed clock control readback

Drawing

Minion core connectivity

For details of the SD-protocol, it may be helpful (caution: redacted information) to refer to the SD-association website.