Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
eb99c5d
[DO NOT MERGE] First E2E Working Version
AlexandreSinger Jan 17, 2024
aae154b
[DO NOT MERGE] Added Star and Hybrid
AlexandreSinger Jan 17, 2024
4d254c6
[DO NOT COMMIT] Added B2B Formulation.
AlexandreSinger Jan 19, 2024
7c8e507
[DO NOT MERGE] Added Sparsity
AlexandreSinger Jan 19, 2024
70db6bb
[DO NOT MERGE] B2B Sparse Storage
AlexandreSinger Jan 20, 2024
ad4f8aa
[Git] Updated GitIgnore
AlexandreSinger Apr 25, 2024
f4e1c52
[AnalyticalPlacement] Infrastructure Building
AlexandreSinger Apr 28, 2024
eabd75a
[AnalyticalPlacement] Added Skeleton for Legalizer
AlexandreSinger Apr 29, 2024
6b6a596
[AnalyticalPlacer] Added Basic Flow-Based Spreader
AlexandreSinger May 1, 2024
5a19c91
[AnalyticalPlacer] Added Skeleton for Full Legalizer
AlexandreSinger May 1, 2024
2fbfaa3
[AnalyticalPlacement] Started Full Legalizer
AlexandreSinger May 2, 2024
84ca0e9
[AnalyticalPlacement] Used Molecules Instead of Atom Blocks
AlexandreSinger May 4, 2024
4d1c8c5
[AnalyticalPlacer] Running into issues with the Full Legalizer
AlexandreSinger May 8, 2024
7f09970
[AnalyticalPlacer] Created a Factory-Style Interface for Solver
AlexandreSinger May 16, 2024
40125ae
[fix io] vpr can read constraint file for fixing io block
May 28, 2024
ca53f0f
[fix io] fixing comments on pull request
Jun 3, 2024
f69257c
[back edge] initial commit for the backedge
Jun 12, 2024
efdea30
[analytical placement] backedge bug fixes
Jun 20, 2024
02921e4
[analytical placement] the backedge with no error, but bad convergence
Jun 25, 2024
1e02ab1
[back edge] addressing comments on github
Jun 27, 2024
ef52b0d
[analytical placer][2b2] initial commit for b2b
Jul 8, 2024
ccef748
[analytical placer][b2b] outer loop and inner loop complete
Jul 11, 2024
0943592
[analytical placer][b2b] Achieves convergence
Jul 11, 2024
9f27196
[analytical placer][b2b] fixed initalize placement and tried constant
Jul 12, 2024
1e9878c
[analytical placer][b2b] addressing PR comments
Jul 13, 2024
f1e79e5
[analytical placer][b2b] fixing PR comments
Jul 15, 2024
027b2c5
[AP] Properly Inserted AP into VPR Flow
AlexandreSinger Jul 15, 2024
74c7c7a
[AP] Created AP Netlist and Fixed Bug in B2B
AlexandreSinger Jul 15, 2024
633492f
[AP] Added Export for Flat Placement File
AlexandreSinger Jul 30, 2024
d89d1d4
[AP] Re-Designed the Legalizer Abstraction
AlexandreSinger Aug 2, 2024
e9efc49
[AP] formatting, simulated annealing output, larger arch desc for mcnc
Jul 25, 2024
73ac3e6
[AP] added timer for profiling
Jul 25, 2024
84d3b3c
[vpr][analytical placer] added macro for analytical placement timing
Aug 13, 2024
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 @@ -127,6 +127,7 @@ odin_ii/usefull_tools/**/track_completed
Session.vim
.netrwhist
*~
.cache

#
# LibreOffice
Expand Down
2 changes: 2 additions & 0 deletions libs/libvtrutil/src/vtr_assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ void handle_assert(const char* expr, const char* file, unsigned int line, const
fprintf(stderr, " (%s)", msg);
}
fprintf(stderr, ".\n");
fflush(stdout); \
fflush(stderr);
std::abort();
}

Expand Down
9 changes: 5 additions & 4 deletions utils/fasm/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ int main(int argc, const char **argv) {
/* Read options, architecture, and circuit netlist */
vpr_init(argc, argv, &Options, &vpr_setup, &Arch);

vpr_setup.PackerOpts.doPacking = STAGE_LOAD;
vpr_setup.PlacerOpts.doPlacement = STAGE_LOAD;
vpr_setup.RouterOpts.doRouting = STAGE_LOAD;
vpr_setup.PackerOpts.doPacking = STAGE_LOAD;
vpr_setup.PlacerOpts.doPlacement = STAGE_LOAD;
vpr_setup.PlacerOpts.doAnalyticalPlacement = STAGE_SKIP;
vpr_setup.RouterOpts.doRouting = STAGE_LOAD;
vpr_setup.RouterOpts.read_rr_edge_metadata = true;
vpr_setup.AnalysisOpts.doAnalysis = STAGE_SKIP;
vpr_setup.AnalysisOpts.doAnalysis = STAGE_SKIP;

bool flow_succeeded = false;
flow_succeeded = vpr_flow(vpr_setup, Arch);
Expand Down
9 changes: 5 additions & 4 deletions utils/fasm/test/test_fasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,12 @@ TEST_CASE("fasm_integration_test", "[fasm]") {
vpr_init(sizeof(argv)/sizeof(argv[0]), argv,
&options, &vpr_setup, &arch);

vpr_setup.PackerOpts.doPacking = STAGE_LOAD;
vpr_setup.PlacerOpts.doPlacement = STAGE_LOAD;
vpr_setup.RouterOpts.doRouting = STAGE_LOAD;
vpr_setup.PackerOpts.doPacking = STAGE_LOAD;
vpr_setup.PlacerOpts.doPlacement = STAGE_LOAD;
vpr_setup.PlacerOpts.doAnalyticalPlacement = STAGE_SKIP;
vpr_setup.RouterOpts.doRouting = STAGE_LOAD;
vpr_setup.RouterOpts.read_rr_edge_metadata = true;
vpr_setup.AnalysisOpts.doAnalysis = STAGE_SKIP;
vpr_setup.AnalysisOpts.doAnalysis = STAGE_SKIP;

bool flow_succeeded = vpr_flow(vpr_setup, arch);
REQUIRE(flow_succeeded == true);
Expand Down
5 changes: 3 additions & 2 deletions vpr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ endif()
include(CheckCXXSymbolExists)

#Collect the source files
# FIXME: We really need to imrove this CMake file...
file(GLOB_RECURSE EXEC_SOURCES src/main.cpp)
file(GLOB_RECURSE LIB_SOURCES src/*/*.cpp)
file(GLOB_RECURSE LIB_HEADERS src/*/*.h)
file(GLOB_RECURSE LIB_SOURCES src/*/*.cpp src/place/analytical_placement/*.cpp)
file(GLOB_RECURSE LIB_HEADERS src/*/*.h src/place/analytical_placement/*.h)
files_to_dirs(LIB_HEADERS LIB_INCLUDE_DIRS)

if(${VPR_DEBUG_PARTITION_TREE})
Expand Down
22 changes: 22 additions & 0 deletions vpr/src/base/CheckSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,28 @@ void CheckSetup(const t_packer_opts& PackerOpts,
NUM_PL_MOVE_TYPES);
}

// Rules for doing analytical placement.
if (PlacerOpts.doAnalyticalPlacement) {
// Make sure that the --place option was not set.
if (PlacerOpts.doPlacement) {
VPR_FATAL_ERROR(VPR_ERROR_OTHER,
"Cannot perform both analytical and non-analytical placement.\n");
}
// Make sure that the --pack option was not set.
if (PackerOpts.doPacking) {
VPR_FATAL_ERROR(VPR_ERROR_OTHER,
"Analytical placement should skip packing.\n");
}

// TODO: Should check that read_vpr_constraint_file is non-empty or
// check within analytical placement that the floorplanning has
// some fixed blocks somewhere. Maybe we can live without fixed
// blocks.

// FIXME: Should we enforce that the size of the device is fixed? Or is
// that defined in the constraints file?
}

if (RouterOpts.doRouting) {
if (!Timing.timing_analysis_enabled
&& (DEMAND_ONLY != RouterOpts.base_cost_type && DEMAND_ONLY_NORMALIZED_LENGTH != RouterOpts.base_cost_type)) {
Expand Down
8 changes: 8 additions & 0 deletions vpr/src/base/SetupVPR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,13 @@ void SetupVPR(const t_options* Options,
//do all
if (!Options->do_packing
&& !Options->do_placement
&& !Options->do_analytical_placement
&& !Options->do_routing
&& !Options->do_analysis) {
//run all stages if none specified
PackerOpts->doPacking = STAGE_DO;
PlacerOpts->doPlacement = STAGE_DO;
PlacerOpts->doAnalyticalPlacement = STAGE_SKIP; // AP not default.
RouterOpts->doRouting = STAGE_DO;
AnalysisOpts->doAnalysis = STAGE_AUTO; //Deferred until implementation status known
} else {
Expand Down Expand Up @@ -272,6 +274,12 @@ void SetupVPR(const t_options* Options,
PlacerOpts->doPlacement = STAGE_DO;
}

if (Options->do_analytical_placement) {
PackerOpts->doPacking = STAGE_SKIP;
PlacerOpts->doPlacement = STAGE_SKIP;
PlacerOpts->doAnalyticalPlacement = STAGE_DO;
}

if (Options->do_packing) {
PackerOpts->doPacking = STAGE_DO;
}
Expand Down
13 changes: 12 additions & 1 deletion vpr/src/base/ShowSetup.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <fstream>
#include <tuple>

#include "vtr_assert.h"
#include "vtr_log.h"
Expand All @@ -18,6 +19,7 @@ static void ShowPackerOpts(const t_packer_opts& PackerOpts);
static void ShowNetlistOpts(const t_netlist_opts& NetlistOpts);
static void ShowPlacerOpts(const t_placer_opts& PlacerOpts,
const t_annealing_sched& AnnealSched);
static void ShowAnalyticalPlacerOpts(const t_placer_opts& PlacerOpts);
static void ShowRouterOpts(const t_router_opts& RouterOpts);
static void ShowAnalysisOpts(const t_analysis_opts& AnalysisOpts);
static void ShowNocOpts(const t_noc_opts& NocOpts);
Expand All @@ -42,6 +44,7 @@ void ShowSetup(const t_vpr_setup& vpr_setup) {

VTR_LOG("Packer: %s\n", (vpr_setup.PackerOpts.doPacking ? "ENABLED" : "DISABLED"));
VTR_LOG("Placer: %s\n", (vpr_setup.PlacerOpts.doPlacement ? "ENABLED" : "DISABLED"));
VTR_LOG("Analytical Placer: %s\n", (vpr_setup.PlacerOpts.doAnalyticalPlacement ? "ENABLED" : "DISABLED"));
VTR_LOG("Router: %s\n", (vpr_setup.RouterOpts.doRouting ? "ENABLED" : "DISABLED"));
VTR_LOG("Analysis: %s\n", (vpr_setup.AnalysisOpts.doAnalysis ? "ENABLED" : "DISABLED"));
VTR_LOG("\n");
Expand All @@ -56,6 +59,9 @@ void ShowSetup(const t_vpr_setup& vpr_setup) {
if (vpr_setup.PlacerOpts.doPlacement) {
ShowPlacerOpts(vpr_setup.PlacerOpts, vpr_setup.AnnealSched);
}
if (vpr_setup.PlacerOpts.doAnalyticalPlacement) {
ShowAnalyticalPlacerOpts(vpr_setup.PlacerOpts);
}
if (vpr_setup.RouterOpts.doRouting) {
ShowRouterOpts(vpr_setup.RouterOpts);
}
Expand Down Expand Up @@ -678,6 +684,11 @@ static void ShowPlacerOpts(const t_placer_opts& PlacerOpts,
VTR_LOG("\n");
}

static void ShowAnalyticalPlacerOpts(const t_placer_opts& PlacerOpts) {
std::ignore = PlacerOpts;
// Currently nothing to show, but will happen eventually.
}

static void ShowNetlistOpts(const t_netlist_opts& NetlistOpts) {
VTR_LOG("NetlistOpts.abosrb_buffer_luts : %s\n", (NetlistOpts.absorb_buffer_luts) ? "true" : "false");
VTR_LOG("NetlistOpts.sweep_dangling_primary_ios : %s\n", (NetlistOpts.sweep_dangling_primary_ios) ? "true" : "false");
Expand Down Expand Up @@ -802,4 +813,4 @@ static void ShowNocOpts(const t_noc_opts& NocOpts) {
VTR_LOG("NocOpts.noc_swap_percentage: %d%%\n", NocOpts.noc_swap_percentage);
VTR_LOG("NocOpts.noc_routing_algorithm: %s\n", NocOpts.noc_placement_file_name.c_str());
VTR_LOG("\n");
}
}
5 changes: 5 additions & 0 deletions vpr/src/base/read_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,11 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
.action(argparse::Action::STORE_TRUE)
.default_value("off");

stage_grp.add_argument<bool, ParseOnOff>(args.do_analytical_placement, "--analytical_place")
.help("Run analytical placement")
.action(argparse::Action::STORE_TRUE)
.default_value("off");

stage_grp.add_argument<bool, ParseOnOff>(args.do_routing, "--route")
.help("Run routing")
.action(argparse::Action::STORE_TRUE)
Expand Down
1 change: 1 addition & 0 deletions vpr/src/base/read_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct t_options {
/* Stage Options */
argparse::ArgValue<bool> do_packing;
argparse::ArgValue<bool> do_placement;
argparse::ArgValue<bool> do_analytical_placement;
argparse::ArgValue<bool> do_routing;
argparse::ArgValue<bool> do_analysis;
argparse::ArgValue<bool> do_power;
Expand Down
9 changes: 9 additions & 0 deletions vpr/src/base/vpr_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
#include "place_constraints.h"
#include "place_util.h"
#include "timing_fail_error.h"
#include "analytical_placement_flow.h"

#include "vpr_constraints_writer.h"

Expand Down Expand Up @@ -406,6 +407,14 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
return false; //Unimplementable
}
}

{ //Analytical Place
if (vpr_setup.PlacerOpts.doAnalyticalPlacement == STAGE_DO) {
// TODO: Make this return a bool if the placement was successful or not.
run_analytical_placement_flow();
}
}

bool is_flat = vpr_setup.RouterOpts.flat_routing;
const Netlist<>& router_net_list = is_flat ? (const Netlist<>&)g_vpr_ctx.atom().nlist : (const Netlist<>&)g_vpr_ctx.clustering().clb_nlist;
RouteStatus route_status;
Expand Down
5 changes: 5 additions & 0 deletions vpr/src/base/vpr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,10 @@ enum class e_move_type;
* @param doPlacement
* True if placement is supposed to be done in the CAD flow.
* False if otherwise.
* @param doAnalyticalPlacement
* True if analytical placement is supposed to be done in the CAD
* flow.
* False if otherwise.
* @param place_constraint_expand
* Integer value that specifies how far to expand the floorplan
* region when printing out floorplan constraints based on
Expand Down Expand Up @@ -1231,6 +1235,7 @@ struct t_placer_opts {
int seed;
float td_place_exp_last;
e_stage_action doPlacement;
e_stage_action doAnalyticalPlacement;
float rlim_escape_fraction;
std::string move_stats_file;
int placement_saves_per_temperature;
Expand Down
Loading