Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
93cddd5
Start porting initial placer from VPR to npnr
Jul 11, 2018
a0a5174
Match original npnr messaging during initial placement
Jul 11, 2018
6020eef
Emulate VPR functionality by locking IOs after initial placement
Jul 11, 2018
6deafe5
Add TODO
Jul 11, 2018
65c0e50
Cleanup
Jul 11, 2018
56c33d2
Remove IOs from autoplaced, plus cleanup spacing
Jul 11, 2018
73c628d
Started cramming the VPR placer in; at least enough to compute the st…
Jul 11, 2018
ea14552
Revert ice40/chipdb.py to master
Jul 11, 2018
cada2ef
vpr_find_to to now return legal block; also fix uninitialised cost value
Jul 11, 2018
1368b2a
Rename free_locations_back -> free_locations_front
Jul 12, 2018
4bce378
Disable valid check during placement
Jul 12, 2018
bc03441
Add place_vpr.inc which comes from VPR, and refactor place_vpr.cc to …
Jul 12, 2018
bcd9e39
Comment out unused bits
Jul 14, 2018
25f296c
try_place() to accept grid_width and grid_height
Jul 14, 2018
92c97ef
Start implementing more VPR functions...
Jul 14, 2018
f8fac89
Make grid_width and grid_height global too
Jul 14, 2018
3248ed7
Fix compile errors
Jul 14, 2018
de09bfd
starting_t computation now working
Jul 14, 2018
fc8c0e7
WIP
Jul 14, 2018
aab5105
Update bounding boxes
Jul 15, 2018
dbfb518
Unbind all affected blocks before binding new ones
Jul 15, 2018
48e4cf3
Refactor
Jul 15, 2018
14ae6ca
More refactoring
Jul 15, 2018
eb08209
Support grid[x][y]
Jul 15, 2018
9ebfb8f
Cleanup
Jul 15, 2018
efa1c1e
Cleanup some more
Jul 15, 2018
a384d3a
initial_placement_location() to only pick valid cells too
Jul 15, 2018
24fe95d
Check for global nets
Jul 15, 2018
2438c45
Add Arch::isGlobalNet() function for generic arch
Jul 15, 2018
a2edccc
Skip initial placement of already placed cells, plus fix global net c…
Jul 15, 2018
ae5e8a4
Add ice40 architecture specific place phase for placing all reset/cen…
Jul 15, 2018
a7d674d
Speedup Arch::isValidBelForCell()
Jul 15, 2018
894b430
Optimise pick_from_block sampling by using vector of cells
Jul 15, 2018
3aebb48
Fix header guards
Jul 15, 2018
a0db9a0
Add vpr_place function
Jul 15, 2018
5a3a84d
Merge branch 'master' into vpr_place
eddiehung Jul 15, 2018
cd530c2
Move place_gbs into place_vpr()
eddiehung Jul 15, 2018
02f534a
Make consistent with upstream
eddiehung Jul 15, 2018
9d146d4
Fix grid[][] to capture all bels at that location
eddiehung Jul 15, 2018
4c9d8bc
Add comment for pick_from_block()
eddiehung Jul 15, 2018
928eec6
Comments
eddiehung Jul 15, 2018
7a9204f
Fix off-by-one in find_to_location()'s use of rng()
eddiehung Jul 15, 2018
14c0575
Speedup VPR placer by using std::vector not std::unordered_map
eddiehung Jul 17, 2018
bc2f7b3
Revert further to VPR structures
eddiehung Jul 17, 2018
7a0c566
Add comment
eddiehung Jul 17, 2018
23fb6f0
Merge remote-tracking branch 'origin/master' into vpr_place
eddiehung Jul 17, 2018
de94935
Merge remote-tracking branch 'origin/master' into vpr_place
eddiehung Jul 18, 2018
9c24d2a
Keep track of total swaps considered/accepted and print at end
eddiehung Jul 18, 2018
1f4d8cb
WIP for timing based placement
eddiehung Jul 18, 2018
821bc54
Compiles but doesn't work yet
eddiehung Jul 18, 2018
3d87822
Merge from master, resolve conflicts
eddiehung Jul 19, 2018
51c5fb8
Use NetInfo->udata instead of ->name.index
eddiehung Jul 19, 2018
1356e40
Enable outer_loop_recompute_criticalities
eddiehung Jul 21, 2018
17cdeac
More compatibility, and enable check_place
eddiehung Jul 21, 2018
b3e7206
Cleanup
eddiehung Jul 21, 2018
dab39b6
Revert to original net_is_global() function
eddiehung Jul 21, 2018
7a82505
Missing line
eddiehung Jul 21, 2018
3b77e0f
Fix pin_net_index()
eddiehung Jul 21, 2018
840f511
Fix timing update issue due to pin_net_index
eddiehung Jul 21, 2018
457d3cd
Use VPR words
eddiehung Jul 21, 2018
696d538
Fix invalid memory access
eddiehung Jul 21, 2018
9cd2b07
Add more timing stuff
eddiehung Jul 21, 2018
d40dbc2
Merge remote-tracking branch 'origin/master' into vpr_place
eddiehung Jul 21, 2018
5e064aa
Fix compile issue
eddiehung Jul 21, 2018
b9e3aa1
Fix calculate_clb_net_pin_criticality() to not blow up with small slacks
eddiehung Jul 21, 2018
938d4e4
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Jul 21, 2018
a02b10c
Disable router1 update_budget for now
eddiehung Jul 21, 2018
ff6863f
Support timing_info.update() to call update_budget()
eddiehung Jul 21, 2018
6eab1b4
Merge branch 'redist_slack' into vpr_place
eddiehung Jul 22, 2018
ca12ec7
WIP for VPR macro support
eddiehung Jul 22, 2018
69c69b1
Cleanup initial_placement()
eddiehung Jul 22, 2018
1a7e8dc
WIP for initial macro placement
eddiehung Jul 22, 2018
37d9332
Move from estimatePosition() to getBelLocation()
eddiehung Jul 22, 2018
1ca7c94
Set z_offset for carry chains
eddiehung Jul 22, 2018
dd1aba4
free_locations for macro placement is z == 0
eddiehung Jul 22, 2018
e29ae1d
WIP
eddiehung Jul 22, 2018
512a28f
Shuffle free_locations, fix bugs, cleanup
eddiehung Jul 23, 2018
7fd70fb
Fix macro init
eddiehung Jul 23, 2018
6cda74e
Fix filtering free_locations
eddiehung Jul 23, 2018
6e13b03
Port over carry legalisation from place_legaliser.cc
eddiehung Jul 23, 2018
e1e2969
Refactor place_legaliser for prepare_and_find_carries()
eddiehung Jul 23, 2018
cead10c
Use new prepare_and_find_carries() function
eddiehung Jul 23, 2018
43ea78f
Add support for get_imacro_from_iblk()
eddiehung Jul 23, 2018
bdf9b12
Preparing for macro swapping
eddiehung Jul 23, 2018
f5a59f3
assign_budget() after prepare_and_find_carries()
eddiehung Jul 23, 2018
ac21078
WIP -- completes placement but fails validity check
eddiehung Jul 23, 2018
0659b93
Fix criticality computation for VPR to return [0,1]
eddiehung Jul 23, 2018
44c009c
When swapping macros, check if to cell is compatible with from bel
eddiehung Jul 23, 2018
24a34c7
Disable all slack redistribution...
eddiehung Jul 23, 2018
d92f244
Fix criticality computation
eddiehung Jul 23, 2018
61fab6b
Merge branch 'redist_slack' into vpr_place
eddiehung Jul 23, 2018
e6a6e47
Enable slack redist, fix compile issue
eddiehung Jul 24, 2018
8317b11
Merge branch 'master' into 'master'
Jul 26, 2018
ab7ed31
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Jul 27, 2018
fc6a63e
Fixes for master
eddiehung Jul 27, 2018
9a3a074
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Jul 28, 2018
f2a6598
Fix slack computation
eddiehung Jul 28, 2018
58a380d
Restore .members of t_pl_macro
eddiehung Jul 28, 2018
5339609
Revert to vtr::irand and vtr::frand
eddiehung Jul 28, 2018
e002b8f
For macros swaps, use a two pass approach to determine validity
eddiehung Jul 28, 2018
5f4fdd3
HACK to force macros swaps to take same Z value
eddiehung Jul 28, 2018
c0abd12
Print out CPD, and cope with illegal Z when finding swaps
eddiehung Jul 28, 2018
e3e32bc
compute_fmax to return minimum slack
eddiehung Jul 28, 2018
43e557a
Add stubs for tatum::TimingPathInfo
eddiehung Jul 28, 2018
fd334cd
Typo
eddiehung Jul 28, 2018
15474e7
Fix warning
eddiehung Jul 28, 2018
cf9bfaf
Move VPR code from common/ to vpr/
eddiehung Jul 28, 2018
0fa65a8
Put some more things back in the right place
eddiehung Jul 28, 2018
8a23a3d
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Jul 28, 2018
da2740f
Cleanup, add support for sTNS and sWNS
eddiehung Jul 28, 2018
22078de
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Jul 28, 2018
a76a286
update_budget -> assign_budget
eddiehung Jul 28, 2018
cd0bc41
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Jul 29, 2018
ef16f99
Support update_screen()
eddiehung Jul 29, 2018
58db6a8
Comment out ENABLE_CLASSIC_VPR_STA
eddiehung Jul 29, 2018
cc2107a
Cleanup
eddiehung Jul 29, 2018
b6699eb
Merge branch 'redist_slack' into 'redist_slack'
Jul 31, 2018
80760b0
Merge remote-tracking branch 'origin/master' into vpr_place
eddiehung Jul 31, 2018
d8ff7a6
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Jul 31, 2018
1e54147
Merge branch 'redist_slack' into 'redist_slack'
Aug 1, 2018
08ae50c
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Aug 1, 2018
fd11ce4
Merge branch 'redist_slack' into 'redist_slack'
Aug 1, 2018
191fe64
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Aug 1, 2018
68d32b3
Merge branch 'redist_slack' into 'redist_slack'
Aug 1, 2018
919c67b
Merge remote-tracking branch 'origin/redist_slack' into vpr_place
eddiehung Aug 1, 2018
b67ae0a
Refactor into place_macro.{cpp,h}, speedup pl_macros, cleanup
eddiehung Aug 3, 2018
67cd6eb
Merge https://github.com/YosysHQ/nextpnr into vpr_place
eddiehung Aug 7, 2018
96bfac2
Add print_fmax argument back to timing_analysis()
eddiehung Aug 7, 2018
43334fa
Update call to timing_analysis from router1
eddiehung Aug 7, 2018
3f08799
Fix merge with upstream
eddiehung Aug 7, 2018
4653a2b
assign_budget() to return min_slack too
eddiehung Aug 7, 2018
e220f81
Run assign_budget() or timing_analysis(); not both
eddiehung Aug 7, 2018
9f31c30
Port over macro checking in VPR's check_place()
eddiehung Aug 7, 2018
032b6ae
Query context for (x,y,z) location to Bel
eddiehung Aug 7, 2018
d707d3f
Fix check
eddiehung Aug 7, 2018
5f7953f
Fix clobbering
eddiehung Aug 7, 2018
e4c3bc2
Revert "Query context for (x,y,z) location to Bel"
eddiehung Aug 7, 2018
2245c5f
Use chip_info for width and height
eddiehung Aug 7, 2018
50e8aac
Add VTR attribution
eddiehung Aug 10, 2018
a23aafd
Merge branch 'master' into vpr_place
eddiehung Oct 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ build/
/Testing/*
CTestTestfile.cmake
install_manifest.txt
*.gdb_history
/bbasm
/ImportExecutables.cmake
*-coverage/
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ if (BUILD_PYTHON)
endif ()
endif()

include_directories(common/ json/ ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
include_directories(common/ json/ ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} .)
aux_source_directory(common/ COMMON_SRC_FILES)
aux_source_directory(json/ JSON_PARSER_FILES)
set(COMMON_FILES ${COMMON_SRC_FILES} ${JSON_PARSER_FILES})
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
nextpnr -- a portable FPGA place and route tool
===============================================

### *This `vpr_place` branch contains code adapted from the [Verilog-To-Routing](https://verilogtorouting.org/) project.*

nextpnr aims to be a vendor neutral, timing driven, FOSS FPGA place and route
tool.

Expand Down
7 changes: 6 additions & 1 deletion common/command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ po::options_description CommandHandler::getGeneralOptions()
general.add_options()("no-tmdriv", "disable timing-driven placement");
general.add_options()("save", po::value<std::string>(), "project file to write");
general.add_options()("load", po::value<std::string>(), "project file to read");

general.add_options()("vpr_place", "use VPR placer");
return general;
}

Expand Down Expand Up @@ -207,7 +209,10 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx)
ctx->check();
print_utilisation(ctx.get());
if (!vm.count("pack-only")) {
if (!ctx->place() && !ctx->force)
if (vm.count("vpr_place")) {
if (!ctx->place_vpr() && !ctx->force)
log_error("Placing design failed.\n");
} else if (!ctx->place() && !ctx->force)
log_error("Placing design failed.\n");
ctx->check();
if (!ctx->route() && !ctx->force)
Expand Down
9 changes: 9 additions & 0 deletions common/placer1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class SAPlacer
double avg_metric = curr_metric;
temp = 10000;

tot_move = tot_accept = 0;

// Main simulated annealing loop
for (int iter = 1;; iter++) {
n_move = n_accept = 0;
Expand Down Expand Up @@ -267,9 +269,15 @@ class SAPlacer
curr_metric += wl;
}

tot_move += n_move;
tot_accept += n_accept;

// Let the UI show visualization updates.
ctx->yield();
}

log_info(" swaps attempted: %d acceptance rate: %.3f\n", tot_move, double(tot_accept)/double(tot_move));

// Final post-pacement validitiy check
ctx->yield();
for (auto bel : ctx->getBels()) {
Expand Down Expand Up @@ -476,6 +484,7 @@ class SAPlacer
float temp = 1000;
bool improved = false;
int n_move, n_accept;
int tot_move, tot_accept;
int diameter = 35, max_x = 1, max_y = 1;
std::unordered_map<IdString, int> bel_types;
std::vector<std::vector<std::vector<std::vector<BelId>>>> fast_bels;
Expand Down
6 changes: 3 additions & 3 deletions common/placer1.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
#ifndef PLACE_H
#define PLACE_H
#ifndef PLACER1_H
#define PLACER1_H

#include "nextpnr.h"
#include "settings.h"
Expand All @@ -34,4 +34,4 @@ extern bool placer1(Context *ctx, Placer1Cfg cfg);

NEXTPNR_NAMESPACE_END

#endif // PLACE_H
#endif // PLACER1_H
Loading