Skip to content

Commit 3839ce6

Browse files
committed
Merge remote-tracking branch 'origin/master' into equivalent-tiles
Signed-off-by: Alessandro Comodi <[email protected]>
2 parents 5e5e08e + 9f3bbd3 commit 3839ce6

21 files changed

+844
-518
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ Professors: Kenneth Kent, Vaughn Betz, Jonathan Rose, Jason Anderson, Peter Jami
9595

9696
Research Assistants: Aaron Graham
9797

98-
Graduate Students: Kevin Murray, Jason Luu, Oleg Petelin, Jeffrey Goeders, Chi Wai Yu, Andrew Somerville, Ian Kuon, Alexander Marquardt, Andy Ye, Wei Mark Fang, Tim Liu, Charles Chiasson, Panagiotis (Panos) Patros
98+
Graduate Students: Kevin Murray, Jason Luu, Oleg Petelin, Mohamed Eldafrawy, Jeffrey Goeders, Chi Wai Yu, Andrew Somerville, Ian Kuon, Alexander Marquardt, Andy Ye, Wei Mark Fang, Tim Liu, Charles Chiasson, Panagiotis (Panos) Patros
9999

100100
Summer Students: Opal Densmore, Ted Campbell, Cong Wang, Peter Milankov, Scott Whitty, Michael Wainberg, Suya Liu, Miad Nasr, Nooruddin Ahmed, Thien Yu, Long Yu Wang, Matthew J.P. Walker, Amer Hesson, Sheng Zhong, Hanqing Zeng, Vidya Sankaranarayanan, Jia Min Wang, Eugene Sha, Jean-Philippe Legault, Richard Ren, Dingyu Yang
101101

102-
Companies: Altera Corporation, Texas Instruments
102+
Companies: Intel, Huawei, Lattice, Altera Corporation, Texas Instruments, Google
103+
104+
Funding Agencies: NSERC, Semiconductor Research Corporation

doc/src/dev/tutorial.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,61 @@ Welcome to the Verilog-to-Routing (VTR) Project. This project is an open-source,
77
While you are going through this tutorial, please record down things that should be changed. Whether it is the tutorial itself, documentation, or other parts of the VTR project. Your thoughts are valuable and welcome because fresh eyes help evaluate whether or not our work is clearly presented.
88

99

10-
## Task #1 - Environment Setup ##
10+
## Environment Setup ##
1111

1212
1. Log into your workstation/personal computer. Check your account for general features such as internet, printing, git, etc. If there are problems at this stage, talk to your advisor to get this setup.
1313

1414
2. If you are not familiar with development on Linux, this is the time to get up to speed. Look up online tutorials on general commands, basic development using Makefiles, etc.
1515

16-
## Task #2 - Background Reading ##
16+
## Background Reading ##
1717

1818
1. Read the first two chapters of "Architecture and CAD for deep-submicron FPGAs" by Vaughn Betz, et al. This is a great introduction to the topic of FPGA CAD and architecture. Note though that this book is old so it only covers a small core of what the VTR project is currently capable of.
1919

2020
2. Read chapters 1 to 5 of "FPGA Architecture: Survey and Challenges" by Ian Kuon et al.
2121

2222
3. Review material learned with fellow colleagues.
2323

24-
## Task #3 - Setup VTR ##
24+
## Setup VTR ##
2525

2626
1. Use git to clone a copy of VTR from the [GitHub repository](https://github.com/verilog-to-routing/vtr-verilog-to-routing)
2727

2828
2. Build the project
2929

30-
3. Run "./run_quick_test.pl" to check that the build worked
30+
3. Run `./run_quick_test.pl` to check that the build worked
3131

32-
4. Follow the Basic Design Flow Tutorial found in the Tutorials section of the [documentation](https://vtr.readthedocs.io/en/latest). This tutorial will allow you to run a circuit through the entire flow and read the statistics gathered from that run.
32+
4. Follow the Basic Design Flow Tutorial found in the Tutorials section of the [Welcome to Verilog-to-Routing's documentation!](https://vtr.readthedocs.io/en/latest). This tutorial will allow you to run a circuit through the entire flow and read the statistics gathered from that run.
3333

34-
## Task #4 - Use VTR ##
34+
## Use VTR ##
3535

36-
1. Create your own custom Verilog file. Create your own custom architecture file using one of the existing architecture files as a template. Use VTR to map that circuit that you created to that architecture that you created. The VTR documentation, to be found at [Welcome to Verilog-to-Routing's documention!](https://vtr.readthedocs.io/en/latest/) will prove useful. You may also wish to look at the following links for descriptions of the language used inside the architecture files:
37-
* [Architecture Description and Packing](http://www.eecg.utoronto.ca/~jluu/publications/luu_vpr_fpga2011.pdf)
38-
* [Classical Soft Logic Block Example](http://www.eecg.utoronto.ca/vpr/utfal_ex1.html)
36+
1. Create your own custom Verilog file. Create your own custom architecture file using one of the existing architecture files as a template. Use VTR to map that circuit that you created to that architecture that you created. The VTR documentation, to be found at the [Welcome to Verilog-to-Routing's documentation!](https://vtr.readthedocs.io/en/latest/) will prove useful. You may also wish to look at the following links for descriptions of the language used inside the architecture files:
37+
* [Architecture Description and Packing](http://www.eecg.utoronto.ca/~jluu/publications/luu_vpr_fpga2011.pdf)
38+
* [Classical Soft Logic Block Example](http://www.eecg.utoronto.ca/vpr/utfal_ex1.html)
3939

40-
2. Perform a simple architecture experiment. Run an experiment that varies Fc_in from 0.01 to 1.00 on the benchmarks ch_intrinsics, or1200, and sha. Use tasks/timing as your template. Graph the geometric average of minimum channel width and critical path delay for these three benchmarks across your different values of Fc_in. Review the results with your colleagues and/or advisor.
40+
2. Perform a simple architecture experiment. Run an experiment that varies Fc_in from 0.01 to 1.00 on the benchmarks ch_intrinsics, or1200, and sha. Use `tasks/timing` as your template. Graph the geometric average of minimum channel width and critical path delay for these three benchmarks across your different values of Fc_in. Review the results with your colleagues and/or advisor.
4141

42-
## Task #5 - Open the Black Box ##
42+
## Open the Black Box ##
4343

4444
At this stage, you have gotten a taste of how an FPGA architect would go about using VTR. As a developer though, you need a much deeper understanding of how this tool works. The purpose of this section is to have you to learn the details of the VTR CAD flow by having you manually do what the scripts do.
4545

46-
1. Using the custom Verilog circuit and architecture created in Task #4, directly run Odin II on it to generate a blif netlist. You may need to skim the Odin II readme file and the vtr_flow/scripts/run_vtr_flow.pl.
46+
1. Using the custom Verilog circuit and architecture created in Task #4, directly run Odin II on it to generate a blif netlist. You may need to skim the Odin II readme file and the `vtr_flow/scripts/run_vtr_flow.pl`.
4747

48-
2. Using the output netlist of Odin II, run ABC to generate a technology-mapped blif file. You may need to skim vtr_flow/scripts/run_vtr_flow.pl.
48+
2. Using the output netlist of Odin II, run ABC to generate a technology-mapped blif file. You may need to skim `vtr_flow/scripts/run_vtr_flow.pl`.
4949

50-
3. Using the output of ABC, run VPR to complete the mapping of a user circuit to a target architecture. You may need to consult the VPR User Manual and skim vtr_flow/scripts/run_vtr_flow.pl.
50+
3. Using the output of ABC, run VPR to complete the mapping of a user circuit to a target architecture. You may need to consult the VPR User Manual and skim `vtr_flow/scripts/run_vtr_flow.pl`.
5151

5252
4. Read the VPR section of the online documentation.
5353

54-
## Task #6 - Submitting Changes and Regression Testing ##
54+
## Submitting Changes and Regression Testing ##
5555

56-
1. Read README.developers.md in the base directory of VTR. Code changes rapidly so please help keep this up to date if you see something that is out of date.
56+
1. Read `README.developers.md` in the base directory of VTR. Code changes rapidly so please help keep this up to date if you see something that is out of date.
5757

58-
2. Make your first change to git by modifying README.txt and pushing it. I recommend adding your name to the list of contributors. If you have nothing to modify, just add/remove a line of whitespace at the bottom of the file.
58+
2. Make your first change to git by modifying `README.txt` and pushing it. I recommend adding your name to the list of contributors. If you have nothing to modify, just add/remove a line of whitespace at the bottom of the file.
5959

6060

6161
Now that you have completed the tutorial, you should have a general sense of what the VTR project is about and how the different parts work together. It's time to talk to your advisor to get your first assignment.
6262

6363

64-
#### Good luck! ####
64+
65+
66+
6567

libs/libarchfpga/src/physical_types.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -902,21 +902,19 @@ struct t_pin_to_pin_annotation {
902902
* accessible from each position may be different).
903903
*
904904
* Data members:
905-
* pb_type: Pointer to the type of pb graph node this belongs to
906-
* mode: parent mode of operation
907-
* placement_index: there are a certain number of pbs available, this gives the index of the node
908-
* illegal_modes: vector containing illigal modes that result in conflicts during routing
909-
* child_pb_graph_nodes: array of children pb graph nodes organized into modes
910-
* parent_pb_graph_node: parent pb graph node
905+
* pb_type : Pointer to the type of pb graph node this belongs to
906+
* placement_index : there are a certain number of pbs available, this gives the index of the node
907+
* child_pb_graph_nodes : array of children pb graph nodes organized into modes
908+
* parent_pb_graph_node : parent pb graph node
909+
* total_primitive_count : Total number of this primitive type in the cluster. If there are 10 ALMs per cluster
910+
* and 2 FFs per ALM (given the mode of the parent of this primitive) then the total is 20.
911911
*/
912912
class t_pb_graph_node {
913913
public:
914914
t_pb_type *pb_type;
915915

916916
int placement_index;
917917

918-
std::vector<int> illegal_modes;
919-
920918
t_pb_graph_pin **input_pins; /* [0..num_input_ports-1] [0..num_port_pins-1]*/
921919
t_pb_graph_pin **output_pins; /* [0..num_output_ports-1] [0..num_port_pins-1]*/
922920
t_pb_graph_pin **clock_pins; /* [0..num_clock_ports-1] [0..num_port_pins-1]*/
@@ -942,6 +940,8 @@ class t_pb_graph_node {
942940
int *output_pin_class_size; /* Stores the number of pins that belong to a particular output pin class */
943941
int num_output_pin_class; /* number of output pin classes that this pb_graph_node has */
944942

943+
int total_primitive_count; /* total number of this primitive type in the cluster */
944+
945945
/* Interconnect instances for this pb
946946
* Only used for power
947947
*/

utils/fasm/src/fasm.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ void FasmWriterVisitor::visit_clb_impl(ClusterBlockId blk_id, const t_pb* clb) {
4949

5050
root_clb_ = clb->pb_graph_node;
5151

52-
int x = place_ctx.block_locs[blk_id].x;
53-
int y = place_ctx.block_locs[blk_id].y;
54-
int z = place_ctx.block_locs[blk_id].z;
52+
int x = place_ctx.block_locs[blk_id].loc.x;
53+
int y = place_ctx.block_locs[blk_id].loc.y;
54+
int z = place_ctx.block_locs[blk_id].loc.z;
5555
auto &grid_loc = device_ctx.grid[x][y];
5656
blk_type_ = grid_loc.type;
5757

vpr/src/base/read_place.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ void read_place(const char* net_file,
123123
}
124124

125125
//Set the location
126-
place_ctx.block_locs[blk_id].x = block_x;
127-
place_ctx.block_locs[blk_id].y = block_y;
128-
place_ctx.block_locs[blk_id].z = block_z;
126+
place_ctx.block_locs[blk_id].loc.x = block_x;
127+
place_ctx.block_locs[blk_id].loc.y = block_y;
128+
place_ctx.block_locs[blk_id].loc.z = block_z;
129129

130130
} else {
131131
//Unrecognized
@@ -162,7 +162,7 @@ void read_user_pad_loc(const char *pad_loc_file) {
162162
for (auto blk_id : cluster_ctx.clb_nlist.blocks()) {
163163
if (is_io_type(cluster_ctx.clb_nlist.block_type(blk_id))) {
164164
insert_in_hash_table(hash_table, cluster_ctx.clb_nlist.block_name(blk_id).c_str(), size_t(blk_id));
165-
place_ctx.block_locs[blk_id].x = OPEN; /* Mark as not seen yet. */
165+
place_ctx.block_locs[blk_id].loc.x = OPEN; /* Mark as not seen yet. */
166166
}
167167
}
168168

@@ -234,7 +234,7 @@ void read_user_pad_loc(const char *pad_loc_file) {
234234
int i = xtmp;
235235
int j = ytmp;
236236

237-
if (place_ctx.block_locs[bnum].x != OPEN) {
237+
if (place_ctx.block_locs[bnum].loc.x != OPEN) {
238238
vpr_throw(VPR_ERROR_PLACE_F, pad_loc_file, vtr::get_file_line_number_of_last_opened_file(),
239239
"Block %s is listed twice in pad file.\n", bname);
240240
}
@@ -244,9 +244,9 @@ void read_user_pad_loc(const char *pad_loc_file) {
244244
"Block #%zu (%s) location, (%d,%d) is out of range.\n", size_t(bnum), bname, i, j);
245245
}
246246

247-
place_ctx.block_locs[bnum].x = i; /* Will be reloaded by initial_placement anyway. */
248-
place_ctx.block_locs[bnum].y = j; /* We need to set .x only as a done flag. */
249-
place_ctx.block_locs[bnum].z = k;
247+
place_ctx.block_locs[bnum].loc.x = i; /* Will be reloaded by initial_placement anyway. */
248+
place_ctx.block_locs[bnum].loc.y = j; /* We need to set .x only as a done flag. */
249+
place_ctx.block_locs[bnum].loc.z = k;
250250
place_ctx.block_locs[bnum].is_fixed = true;
251251

252252
auto type = device_ctx.grid[i][j].type;
@@ -267,7 +267,7 @@ void read_user_pad_loc(const char *pad_loc_file) {
267267

268268
for (auto blk_id : cluster_ctx.clb_nlist.blocks()) {
269269
auto type = cluster_ctx.clb_nlist.block_type(blk_id);
270-
if (is_io_type(type) && place_ctx.block_locs[blk_id].x == OPEN) {
270+
if (is_io_type(type) && place_ctx.block_locs[blk_id].loc.x == OPEN) {
271271
vpr_throw(VPR_ERROR_PLACE_F, pad_loc_file, 0,
272272
"IO block %s location was not specified in the pad file.\n", cluster_ctx.clb_nlist.block_name(blk_id).c_str());
273273
}
@@ -307,7 +307,7 @@ void print_place(const char* net_file,
307307
if (strlen(cluster_ctx.clb_nlist.block_name(blk_id).c_str()) < 8)
308308
fprintf(fp, "\t");
309309

310-
fprintf(fp, "%d\t%d\t%d", place_ctx.block_locs[blk_id].x, place_ctx.block_locs[blk_id].y, place_ctx.block_locs[blk_id].z);
310+
fprintf(fp, "%d\t%d\t%d", place_ctx.block_locs[blk_id].loc.x, place_ctx.block_locs[blk_id].loc.y, place_ctx.block_locs[blk_id].loc.z);
311311
fprintf(fp, "\t#%zu\n", size_t(blk_id));
312312
}
313313
}

vpr/src/base/read_route.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ static void process_global_blocks(ifstream &fp, ClusterNetId inet, const char* f
379379
"Block %s for block number %lu specified in the routing file does not match given %s",
380380
tokens[1].c_str(), size_t(bnum), cluster_ctx.clb_nlist.block_name(bnum).c_str());
381381
}
382-
if (place_ctx.block_locs[bnum].x != x || place_ctx.block_locs[bnum].y != y) {
382+
if (place_ctx.block_locs[bnum].loc.x != x || place_ctx.block_locs[bnum].loc.y != y) {
383383
vpr_throw(VPR_ERROR_ROUTE, filename, lineno,
384384
"The placement coordinates (%d, %d) of %d block does not match given (%d, %d)",
385-
x, y, place_ctx.block_locs[bnum].x, place_ctx.block_locs[bnum].y);
385+
x, y, place_ctx.block_locs[bnum].loc.x, place_ctx.block_locs[bnum].loc.y);
386386
}
387387

388388
int pin_index = cluster_ctx.clb_nlist.net_pin_physical_index(inet, pin_counter);

0 commit comments

Comments
 (0)