diff options
Diffstat (limited to 'ice40/chip.cc')
-rw-r--r-- | ice40/chip.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ice40/chip.cc b/ice40/chip.cc index b2601e2a..e6116287 100644 --- a/ice40/chip.cc +++ b/ice40/chip.cc @@ -106,6 +106,35 @@ Chip::Chip(ChipArgs args) : args(args) // ----------------------------------------------------------------------- +std::string Chip::getChipName() +{ +#ifdef ICE40_HX1K_ONLY + if (args.type == ChipArgs::HX1K) { + return "Lattice LP1K"; + } else { + log_error("Unsupported iCE40 chip type.\n"); + } +#else + if (args.type == ChipArgs::LP384) { + return "Lattice LP384"; + } else if (args.type == ChipArgs::LP1K) { + return "Lattice LP1K"; + } else if (args.type == ChipArgs::HX1K) { + return "Lattice HX1K"; + } else if (args.type == ChipArgs::UP5K) { + return "Lattice UP5K"; + } else if (args.type == ChipArgs::LP8K) { + return "Lattice LP8K"; + } else if (args.type == ChipArgs::HX8K) { + return "Lattice HX8K"; + } else { + log_error("Unknown chip\n"); + } +#endif +} + +// ----------------------------------------------------------------------- + BelId Chip::getBelByName(IdString name) const { BelId ret; |