BIO is a RISC-V-based I/O coprocessor designed for the Baochip-1x open-source 22nm SoC, conceived as an alternative to the Raspberry Pi PIO. After cloning and studying the PIO, the author found it consumed excessive FPGA resources and had a poor critical path due to its CISC-like instruction complexity and barrel shifters. The BIO instead uses four PicoRV32 RV32E cores extended with blocking FIFO registers, GPIO access registers, and a 'snap-to-quantum' timing mechanism that eliminates cycle-counting for real-time I/O. Compared to the PIO, BIO uses roughly half the logic area and achieves 4x higher clock rates in ASIC, at the cost of lower IPC. Each core gets 4 kiB of private RAM. Programming examples cover DMA with multi-core coordination, SPI bit-banging in assembly, and WS2812C LED driving in C. A C toolchain using Zig/clang compiles to Rust assembly macros, keeping the Xous OS build pure-Rust. The design is open source and patent-free.

29m read timeFrom bunniestudios.com
Post cover image
Table of contents
BackgroundLessons Learned from the PIOA Caveat to PIO UsersAn Alternative ApproachRISC with a TwistDesign of the BIOA Simple BIO Code ExampleDetails of the FIFO and GPIOsSnapping to Quantum: A SPI ExampleTrade-offs Everywhere: Area, Clock Rates and Code SpaceOn Memory Trade-OffsCoding for BIO in CReflectionResources

Sort: