Firmware

This repository stores a collection of VHDL modules developed as part of the HotRIO project. The primary objective of this repository is to provide a centralized resource for reusable VHDL modules.

Repository Structure

This repository follows a similar structure to a vertical project, defined in the Quality Assurance documentation Here. Each module is stored in a directory inside ‘Source/modules/’ with the following subdirectory structure:

.
├── ip_cores
├── globals
└── modules/
   └── module_name/
      ├── hdl/
      │   ├── module_name.vhd
      │   ├── supporting_ip1.vhd
      │   ├── supporting_ip2.vhd
      │   └── ...
      ├── sim/
      │   ├── module_name_tb.vhd
      │   └── module_name_vunit.py
      └── test/
            ├── module_name_test.vhd
            ├── module_name_test.lpf
            └── module_name_test.ldc

To facilitate the use of automatic tools for testing a building the projects, the following files should be present in the module directory:

  • .vhd file with the module name inside of the hdl folder. This module should be the top-level entity of the module.

  • Testbench file with the module name, plus ‘_tb’ inside of the sim folder. If Vunit is used, an associated python file must be present with the same name.

  • Test file with the module name, plus ‘_test’ inside of the test folder. Moreover, a .lpf and a .ldc file must be present in the same folder. This test should target physical test on the FPGA development board (if applicable).

IP cores

The Ip cores are defined as the modules that are vendor-specific and fpga-specific. These modules are used to build the test projects for the modules.

Module

Description

ecp5_dual_ring_wrapper

Preconfigured version of ecp5_quad_wrapper for HotRIO Dual Ring architectures

ecp5_quad_wrapper

Custom wrapper for the ECP5UM(5G) quad channel 8b/10b transceiver.

sed_wrapper

Custom wrapper for the SED Primitive (not to be combined with Distributed RAM).

Globals

The ‘globals’ package must be included in every HotRIO project as it contains important constants for HotRIO and for the PCS communication.

Globals package link

Modules

Module

Description

adc_interface

Interface module for the ADCs.

backplane_interface

Modules and scripts to create custom interfaces over the HotRIO backplane.

clock_mux

Glitchless clock multiplexer with no hardware IP usage

crio_interface

Interface module for the communication with a compact-RIO

delay_counter

Counts the clock cycles between two signals.

dmp_module

Measures network latency of a HotRIO Dual Ring slave node with respect to the master on each ring.

ethernet_ipv4_udp_formatter

Packages data from a fifo into a ethernet frame (using udp).

fast_logic_solver

Runtime-configurable programmable logic module with pulse train I/O support.

g0_interrupt_controller

Transfers interrupt requests from firmware components to the STM32-G0 MCU.

hotrio_master_rx

Hotrio Master RX module.

hotrio_master_tx

Hotrio Master TX module.

hotrio_slave

Hotrio Slave module.

minmax_downsampler

Reduces data volume by selecting min and/or max values from a data stream.

octo_spi

Half-duplex Octo-SPI interface for ECP5U.

pulse_stretcher

Pulse stretcher module.

register_tree

Register tree components and automatic generation.

scheduler_rx

Address-based demultiplexer for received HotRIO packets

scheduler_tx

Round-robin scheduler for HotRIO packet transmission with broadcast address support

signal_cdc

Clock Domain Crossing (CDC) module.

timestamp_counter

Nanoseconds counter synchronized with PPS and externally provided timestamps

threshold_comparator

Generates an alarm based on comparison between input data and a dual threshold.

vspi

Virtual SPI module.

i2c_master

I2C Master module.