FABulous.fabric_generator.gen_fabric.gen_switchmatrix#
Switch matrix generation module for FABulous FPGA tiles.
This module generates RTL code for configurable switch matrices within FPGA tiles. Switch matrices handle the routing of signals between tile ports, BEL inputs/outputs, and jump wires. The module supports various configuration modes and multiplexer styles.
Key features: - CSV and list file parsing for switch matrix configurations - Support for custom and generic multiplexer implementations - Configuration bit calculation and management - Debug signal generation for switch matrix analysis - Multiple configuration modes (FlipFlop chain, Frame-based)
Classes#
Functions#
- genTileSwitchMatrix(writer, fabric, tile, switch_matrix_debug_signal)[source]#
- Parameters:
writer (CodeGenerator)
fabric (Fabric)
tile (Tile)
switch_matrix_debug_signal (bool)
- Return type:
None
Generate the RTL code for the tile switch matrix.
The switch matrix generated will be based on the matrixDir attribute of the tile. If the given file format is .csv, it will be parsed as a switch matrix .csv file. If the given file format is .list, the tool will convert the .list file into a switch matrix with specific ordering first before progressing. If the given file format is Verilog or VHDL, then the function will not generate anything.
- param tile:
A tile object.
- type tile:
Tile
- raises ValueError:
If matrixDir does not contain a valid file format.