Skip to content

Commit 03ef84b

Browse files
committed
Merge remote-tracking branch 'origin/master' into yosys-upgrade
Attempting to resolve conflict with strong_cluster_seed_type golden results
2 parents 82f3746 + f81a1bf commit 03ef84b

32 files changed

+1015
-510
lines changed

dev/vtr_test_suite_verifier/test_suites_info.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
{
1919
"name": "vtr_reg_strong",
2020
"ignored_tasks": [
21-
"strong_ap/gen_mass_report",
22-
"strong_cluster_seed_type",
2321
"strong_router_heap",
2422
"strong_verify_rr_graph_3d",
2523
"strong_xilinx_support"
@@ -28,7 +26,6 @@
2826
{
2927
"name": "vtr_reg_strong_odin",
3028
"ignored_tasks": [
31-
"strong_pack_modes",
3229
"strong_xilinx_support",
3330
"strong_router_heap",
3431
"strong_cluster_seed_type"

doc/src/vpr/command_line_usage.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,14 @@ Analytical Placement is generally split into three stages:
13241324

13251325
**Default:** ``auto``
13261326

1327+
.. option:: --ap_high_fanout_threshold <int>
1328+
1329+
Defines the threshold for high fanout nets within AP flow.
1330+
1331+
Ignores the nets that have higher fanouts than the threshold for the analytical solver.
1332+
1333+
**Default:** ``256``
1334+
13271335
.. option:: --ap_verbosity <int>
13281336

13291337
Controls the verbosity of the AP flow output.

doc/src/vtr/run_vtr_flow.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ Enable Synlig tool with the ``-DSYNLIG_SYSTEMVERILOG=ON`` compile flag for the P
9090
9191
Will run the VTR flow (default configuration) with Yosys frontend using Parmys plugin as partial mapper. To utilize the Parmys plugin, the ``-DYOSYS_PARMYS_PLUGIN=ON`` compile flag should be passed while building the VTR project with Yosys as a frontend.
9292

93+
.. code-block:: bash
94+
95+
# Using the Parmys (Partial Mapper for Yosys) plugin as partial mapper with include files
96+
./run_vtr_flow <path/to/Verilog/File> <path/to/arch/file> -include <path/to/include/directory>/*.v*
97+
98+
Will run the VTR flow (default configuration) with Yosys frontend using Parmys plugin as partial mapper. In addition to the main circuit passed in with the architecture, it will also pass in every HDL file with the specified file type within the include directory.
99+
93100
Detailed Command-line Options
94101
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95102

@@ -123,6 +130,15 @@ Detailed Command-line Options
123130
* ``vpr``
124131

125132
**Default:** ``vpr``
133+
134+
.. option:: -include <path_to_file(s)>/*.<file_type(s)>
135+
136+
List of include files to a benchmark circuit
137+
(pass to VTR frontends as a benchmark design set).
138+
139+
Include files can be any file supported by yosys+parmys (normally .v or .vh files).
140+
141+
The include directory should not contain the circuit passed in with the architecture.
126142

127143
.. option:: -power
128144

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ static void LoadPinLoc(pugi::xml_node Locations,
698698
for (int width = 0; width < type->width; ++width) {
699699
for (int height = 0; height < type->height; ++height) {
700700
for (e_side side : TOTAL_2D_SIDES) {
701-
for (auto token : pin_locs->assignments[sub_tile_index][width][height][layer][side]) {
701+
for (const std::string& token : pin_locs->assignments[sub_tile_index][width][height][layer][side]) {
702702
auto pin_range = ProcessPinString<t_sub_tile*>(Locations,
703703
&sub_tile,
704704
token.c_str(),
@@ -741,109 +741,97 @@ static std::pair<int, int> ProcessPinString(pugi::xml_node Locations,
741741
T type,
742742
const char* pin_loc_string,
743743
const pugiutil::loc_data& loc_data) {
744-
int num_tokens;
745-
auto tokens = GetTokensFromString(pin_loc_string, &num_tokens);
744+
Tokens tokens(pin_loc_string);
746745

747-
int token_index = 0;
748-
auto token = tokens[token_index];
746+
size_t token_index = 0;
749747

750-
if (token.type != TOKEN_STRING || token.data != type->name) {
748+
if (tokens[token_index].type != e_token_type::STRING || tokens[token_index].data != type->name) {
751749
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
752750
"Wrong physical type name of the port: %s\n", pin_loc_string);
753751
}
754752

755753
token_index++;
756-
token = tokens[token_index];
757754

758-
if (token.type != TOKEN_DOT) {
755+
if (tokens[token_index].type != e_token_type::DOT) {
759756
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
760757
"No dot is present to separate type name and port name: %s\n", pin_loc_string);
761758
}
762759

763760
token_index++;
764-
token = tokens[token_index];
765761

766-
if (token.type != TOKEN_STRING) {
762+
if (tokens[token_index].type != e_token_type::STRING) {
767763
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
768764
"No port name is present: %s\n", pin_loc_string);
769765
}
770766

771-
auto port = type->get_port(token.data);
767+
auto port = type->get_port(tokens[token_index].data);
772768
if (port == nullptr) {
773769
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
774770
"Port %s for %s could not be found: %s\n",
775-
type->name.c_str(), token.data,
771+
type->name.c_str(), tokens[token_index].data.c_str(),
776772
pin_loc_string);
777773
}
778774
int abs_first_pin_idx = port->absolute_first_pin_index;
779775

780776
token_index++;
781777

782778
// All the pins of the port are taken or the port has a single pin
783-
if (token_index == num_tokens) {
784-
freeTokens(tokens, num_tokens);
779+
if (token_index == tokens.size()) {
785780
return std::make_pair(abs_first_pin_idx, abs_first_pin_idx + port->num_pins);
786781
}
787782

788-
token = tokens[token_index];
789-
790-
if (token.type != TOKEN_OPEN_SQUARE_BRACKET) {
783+
if (tokens[token_index].type != e_token_type::OPEN_SQUARE_BRACKET) {
791784
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
792785
"No open square bracket present: %s\n", pin_loc_string);
793786
}
794787

795788
token_index++;
796-
token = tokens[token_index];
797789

798-
if (token.type != TOKEN_INT) {
790+
if (tokens[token_index].type != e_token_type::INT) {
799791
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
800792
"No integer to indicate least significant pin index: %s\n", pin_loc_string);
801793
}
802794

803-
int first_pin = vtr::atoi(token.data);
795+
int first_pin = vtr::atoi(tokens[token_index].data);
804796

805797
token_index++;
806-
token = tokens[token_index];
807798

808799
// Single pin is specified
809-
if (token.type != TOKEN_COLON) {
810-
if (token.type != TOKEN_CLOSE_SQUARE_BRACKET) {
800+
if (tokens[token_index].type != e_token_type::COLON) {
801+
if (tokens[token_index].type != e_token_type::CLOSE_SQUARE_BRACKET) {
811802
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
812803
"No closing bracket: %s\n", pin_loc_string);
813804
}
814805

815806
token_index++;
816807

817-
if (token_index != num_tokens) {
808+
if (token_index != tokens.size()) {
818809
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
819810
"pin location should be completed, but more tokens are present: %s\n", pin_loc_string);
820811
}
821812

822-
freeTokens(tokens, num_tokens);
823813
return std::make_pair(abs_first_pin_idx + first_pin, abs_first_pin_idx + first_pin + 1);
824814
}
825815

826816
token_index++;
827-
token = tokens[token_index];
828817

829-
if (token.type != TOKEN_INT) {
818+
if (tokens[token_index].type != e_token_type::INT) {
830819
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
831820
"No integer to indicate most significant pin index: %s\n", pin_loc_string);
832821
}
833822

834-
int last_pin = vtr::atoi(token.data);
823+
int last_pin = vtr::atoi(tokens[token_index].data);
835824

836825
token_index++;
837-
token = tokens[token_index];
838826

839-
if (token.type != TOKEN_CLOSE_SQUARE_BRACKET) {
827+
if (tokens[token_index].type != e_token_type::CLOSE_SQUARE_BRACKET) {
840828
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
841829
"No closed square bracket: %s\n", pin_loc_string);
842830
}
843831

844832
token_index++;
845833

846-
if (token_index != num_tokens) {
834+
if (token_index != tokens.size()) {
847835
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
848836
"pin location should be completed, but more tokens are present: %s\n", pin_loc_string);
849837
}
@@ -852,7 +840,6 @@ static std::pair<int, int> ProcessPinString(pugi::xml_node Locations,
852840
std::swap(first_pin, last_pin);
853841
}
854842

855-
freeTokens(tokens, num_tokens);
856843
return std::make_pair(abs_first_pin_idx + first_pin, abs_first_pin_idx + last_pin + 1);
857844
}
858845

0 commit comments

Comments
 (0)