Adding LP4K as well
This commit is contained in:
parent
3be76a837d
commit
6991a53d68
@ -87,6 +87,8 @@ void MainWindow::new_proj()
|
|||||||
arch.insert("Lattice U4K", ArchArgs::U4K);
|
arch.insert("Lattice U4K", ArchArgs::U4K);
|
||||||
if (Arch::isAvailable(ArchArgs::UP5K))
|
if (Arch::isAvailable(ArchArgs::UP5K))
|
||||||
arch.insert("Lattice UP5K", ArchArgs::UP5K);
|
arch.insert("Lattice UP5K", ArchArgs::UP5K);
|
||||||
|
if (Arch::isAvailable(ArchArgs::LP4K))
|
||||||
|
arch.insert("Lattice LP4K", ArchArgs::LP4K);
|
||||||
if (Arch::isAvailable(ArchArgs::LP8K))
|
if (Arch::isAvailable(ArchArgs::LP8K))
|
||||||
arch.insert("Lattice LP8K", ArchArgs::LP8K);
|
arch.insert("Lattice LP8K", ArchArgs::LP8K);
|
||||||
if (Arch::isAvailable(ArchArgs::HX4K))
|
if (Arch::isAvailable(ArchArgs::HX4K))
|
||||||
|
@ -55,7 +55,7 @@ static const ChipInfoPOD *get_chip_info(ArchArgs::ArchArgsTypes chip)
|
|||||||
chipdb = "ice40/chipdb-u4k.bin";
|
chipdb = "ice40/chipdb-u4k.bin";
|
||||||
} else if (chip == ArchArgs::UP5K) {
|
} else if (chip == ArchArgs::UP5K) {
|
||||||
chipdb = "ice40/chipdb-5k.bin";
|
chipdb = "ice40/chipdb-5k.bin";
|
||||||
} else if (chip == ArchArgs::LP8K || chip == ArchArgs::HX8K || chip == ArchArgs::HX4K) {
|
} else if (chip == ArchArgs::LP8K || chip == ArchArgs::HX8K || chip == ArchArgs::LP4K || chip == ArchArgs::HX4K) {
|
||||||
chipdb = "ice40/chipdb-8k.bin";
|
chipdb = "ice40/chipdb-8k.bin";
|
||||||
} else {
|
} else {
|
||||||
log_error("Unknown chip\n");
|
log_error("Unknown chip\n");
|
||||||
@ -75,7 +75,7 @@ std::vector<std::string> Arch::getSupportedPackages(ArchArgs::ArchArgsTypes chip
|
|||||||
std::vector<std::string> packages;
|
std::vector<std::string> packages;
|
||||||
for (int i = 0; i < chip_info->num_packages; i++) {
|
for (int i = 0; i < chip_info->num_packages; i++) {
|
||||||
std::string name = chip_info->packages_data[i].name.get();
|
std::string name = chip_info->packages_data[i].name.get();
|
||||||
if (chip == ArchArgs::HX4K)
|
if (chip == ArchArgs::LP4K || chip == ArchArgs::HX4K)
|
||||||
{
|
{
|
||||||
if (name.find(":4k") != std::string::npos)
|
if (name.find(":4k") != std::string::npos)
|
||||||
name = name.substr(0, name.size()-3);
|
name = name.substr(0, name.size()-3);
|
||||||
@ -99,7 +99,7 @@ Arch::Arch(ArchArgs args) : args(args)
|
|||||||
|
|
||||||
package_info = nullptr;
|
package_info = nullptr;
|
||||||
std::string package_name = args.package;
|
std::string package_name = args.package;
|
||||||
if (args.type == ArchArgs::HX4K)
|
if (args.type == ArchArgs::LP4K || args.type == ArchArgs::HX4K)
|
||||||
package_name += ":4k";
|
package_name += ":4k";
|
||||||
|
|
||||||
for (int i = 0; i < chip_info->num_packages; i++) {
|
for (int i = 0; i < chip_info->num_packages; i++) {
|
||||||
@ -132,6 +132,8 @@ std::string Arch::getChipName() const
|
|||||||
return "Lattice UP5K";
|
return "Lattice UP5K";
|
||||||
} else if (args.type == ArchArgs::U4K) {
|
} else if (args.type == ArchArgs::U4K) {
|
||||||
return "Lattice U4K";
|
return "Lattice U4K";
|
||||||
|
} else if (args.type == ArchArgs::LP4K) {
|
||||||
|
return "Lattice LP4K";
|
||||||
} else if (args.type == ArchArgs::LP8K) {
|
} else if (args.type == ArchArgs::LP8K) {
|
||||||
return "Lattice LP8K";
|
return "Lattice LP8K";
|
||||||
} else if (args.type == ArchArgs::HX4K) {
|
} else if (args.type == ArchArgs::HX4K) {
|
||||||
@ -157,6 +159,8 @@ IdString Arch::archArgsToId(ArchArgs args) const
|
|||||||
return id("up5k");
|
return id("up5k");
|
||||||
if (args.type == ArchArgs::U4K)
|
if (args.type == ArchArgs::U4K)
|
||||||
return id("u4k");
|
return id("u4k");
|
||||||
|
if (args.type == ArchArgs::LP4K)
|
||||||
|
return id("lp4k");
|
||||||
if (args.type == ArchArgs::LP8K)
|
if (args.type == ArchArgs::LP8K)
|
||||||
return id("lp8k");
|
return id("lp8k");
|
||||||
if (args.type == ArchArgs::HX4K)
|
if (args.type == ArchArgs::HX4K)
|
||||||
|
@ -385,6 +385,7 @@ struct ArchArgs
|
|||||||
NONE,
|
NONE,
|
||||||
LP384,
|
LP384,
|
||||||
LP1K,
|
LP1K,
|
||||||
|
LP4K,
|
||||||
LP8K,
|
LP8K,
|
||||||
HX1K,
|
HX1K,
|
||||||
HX4K,
|
HX4K,
|
||||||
|
@ -134,6 +134,11 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s
|
|||||||
chipArgs.package = "tq144";
|
chipArgs.package = "tq144";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm.count("lp4k")) {
|
||||||
|
chipArgs.type = ArchArgs::LP4K;
|
||||||
|
chipArgs.package = "tq144";
|
||||||
|
}
|
||||||
|
|
||||||
if (vm.count("lp8k")) {
|
if (vm.count("lp8k")) {
|
||||||
chipArgs.type = ArchArgs::LP8K;
|
chipArgs.type = ArchArgs::LP8K;
|
||||||
chipArgs.package = "ct256";
|
chipArgs.package = "ct256";
|
||||||
@ -186,6 +191,9 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s
|
|||||||
if (arch_type == "lp1k") {
|
if (arch_type == "lp1k") {
|
||||||
chipArgs.type = ArchArgs::LP1K;
|
chipArgs.type = ArchArgs::LP1K;
|
||||||
}
|
}
|
||||||
|
if (arch_type == "lp4k") {
|
||||||
|
chipArgs.type = ArchArgs::LP4K;
|
||||||
|
}
|
||||||
if (arch_type == "lp8k") {
|
if (arch_type == "lp8k") {
|
||||||
chipArgs.type = ArchArgs::LP8K;
|
chipArgs.type = ArchArgs::LP8K;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user