How bsc-loca/sauria works
SAURIA is a configurable SystemVerilog CNN convolution/GEMM accelerator, with Python tools for preparing workloads and generating stimuli, running simulations, and checking results. The main workflow starts with a user workload, creates convolution and hardware configuration, prepares tensor and memory data, then runs the RTL accelerator and reads simulation outputs. The README also identifies on-the-fly convolution lowering and configurable arithmetic/array shapes as core capabilities. RTL relationships are shown only where documented; sampled evidence focuses on the Python tools, so uncertain internal RTL connections are omitted.
Main entry points: sauria_lib.py Simulation API · multipliers.py Multiplier selection · sauria_core.sv Accelerator core · file_helper.py Stimuli and results
Components 23
Python workload tools
- Simulation API
Python/src/sauria_lib.py - Convolution mapping
Python/src/sauria_lib.py - Hardware configuration
Python/src/config_helper.py - Tensor and DRAM data
Python/src/data_helper.py - Stimuli and results
Python/src/file_helper.py - Execution model
Python/src/execution_model.py - Approximate FP arithmetic
Python/src/approx_comp/fp.py - Multiplier selection
Python/src/approx_comp/multipliers.py - Booth multiplier
Python/src/approx_comp/abm.py - Broken array multiplier
Python/src/approx_comp/bam.py - Log multiplier
Python/src/approx_comp/lm.py - UDM multiplier
Python/src/approx_comp/udm.py - Approximate adders
Python/src/approx_comp/adders.py
RTL control and dataflow
- SAURIA subsystem
RTL/src/sauria_subsystem.sv - Dataflow controller
RTL/src/df_controller/df_controller_top.sv - DMA engine
RTL/src/dma/dma_top.sv
RTL compute and memory
- Accelerator core
RTL/src/sauria_core/sauria_core.sv - Systolic array
RTL/src/sauria_core/systolic_array/sa_array.sv - Operand feeders
RTL/src/sauria_core/data_feeder/ifmap_feeder.sv - Local SRAM
RTL/src/sauria_core/sram/sram_top.sv - Partial-sum manager
RTL/src/sauria_core/psm/psm_top.sv
Other components
- Workload user
- RTL simulator
Connections 25
- Workload user → Simulation API: configures
README.md - Simulation API → Convolution mapping: maps workload
Python/src/sauria_lib.py - Simulation API → Hardware configuration: builds registers
Python/src/sauria_lib.py - Simulation API → Tensor and DRAM data: prepares tensors
Python/src/sauria_lib.py - Simulation API → Execution model: models execution
Python/src/sauria_lib.py - Simulation API → Stimuli and results: generates stimuli
Python/src/sauria_lib.py - Stimuli and results → Hardware configuration: packs commands
Python/src/file_helper.py - Stimuli and results → Tensor and DRAM data: converts data
Python/src/file_helper.py - Execution model → Approximate FP arithmetic: evaluates arithmetic
Python/src/execution_model.py - Approximate FP arithmetic → Multiplier selection: uses multipliers
Python/src/approx_comp/fp.py - Approximate FP arithmetic → Approximate adders: uses adders
Python/src/approx_comp/fp.py - Multiplier selection → Booth multiplier: dispatches
Python/src/approx_comp/multipliers.py - Multiplier selection → Broken array multiplier: dispatches
Python/src/approx_comp/multipliers.py - Multiplier selection → Log multiplier: dispatches
Python/src/approx_comp/multipliers.py - Multiplier selection → UDM multiplier: dispatches
Python/src/approx_comp/multipliers.py - Stimuli and results → RTL simulator: provides stimuli
README.md - RTL simulator → SAURIA subsystem: runs design
README.md - SAURIA subsystem → Dataflow controller: coordinates
- SAURIA subsystem → DMA engine: transfers memory
- SAURIA subsystem → Accelerator core: connects accelerator
- Accelerator core → Systolic array: computes GEMM
- Accelerator core → Operand feeders: supplies operands
- Accelerator core → Local SRAM: uses SRAM
- Accelerator core → Partial-sum manager: manages sums
- RTL simulator → Stimuli and results: writes outputs