gen_tileΒΆ
Tile generation module for FABulous FPGA architecture.
This module generates RTL code for individual tiles and super tiles within an FPGA fabric. It handles the integration of Basic Elements of Logic (BELs), switch matrices, and configuration infrastructure into complete tile implementations.
Key features:
Individual tile RTL generation with BEL instantiation
Switch matrix integration and port mapping
Configuration data routing and management
Supertile wrapper generation for hierarchical designs
Support for both VHDL and Verilog code generation
External I/O port handling and clock distribution
FunctionsΒΆ
|
Generate a super tile wrapper for given super tile. |
|
Generate the RTL code for a tile given the tile object. |
Module ContentsΒΆ
- generateSuperTile(writer, superTile, frame_bits_per_row=32, max_frame_per_col=20, disable_user_clk=False, config_bit_mode=ConfigBitMode.FRAME_BASED) None[source]ΒΆ
Generate a super tile wrapper for given super tile.
Creates a hierarchical wrapper that instantiates multiple individual tiles and manages their interconnections. The supertile handles:
Internal tile-to-tile connections within the supertile
External port mapping to fabric-level connections
Configuration data distribution to sub-tiles
Clock signal routing and buffering
External I/O port aggregation
- Parameters:
writer (CodeGenerator) β The code generator instance for RTL output
superTile (SuperTile) β Super tile object containing tile map and configuration
frame_bits_per_row (int) β Number of configuration bits per row for frame-based configuration
max_frame_per_col (int) β Maximum number of frames per column for frame-based configuration
disable_user_clk (bool) β If True, the UserCLK port will not be generated or connected
config_bit_mode (ConfigBitMode) β The configuration bit mode to use (frame-based or FlipFlop chain)
- generateTile(writer, tile, frame_bits_per_row=32, max_frame_per_col=20, disable_user_clk=False, config_bit_mode=ConfigBitMode.FRAME_BASED) None[source]ΒΆ
Generate the RTL code for a tile given the tile object.
This function creates the complete RTL implementation for a tile, including:
Port declarations for all tile connections
BEL instantiations with proper port mapping
Switch matrix instantiation and connections
Configuration infrastructure (frame-based or FlipFlop chain)
Clock and reset signal distribution
Jump wire handling for long-distance connections
We first check if we need a configuration port. Currently we assume that each primitive needs a configuration port. However, a switch matrix can have no switch matrix multiplexers (e.g., when only bouncing back in border termination tiles)
TODO: we donβt do this and always create a configuration port for each tile. This dangle the CLK and MODE ports hanging in the air, which will throw a warning
Each switch matrix entity is build up is a specific order: 1.a) interconnect wire INPUTS (in the order defined by the fabric file,) 2.a) BEL primitive INPUTS (in the order the BEL-VHDLs are listed
in the fabric CSV) within each BEL, the order from the entity is maintained Note that INPUTS refers to the view of the switch matrix! Which corresponds to BEL outputs at the actual BEL
3.a) JUMP wire INPUTS (in the order defined by the fabric file) 1.b) interconnect wire OUTPUTS 2.b) BEL primitive OUTPUTS
- Again: OUTPUTS refers to the view of the switch matrix which corresponds to
BEL inputs at the actual BEL
3.b) JUMP wire OUTPUTS The switch matrix uses single bit ports (std_logic and not std_logic_vector)!!!
- Parameters:
writer (CodeGenerator) β The code generator instance for RTL output
tile (Tile) β The tile object containing BELs and port information
frame_bits_per_row (int) β Number of configuration bits per row for frame-based configuration
max_frame_per_col (int) β Maximum number of frames per column for frame-based configuration
disable_user_clk (bool) β If True, the UserCLK port will not be generated or connected
config_bit_mode (ConfigBitMode) β The configuration bit mode to use (frame-based or FlipFlop chain)
- Raises:
FileNotFoundError β Only raised for VHDL output. If required component files (e.g., switch matrix or config memory) are missing.