Added link to pinmux
[libreriscv.git] / crypto_router_asic.mdwn
1 # Crypto-router ASIC
2
3 * NLnet page: [[nlnet_2021_crypto_router]]
4 * Top-level bugreport: <https://bugs.libre-soc.org/show_bug.cgi?id=589>
5 * Pinmux page: [[crypto_router_pinmux]]
6
7 # Specifications
8
9 All of these are entirely Libre-Licensed or are to be written as Libre-Licensed:
10
11 * 300 mhz single-core,
12 [Libre-SOC](https://git.libre-soc.org/?p=soc.git;a=blob;f=README.md;hb=HEAD)
13 OpenPOWER CPU with
14 [[openpower/sv/bitmanip]] extensions
15 * 180/130 nm (TBD)
16 * 5x [[shakti/m_class/RGMII]] Gigabit Ethernet PHYs with
17 [SRAM](https://github.com/adamgreig/daqnet/blob/master/gateware/daqnet/ethernet/rmii.py)
18 on-chip, built-in.
19 * 2x USB [[shakti/m_class/ULPI]] PHYs
20 * Direct DMA interface (independent bulk transfer)
21 * [JTAG](https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/debug/jtag.py;hb=HEAD),
22 GPIO, I2C, PWM, UART, SPI, QSPI, SD/MMC
23 * On-board Dual-ported SRAM (for Packet Buffers)
24 * Opencores [[shakti/m_class/sdram]]
25 * Wishbone interfaces to all peripherals
26 * [XICS ICP / ICS](https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/interrupts/xics.py;hb=HEAD)
27 Interrupt Controller
28
29
30
31 # Example packet transfer
32
33 * Packet comes in on RGMII port 1. Each PHY has its own dual-ported SRAM
34 * Packet is **directly** stored in internal (dual-ported SRAM) by
35 the RGMII PHY itself
36 * Interrupt notification is sent to the processor (XICS)
37 * Processor inspects packet over Wishbone interface directly
38 connected to 2nd SRAM port.
39 * Processor computes, based on decoding the ETH Frame, where the
40 packet must be sent to (which other RGM-II port: e.g. Port 2)
41 * Processor initiates Memory-to-Memory DMA transfer
42 * DMA Memory-to-Memory transfer, using Wishbone Bus, copies the ETH Frame
43 from one on-board SRAM to the target on-board SRAM associated with Port 2.
44 * DMA Engine generates interrupt (XICS) to the CPU to say it is completed
45 * Processor notifies target RGM-II PHY to activate "send" of frame out
46 through target RGM-II port 2.
47
48 # Testing and Verification
49
50 We will need full HDL simulations as well as post P&R simulations.
51 These may be achieved as follows:
52
53 * ISA-level unit tests as well as Formal Correctness Proofs.
54 Example [bpermd proof](https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/logical/formal/proof_bpermd.py;hb=HEAD)
55 and individual unit tests for the
56 [Logical pipeline](https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/fu/logical/test/test_pipe_caller.py;hb=HEAD)
57 * [Litex sim.py](https://git.libre-soc.org/?p=libresoc-litex.git;a=blob;f=sim.py;hb=HEAD)
58 with some peripherals developed in c++ as verilator modules
59 * nmigen-based OpenPOWER Libre-SOC core co-simulation such as
60 this unit test,
61 [test_issuer.py](https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/simple/test/test_issuer.py;hb=HEAD)
62 * [cocotb pre/post PnR](https://git.libre-soc.org/?p=soc-cocotb-sim.git;a=tree;f=ls180;hb=HEAD) including GHDL, Icarus and Verilator
63 (where best suited)
64
65 Actual instructions being developed (bitmanip) may therefore be
66 unit tested prior to deployment. Following that, rapid simulations
67 may be achieved by running Litex (the same HDL may also easily
68 be uploaded to an FPGA). When it comes to Place-and-Route of the
69 ASIC, the cocotb simulations may be used to verify that the GDS-II
70 layout has not been "damaged" by the PnR tools.
71
72 Peripherals functionality tests must also be part of the simulations,
73 particularly using cocotb, to ensure that they remain functional after PnR.
74 Supercomputer access for compilation of verilator and/or cxxrtl is available
75 through [[fed4fire]]
76