update documentation on circuit model annotation on VPR architecture
This commit is contained in:
parent
7195564455
commit
089cc5e86e
|
@ -4,23 +4,16 @@ Bind circuit modules to VPR architecture
|
|||
----------------------------------------
|
||||
Each defined circuit model should be linked to an FPGA module defined in the original part of architecture descriptions. It helps FPGA-circuit creating the circuit netlists for logic/routing blocks. Since the original part lacks such support, we create a few XML properties to link to Circuit models.
|
||||
|
||||
SRAM
|
||||
~~~~
|
||||
|
||||
To link the defined circuit model of SRAM into the FPGA architecture description, a new line in XML format should be added under the XML node device. The new XML node is named as sram, which defines the area of an SRAM and the name of the circuit model to be linked. An example is shown as follows:
|
||||
Configuration Protocol
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<sram area=”int” circuit_model_name=”string”>
|
||||
<configuration_protocol>
|
||||
<organization type="<string>" circuit_model_name="<string>"/>
|
||||
</configuration_protocol>
|
||||
|
||||
<sram>
|
||||
<spice organization="string" circuit_model_name="scff"/>
|
||||
<verilog organization="string" circuit_model_name="scff"/>
|
||||
</sram>
|
||||
|
||||
* **area:** is expressed in terms of the number of minimum width transistors. The SRAM area defined in this line is used in the area estimation of global routing multiplexers. circuit_model_name should match the name of the circuit model that has been defined under XML node module_circuit_model. The type of the linked circuit model should be sram.
|
||||
|
||||
* **organization:** [scan-chain|memory_bank|standalone], is the type of configuration circuits.
|
||||
- ``type="scan_chain|memory_bank|standalone"`` Specify the type of configuration circuits.
|
||||
|
||||
:numref:`fig_sram` illustrates an example where a memory organization using memory decoders and 6-transistor SRAMs.
|
||||
|
||||
|
@ -32,19 +25,12 @@ To link the defined circuit model of SRAM into the FPGA architecture description
|
|||
|
||||
Example of a memory organization using memory decoders
|
||||
|
||||
.. note:: Currently circuit only supports standalone memory organization.
|
||||
.. note:: Currently FPGA-SPICE only supports standalone memory organization.
|
||||
|
||||
.. note:: Currently RRAM-based FPGA only supports memory-bank organization for Verilog Generator.
|
||||
|
||||
Here is an example.
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<sram area=”4” circuit_model_name=”sram6T”>
|
||||
|
||||
|
||||
Switch Boxes
|
||||
~~~~~~~~~~~~
|
||||
Switch Blocks
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Original VPR architecture description contains an XML node called switchlist under which all the multiplexers of switch blocks are described.
|
||||
To link a defined circuit model to a multiplexer in the switch blocks, a new XML property circuit_model_name should be added to the descriptions.
|
||||
|
@ -53,28 +39,27 @@ Here is an example:
|
|||
|
||||
.. code-block:: xml
|
||||
|
||||
<switchlist>
|
||||
<switch type=”mux” name=”string” R=”float” Cin=”float” Cout=”float” Tdel=”float” mux_trans_size=”float” buf_size=”float” circuit_model_name=”string”/>
|
||||
</switchlist>
|
||||
<switch_block>
|
||||
<switch type="mux" name="<string>" circuit_model_name="<string>"/>
|
||||
</switch_block>
|
||||
|
||||
* **circuit_model_name:** should match a circuit model whose type is mux defined under module_circuit_models.
|
||||
- ``circuit_model_name="<string>"`` should match a circuit model whose type is ``mux`` defined in :ref:`circuit_library`.
|
||||
|
||||
|
||||
Connection Blocks
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
To link the defined circuit model of the multiplexer to the Connection Blocks, a circuit_model_name should be added to the definition of Connection Blocks switches. However, the original architecture descriptions do not offer a switch description for connection boxes as they do for the switch blocks.
|
||||
Therefore, FPGA-circuit requires a new XML node called **cblock** under the root XML node architecture, where a switch for connection blocks can be defined.
|
||||
To link the defined circuit model of the multiplexer to the Connection Blocks, a ``circuit_model_name`` should be annotated to the definition of Connection Blocks switches.
|
||||
|
||||
Here is the example:
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<cblock>
|
||||
<switch type=”mux” name=”string” R=”float” Cin=”float” Cout=”float” Tdel=”float” mux_trans_size=”float” buf_size=”float” circuit_model_name=”string”/>
|
||||
</cblock>
|
||||
<connection_block>
|
||||
<switch type="ipin_cblock" name="<string>" circuit_model_name="<string>"/>
|
||||
</connection_block>
|
||||
|
||||
* **circuit_model_name:** should match a circuit model whose type is mux defined under module_circuit_models.
|
||||
- ``circuit_model_name="<string>"`` should match a circuit model whose type is ``mux`` defined in :ref:`circuit_library`.
|
||||
|
||||
Channel Wire Segments
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -84,10 +69,10 @@ Similar to the Switch Boxes and Connection Blocks, the channel wire segments in
|
|||
.. code-block:: xml
|
||||
|
||||
<segmentlist>
|
||||
<segment freq=”float” length=”int” type=”string” Rmetal=”float” Cmetal=”float” circuit_model_name=”string”/>
|
||||
<segment name="<string>" circuit_model_name="<string>"/>
|
||||
</segmentlist>
|
||||
|
||||
* circuit_model_name: should match a circuit model whose type is chan_wire defined under module_circuit_models.
|
||||
- ``circuit_model_name="<string>"`` should match a circuit model whose type is ``chan_wire`` defined in :ref:`circuit_library`.
|
||||
|
||||
Primitive Blocks inside Multi-mode Configurable Logic Blocks
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -97,85 +82,86 @@ Each primitive block, i.e., the leaf ``pb_types``, should be linked to a valid c
|
|||
The ``circuit_model_name`` should match the given name of a ``circuit_model`` defined by users.
|
||||
|
||||
.. code-block:: xml
|
||||
|
||||
<pb_type_annotations>
|
||||
<!-- physical pb_type binding in complex block IO -->
|
||||
<pb_type name="io" physical_mode_name="physical"/>
|
||||
<pb_type name="io[physical].iopad" circuit_model_name="iopad" mode_bits="1"/>
|
||||
<pb_type name="io[inpad].inpad" physical_pb_type_name="io[physical].iopad" mode_bits="1"/>
|
||||
<pb_type name="io[outpad].outpad" physical_pb_type_name="io[physical].iopad" mode_bits="0"/>
|
||||
<!-- End physical pb_type binding in complex block IO -->
|
||||
|
||||
<!-- physical pb_type binding in complex block CLB -->
|
||||
<!-- physical mode will be the default mode if not specified -->
|
||||
<pb_type name="clb">
|
||||
<!-- Binding interconnect to circuit models as their physical implementation, if not defined, we use the default model -->
|
||||
<interconnect name="crossbar" circuit_model_name="mux_2level"/>
|
||||
</pb_type>
|
||||
<pb_type name="clb.fle" physical_mode_name="physical"/>
|
||||
<pb_type name="clb.fle[physical].fabric.frac_logic.frac_lut6" circuit_model_name="frac_lut6" mode_bits="0"/>
|
||||
<pb_type name="clb.fle[physical].fabric.ff" circuit_model_name="static_dff"/>
|
||||
<!-- Binding operating pb_type to physical pb_type -->
|
||||
<pb_type name="clb.fle[n2_lut5].lut5inter.ble5.lut5" physical_pb_type_name="clb.fle[physical].fabric.frac_logic.frac_lut6" mode_bits="1" physical_pb_type_index_factor="0.5">
|
||||
<!-- Binding the lut5 to the first 5 inputs of fracturable lut6 -->
|
||||
<port name="in" physical_mode_port="in[0:4]"/>
|
||||
<port name="out" physical_mode_port="lut5_out" physical_mode_pin_rotate_offset="1"/>
|
||||
</pb_type>
|
||||
<pb_type name="clb.fle[n2_lut5].lut5inter.ble5.ff" physical_pb_type_name="clb.fle[physical].fabric.ff"/>
|
||||
<pb_type name="clb.fle[n1_lut6].ble6.lut6" physical_pb_type_name="clb.fle[physical].fabric.frac_logic.frac_lut6" mode_bits="0">
|
||||
<!-- Binding the lut6 to the first 6 inputs of fracturable lut6 -->
|
||||
<port name="in" physical_mode_port="in[0:5]"/>
|
||||
<port name="out" physical_mode_port="lut6_out"/>
|
||||
</pb_type>
|
||||
<pb_type name="clb.fle[n1_lut6].ble6.ff" physical_pb_type_name="clb.fle[physical].fabric.ff" physical_pb_type_index_factor="2" physical_pb_type_index_offset="0"/>
|
||||
<!-- End physical pb_type binding in complex block IO -->
|
||||
</pb_type_annotations>
|
||||
|
||||
<!-- Multi-mode BLE -->
|
||||
<pb_type name="ble" num_pb="10" physical_mode_name="ble_phy"/>
|
||||
<!-- Physical implementation of BLE shown in Fig. :ref:`` -->
|
||||
<mode name="ble_phy" disabled_in_packing="true"/>
|
||||
<!-- Define a 6-input LUT in BLE and link it to circuit model -->
|
||||
<pb_type name="flut6_phy" circuit_model_name="frac_lut6">
|
||||
<input name="in" num_pins="6"/>
|
||||
<output name="lut4_out" num_pins="4"/>
|
||||
<output name="lut5_out" num_pins="2"/>
|
||||
<output name="lut6_out" num_pins="1"/>
|
||||
</pb_type>
|
||||
<pb_type name="lut4_phy" circuit_model_name="lut4">
|
||||
<input name="in" num_pins="4"/>
|
||||
<output name="out" num_pins="1"/>
|
||||
</pb_type>
|
||||
<pb_type name="adder_phy" num_pb="2" circuit_model_name="adder">
|
||||
<input name="a" num_pins="1"/>
|
||||
<input name="b" num_pins="1"/>
|
||||
<input name="cin" num_pins="1"/>
|
||||
<output name="cout" num_pins="1"/>
|
||||
<output name="sumout" num_pins="1"/>
|
||||
</pb_type>
|
||||
<pb_type name="ff_phy" num_pb="2" circuit_model_name="dff">
|
||||
<input name="D" num_pins="1"/>
|
||||
<output name="Q" num_pins="1"/>
|
||||
<clock name="clk" num_pins="1"/>
|
||||
</pb_type>
|
||||
<interconnect>
|
||||
<!-- Routing multiplexers are omitted in this example. -->
|
||||
</interconnect>
|
||||
</mode>
|
||||
<!-- Arithmetic mode of BLE shown in Fig. 2(b)-->
|
||||
<mode name="flut4_arithmetic"/>
|
||||
<pb_type name="flut4_arith" num_pb="4"/>
|
||||
<!-- Define a virtual 4-input LUT in BLE and link it to physical 6-input LUT defined at LINE 6 -->
|
||||
<pb_type name="lut4" mode_bits="01" physical_pb_type_name="flut6_phy">
|
||||
<!-- Define an input port and link it to its physical port defined at LINE 7 -->
|
||||
<input name="in" num_pins="4" physical_mode_pin="in[3:0]"/>
|
||||
<!-- Define an output port and link it to its physical port defined at LINE 8 -->
|
||||
<output name="out" num_pins="1" physical_mode_pin="lut4_out"/>
|
||||
</pb_type>
|
||||
<pb_type name="adder" num_pb="2" physical_pb_type_name="adder_phy">
|
||||
<input name="a" num_pins="1" physical_mode_pin="a"/>
|
||||
<input name="b" num_pins="1" physical_mode_pin="b"/>
|
||||
<input name="cin" num_pins="1" physical_mode_pin="cin"/>
|
||||
<output name="cout" num_pins="1" physical_mode_pin="cout"/>
|
||||
<output name="sumout" num_pins="1" physical_mode_pin="sumout"/>
|
||||
</pb_type>
|
||||
<pb_type name="ff" num_pb="2" physical_pb_type_name="ff_phy">
|
||||
<input name="D" num_pins="1" physical_mode_pin="D"/>
|
||||
<output name="Q" num_pins="1" physical_mode_pin="Q"/>
|
||||
<clock name="clk" num_pins="1" physical_mode_pin="clk"/>
|
||||
</pb_type>
|
||||
<interconnect>
|
||||
<!-- Routing multiplexers are omitted in this example. Full details can be found in [21] -->
|
||||
</interconnect>
|
||||
</pb_type>
|
||||
</mode>
|
||||
<!-- More operating modes can be defined -->
|
||||
</pb_type>
|
||||
.. option:: <pb_type name="<string>" physical_mode_name="<string>">
|
||||
|
||||
* **physical_mode_name:** tell the name of the mode that describes the physical implementation of the configurable block. This is critical in modeling actual circuit designs and architecture of an FPGA. Typically, only one physical_mode should be specified for each multi-mode ``pb_type``.
|
||||
Specify a physical mode for multi-mode ``pb_type`` defined in VPR architecture.
|
||||
|
||||
* **idle_mode_name:** tell the name of the mode that the ``pb_type`` is configured to be by default. This is critical in building circuit netlists for unused logic blocks.
|
||||
.. note:: This should be applied to non-primitive ``pb_type``, i.e., ``pb_type`` have child ``pb_type``.
|
||||
|
||||
* **circuit_model_name:** should match a circuit model defined under ``module_circuit_models``. The ``circuit_model_name`` is mandatory for every leaf ``pb_type`` in a physical_mode ``pb_type``. For the interconnection type direct, the type of the linked circuit model should be wire. For multiplexers, the type of linked circuit model should be ``mux``. For complete, the type of the linked circuit model can be either ``mux`` or ``wire``, depending on the case.
|
||||
- ``name="<string>"`` specifiy the full name of a ``pb_type`` in the hierarchy of VPR architecture.
|
||||
|
||||
* **mode_bits** specifies the configuration bits for the ``circuit_model`` when operating at an operating mode. The length of ``mode_bits`` should match the ``port`` size defined in ``circuit_model``. The ``mode_bits`` should be derived from circuit designs while users are responsible for its correctness. FPGA-Bitstreamm will add the ``mode_bits`` during bitstream generation.
|
||||
- ``physical_mode_name="<string>"`` Specify the name of the mode that describes the physical implementation of the configurable block. This is critical in modeling actual circuit designs and architecture of an FPGA. Typically, only one ``physical_mode`` should be specified for each multi-mode ``pb_type``.
|
||||
|
||||
* **physical_pb_type_name** creates the link on ``pb_type`` between operating and physical modes. This syntax is mandatory for every leaf ``pb_type`` in an operating mode ``pb_type``. It should be a valid name of leaf ``pb_type`` in physical mode.
|
||||
.. note:: OpenFPGA will infer the physical mode for a single-mode ``pb_type`` defined in VPR architecture
|
||||
|
||||
* **physical_pb_type_index_factor** aims to align the indices for ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_pb_type_name`` is larger than 1, the index of ``pb_type`` will be multipled by the given factor.
|
||||
.. option:: <pb_type name="<string>" physical_pb_type_name="<string>" circuit_model_name="<string>"
|
||||
mode_bits="<int>" physical_pb_type_index_factor="<float>" physical_pb_type_index_offset="<int>">
|
||||
|
||||
* **physical_pb_type_index_offset** aims to align the indices for ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_pb_type_name`` is larger than 1, the index of ``pb_type`` will be shifted by the given factor.
|
||||
Specify the physical implementation for a primitive ``pb_type`` in VPR architecture
|
||||
|
||||
* **physical_mode_pin** creates the linke on ``port`` of ``pb_type`` between operating and physical modes. This syntax is mandatory for every leaf ``pb_type`` in an operating mode ``pb_type``. It should be a valid ``port`` name of leaf ``pb_type`` in physical mode and the port size should also match.
|
||||
.. note:: This should be applied to primitive ``pb_type``, i.e., ``pb_type`` have no children.
|
||||
|
||||
* **physical_mode_pin_rotate_offset** aims to align the pin indices for ``port`` of ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_mode_pin_rotate_offset`` is larger than zero, the pin index of ``pb_type`` (whose index is large than 1) will be shifted by the given offset.
|
||||
- ``name="<string>"`` specifiy the full name of a ``pb_type`` in the hierarchy of VPR architecture.
|
||||
|
||||
- ``physical_pb_type_name=<string>`` creates the link on ``pb_type`` between operating and physical modes. This syntax is mandatory for every primitive ``pb_type`` in an operating mode ``pb_type``. It should be a valid name of primitive ``pb_type`` in physical mode.
|
||||
|
||||
- ``circuit_model_name="<string>"`` Specify a circuit model to implement a ``pb_type`` in VPR architecture. The ``circuit_model_name`` is mandatory for every primitive``pb_type`` in a physical_mode ``pb_type``.
|
||||
|
||||
- ``mode_bits="<int>"`` Specify the configuration bits for the ``circuit_model`` when operating at an operating mode. The length of ``mode_bits`` should match the ``port`` size defined in ``circuit_model``. The ``mode_bits`` should be derived from circuit designs while users are responsible for its correctness. FPGA-Bitstreamm will add the ``mode_bits`` during bitstream generation.
|
||||
|
||||
- ``physical_pb_type_index_factor="<float>"`` aims to align the indices for ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_pb_type_name`` is larger than 1, the index of ``pb_type`` will be multipled by the given factor.
|
||||
|
||||
- ``physical_pb_type_index_offset=<int>`` aims to align the indices for ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_pb_type_name`` is larger than 1, the index of ``pb_type`` will be shifted by the given factor.
|
||||
|
||||
.. option:: <interconnect name="<string>" circuit_model_name="<string>">
|
||||
|
||||
- ``name="<string>"`` specifiy the name of a ``interconnect`` in VPR architecture. Different from ``pb_type``, hierarchical name is not required here.
|
||||
|
||||
- ``circuit_model_name="<string>"`` For the interconnection type direct, the type of the linked circuit model should be wire. For multiplexers, the type of linked circuit model should be ``mux``. For complete, the type of the linked circuit model can be either ``mux`` or ``wire``, depending on the case.
|
||||
|
||||
.. option:: <port name="<string>" physical_mode_port="<string>" physical_mode_pin_rotate_offset="<int>"/>
|
||||
|
||||
Link a port of an operating ``pb_type`` to a port of a physical ``pb_type``
|
||||
|
||||
- ``name="<string>"`` specifiy the name of a ``port`` in VPR architecture. Different from ``pb_type``, hierarchical name is not required here.
|
||||
|
||||
- ``physical_mode_pin="<string>" creates the link of ``port`` of ``pb_type`` between operating and physical modes. This syntax is mandatory for every primitive ``pb_type`` in an operating mode ``pb_type``. It should be a valid ``port`` name of leaf ``pb_type`` in physical mode and the port size should also match.
|
||||
|
||||
- ``physical_mode_pin_rotate_offset="<int>"`` aims to align the pin indices for ``port`` of ``pb_type`` between operating and physical modes, especially when an operating mode contains multiple ``pb_type`` (``num_pb``>1) that are linked to the same physical ``pb_type``. When ``physical_mode_pin_rotate_offset`` is larger than zero, the pin index of ``pb_type`` (whose index is large than 1) will be shifted by the given offset.
|
||||
|
||||
.. note::
|
||||
It is highly recommended that only one physical mode is defined for a multi-mode configurable block. Try not to use nested physical mode definition. This will ease the debugging and lead to clean XML description.
|
||||
|
|
|
@ -250,18 +250,30 @@ A circuit model may consist of a number of ports. The port list is mandatory in
|
|||
|
||||
- ``type="input|output|sram|clock"`` Specify the type of the port, i.e., the directionality and usage. For programmable modules, such as multiplexers and LUTs, SRAM ports MUST be defined. For registers, such as FFs and memory banks, clock ports MUST be defined.
|
||||
|
||||
.. note:: ``sram`` and ``clock`` ports are considered as inputs in terms of directionality
|
||||
|
||||
- ``prefix="<string>"`` the name of the port to appear in the autogenerated netlists. Each port will be shown as ``<prefix>[i]`` in Verilog/SPICE netlists.
|
||||
|
||||
.. note:: if the circuit model is binded to a ``pb_type`` in VPR architecture, ``prefix`` must match the port name defined in ``pb_type``
|
||||
|
||||
- ``lib_name="<string>"`` the name of the port defined in standard cells or customized cells. If not specified, this attribute will be the same as ``prefix``.
|
||||
|
||||
.. note:: if the circuit model comes from a standard cell library, using ``lib_name`` is recommended. This is because
|
||||
- the port names defined in ``pb_type`` are very diffrerent from the standard cells
|
||||
- the port sequence is very different
|
||||
|
||||
- ``size="<int>"`` bandwidth of the port. MUST be larger than zero.
|
||||
|
||||
- ``default_val="<int>"`` Specify default logic value for a port, which is used as the initial logic value of this port in testbench generation. Can be either 0 or 1. We assume each pin of this port has the same default value.
|
||||
|
||||
- ``circuit_model_name="<string>"`` Specify the name of the circuit model which is connected to this port.
|
||||
|
||||
.. note:: ``circuit_model_name`` is only valid when the type of this port is ``sram``.
|
||||
|
||||
- ``mode_select="true|false"`` Specify if this port controls the mode switching in a configurable logic block. This is due to that a configurable logic block can operate in different modes, which is controlled by SRAM bits.
|
||||
|
||||
.. note:: ``mode_select`` is only valid when the type of this port is ``sram``.
|
||||
|
||||
- ``is_global="true|false"`` can be either ``true`` or ``false``. Specify if this port is a global port, which will be routed globally. Note that when multiple global ports are defined with the same name, these global ports will be short-wired together.
|
||||
|
||||
- ``is_set="true|false"`` Specify if this port controls a set signal. All the set ports are connected to global set voltage stimuli in testbenches.
|
||||
|
@ -270,12 +282,6 @@ A circuit model may consist of a number of ports. The port list is mandatory in
|
|||
|
||||
- ``is_config_enable="true|false"`` Specify if this port controls a configuration-enable signal. Only valid when ``is_global`` is ``true``. This port is only enabled during FPGA configuration, and always disabled during FPGA operation. All the ``config_enable`` ports are connected to global configuration-enable voltage stimuli in testbenches.
|
||||
|
||||
.. note:: ``sram`` and ``clock`` ports are considered as inputs in terms of directionality
|
||||
|
||||
.. note:: ``circuit_model_name`` is only valid when the type of this port is ``sram``.
|
||||
|
||||
.. note:: ``mode_select`` is only valid when the type of this port is ``sram``.
|
||||
|
||||
.. note:: ``is_set``, ``is_reset`` and ``is_config_enable`` are only valid when ``is_global`` is ``true``.
|
||||
|
||||
.. note:: Different types of ``circuit_model`` have different XML syntax, with which users can highly customize their circuit topologies. See refer to examples of :ref:``circuit_model_example`` for more details.
|
||||
|
|
Loading…
Reference in New Issue