Skip to content

Commit

Permalink
add use_vpr_latest command EDA-3111
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-rs committed Sep 26, 2024
1 parent e822056 commit 9290363
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Compiler/CompilerOpenFPGA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,25 @@ bool CompilerOpenFPGA::RegisterCommands(TclInterpreter* interp,
};
interp->registerCmd("flat_routing", flat_routing, this, 0);

auto use_vpr_latest = [](void* clientData, Tcl_Interp* interp, int argc,
const char* argv[]) -> int {
CompilerOpenFPGA& comp = *(CompilerOpenFPGA*)clientData;
std::filesystem::path vpr = comp.m_vprExecutablePath.lexically_normal();
constexpr bool dbg = false;
if (dbg) std::cerr << "\n VPR WAS: " << vpr << '\n';
try {
vpr.replace_filename("vpr_latest");
comp.VprExecPath(vpr);
if (dbg) std::cerr << " VPR NOW: " << vpr << "\n\n";
} catch (...) {
if (dbg) {
assert(0);
}
}
return TCL_OK;
};
interp->registerCmd("use_vpr_latest", use_vpr_latest, this, 0);

auto message_severity = [](void* clientData, Tcl_Interp* interp, int argc,
const char* argv[]) -> int {
CompilerOpenFPGA* compiler = (CompilerOpenFPGA*)clientData;
Expand Down

0 comments on commit 9290363

Please sign in to comment.