diff options
author | David Shah <dave@ds0.me> | 2019-08-01 14:28:21 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-08-05 14:52:15 +0100 |
commit | 1839a3a770a71c928b92bf876e04728d2649e425 (patch) | |
tree | 9de012efabb47f066860918b6360f3966b42f4da /ecp5 | |
parent | 1ecf271cb32f9f78ea082788c6534f2523144d01 (diff) | |
download | nextpnr-1839a3a770a71c928b92bf876e04728d2649e425.tar.gz nextpnr-1839a3a770a71c928b92bf876e04728d2649e425.tar.bz2 nextpnr-1839a3a770a71c928b92bf876e04728d2649e425.zip |
Major Property improvements for common and iCE40
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ecp5')
-rw-r--r-- | ecp5/main.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ecp5/main.cc b/ecp5/main.cc index 75126cea..ed2501a9 100644 --- a/ecp5/main.cc +++ b/ecp5/main.cc @@ -34,7 +34,7 @@ class ECP5CommandHandler : public CommandHandler public: ECP5CommandHandler(int argc, char **argv); virtual ~ECP5CommandHandler(){}; - std::unique_ptr<Context> createContext(std::unordered_map<std::string, Property> &values) override; + std::unique_ptr<Context> createContext(std::unordered_map<std::string, RTLIL::Const> &values) override; void setupArchContext(Context *ctx) override{}; void customAfterLoad(Context *ctx) override; void validate() override; @@ -113,7 +113,7 @@ static std::string speedString(ArchArgs::SpeedGrade speed) return ""; } -std::unique_ptr<Context> ECP5CommandHandler::createContext(std::unordered_map<std::string, Property> &values) +std::unique_ptr<Context> ECP5CommandHandler::createContext(std::unordered_map<std::string, RTLIL::Const> &values) { ArchArgs chipArgs; chipArgs.type = ArchArgs::NONE; @@ -162,12 +162,12 @@ std::unique_ptr<Context> ECP5CommandHandler::createContext(std::unordered_map<st chipArgs.speed = ArchArgs::SPEED_6; } if (values.find("arch.name") != values.end()) { - std::string arch_name = values["arch.name"].str; + std::string arch_name = values["arch.name"].decode_string(); if (arch_name != "ecp5") log_error("Unsuported architecture '%s'.\n", arch_name.c_str()); } if (values.find("arch.type") != values.end()) { - std::string arch_type = values["arch.type"].str; + std::string arch_type = values["arch.type"].decode_string(); if (chipArgs.type != ArchArgs::NONE) log_error("Overriding architecture is unsuported.\n"); @@ -196,10 +196,10 @@ std::unique_ptr<Context> ECP5CommandHandler::createContext(std::unordered_map<st if (values.find("arch.package") != values.end()) { if (vm.count("package")) log_error("Overriding architecture is unsuported.\n"); - chipArgs.package = values["arch.package"].str; + chipArgs.package = values["arch.package"].decode_string(); } if (values.find("arch.speed") != values.end()) { - std::string arch_speed = values["arch.speed"].str; + std::string arch_speed = values["arch.speed"].decode_string(); if (arch_speed == "6") chipArgs.speed = ArchArgs::SPEED_6; else if (arch_speed == "7") |