From 1839a3a770a71c928b92bf876e04728d2649e425 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 1 Aug 2019 14:28:21 +0100 Subject: Major Property improvements for common and iCE40 Signed-off-by: David Shah --- ice40/main.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ice40/main.cc') diff --git a/ice40/main.cc b/ice40/main.cc index 83cb04b0..b656f932 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -159,12 +159,12 @@ std::unique_ptr Ice40CommandHandler::createContext(std::unordered_map(); if (values.find("arch.name") != values.end()) { - std::string arch_name = values["arch.name"].str; + std::string arch_name = values["arch.name"].as_string(); if (arch_name != "ice40") 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"].as_string(); if (chipArgs.type != ArchArgs::NONE) log_error("Overriding architecture is unsuported.\n"); @@ -195,7 +195,7 @@ std::unique_ptr Ice40CommandHandler::createContext(std::unordered_map Ice40CommandHandler::createContext(std::unordered_mapsettings[ctx->id("arch.package")] = ctx->archArgs().package; if (vm.count("promote-logic")) - ctx->settings[ctx->id("promote_logic")] = "1"; + ctx->settings[ctx->id("promote_logic")] = Property::State::S1; if (vm.count("no-promote-globals")) - ctx->settings[ctx->id("no_promote_globals")] = "1"; + ctx->settings[ctx->id("no_promote_globals")] = Property::State::S1; if (vm.count("opt-timing")) - ctx->settings[ctx->id("opt_timing")] = "1"; + ctx->settings[ctx->id("opt_timing")] = Property::State::S1; if (vm.count("pcf-allow-unconstrained")) - ctx->settings[ctx->id("pcf_allow_unconstrained")] = "1"; + ctx->settings[ctx->id("pcf_allow_unconstrained")] = Property::State::S1; return ctx; } -- cgit v1.2.3