upd readme
This commit is contained in:
parent
429697db18
commit
56586bcdf1
20
README.md
20
README.md
@ -12,13 +12,13 @@ To save on PCB cost, the board is smaller than a 'true' SBus board; the hardware
|
||||
|
||||
## Current status
|
||||
|
||||
2021-10-09: The original V1.0 design has been replaced by the newer V1.2 design, which supports fewer leds, more interrupt lines, a proper USB connector, and a Pmod connector. The old VHDL gateware is not supported on the V1.2, only the Migen/Litex one.
|
||||
2021-11-20: The V1.2 design with the Migen gateware is ongoing, with several peripherals to combine (limited by the FPGA size).
|
||||
|
||||
## The hardware
|
||||
|
||||
Directory 'sbus-to-ztex'
|
||||
|
||||
The custom board is a SBus-compliant (I hope...) board, designed to receive a [ZTex USB-FPGA Module 2.13](https://www.ztex.de/usb-fpga-2/usb-fpga-2.13.e.html) as a daughterboard. The ZTex module contains the actual FPGA (Artix-7), some RAM, programming hardware, etc. The SBus board contains level-shifters ICs to interface between the SBus signals and the FPGA, a serial header, a Led, a JTAG header, a micro-sd card slot, a USB micro-B connector, and a (Pmod)[https://digilent.com/shop/boards-and-components/system-board-expansion-modules/pmods/] connector. It supports every SBus feature except the optional parity (i.e. it can do both slave and master modes) and interrupt level 7 - 1 to 6 are connected.
|
||||
The custom board is a SBus-compliant (I hope...) board, designed to receive a [ZTex USB-FPGA Module 2.13](https://www.ztex.de/usb-fpga-2/usb-fpga-2.13.e.html) as a daughterboard. The ZTex module contains the actual FPGA (Artix-7), some RAM, programming hardware, etc. The SBus board contains level-shifters ICs to interface between the SBus signals and the FPGA, a serial header, a Led, a JTAG header, a micro-sd card slot, a USB micro-B connector, and a (Pmod)[https://digilent.com/shop/boards-and-components/system-board-expansion-modules/pmods/] connector. It supports every SBus feature except the optional parity (i.e. it can do both slave and master modes) and interrupt level 1 to 6 are connected.
|
||||
|
||||
The PCB was designed with Kicad 5.0
|
||||
|
||||
@ -31,7 +31,7 @@ Directory 'sbus-to-ztex-gateware-migen'
|
||||
The gateware is written in the Migen language, choosen because that's what [Litex](https://github.com/enjoy-digital/litex/) uses.
|
||||
It implements a simple CPU-less Litex SoC built around a Wishbone bus, with a custom bridge between the SBus and the Wishbone.
|
||||
|
||||
A ROM, a SDRAM controller ([litedram](https://github.com/enjoy-digital/litedram) to the on-board DDR3), a TRNG (using the [NeoRV32](https://github.com/stnolting/neorv32) TRNG), an USB OHCI (host controller, using the Litex wrapper around the [SpinalHDL](https://github.com/SpinalHDL/SpinalHDL) implementation) and a Curve25519 Crypto Engine (taken from the [Betrusted.IO](https://betrusted.io/) project) are connected to that bus. As a test feature for the Pmod connector, a cg3-compatible framebuffer can be implemented using a custom RGA222 VGA Pmod.
|
||||
A ROM, a SDRAM controller ([litedram](https://github.com/enjoy-digital/litedram) to the on-board DDR3), a TRNG (using the [NeoRV32](https://github.com/stnolting/neorv32) TRNG), an USB OHCI (host controller, using the Litex wrapper around the [SpinalHDL](https://github.com/SpinalHDL/SpinalHDL) implementation), a Curve25519 Crypto Engine (taken from the [Betrusted.IO](https://betrusted.io/) project) and a Litex micro-sd controller can be connected to that bus. As a test feature for the Pmod connector, a cg3-compatible or cg6-compatible framebuffer can be implemented using a custom RGA222 VGA Pmod.
|
||||
|
||||
### Details
|
||||
|
||||
@ -39,15 +39,17 @@ Master access to the SBus by the host are routed to the Wishbone to access the v
|
||||
|
||||
The ROM doesn't do much beyond exposing the devices' existence and specifications to the host.
|
||||
|
||||
The SDRAM has its own custom DMA controller, using native Litedram DMA to the memory, and some FIFO to/from the SBus. A custom NetBSD driver exposes it as a drive on which you can swap. It's also usable as a 'fast', volatile disk (for e.g. /tmp or similar temporary filesystem). It could use a interrupt line, but it's not yet implemented in software.
|
||||
The USB OHCI DMA (USB 1.1) is bridged from the Wishbone to the SBus by having the physical addresses of the Wishbone (that match the virtual addresses from NetBSD DVMA allocations) to the bridge. Reads are buffered by block of 16 bytes; currently writes are unbuffered (and somewhat slow, as they need a full SBus master cycle for every transaction of 32 bits or less). The standard NetBSD OHCI driver is used, with just a small custom SBus-OHCI driver mirroring the PCI-OHCI one. It uses the interrupt level 4 by default. It connects to the micro-B USB connector, an a cable such as [this one](https://www.startech.com/en-us/cables/uusbotgra) allows to expose a conventional USB type A connector for either an external (preferably self-powered) USB Hub or a single low-power device.
|
||||
|
||||
The SDRAM has its own custom DMA controller, using native Litedram DMA to the memory, and some FIFO to/from the SBus. A custom NetBSD driver exposes it as a drive on which you can swap. It's also usable as a 'fast', volatile disk (for e.g. /tmp or similar temporary filesystem). It can use a interrupt line, but software support isn't there yet (only synchronous polling).
|
||||
|
||||
The micro-sd card controller is using a similar driver to the SDRAM, so is also currently limited to sychronous polling and lack of support for interrupts (or removability). It also has similar level of support in the PROM, enabling it as a boot device (of course using a NetBSD kernel with appropriate support). For its DMA engine, the micro-sd controller uses the same Wishbone/SBus bridge as designed for the USB OHCI.
|
||||
|
||||
The TRNG has a NetBSD driver to add entropy to the entropy pool.
|
||||
|
||||
The USB OHCI DMA (USB 1.1) is bridged from the Wishbone to the SBus by having the physical addresses of the Wishbone (that match the virtual addresses from NetBSD DVMA allocations) to the bridge. Reads are buffered by block of 16 bytes; currently writes are unbuffered (and somewhat slow, as they need a full SBus master cycle for every transaction of 32 bits or less). The standard NetBSD OHCI driver is used, with just a small custom SBus-OHCI driver mirroring the PCI-OHCI one. It uses the interrupt level 4 by default. It connects to the micro-B USB connector, an a cable such as [this one](https://www.startech.com/en-us/cables/uusbotgra) allows to expose a conventional USB type A connector for either an external (preferably self-powered) USB Hub or a single low-power device.
|
||||
The Curve25519 Engine currently exposes an IOCTL to do the computation, which has yet to be integrated usefully in e.g. OpenSSL. It could use a interrupt line, but it's not yet implemented in software. The load/store unit used the same Wishbone/SBus bridge as designed for the USB OHCI.
|
||||
|
||||
The Curve25519 Engine currently exposes an IOCTL to do the computation, which has yet to be integrated usefully in e.g. OpenSSL. It could use a interrupt line, but it's not yet implemented in software.
|
||||
|
||||
The cg3 emulation requires the custom Pmod, and colors are vert limited at 2 bits per channel, so it's for testing mostly. It can work as a PROM console, a NetBSD console, and with X11, all as an non-accelerated framebuffer. Resolution can be arbitrary but the current design cannot handle timings requirements for 1920x1080 or higher ; 1280x1024 @ 60 Hz is known to work.
|
||||
The cg3 emulation requires the custom Pmod, and colors are vert limited at 2 bits per channel, so it's for testing mostly. It can work as a PROM console, a NetBSD console, and with X11, all as an non-accelerated framebuffer. Resolution can be arbitrary but is fixed in the bitstream at synthesis time, the current design can go up to 1920x1080@60Hz. cg6 emulation is similar but uses a micro-coded VexRiscv core to emulate some of the cg6 hardware acceleration, enough to accelerate the PROM console, the NetBSD console and X11 EXA acceleration in NetBSD 9.0. However, for both the cg3 and the cg6, some unknown bug causes corruption of the UVM (virtual memory) subsystem when running X11.
|
||||
|
||||
### Special Notes
|
||||
|
||||
@ -59,5 +61,5 @@ As not everything lives in the same clock domain, the design also use a Wishbone
|
||||
|
||||
Directory 'NetBSD'
|
||||
|
||||
Some basic drivers for NetBSD 9.0/sparc to enable the devices as described above.
|
||||
Some basic drivers for NetBSD 9.0/sparc to enable the devices as described above (cg3 and cg6 which use unmodifed NetBSD drivers and USB OHCI where only the SBus-OHCI layer is needed, the NetBSD OHCI driver is used unmodified).
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user