diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2020-07-08 14:09:44 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2020-07-08 14:09:44 +0200 |
commit | 32ddc94b4f5735b8c28edb1f311533b360888a2a (patch) | |
tree | 7ddfa1bea8e5322c5b08b07b4c91bcfdd06c6a11 /ice40/arch.cc | |
parent | b45b375ff2768ee9bb5190f22cee517f46971022 (diff) | |
download | nextpnr-32ddc94b4f5735b8c28edb1f311533b360888a2a.tar.gz nextpnr-32ddc94b4f5735b8c28edb1f311533b360888a2a.tar.bz2 nextpnr-32ddc94b4f5735b8c28edb1f311533b360888a2a.zip |
Support rest of parts
Diffstat (limited to 'ice40/arch.cc')
-rw-r--r-- | ice40/arch.cc | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/ice40/arch.cc b/ice40/arch.cc index a94d40c8..306c52c2 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -51,9 +51,9 @@ static const ChipInfoPOD *get_chip_info(ArchArgs::ArchArgsTypes chip) chipdb = "ice40/chipdb-384.bin"; } else if (chip == ArchArgs::LP1K || chip == ArchArgs::HX1K) { chipdb = "ice40/chipdb-1k.bin"; - } else if (chip == ArchArgs::U4K) { + } else if (chip == ArchArgs::U1K || chip == ArchArgs::U2K || chip == ArchArgs::U4K) { chipdb = "ice40/chipdb-u4k.bin"; - } else if (chip == ArchArgs::UP5K) { + } else if (chip == ArchArgs::UP3K || chip == ArchArgs::UP5K) { chipdb = "ice40/chipdb-5k.bin"; } else if (chip == ArchArgs::LP8K || chip == ArchArgs::HX8K || chip == ArchArgs::LP4K || chip == ArchArgs::HX4K) { chipdb = "ice40/chipdb-8k.bin"; @@ -74,15 +74,14 @@ std::vector<std::string> Arch::getSupportedPackages(ArchArgs::ArchArgsTypes chip const ChipInfoPOD *chip_info = get_chip_info(chip); std::vector<std::string> packages; for (int i = 0; i < chip_info->num_packages; i++) { - std::string name = chip_info->packages_data[i].name.get(); - if (chip == ArchArgs::LP4K || chip == ArchArgs::HX4K) - { - if (name.find(":4k") != std::string::npos) - name = name.substr(0, name.size()-3); - else - continue; - } - packages.push_back(name); + std::string name = chip_info->packages_data[i].name.get(); + if (chip == ArchArgs::LP4K || chip == ArchArgs::HX4K) { + if (name.find(":4k") != std::string::npos) + name = name.substr(0, name.size() - 3); + else + continue; + } + packages.push_back(name); } return packages; } @@ -128,8 +127,14 @@ std::string Arch::getChipName() const return "Lattice LP1K"; } else if (args.type == ArchArgs::HX1K) { return "Lattice HX1K"; + } else if (args.type == ArchArgs::UP3K) { + return "Lattice UP3K"; } else if (args.type == ArchArgs::UP5K) { return "Lattice UP5K"; + } else if (args.type == ArchArgs::U1K) { + return "Lattice U1K"; + } else if (args.type == ArchArgs::U2K) { + return "Lattice U2K"; } else if (args.type == ArchArgs::U4K) { return "Lattice U4K"; } else if (args.type == ArchArgs::LP4K) { @@ -155,8 +160,14 @@ IdString Arch::archArgsToId(ArchArgs args) const return id("lp1k"); if (args.type == ArchArgs::HX1K) return id("hx1k"); + if (args.type == ArchArgs::UP3K) + return id("up3k"); if (args.type == ArchArgs::UP5K) return id("up5k"); + if (args.type == ArchArgs::U1K) + return id("u1k"); + if (args.type == ArchArgs::U2K) + return id("u2k"); if (args.type == ArchArgs::U4K) return id("u4k"); if (args.type == ArchArgs::LP4K) |