-
Couldn't load subscription status.
- Fork 429
Support route constraint. #2233
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
base: master
Are you sure you want to change the base?
Changes from 23 commits
b7cba40
4a05cad
619caea
b749ce1
3932e1d
fda9057
aecd504
17626dd
f3a6875
7b5c8ab
c957a44
3f4a404
6e21663
ac554b1
7490a21
e4fa747
1101588
2bbb7f2
4d46b47
3ecee3e
2b71a2c
bef7983
38a8569
0af1634
aba2572
b06c5ba
314d22a
4f19f8e
0b77856
8c2bc64
2a846e4
54efbc2
a46461b
a96afb9
00d118d
c460ad1
dcb50bc
fa22d5b
e59d5cd
2ee2bae
d43e667
f6844ec
3653c77
bcc0fd9
b54d4ad
4e8ad95
885eb58
e1d6d03
674a569
090322c
a18c419
6c781e8
e5b9fa1
24b486d
d0a65ad
c854a5e
e78f446
43a80a4
4c2b47e
a88ac6e
0d1339e
c16fcb8
3ca5e2f
ad0d96c
f3b5a30
f77645a
bd49f85
4155c0b
edd61a3
53e6b00
8bd4096
087cf29
2a1b88c
b080eda
ef79f28
750091e
f0cf714
e36edc3
b5d4f8c
71eddf0
e1a2a7c
78f8c82
ce3173c
6a515ff
abc6555
3b758f0
f97b7e2
7994e80
2bce428
7482107
eb75a5a
5d409cb
6dff200
1ba0c0e
4966634
40d4050
2c3197e
1374493
907ff58
5ea5661
bd63ae2
69476ee
b2df632
7233288
825d444
a8349b6
bb895cb
6576247
332bc90
2f1bfd3
d3a8039
3238de2
1a8c875
c415acb
970afa5
c33574d
147200b
942d1bb
56a1eb2
69773db
c70f97b
5226096
b763242
ff83963
3264072
c162275
f0d1bb6
921e1ba
4834fd0
01e288c
b156bf4
3637125
c8f5a65
caf364c
96ea971
671c9d2
22f0d32
62e42cf
d1c0382
afed57f
5462d26
9e53e9a
99c132d
52bd89f
7a4150d
ac6b2f4
60721ba
5795b7d
69d852d
67a84e1
f573c44
8e623dc
1a9b970
4199c48
2796b58
ebb804e
0f40ecb
fb90ee8
89cc2e2
a492d95
ba41ecf
5119ac8
57e6b8c
d501af2
bcc1881
63b028d
f3b42d2
0dbd685
71db0a4
bd59994
8593cb5
294c49b
1b95c01
458fa39
4c43c74
0b915ba
6ac416c
d70659f
42e48e5
2dc4652
e0dd3c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
|
|
||
| VPR Placement Constraints | ||
| ========================= | ||
| .. _vpr_constraints_file: | ||
| VPR supports running flows with route constraints. Route constraints are set on global signals to specify if they should be routed or not. For example, a user may want to route a specific internal clock even clock modeling option is set to not route it. | ||
Tulong4Dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The route constraints should be specified by the user using an XML constraints file format, as described in the section below. | ||
|
|
||
| A Constraints File Example | ||
| -------------------------- | ||
|
|
||
| .. code-block:: xml | ||
| :caption: An example of a route constraints file in XML format. | ||
| :linenos: | ||
| <vpr_constraints tool_name="vpr"> | ||
| <global_route_constraints> | ||
| <!-- specify route method for a global pin that needs to be connected globally --> | ||
| <set_global_signal name="(int_clk)(.*)" type="clock" route_model="route"/> | ||
Tulong4Dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <set_global_signal name="clk_ni" type="clock" route_model="ideal"/> | ||
Tulong4Dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </global_route_constraints> | ||
| </vpr_constraints> | ||
| .. _end: | ||
|
|
||
| Constraints File Format | ||
| ----------------------- | ||
|
|
||
| VPR has a specific XML format which must be used when creating a route constraints file. The purpose of this constraints file is to specify | ||
|
|
||
| #. The signals that should be constrained for routing | ||
| #. The route model for such signals | ||
|
|
||
| The file is passed as an input to VPR when running with route constraints. When the file is read in, its information is used to guide VPR route or not route such signals. | ||
|
|
||
| .. note:: Use the VPR option :vpr:option:`--read_vpr_constraints` to specify the VPR route constraints file that is to be loaded. | ||
|
|
||
| .. note:: Wildcard names of signals are supported to specify a list of signals. The wildcard expression should follow the C/C++ regexpr rule. | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #include "route_constraint.h" | ||
|
|
||
| RouteConstraint::RouteConstraint() { | ||
| net_name_ = std::string(""); | ||
| net_type_ = std::string(""); | ||
| route_method_ = std::string(""); | ||
| is_valid_ = false; | ||
| } | ||
|
|
||
| void RouteConstraint::set_net_name(std::string name) { | ||
| net_name_ = name; | ||
| return; | ||
| } | ||
|
|
||
| std::string RouteConstraint::get_net_name() const { | ||
| return net_name_; | ||
| } | ||
|
|
||
| void RouteConstraint::set_net_type(std::string type) { | ||
| net_type_ = type; | ||
| return; | ||
| } | ||
|
|
||
| std::string RouteConstraint::get_net_type() const { | ||
| return net_type_; | ||
| } | ||
|
|
||
| void RouteConstraint::set_route_model(std::string route_method) { | ||
| route_method_ = route_method; | ||
| return; | ||
| } | ||
|
|
||
| std::string RouteConstraint::get_route_model() const { | ||
Tulong4Dev marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return route_method_; | ||
| } | ||
|
|
||
| void RouteConstraint::set_is_valid(bool value) { | ||
| is_valid_ = value; | ||
| } | ||
|
|
||
| bool RouteConstraint::get_is_valid() const { | ||
| return is_valid_; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| #ifndef ROUTE_CONSTRAINT_H | ||
| #define ROUTE_CONSTRAINT_H | ||
|
|
||
| #include "vpr_types.h" | ||
|
|
||
| /** | ||
| * @file | ||
| * @brief This file defines the RouteConstraint class. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should have a bigger comment on what this class is for, what it can currently do, what kind of code belongs here (so people know in the future if there is some new feature code that would best be put here), etc. |
||
| */ | ||
|
|
||
| class RouteConstraint { | ||
| public: | ||
| /** | ||
| * @brief Constructor for the RouteConstraint class, sets member variables to invalid values | ||
| */ | ||
| RouteConstraint(); | ||
|
|
||
| /** | ||
| * @brief get net name | ||
| */ | ||
| std::string get_net_name() const; | ||
|
|
||
| /** | ||
| * @brief set net name | ||
| */ | ||
| void set_net_name(std::string); | ||
|
|
||
| /** | ||
| * @brief get net type | ||
| */ | ||
| std::string get_net_type() const; | ||
|
|
||
| /** | ||
| * @brief set net type | ||
| */ | ||
| void set_net_type(std::string); | ||
|
|
||
| /** | ||
| * @brief get route model | ||
| */ | ||
| std::string get_route_model() const; | ||
|
|
||
| /** | ||
| * @brief set route model | ||
| */ | ||
| void set_route_model(std::string); | ||
|
|
||
| /** | ||
| * @brief set is valid | ||
| */ | ||
| void set_is_valid(bool); | ||
|
|
||
| /** | ||
| * @brief get is valid | ||
| */ | ||
| bool get_is_valid() const; | ||
|
|
||
| private: | ||
| std::string net_name_; | ||
| std::string net_type_; | ||
| std::string route_method_; | ||
| bool is_valid_; | ||
| }; | ||
|
|
||
| #endif /* ROUTE_CONSTRAINT_H */ | ||
Uh oh!
There was an error while loading. Please reload this page.