Merge pull request #311 from YosysHQ/deprecate-default-package

Add deprecation warning for default packages
This commit is contained in:
David Shah 2019-08-09 10:27:03 +01:00 committed by GitHub
commit 67488f780c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -220,8 +220,11 @@ std::unique_ptr<Context> ECP5CommandHandler::createContext(std::unordered_map<st
if (chipArgs.type == ArchArgs::NONE)
chipArgs.type = ArchArgs::LFE5U_45F;
if (chipArgs.package.empty())
if (chipArgs.package.empty()) {
chipArgs.package = "CABGA381";
log_warning("Use of default value for --package is deprecated. Please add '--package %s' to arguments.\n",
chipArgs.package.c_str());
}
if (chipArgs.type == ArchArgs::LFE5UM5G_25F || chipArgs.type == ArchArgs::LFE5UM5G_45F ||
chipArgs.type == ArchArgs::LFE5UM5G_85F) {

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -ex
yosys blinky.ys
../../../nextpnr-ice40 --json blinky.json --pcf blinky.pcf --asc blinky.asc
../../../nextpnr-ice40 --hx1k --package tq144 --json blinky.json --pcf blinky.pcf --asc blinky.asc
icepack blinky.asc blinky.bin
icebox_vlog blinky.asc > blinky_chip.v
iverilog -o blinky_tb blinky_chip.v blinky_tb.v

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -ex
yosys -p "synth_ice40 -top top -json floorplan.json" floorplan.v
../../../nextpnr-ice40 --up5k --json floorplan.json --pcf icebreaker.pcf --asc floorplan.asc --ignore-loops --pre-place floorplan.py
../../../nextpnr-ice40 --package sg48 --up5k --json floorplan.json --pcf icebreaker.pcf --asc floorplan.asc --ignore-loops --pre-place floorplan.py
icepack floorplan.asc floorplan.bin
iceprog floorplan.bin

View File

@ -157,7 +157,6 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s
if (vm.count("package"))
chipArgs.package = vm["package"].as<std::string>();
if (values.find("arch.name") != values.end()) {
std::string arch_name = values["arch.name"].as_string();
if (arch_name != "ice40")
@ -208,6 +207,9 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s
}
#endif
log_warning("Use of default value for --package is deprecated. Please add '--package %s' to arguments.\n",
chipArgs.package.c_str());
auto ctx = std::unique_ptr<Context>(new Context(chipArgs));
for (auto &val : values)
ctx->settings[ctx->id(val.first)] = val.second;