diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-10 18:25:23 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-10 18:25:23 +0200 |
commit | 67227847e5771f7b99d4f6959634012b4b03f2e5 (patch) | |
tree | 408cf2646dab2dd89d46044f61f3b70d951a05ef /ice40/chip.cc | |
parent | d3f1112580b1920cae8684d95e0c5eb65c785efe (diff) | |
download | nextpnr-67227847e5771f7b99d4f6959634012b4b03f2e5.tar.gz nextpnr-67227847e5771f7b99d4f6959634012b4b03f2e5.tar.bz2 nextpnr-67227847e5771f7b99d4f6959634012b4b03f2e5.zip |
Pass design to gui, display chip name
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; |