-
Notifications
You must be signed in to change notification settings - Fork 415
Noc traffic flows parser final #2083
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
Changes from all commits
ad67564
66b81f1
97861ba
e66973c
4c6e038
ae3fc05
aaa4687
5b088b6
6fcb368
7a80043
b966d70
db4c1f3
d57ad16
790e660
1401585
e3a0400
dfa7742
dd51424
887af99
0577a29
076b091
37e11ef
6f4beae
1e55e3d
cfa3969
dbb09c4
3ca57f1
3b2a565
12afbd6
52f0598
d8bf75a
5eec09e
f3e12a6
cf0f135
fb41204
0de01cc
df88ab7
ad39612
c3dbe68
7786b8f
1b291e8
fcb9bfb
cc40fd6
df6651c
5129422
8f226c3
6321cc5
2e461f1
b9d3f67
066e57a
11c88fa
bde20d4
774e10f
fc66cc9
ba26e7c
0038cc0
bd6ca3f
ee0c344
e6332d9
a142d1b
3c31e04
76342be
3711019
7b96833
22b4071
89232af
72b4f96
e73fece
9571c5c
3bd8100
c6b7b24
5a77e6b
b487e33
d14f6bb
ca1304b
b30a1f6
4175d51
91daab2
9873d39
76016e1
80c35ec
279f89d
7422117
f180c93
8d8af65
32125ff
4837211
f4e3ee4
76f9f49
72926e5
a153da5
d018f1b
1f3a951
3ad6112
caee85f
af61c84
70de39a
496c9a4
0c8d04d
9b8cbf2
9491ffe
2addace
9578626
55c8ae4
abc735b
5001d14
b6aaa9a
ae2734f
5372ba6
96539ac
8b6b860
8033563
77d24b1
a78c867
b32fba0
c9e568c
57bfd96
6551f65
5137869
5eba6ac
682522c
d16c5db
ad0bebf
f11ed2d
9cbcf33
9f6ca9f
7776f03
6869f55
b1f1477
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 |
---|---|---|
|
@@ -65,6 +65,7 @@ enum e_echo_files { | |
|
||
//NoC | ||
E_ECHO_NOC_MODEL, | ||
E_ECHO_NOC_TRAFFIC_FLOWS, | ||
|
||
E_ECHO_END_TOKEN | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -458,6 +458,24 @@ BlockId Netlist<BlockId, PortId, PinId, NetId>::find_block(const std::string& na | |
} | ||
} | ||
|
||
template<typename BlockId, typename PortId, typename PinId, typename NetId> | ||
BlockId Netlist<BlockId, PortId, PinId, NetId>::find_block_by_name_fragment(const std::string& name_substring) const { | ||
BlockId matching_blk_id = BlockId::INVALID(); | ||
const std::string blk_name; | ||
|
||
// go through all the blocks in the netlist | ||
for (auto blk_id = block_ids_.begin(); blk_id != block_ids_.end(); blk_id++) { | ||
// get the corresponding block name | ||
blk_name = &strings_[block_names_[*blk_id]]; | ||
// check whether the current block name contains the input string within it | ||
if (blk_name.find(name_substring) != std::string::npos) { | ||
matching_blk_id = blk_id; | ||
break; | ||
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. Return first match; not guaranteeing it the only match. 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. Added to the comment |
||
} | ||
} | ||
return matching_blk_id; | ||
} | ||
|
||
template<typename BlockId, typename PortId, typename PinId, typename NetId> | ||
PortId Netlist<BlockId, PortId, PinId, NetId>::find_port(const BlockId blk_id, const std::string& name) const { | ||
VTR_ASSERT_SAFE(valid_block_id(blk_id)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2622,6 +2622,13 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg | |
.default_value("off") | ||
.show_in(argparse::ShowIn::HELP_ONLY); | ||
|
||
noc_grp.add_argument<std::string>(args.noc_flows_file, "--noc_flows_file") | ||
.help( | ||
"XML file containing the list of traffic flows within the NoC (communication between routers)." | ||
"This is required if the --noc option is turned on.") | ||
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. "turned on" --> "on" 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. or just if --noc is on |
||
.default_value("") | ||
.show_in(argparse::ShowIn::HELP_ONLY); | ||
|
||
return parser; | ||
} | ||
|
||
|
@@ -2803,7 +2810,7 @@ void set_conditional_defaults(t_options& args) { | |
|
||
bool verify_args(const t_options& args) { | ||
/* | ||
* Check for conflicting paramaters | ||
* Check for conflicting paramaters or dependencies where one parameter set requires another parameter to be included | ||
*/ | ||
if (args.read_rr_graph_file.provenance() == Provenance::SPECIFIED | ||
&& args.RouteChanWidth.provenance() != Provenance::SPECIFIED) { | ||
|
@@ -2826,5 +2833,19 @@ bool verify_args(const t_options& args) { | |
args.router_lookahead_type.argument_name().c_str()); | ||
} | ||
|
||
/** | ||
* @brief If the user provided the "--noc" command line option, then there | ||
* must be a NoC in the FPGA and the netlist must include NoC routers. | ||
* Therefore, the user must also provide a noc traffic flows file to | ||
* describe the communication within the NoC. We ensure that a noc traffic | ||
* flows file is provided when the "--noc" option is used. If it is not | ||
* provided, we throw an error. | ||
* | ||
*/ | ||
if (args.noc.provenance() == Provenance::SPECIFIED && args.noc_flows_file.provenance() != Provenance::SPECIFIED) { | ||
VPR_FATAL_ERROR(VPR_ERROR_OTHER, | ||
"--noc_flows_file option must be specified if --noc is turned on.\n"); | ||
} | ||
|
||
return true; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
#include <climits> | ||
#include <cmath> | ||
|
||
|
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.
Return first?
What is none matches (return Invalid?)
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.
Also seems like the comment is half-repeated?
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.
Done