-
Notifications
You must be signed in to change notification settings - Fork 446
Relatively Placed Macro #3717
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
Open
amin1377
wants to merge
92
commits into
master
Choose a base branch
from
relative_placement
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Relatively Placed Macro #3717
Changes from 51 commits
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
01e6e3a
[vpr][constraint] update constrain file to include relative placement…
amin1377 277d561
[vpr][base] add UserRelativeGroup to store rel macro info
amin1377 d07fdc3
[vpr][base] add UserRelativeMacros to VprConstraints
amin1377 1eb1322
[vpr][base] add relative_macros to FloorplanningContext
amin1377 c7f4117
[vpr][base] add functions related to rel placement
amin1377 d879710
[vpr][base] rel place: update autogenerated files
amin1377 fc1a0cf
[vpr][pack] add check_cluster_relative_group and rel_group to cluster…
amin1377 ad0d21a
[vpr][pack] add relative macro attraction group functions
amin1377 d8bd6b1
[vpr][pack] add rel mol attraction group in candidate sel
amin1377 f3d36c1
[vpr][pack] add check_clustering_relative_group_consistency
amin1377 d165bce
[vpr][pack] add BLK_FAILED_RELATIVE_GROUP to errors
amin1377 fa9dfe0
[vpr][pack] increase gain for rpm so they get packed firt
amin1377 2c55729
[vpr][pack] update try pack to check for rpm
amin1377 d5c82d6
[vpr][pack] pass group gain and pull_in_initial_search when rebuildin…
amin1377 9b2eba4
[vpr][place] add append_user_defined_macros_
amin1377 3ed8f00
[vpr][place] fix root location issue with rmp
amin1377 05d77c6
[doc][vpr] add rmp doc
amin1377 887a988
[vpr][test] add unit test for UserRelativeMacro
amin1377 8539cd4
[ci][strong] add rmp test
amin1377 d728376
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 86ddaaf
make format
amin1377 d230e69
[vpr][pack] recreate attraction group for rel group if packing doesn'…
amin1377 0f16846
[vpr][pack] remove duplicate attraction groups
amin1377 e9e5c9c
[vpr][pack] check macro conflict with rel placement
amin1377 6c4e68c
[vpr][base] add fast path for get_atom_group
amin1377 91a1bae
[vpr][base] improve rmp log msg
amin1377 df8a9c2
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 85ca126
[vpr][pack] shorten comments
amin1377 ba13e4b
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 c2f60ec
[vpr][pack] consider rpm in prepack
amin1377 cdbc4c9
[vpr][place] remove redundant checks
amin1377 1c47e03
[vpr] fix comments for rpm
amin1377 2c85ae8
[vpr][place] add macro log to MoveAbortionLogger
amin1377 8c18649
[vpr][cli] pack_relative_group_best_effort
amin1377 93abede
[vpr][cli] remove pack_relative_group_best_effort
amin1377 c68d2c0
[vpr][place] break the loop when swapping macros
amin1377 11474b5
[doc] remove best effort mode doc related to rpm
amin1377 a8d437d
[vpr][pack] add rmp methods into attraction group
amin1377 805d1d5
[vpr][place] record whether user macro exist + check it doesn't overl…
amin1377 15b15f0
[vpr][pack] add pack_relative_group_into_cluster to pack a group into…
amin1377 fefae71
[vpr][place] add root location check to macro_can_be_placed
amin1377 1cd2f3b
[vpr][pack] remove redundant functions after simplifying pack retry
amin1377 0acb1fe
[vpr][pack] retry failed rel mol for limited number of times
amin1377 0a9d0b9
[vpr][pack] add helper functions to set/get whether cluster is reserv…
amin1377 e5b335d
[vpr][pack] reserve cluster for rel mol during repack
amin1377 99dbccf
[vpr][pack] fail fast if number of split macros for rel mols increase
amin1377 bbe1f40
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 7e9eb13
update submodules
amin1377 e09df0a
[vpr][ap] error out if RPM is used
amin1377 111e7a8
[ci] update rpm test
amin1377 b5e65cf
[vpr][place] narrow the cycle filter
amin1377 a7b68c0
[vpr][pack] check for chain in validate_relative_group_molecules
amin1377 a76a50a
[ci] add carry chain to constraint file
amin1377 0541036
[ci] update rpm blif file
amin1377 8cb614c
[doc] update rpm doc
amin1377 588f088
check for long chain cluster to not belong to multiple rmp groups
amin1377 abaae85
[doc][rpm] update doc to reflect changes in macro
amin1377 c3b4ade
[vpr][pack] add check_cluster_long_chain_ownership to check for long …
amin1377 a15902e
[vpr][place] merge arch macro and user macro for chains
amin1377 77fe78b
[ci] update rmp blif to have a chain spanning mulitple clusters
amin1377 a13b57f
[ci][rmp] update golden resutls
amin1377 0aa9be1
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 addc223
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 adace89
[vpr][pack] add assertion to check for pin class size
amin1377 10085e9
[vpr][pack] remove bypass paramter
amin1377 9de704d
[vpr][pack] remove bypass parameter
amin1377 ec0c71b
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 188d87c
[vpr][pack] choose group atoms first
amin1377 e0210a5
[vpr][pack] remove rel group from attraction groups
amin1377 3851b99
[vpr][pack] pack rpm clusters first
amin1377 424f6c7
[vpr][pack] remove rpm reservations from cluster legalizer
amin1377 462ec85
[vpr][pack] remove attraction group provisions for rpm in pack.cpp
amin1377 2b3d0f5
[vpr][pack] add get_molecule_relative_group
amin1377 3e4f37c
[vpr][place] fix rpm comments
amin1377 01f7cd2
[vpr][pack] remove remaining code related to prev version of rpm
amin1377 9d667b0
[ci] update rpm golden results
amin1377 f4bb71d
[doc][vpr][rpm] add site_path
amin1377 32f786a
[doc][vpr] add doc related to site_path
amin1377 862ad89
[vpr][constraint] add site_path
amin1377 633ba3e
[vpr][base] print site_path when writing flat place file
amin1377 14bf26b
[vpr][base] add atom sith path to rpm ds
amin1377 7e9082e
[vpr][pack] use forced_placement in cluster_placement
amin1377 9880676
[vpr][pack] record why atom in rpm cannot be placed
amin1377 c2f6244
[vpr][pack] pack rpm forced sites first in greedy clusterer
amin1377 c5f4f46
[doc] update RPM doc
amin1377 58e121a
[vpr][base] update constrain serializer with site_path
amin1377 c54be42
[vpr][pack] check for molecule root rpm constraint
amin1377 e0bc8d5
[vpr][pack] verify site_path is honored
amin1377 189a507
[vpr][test] add unit test for rpm
amin1377 d4ab376
[ci] update rpm test
amin1377 8b29a8f
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 ddf2fb6
Merge branch 'master' of https://github.com/verilog-to-routing/vtr-ve…
amin1377 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
|
|
||
| Relative Placement Constraints | ||
| ============================== | ||
| .. _relative_placement_constraints: | ||
|
|
||
| VPR supports *relative placement macros*: constraints that fix the placement of groups of primitives **relative to each other**, without pinning them to absolute locations on the chip. | ||
| Each macro consists of one *reference group* and one or more *relative groups* of primitives (a.k.a. atoms). | ||
| The constraints affect both packing and placement: | ||
|
|
||
| * **Packing:** the atoms of each group are packed together into a single cluster, and atoms of different groups (of any macro) are never packed into the same cluster. Unconstrained atoms may share a cluster with a group. | ||
| * **Placement:** the clusters created from the groups of one macro form a placement macro (like an architectural carry chain): each relative group's cluster is placed at exactly its ``(x_offset, y_offset, sub_tile_offset)`` from the reference group's cluster, and the whole macro moves as a rigid unit during initial placement and simulated annealing. The placer chooses *where* the macro goes; the constraints fix only the internal geometry. | ||
|
|
||
| Relative placement constraints are specified inside the same XML constraints file as :ref:`placement (region) constraints <placement_constraints>` and are read with :option:`vpr --read_vpr_constraints`. | ||
| They compose with region constraints: an atom may belong to both a partition and a relative group, in which case the macro is placed such that the region constraints of all its members are satisfied. | ||
|
|
||
| A Relative Placement Constraints File Example | ||
| --------------------------------------------- | ||
|
|
||
| .. code-block:: xml | ||
| :caption: An example of relative placement macros in a VPR constraints file. | ||
| :linenos: | ||
|
|
||
| <vpr_constraints tool_name="vpr"> | ||
| <relative_macro_list> | ||
| <relative_macro name="dsp_with_ctrl_logic"> | ||
| <reference_group> | ||
| <add_atom name_pattern="mult_36.out_reg"/> <!-- The anchor of the macro --> | ||
| </reference_group> | ||
| <relative_group x_offset="1" y_offset="0" sub_tile_offset="0"> | ||
| <add_atom name_pattern="^ctrl_lut_[0-4]$" is_regex="true"/> <!-- These LUTs are packed into one cluster, placed directly right of the anchor --> | ||
| </relative_group> | ||
| </relative_macro> | ||
| <relative_macro name="bit_sliced_datapath"> | ||
| <reference_group> | ||
| <add_atom name_pattern="slice0_.*" is_regex="true"/> | ||
| </reference_group> | ||
| <relative_group x_offset="0" y_offset="1" sub_tile_offset="0"> | ||
| <add_atom name_pattern="slice1_.*" is_regex="true"/> | ||
| </relative_group> | ||
| <relative_group x_offset="0" y_offset="2" sub_tile_offset="0"> | ||
| <add_atom name_pattern="slice2_.*" is_regex="true"/> | ||
| </relative_group> | ||
| </relative_macro> | ||
| </relative_macro_list> | ||
| </vpr_constraints> | ||
|
|
||
| .. _end: | ||
|
|
||
| Relative Placement Constraints File Format | ||
| ------------------------------------------ | ||
|
|
||
| The ``<vpr_constraints>`` top-level tag may contain one ``<relative_macro_list>`` tag, which contains an unbounded number of ``<relative_macro>`` tags. | ||
|
|
||
| .. arch:tag:: <relative_macro name="string"> | ||
|
|
||
| A relative macro is made up of exactly one ``<reference_group>`` (which must come first) followed by one or more ``<relative_group>`` tags. | ||
|
|
||
| :req_param name: | ||
| A unique name for the macro, used in log and error messages. | ||
|
|
||
| .. arch:tag:: <reference_group> | ||
|
|
||
| The anchor of the macro. The atoms added to this group are packed into one cluster, and all relative groups' offsets are measured from this cluster's location. Contains one or more ``<add_atom>`` tags (same syntax and matching semantics as in a ``<partition>``, see :ref:`placement_constraints`; the ``logical_block_location`` attribute is not supported here and is ignored with a warning). | ||
|
|
||
| .. arch:tag:: <relative_group x_offset="int" y_offset="int" sub_tile_offset="int" layer_offset="int"> | ||
|
|
||
| A group of atoms packed into one cluster, placed at the given offset from the reference group's cluster. Contains one or more ``<add_atom>`` tags. | ||
|
|
||
| :req_param x_offset: | ||
| Grid-tile x offset of this group's cluster from the reference cluster. May be negative. | ||
|
|
||
| :req_param y_offset: | ||
| Grid-tile y offset of this group's cluster from the reference cluster. May be negative. | ||
|
|
||
| :req_param sub_tile_offset: | ||
| Sub-tile offset of this group's cluster from the reference cluster. Use ``0`` when the tiles have a single sub-tile. This attribute is currently required; a future extension will allow omitting it to mean "any compatible sub-tile". | ||
|
|
||
| :opt_param layer_offset: | ||
| Layer (die) offset. Must currently be ``0`` (cross-layer relative macros are not supported and are rejected when the file is loaded). | ||
| **Default:** ``0`` | ||
|
|
||
| Semantics and Restrictions | ||
| -------------------------- | ||
|
|
||
| * **One group, one cluster.** All atoms of a group must fit into a single cluster; this is enforced. If a group cannot be packed into one cluster (e.g. it is larger than the cluster type allows, or conflicts with architectural pack patterns), packing fails with an error naming the group. Prepacked molecules (e.g. a LUT and the FF it drives, or carry-chain segments) that mix a constrained atom with unconstrained atoms are pulled into the group's cluster as a whole. A molecule whose atoms belong to two *different* groups is reported as an error: a molecule is indivisible (all its atoms always pack into one cluster), so it can never satisfy constraints that require its atoms to be in different clusters. | ||
| * **Groups never share a cluster.** This holds between groups of the same macro and between groups of different macros. Unconstrained atoms may fill the remaining capacity of any group's cluster. | ||
| * **Offsets must match the device grid.** The placer never adjusts an offset: it only uses positions where every member of the macro lands on a tile that can host its cluster. For example, ``x_offset="1"`` between a RAM cluster and a CLB cluster only works if the device has a CLB column immediately to the right of a RAM column — and if the RAM tile spans four grid rows, the RAM must sit on a RAM tile's first row, so the macro can only move vertically in steps of four. If no position on the device satisfies all members, placement fails after an exhaustive search. | ||
| * **Members may have different block types** (e.g. a CLB next to a DSP). | ||
| * **Interaction with carry chains:** a cluster cannot belong to both a relative macro and an architecture-derived placement macro (carry chain); this is reported as an error. | ||
| * Relative macro constraints are validated when a packed netlist (``.net``) or placement (``.place``) file is loaded, so stale files that do not satisfy the constraints are rejected. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would replace the dash at "[...] a RAM column — and if the RAM tile spans [...]" with a period. The vertical spacing scenario is a whole different sentence really.
I think I understand what this is saying (the "position" of a block larger than 1x1 is it's bottom left corner so if you're working with these kind of blocks the offsets must point to the bottom left corner of each block) but the current wording is hard to understand.