belΒΆ
Basic Element of Logic (BEL) definition module.
This module contains the Bel class which represents a Basic Element of Logic in the
FPGA fabric.
BELs are the fundamental building blocks that can be placed and configured within tiles,
such as LUTs, flip-flops, and other logic elements.
ClassesΒΆ
Information about a single BEL. |
Module ContentsΒΆ
BelΒΆ
- class Bel(src, prefix, module_name, internal, external, configPort, sharedPort, configBit, belMap, userCLK, ports_vectors, carry, localShared)[source]ΒΆ
Information about a single BEL.
The information is parsed from the directory of the BEL in the CSV definition file. There are some things to be noted:
The parsed name will contain the prefix of the bel.
The
sharedPortattribute is a list of Tuples with the name of the port and IO information, which is not expanded out yet.If a port is marked as both shared and external, the port is considered as shared, as a result, signals like UserCLK will be in the shared port list, but not in the external port list.
- Parameters:
src (Path) β The source directory path of the BEL.
prefix (str) β The prefix of the BEL.
module_name (str) β The name of the module in the BEL.
internal (list[tuple[str, IO]]) β List of internal ports with their IO direction.
external (list[tuple[str, IO]]) β List of external ports with their IO direction.
configPort (list[tuple[str, IO]]) β List of configuration ports with their IO direction.
sharedPort (list[tuple[str, IO]]) β List of shared ports with their IO direction.
configBit (int) β The number of configuration bits of the BEL.
userCLK (bool) β Whether the BEL has userCLK port.
ports_vectors (dict[str, dict[str, tuple[IO, int]]]) β Dictionary structure to save vectorized port information.
localShared (dict[str, tuple[str, IO]]) β Local shared ports of the BEL.
- Variables:
src (Path) β The source directory of the BEL given in the CSV file.
prefix (str) β The prefix of the BEL given in the CSV file.
name (str) β The name of the BEL, extracted from the source directory.
module_name (str) β The name of the module in the bel. For verlog we can extract this from the RTL. For VHDL this is currently the same as name.
filetype (HDLType) β The file type of the BEL.
inputs (list[str]) β All the normal input ports of the BEL.
outputs (list[str]) β All the normal output ports of the BEL.
externalInput (list[str]) β All the external input ports of the BEL.
externalOutput (list[str]) β All the external output ports of the BEL.
configPort (list[tuple[str, IO]]) β All the config ports of the BEL.
sharedPort (list[tuple[str, IO]]) β All the shared ports of the BEL.
configBit (int) β The number of config bits of the BEL.
language (str) β Language of the BEL. Currently only VHDL and Verilog are supported.
belFeatureMap (dict[str, dict]) β The feature map of the BEL.
withUserCLK (bool) β Whether the BEL has userCLK port. Default is False.
ports_vectors (dict[str, dict[str, tuple[IO, int]]]) β Dict structure to save vectorized port information {<porttype>:{<portname>:(IO, <portwidth>)}}
carry (dict[str, dict[IO, str]]) β Carry chains by name. carry_name : {direction : port_name}
localShared (dict[str,tuple[str, IO]]) β {RESET/ENABLE,(portname, IO)} Local shared ports of the BEL. Are only shared in the Tile, not in the fabric.
- Raises:
ValueError β If the file type is not recognized (not .sv, .v, .vhd, or .vhdl).