Skip to content
Merged
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
1 change: 1 addition & 0 deletions src/Compiler/Compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ class Compiler {
std::filesystem::path m_autoLayoutGeneratedVPRXMLPath{};
std::filesystem::path m_autoLayoutGeneratedRRGraphBinPath{};
std::filesystem::path m_autoLayoutGeneratedRouterLookaheadBinPath{};
bool m_useAnalyticalPlace = false;

// Tasks generic options
IPGenerateOpt m_ipGenerateOpt = IPGenerateOpt::None;
Expand Down
50 changes: 48 additions & 2 deletions src/Compiler/CompilerOpenFPGA_ql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3127,6 +3127,7 @@ std::string CompilerOpenFPGA_ql::BaseStaScript(std::string libFileName,
}

bool CompilerOpenFPGA_ql::Packing() {

// Using a Scope Guard so this will fire even if we exit mid function
// This will fire when the containing function goes out of scope
auto guard = sg::make_scope_guard([this] {
Expand Down Expand Up @@ -3197,6 +3198,29 @@ bool CompilerOpenFPGA_ql::Packing() {
ofssdc.close();
#endif // #if UPSTREAM_UNUSED


// reload QLSettingsManager() to ensure we account for dynamic changes in the settings/power json:
QLSettingsManager::reloadJSONSettings();

// check if settings were loaded correctly before proceeding:
if((QLSettingsManager::getInstance()->settings_json).empty()) {
ErrorMessage("Project Settings JSON is missing, please check <project_name> and corresponding <project_name>.json exists: " + ProjManager()->projectName());
return false;
}

if( QLSettingsManager::getStringValue("general", "options", "analytical_place") == "checked") {
m_useAnalyticalPlace = true;
}
else {
m_useAnalyticalPlace = false;
}

if(m_useAnalyticalPlace) {
m_state = State::Packed;
Message("Design " + ProjManager()->projectName() + " packing is skipped as we are in Analytical Place flow!");
return true;
}

std::filesystem::path io_floor_planningpath = std::filesystem::path(ProjManager()->projectPath()) /
std::string(ProjManager()->projectName() + "_constraints.xml");
if (fs::exists(io_floor_planningpath)) {
Expand Down Expand Up @@ -3973,6 +3997,22 @@ bool CompilerOpenFPGA_ql::Placement() {
}
#endif // #if UPSTREAM_UNUSED

// reload QLSettingsManager() to ensure we account for dynamic changes in the settings/power json:
QLSettingsManager::reloadJSONSettings();

// check if settings were loaded correctly before proceeding:
if((QLSettingsManager::getInstance()->settings_json).empty()) {
ErrorMessage("Project Settings JSON is missing, please check <project_name> and corresponding <project_name>.json exists: " + ProjManager()->projectName());
return false;
}

if( QLSettingsManager::getStringValue("general", "options", "analytical_place") == "checked") {
m_useAnalyticalPlace = true;
}
else {
m_useAnalyticalPlace = false;
}

// generate pin contraints file or use pre-generated .place file, if required.
// this string should contain the path of the PinConstraints file, if generated correctly.
// the "filepath_fpga_fix_pins_place_str" variable will be empty if:
Expand All @@ -3997,8 +4037,14 @@ bool CompilerOpenFPGA_ql::Placement() {
command += std::string(" ") + vpr_custom_options_string;
}

command += std::string(" ") +
std::string("--place");
if(m_useAnalyticalPlace) {
command += std::string(" ") +
std::string("--analytical_place");
}
else {
command += std::string(" ") +
std::string("--place");
}

if (!filepath_fpga_fix_pins_place_str.empty()) {
command += std::string(" --fix_clusters") +
Expand Down
38 changes: 19 additions & 19 deletions src/Compiler/QLDeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,25 +1072,25 @@ void QLDeviceManager::parseDeviceData() {


// DEBUG
std::cout << "============ DEBUG++ ============" << std::endl;
for (QLDeviceType device: device_list) {
std::cout << "Device: " + device.family + " " + device.foundry + " " + device.node + " " + device.devicename << std::endl;
for (QLDeviceVariant variant: device.device_variants) {
std::cout << " Variant: " + variant.voltage_threshold + " " + variant.p_v_t_corner << std::endl;
for (QLDeviceVariantLayout layout: variant.device_variant_layouts) {
std::cout << " layout_name:" + layout.name + "\n" +
" w:" + std::to_string(layout.width) + "\n" +
" h:" + std::to_string(layout.height) + "\n" +
" clb:" + std::to_string(layout.clb) + "\n" +
" io:" + std::to_string(layout.io) + "\n" +
" bram:" + std::to_string(layout.bram) + "\n" +
" dsp:" + std::to_string(layout.dsp)
<< std::endl;
}
}
std::cout << "\n" << std::endl;
}
std::cout << "============ DEBUG-- ============" << std::endl;
// std::cout << "============ DEBUG++ ============" << std::endl;
// for (QLDeviceType device: device_list) {
// std::cout << "Device: " + device.family + " " + device.foundry + " " + device.node + " " + device.devicename << std::endl;
// for (QLDeviceVariant variant: device.device_variants) {
// std::cout << " Variant: " + variant.voltage_threshold + " " + variant.p_v_t_corner << std::endl;
// for (QLDeviceVariantLayout layout: variant.device_variant_layouts) {
// std::cout << " layout_name:" + layout.name + "\n" +
// " w:" + std::to_string(layout.width) + "\n" +
// " h:" + std::to_string(layout.height) + "\n" +
// " clb:" + std::to_string(layout.clb) + "\n" +
// " io:" + std::to_string(layout.io) + "\n" +
// " bram:" + std::to_string(layout.bram) + "\n" +
// " dsp:" + std::to_string(layout.dsp)
// << std::endl;
// }
// }
// std::cout << "\n" << std::endl;
// }
// std::cout << "============ DEBUG-- ============" << std::endl;
//DEBUG
}

Expand Down
Loading