Skip to content

Add Heterogeneous Tiles capability #1208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6c2692b
vpr: add heterogeneous tiles
acomodi Mar 25, 2020
0e7132e
arch: refactoring of pin location processing
acomodi Mar 25, 2020
71d28a4
fix compilation errors
acomodi Mar 25, 2020
56ed536
vpr: addressed review comments and fixed compilation errors
acomodi Mar 26, 2020
b86fa8d
update_arch: generate sub tiles in architecture files
acomodi Mar 27, 2020
3a4045a
vpr: remove equivalent sites from the physical tile type
acomodi Mar 27, 2020
0f07452
vpr: fix regression test issues related to heterogeneous tiles
acomodi Mar 27, 2020
7ad5b81
vpr: solve issue with place delay regression test
acomodi Mar 27, 2020
b33d4e9
libarch: remove debug print
acomodi Mar 28, 2020
85a1565
libarch: free sub tile name when destroying physical tiles
acomodi Mar 28, 2020
efe09a5
libarch: ensure that port with same name are equal among subtiles
acomodi Mar 28, 2020
494d2c4
place: is_swap_legal: check first if x and y locs are in range
acomodi Mar 29, 2020
7d3c097
heterogeneous: fix wrong pin indicization
acomodi Mar 30, 2020
73e80ec
run make format
acomodi Mar 30, 2020
1bb1784
heterogeneous: fix pin indexing
acomodi Mar 31, 2020
5504c87
vpr: move all references to z location to use sub_tile notation
acomodi Mar 31, 2020
9aaee31
heterogeneous: place: pick sub tiles that are compatible only
acomodi Mar 31, 2020
176685a
heterogeneous: add regression test to test sub tiles
acomodi Mar 31, 2020
a57e8be
vpr: print route now takes the correct blkid based on subtile loc
acomodi Mar 31, 2020
2dad53d
run make format
acomodi Mar 31, 2020
da80322
docs: update architecture reference with sub tiles
acomodi Mar 31, 2020
be28e00
heterogeneous: address review comments
acomodi Apr 2, 2020
a6197ef
heterogeneous: added sub tile strong reg test golden results
acomodi Apr 2, 2020
eae62e1
heterogeneous: added tutorial
acomodi Apr 6, 2020
dc6cca0
heterogeneous: added comments and changed some utility funcs names
acomodi Apr 6, 2020
3aa5f59
run make format
acomodi Apr 6, 2020
c3fc8cf
docs: addressed review comments for the heterogeneous tiles tutorial
acomodi Apr 8, 2020
550e1c1
place: added check on sub tile compatibility
acomodi Apr 8, 2020
a4028a6
doc: update heterogeneous tiles tutorial
acomodi Apr 8, 2020
9c837ca
place: added comments on the sub tile compatibility map
acomodi Apr 8, 2020
7d55973
vtr: modified architecture definitions to add sub tiles
acomodi Apr 9, 2020
84e48a9
vtr: change outstanding architectures
acomodi Apr 9, 2020
763528e
place: change variable names
acomodi Apr 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
367 changes: 191 additions & 176 deletions doc/src/arch/reference.rst

Large diffs are not rendered by default.

Binary file added doc/src/tutorials/arch/clock_tile_figure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 21 additions & 20 deletions doc/src/tutorials/arch/equivalent_sites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Below the user can find the implementation of this situation starting from an ex
<site pb_type="SLICEL_SITE" pin_mapping="direct"/>
</equivalent_sites>

<fc ...>
<pinlocations ...>
<fc />
<pinlocations />
</tile>
<tile name="SLICEM_TILE">
<input name="IN_A" num_pins="6"/>
Expand All @@ -54,8 +54,8 @@ Below the user can find the implementation of this situation starting from an ex
<site pb_type="SLICEM_SITE" pin_mapping="direct"/>
</equivalent_sites>

<fc ...>
<pinlocations ...>
<fc />
<pinlocations />
</tile>
</tiles>

Expand All @@ -71,8 +71,8 @@ Below the user can find the implementation of this situation starting from an ex
<output name="A" num_pins="1"/>
<output name="AMUX" num_pins="1"/>
<output name="AQ" num_pins="1"/>
<mode ...>
...
<mode />
/
</pb_type>
<pb_type name="SLICEM_SITE"/>
<input name="IN_A" num_pins="6"/>
Expand All @@ -85,8 +85,8 @@ Below the user can find the implementation of this situation starting from an ex
<output name="A" num_pins="1"/>
<output name="AMUX" num_pins="1"/>
<output name="AQ" num_pins="1"/>
<mode ...>
...
<mode />
/
</pb_type>
</complexblocklist>

Expand Down Expand Up @@ -123,8 +123,8 @@ To have the possibility to make VPR choose a ``SLICEM`` location when placing a
</site>
</equivalent_sites>

<fc ...>
<pinlocations ...>
<fc />
<pinlocations />
</tile>

With the above description of the ``SLICEM`` tile, the user can now have the ``SLICEL`` sites to be placed in ``SLICEM`` physical locations.
Expand All @@ -147,7 +147,7 @@ Below the user can find the implementation of this situation starting from an ex
<site pb_type="LEFT_IOPAD_SITE" pin_mapping="direct"/>
</equivalent_sites>

<fc ...>
<fc />
<pinlocations pattern="custom">
<loc side="left">LEFT_IOPAD_TILE.INPUT</loc>
<loc side="right">LEFT_IOPAD_TILE.OUTPUT</loc>
Expand All @@ -161,7 +161,7 @@ Below the user can find the implementation of this situation starting from an ex
<site pb_type="RIGHT_IOPAD_SITE" pin_mapping="direct"/>
</equivalent_sites>

<fc ...>
<fc />
<pinlocations pattern="custom">
<loc side="right">RIGHT_IOPAD_TILE.INPUT</loc>
<loc side="left">RIGHT_IOPAD_TILE.OUTPUT</loc>
Expand All @@ -173,14 +173,14 @@ Below the user can find the implementation of this situation starting from an ex
<pb_type name="LEFT_IOPAD_SITE">
<input name="INPUT" num_pins="1"/>
<output name="OUTPUT" num_pins="1"/>
<mode ...>
...
<mode />
/
</pb_type>
<pb_type name="RIGHT_IOPAD_SITE">
<input name="INPUT" num_pins="1"/>
<output name="OUTPUT" num_pins="1"/>
<mode ...>
...
<mode />
/
</pb_type>
</complexblocklist>

Expand All @@ -197,7 +197,7 @@ To avoid duplicating the complex logic blocks in ``LEFT`` and ``RIGHT IOPADS``,
<site pb_type="IOPAD_SITE" pin_mapping="direct"/>
</equivalent_sites>

<fc ...>
<fc />
<pinlocations pattern="custom">
<loc side="left">LEFT_IOPAD_TILE.INPUT</loc>
<loc side="right">LEFT_IOPAD_TILE.OUTPUT</loc>
Expand All @@ -211,7 +211,7 @@ To avoid duplicating the complex logic blocks in ``LEFT`` and ``RIGHT IOPADS``,
<site pb_type="IOPAD_SITE" pin_mapping="direct"/>
</equivalent_sites>

<fc ...>
<fc />
<pinlocations pattern="custom">
<loc side="right">RIGHT_IOPAD_TILE.INPUT</loc>
<loc side="left">RIGHT_IOPAD_TILE.OUTPUT</loc>
Expand All @@ -223,8 +223,9 @@ To avoid duplicating the complex logic blocks in ``LEFT`` and ``RIGHT IOPADS``,
<pb_type name="IOPAD_SITE">
<input name="INPUT" num_pins="1"/>
<output name="OUTPUT" num_pins="1"/>
<mode ...>
...
<mode>
...
</mode>
</pb_type>
</complexblocklist>

Expand Down
Binary file added doc/src/tutorials/arch/hclk_ioi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
189 changes: 189 additions & 0 deletions doc/src/tutorials/arch/heterogeneous_tiles.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
.. _heterogeneous_tiles_tutorial:

Heterogeneous tiles tutorial
============================

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need some higher-level motivation at the beginning. Focusing letting the reader know at a high level what this feature actually is, and where it can be useful. (e.g. multiple blocks of different types at the same x/y location, swappable by the placer).

This tutorial aims at providing information to the user on how to model sub tiles to enable *heterogeneous tiles* in VPR.

An *heterogeneous tile* is a tile that includes two or more site types that may differ in the following aspects:

- *Block types* (pb_type)
- *Fc* definition
- *Pin locations* definition
- *IO ports* definition

As a result, an *heterogeneous tile* has the possibility of having multiple block types at the same (*x*, *y*) location in the grid.
This comes with the introduction of a third spatial coordinate (sub-block) that identifies the placement of the block type within the x and y grid coordinate.

Moreover, the placer can choose and assign different locations for each block type within the same coordinates as well.

.. figure:: sub_tiles_grid.png

Device grid, with (x, y, sub-block) coordinates. Each block can be moved by the placer in all the three spatial dimensions.

To correctly model an architecture, each :ref:`arch_tiles` requires at least one sub tile definition. This represents a default
homogeneous architecture, composed of one or many instances of the sub tile within the physical tile (the number of such sub-tiles is referred to as the *capacity*).

To enhance the expressivity of VPR architecture, additional sub tiles can be inserted alongside with the default sub tile.
This enables the definition of the *heterogeneous tiles*.

With this new capability, the device grid of a given architecture does include a new sub-block coordinate that identifies the type of sub tile used and its actual location, in case the capacity is greater than 1.

Heterogeneous tiles examples
----------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want a bit of a description of what follows. Perhaps something like:

The following examples illustrate some potential use cases for heterogeneous tiles.


Following, there are two examples to illustrate some potential use cases of the *heterogeneous tiles*, that might be of interest to the reader.

.. note:: The examples below are a simplified versions of the real architectural specification.

Sub-tiles with different pin locations
######################################

The Xilinx Series 7 Clock tile is composed of 16 BUFGCTRL sites (pg. 36 of the `7 Series FPGAs
Clocking Resources <https://www.xilinx.com/support/documentation/user_guides/ug472_7Series_Clocking.pdf>`_ guide). Even though they are equivalent regarding the ports and Fc definition, some of the sites differ in terms of pin locations, as depicted by the simplified representation of the Clock tile in :numref:`clock_tile`.

.. _clock_tile:
.. figure:: clock_tile_figure.png

Simplified view of the Clock tile of the Xilinx Series 7 fabric.

Heterogeneous tiles come in hand to model this kind of tiles and an example is the following:

.. code-block:: XML

<tiles>
<tile name="BUFG_TILE">
<sub_tile name="BUFG_SUB_TILE_0" capacity="1">
<clock name="I0" num_pins="1"/>
<clock name="I1" num_pins="1"/>
<input name="CE0" num_pins="1"/>
<input name="CE1" num_pins="1"/>
<input name="IGNORE0" num_pins="1"/>
<input name="IGNORE1" num_pins="1"/>
<input name="S0" num_pins="1"/>
<input name="S1" num_pins="1"/>
<output name="O" num_pins="1"/>
<fc in_type="abs" in_val="2" out_type="abs" out_val="2"/>
<pinlocations pattern="custom">
<loc side="top">BUFG_SUB_TILE_0.I1 BUFG_SUB_TILE_0.I0 BUFG_SUB_TILE_0.CE0 BUFG_SUB_TILE_0.S0 BUFG_SUB_TILE_0.IGNORE1 BUFG_SUB_TILE_0.CE1 BUFG_SUB_TILE_0.IGNORE0 BUFG_SUB_TILE_0.S1</loc>
<loc side="right">BUFG_SUB_TILE_0.I1 BUFG_SUB_TILE_0.I0 BUFG_SUB_TILE_0.O</loc>
</pinlocations>
<equivalent_sites>
<site pb_type="BUFGCTRL" pin_mapping="direct"/>
</equivalent_sites>
</sub_tile>
<sub_tile name="BUFG_SUB_TILE_1" capacity="14">
<clock name="I0" num_pins="1"/>
<clock name="I1" num_pins="1"/>
<input name="CE0" num_pins="1"/>
<input name="CE1" num_pins="1"/>
<input name="IGNORE0" num_pins="1"/>
<input name="IGNORE1" num_pins="1"/>
<input name="S0" num_pins="1"/>
<input name="S1" num_pins="1"/>
<output name="O" num_pins="1"/>
<fc in_type="abs" in_val="2" out_type="abs" out_val="2"/>
<pinlocations pattern="custom">
<loc side="top">BUFG_SUB_TILE_1.S1 BUFG_SUB_TILE_1.I0 BUFG_SUB_TILE_1.CE1 BUFG_SUB_TILE_1.I1 BUFG_SUB_TILE_1.IGNORE1 BUFG_SUB_TILE_1.IGNORE0 BUFG_SUB_TILE_1.CE0 BUFG_SUB_TILE_1.S0</loc>
<loc side="right">BUFG_SUB_TILE_1.I0 BUFG_SUB_TILE_1.I1 BUFG_SUB_TILE_1.O</loc>
</pinlocations>
<equivalent_sites>
<site pb_type="BUFGCTRL" pin_mapping="direct"/>
</equivalent_sites>
</sub_tile>
<sub_tile name="BUFG_SUB_TILE_2" capacity="1">
<clock name="I0" num_pins="1"/>
<clock name="I1" num_pins="1"/>
<input name="CE0" num_pins="1"/>
<input name="CE1" num_pins="1"/>
<input name="IGNORE0" num_pins="1"/>
<input name="IGNORE1" num_pins="1"/>
<input name="S0" num_pins="1"/>
<input name="S1" num_pins="1"/>
<output name="O" num_pins="1"/>
<fc in_type="abs" in_val="2" out_type="abs" out_val="2"/>
<pinlocations pattern="custom">
<loc side="right">BUFG_SUB_TILE_2.S1 BUFG_SUB_TILE_2.I0 BUFG_SUB_TILE_2.CE1 BUFG_SUB_TILE_2.I1 BUFG_SUB_TILE_2.IGNORE1 BUFG_SUB_TILE_2.IGNORE0 BUFG_SUB_TILE_2.CE0 BUFG_SUB_TILE_2.S0</loc>
<loc side="left">BUFG_SUB_TILE_2.I0 BUFG_SUB_TILE_2.I1 BUFG_SUB_TILE_2.O</loc>
</pinlocations>
<equivalent_sites>
<site pb_type="BUFGCTRL" pin_mapping="direct"/>
</equivalent_sites>
</sub_tile>
</tile>
</tiles>

<complexblocklist>
<pb_type name="BUFGCTRL"/>
<clock name="I0" num_pins="1"/>
<clock name="I1" num_pins="1"/>
<input name="CE0" num_pins="1"/>
<input name="CE1" num_pins="1"/>
<input name="IGNORE0" num_pins="1"/>
<input name="IGNORE1" num_pins="1"/>
<input name="S0" num_pins="1"/>
<input name="S1" num_pins="1"/>
<output name="O" num_pins="1"/>
</pb_type>
</complexblocklist>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that after giving the XML, you need to have text which walks through what it represents. So something like:

The above `BUFG_TILE` contains three types of sub-tiles (`BUFGCTRL_0`, `BUFGCTRL_1` and `BUFGCTRL_2`).
While each sub-tile type can contain the same pb_type (equivalent_sites of `BUFGCTRL`), the differ in two ways:
    1) Each sub-tile has different pin locations. For example `BUFGCTRL_0` has the `I1` pins on the top side of the tile, while `BUFGCTRL_1` and `BUGCTRL_2` have them on the right and left sides respectively.
    2) Each sub-tile has a different 'capacity' (i.e. a different number of sites). `BUFGCTRL_1` and `BUFGCTRL_2` have capacity 4, while `BUFGCTRL_1` has capacity 8. As a result the `BUFG_TILE` can implement a total of 16 `BUFGCTRL` blocks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an aside, it may help to come up with a more distinct name for the sub-tiles in the example. BUFGCTRL_1 sub-tile is very similar to BUFGCTRL pb-type. Maybe use BUFGSUBTILE instead for clarity?

The above ``BUFG_TILE`` contains three types of sub-tiles (``BUFG_SUB_TILE_0``, ``BUFG_SUB_TILE_1`` and ``BUFG_SUB_TILE_2``).

While each sub-tile type contains the same pb_type (equivalent_sites of ``BUFGCTRL``), they differ in two ways:

1. Each sub-tile has different pin locations. For example ``BUFG_SUB_TILE_0`` has the ``I1`` pins on the top side of the tile, while ``BUFG_SUB_TILE_1`` and ``BUFG_SUB_TILE_2`` have them on the right and left sides respectively.
2. Each sub-tile has a different 'capacity' (i.e. a different number of sites). ``BUFG_SUB_TILE_1`` and ``BUFG_SUB_TILE_2`` have capacity 1, while ``BUFG_SUB_TILE_1`` has capacity 14. As a result the ``BUFG_TILE`` can implement a total of 16 ``BUFGCTRL`` blocks.

Sub-tiles containing different block types
##########################################

As another example taken from the Xilinx Series 7 fabric, the HCLK_IOI tile is composed of three different block types, namely BUFIO, BUFR and IDELAYCTRL.

.. figure:: hclk_ioi.png

Simplified view of the HCLK_IOI tile in the Xilinx Series 7 fabric.

The reader might think that it is possible to model this situation using the :ref:`arch_complex_blocks` to model this situation, with a ``<pb_type>`` containing the various blocks.

Indeed, this could be done, but, for some architectures, the placement location of a sub block is particularly relevant, hence the need of leaving this choice to the placement algorithm instead of the packer one.

Each one of these site types has different IO pins as well as pin locations.

.. code-block:: XML

<tile name="HCLK_IOI">
<sub_tile name="BUFIO" capacity="4">
<clock name="I" num_pins="1"/>
<output name="O" num_pins = "1"/>
<equivalent_sites>
<site pb_type="BUFIO_SITE" pin_mapping="direct"/>
</equivalent_sites>
<fc />
<pinlocations />
</sub_tile>
<sub_tile name="BUFR" capacity="4">
<clock name="I" num_pins="1"/>
<input name="CE" num_pins="1"/>
<output name="O" num_pins = "1"/>
<equivalent_sites>
<site pb_type="BUFR_SITE" pin_mapping="direct"/>
</equivalent_sites>
<fc />
<pinlocations />
</sub_tile>
<sub_tile name="IDELAYCTRL" capacity="1">
<clock name="REFCLK" num_pins="1"/>
<output name="RDY" num_pins="1"/>
<equivalent_sites>
<site pb_type="IDELAYCTRL_SITE" pin_mapping="direct"/>
</equivalent_sites>
<fc />
<pinlocations />
</sub_tile>
</tile>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will also want text waling through the XML. For example something like:

Each ``HCLK_IOI`` tile contains three sub-tiles, each containing a different type of pb_type. The ``BUFIO`` sub-tile supports 4 instances (capacity=4) of pb_type `BUFIO_SITE`, the ``BUFR`` sub-tile supports 4 instances of `BUF_SITE` pb_types, and the `IDELAYCTRL` sub-tile supports 1 instances of the `IDELAYCTRL_SITE`.


Each ``HCLK_IOI`` tile contains three sub-tiles, each containing a different type of pb_type:

- the ``BUFIO`` sub-tile supports 4 instances (capacity = 4) of pb_type ``BUFIO_SITE``
- the ``BUFR`` sub-tile supports 4 instances of ``BUFR_SITE`` pb_types
- the ``IDELAYCTRL`` sub-tile supports 1 instances of the ``IDELAYCTRL_SITE``
1 change: 1 addition & 0 deletions doc/src/tutorials/arch/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Multiple examples of how this language can be used to describe different types o
configurable_memory
xilinx_virtex_6_like
equivalent_sites
heterogeneous_tiles

**Modeling Guides:**

Expand Down
Binary file added doc/src/tutorials/arch/sub_tiles_grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading