Skip to content
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

Workdir parameter #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions src/Silisizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ std::string reverseOpenSTANaming(std::string cellname) {
}

// Silisizer: resize operator-level cells to resolve timing violations
int Silisizer::silisize(int max_iter,
int Silisizer::silisize(const char* workdir,
int max_iter,
int min_paths_per_group,
int max_paths_per_group,
int min_swaps_per_iter,
Expand All @@ -73,7 +74,7 @@ int Silisizer::silisize(int max_iter,
const double TARGET_FINISH_ITER = max_iter * 0.5; // iter to try to finish by

// Output the header for back-annotation CSV
std::ofstream transforms("preqorsor/data/resized_cells.csv");
std::ofstream transforms(std::string(workdir) + "/data/resized_cells.csv");
if (transforms.good()) {
transforms << "Scope" << "," << "Instance" << "," << "From cell" << ","
<< "To cell" << std::endl;
Expand Down
3 changes: 2 additions & 1 deletion src/Silisizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ namespace SILISIZER {
class Silisizer : public sta::Sta {
public:
~Silisizer() {}
int silisize(int max_iter = 200,
int silisize(const char* workdir,
int max_iter = 200,
int min_paths_per_group = 100,
int max_paths_per_group = 2000,
int min_swaps_per_iter = 3,
Expand Down
1 change: 1 addition & 0 deletions src/Silisizer.i
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
%inline %{

extern int silisize(
const char* workdir,
int max_iter = 200,
int min_paths_per_group = 100,
int max_paths_per_group = 2000,
Expand Down
5 changes: 3 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ static int silisizer_argc;
static char **silisizer_argv;
static Silisizer *sizer = nullptr;

int silisize(int max_iter = 200,
int silisize(const char* workdir,
int max_iter = 200,
int min_paths_per_group = 100,
int max_paths_per_group = 2000,
int min_swaps_per_iter = 3,
int max_swaps_per_iter = 20,
double delay_weight_exp = 1.0,
double slack_weight_exp = 1.0) {
return sizer->silisize(
max_iter, min_paths_per_group, max_paths_per_group,
workdir, max_iter, min_paths_per_group, max_paths_per_group,
min_swaps_per_iter, max_swaps_per_iter,
delay_weight_exp, slack_weight_exp);
}
Expand Down