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