Skip to content

About

BLogic MCU - RISC-V (CV32E40P, RV32IMC) microcontroller SoC with a custom AXI4 interconnect and a TinyConv keyword-spotting AI accelerator (21× vs software). sky130 GDSII signed off at 27 MHz, runs on a Genesys 2 FPGA at 50 MHz, JTAG debug. TEKNOFEST 2026 Chip Design Competition - OSTİM Technical University

Topics

Resources

Stars

20 stars

Watchers

0 watching

Forks

Repository files navigation

BLogic MCU

A 32-bit RISC-V microcontroller with a hardware accelerator for keyword spotting, implemented on FPGA and signed off as a sky130 ASIC.

CI License: GPL-3.0 OSHWA certified: TR000011 ISA: RV32IMC ASIC: sky130 FPGA: 50 MHz

BLogic MCU on a Digilent Genesys 2 board, classifying feature vectors in real time

The design on a Digilent Genesys 2 board, classifying feature vectors sent over UART by the competition's test tool. The OLED shows the class reported by the accelerator, the inference cycle count and the UART rates. Slowed down 1.6 times.

Overview

BLogic MCU was designed by BLogic Microelectronic team (Ostim Technical University) for the Microcontroller Design category of the TEKNOFEST 2026 Chip Design Competition.

The processor is the OpenHW Group CV32E40P (RV32IMC). It is connected through two OBI-to-AXI4 bridges to an AXI4 interconnect with a boot ROM, instruction and data SRAMs, and an AXI4-Lite peripheral bus carrying two UARTs, GPIO, a timer, an I2C master and a QSPI master used for booting from external flash. A JTAG port based on the PULP riscv-dbg debug module allows debugging with OpenOCD and gdb.

The accelerator implements the TFLite Micro Speech "tiny conv" model (Conv2D, ReLU, fully connected layer, argmax) with INT8 arithmetic. On the same SoC it completes one inference in 459,016 cycles, compared with 9,684,726 cycles for the software implementation on the CV32E40P, a speed-up of 21x. Its classification matches the TFLite interpreter on 1000 of 1000 test inputs.

The same RTL has been implemented on a Kintex-7 FPGA at 50 MHz and taken through the sky130 flow with LibreLane to a GDS that passes DRC and LVS and is signed off at 27 MHz.

Summary of results

Area Result
Processor CV32E40P, RV32IMC, machine mode only, 4-stage pipeline
Memory 1 KB boot ROM, 8 KB instruction SRAM, 8 KB data SRAM, 30 KB AI SRAM
Verification 90.7 % line and 88.5 % branch coverage; riscv-arch-test 72 of 73 signatures identical to Spike; Spike lockstep co-simulation; UVM environment for five blocks; AXI protocol checkers; a report and a register access log for every test
FPGA Digilent Genesys 2 (XC7K325T), 50 MHz, WNS +2.433 ns
ASIC sky130, 18.77 mm² die, 27 SRAM macros, DRC 0, LVS match, gate-level simulation with SDF passing at 27.0 MHz

Layout of the delivered sky130 GDS   Block diagram of BLogic MCU

Left: the delivered sky130 layout, with the power grid and fill cells hidden. Right: block diagram.

Getting started

With Docker

The simulation image contains Verilator, Spike, the RISC-V GCC toolchain and the sources, so nothing else has to be installed:

docker run --rm ghcr.io/blogic-microelectronic/blogic-mcu

The default command runs two programs on the Verilator model of the SoC, a boot test that prints over UART_0 and one inference on the AI accelerator, and prints a summary. It takes about half a minute. Any make target can be given instead, or a shell can be opened in the environment:

docker run --rm ghcr.io/blogic-microelectronic/blogic-mcu make regression
docker run --rm -it ghcr.io/blogic-microelectronic/blogic-mcu bash

The latest tag follows the main branch. Each release also has its own tag, for example ghcr.io/blogic-microelectronic/blogic-mcu:v1.1, which does not change.

From source

The simulation flow is verified with Verilator 5.052 and the xPack RISC-V GCC 13.2 toolchain. Spike is needed for the lockstep and ISA compliance tests. Installation instructions are given in section 8 of the documentation; on Ubuntu 24.04, .github/scripts/build_tools.sh builds the same versions that the CI uses.

git clone --depth 1 https://github.com/BLogic-Microelectronic/BLogic-MCU.git
cd BLogic-MCU
make compile && make sim

make sim builds the firmware, simulates the SoC in Verilator and prints the message "Hello World from BLogic MCU!" received on UART_0. make regression runs the main regression suite, make test-all runs all 18 verification components, and make help lists every available target.

The --depth 1 option downloads only the latest version of the repository and is recommended, because earlier commits contain large physical design files.

Test reports and register access logs

Every simulation test ends with a short summary of what it did:

---- Test report: UART_0 transmit (Hello World) -----------------------------------------
  What it proves : Proves that the core boots from the instruction SRAM, executes C code and
                   transmits a string through UART_0 at the programmed clocks-per-bit value.
  Test files     : sw/tests/uart_hello.c, sw/drivers/blogic_mcu.h, sw/common/crt0.S, ...
  Design files   : rtl/peripherals/uart_axil.sv, rtl/peripherals/uart_tx.v, rtl/soc_top.sv, ...
  Checks         : 1 passed, 0 failed (listed in the report)
  Registers      : UART0: CPB, TDR, CFG  (15,750 accesses)
  Bus protocol   : 10 interfaces checked, no violations
  Result         : PASS (125,739 cycles)
  Report         : logs/sim/uart_hello/report.txt
  Access log     : logs/sim/uart_hello/bus_trace.log

Two files are written into the log directory of the test:

  • report.txt states what the test proves, every check it made with its result, how often each register was read and written, the results of the bus protocol checkers and coverage monitors, and where the other log files are.
  • bus_trace.log lists every access on the peripheral bus in time order, with the cycle, the address, the register name and the value, together with the checks of the test:
#        cycle  access  address     register         data
            69  write  0x40000000  UART0.CPB        0x000001b2
            79  write  0x4000000c  UART0.TDR        0x00000048  'H'
            82  write  0x40000010  UART0.CFG        0x00000003
            85  read   0x40000010  UART0.CFG        0x00000001
              ... the access above repeated 512 more times, last at cycle 4181

At the end of make test-all, logs/report_index.txt lists the report of every test. make sim MEM_TRACE=1 also writes mem_trace.log with every load and store of the processor. What each test checks, which files it uses and which registers it accesses is described in docs/TESTS.md.

Continuous integration

Every push runs the simulation test suite on GitHub Actions (workflow): lint, the regression, the block and SoC tests, the ISA compliance suite, UVM, the JTAG debug tests with OpenOCD and gdb, the ASIC top level with the SRAM macro models, and coverage. The Docker image is built and tested by a second workflow before it is published.

Physical design outputs

The large outputs of the ASIC flow (GDS, ODB, Magic database, SDF and SPEF files) are not stored in the repository. They are attached as downloadable files to every release, and bash asic/fetch_results.sh downloads and verifies them. The signoff reports, the configuration and the layout images remain in asic/. The repository exactly as submitted to the competition is preserved under the tag teknofest-final.

Documentation

The complete design and verification report is in docs/DOCUMENTATION.md. Frequently used sections:

Open source hardware certification

OSHW certification mark with the UID TR000011

BLogic MCU is certified as open source hardware by the Open Source Hardware Association (OSHWA). Version 1.1 was certified on 22 October 2026 under the UID TR000011.

License

This project is licensed under the GNU General Public License v3.0 only; see LICENSE. Third-party components included in the repository retain their original licenses, which are listed in LICENSING.md.

About

BLogic MCU - RISC-V (CV32E40P, RV32IMC) microcontroller SoC with a custom AXI4 interconnect and a TinyConv keyword-spotting AI accelerator (21× vs software). sky130 GDSII signed off at 27 MHz, runs on a Genesys 2 FPGA at 50 MHz, JTAG debug. TEKNOFEST 2026 Chip Design Competition - OSTİM Technical University

Topics

Resources

Stars

20 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages