From 9943c3072a119fada0ad564927d5b324423c220d Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Thu, 18 Jan 2024 13:04:09 -0500 Subject: [PATCH] lattice: Add all MachXO[23] part IDs The version field is the only difference between many parts in the MachXO[23] family, including between different families. Add the version field to all parts, fixing detection of some MachXO3 parts as MachXO2s. The id codes were extracted from the BSDL files on Lattice's website. --- src/lattice.cpp | 2 +- src/part.hpp | 62 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/src/lattice.cpp b/src/lattice.cpp index b81152d99a..695b4afba5 100644 --- a/src/lattice.cpp +++ b/src/lattice.cpp @@ -168,7 +168,7 @@ Lattice::Lattice(Jtag *jtag, const string filename, const string &file_type, string family = fpga_list[idcode].family; if (family == "MachXO2") { _fpga_family = MACHXO2_FAMILY; - } else if (family == "MachXO3LF") { + } else if (family == "MachXO3L" || family == "MachXO3LF") { _fpga_family = MACHXO3_FAMILY; } else if (family == "MachXO3D") { _fpga_family = MACHXO3D_FAMILY; diff --git a/src/part.hpp b/src/part.hpp index 51b3546561..e72d7e22c3 100644 --- a/src/part.hpp +++ b/src/part.hpp @@ -175,24 +175,54 @@ static std::map fpga_list = { {0x0129a043, {"lattice", "XP2", "LFXP2-8E", 8}}, /* Lattice MachXO2 */ - {0x012b8043, {"lattice", "MachXO2", "LCMXO2-256HC", 8}}, - {0x012b9043, {"lattice", "MachXO2", "LCMXO2-640HC", 8}}, - {0x012ba043, {"lattice", "MachXO2", "LCMXO2-1200HC", 8}}, - {0x012bc043, {"lattice", "MachXO2", "LCMXO2-4000HC", 8}}, - {0x012bd043, {"lattice", "MachXO2", "LCMXO2-7000HC", 8}}, - {0x012b5043, {"lattice", "MachXO2", "LCMXO2-7000HE", 8}}, + {0x012b0043, {"lattice", "MachXO2", "LCMXO2-256ZE", 8}}, + {0x012b1043, {"lattice", "MachXO2", "LCMXO2-640ZE", 8}}, + {0x012b2043, {"lattice", "MachXO2", "LCMXO2-1200ZE", 8}}, + {0x012b3043, {"lattice", "MachXO2", "LCMXO2-2000ZE", 8}}, + {0x012b4043, {"lattice", "MachXO2", "LCMXO2-4000ZE", 8}}, + {0x012b5043, {"lattice", "MachXO2", "LCMXO2-7000ZE", 8}}, + {0x012b8043, {"lattice", "MachXO2", "LCMXO2-256HC", 8}}, + {0x012b9043, {"lattice", "MachXO2", "LCMXO2-640HC", 8}}, + {0x012ba043, {"lattice", "MachXO2", "LCMXO2-1200HC", 8}}, + {0x012ba043, {"lattice", "MachXO2", "LCMXO2-640UHC", 8}}, + {0x012bb043, {"lattice", "MachXO2", "LCMXO2-2000HC", 8}}, + {0x012bb043, {"lattice", "MachXO2", "LCMXO2-1200UHC", 8}}, + {0x012bc043, {"lattice", "MachXO2", "LCMXO2-4000HC", 8}}, + {0x012bc043, {"lattice", "MachXO2", "LCMXO2-2000UHC", 8}}, + {0x012bd043, {"lattice", "MachXO2", "LCMXO2-7000HC", 8}}, /* Lattice MachXO3 */ - {0xE12BB043, {"lattice", "MachXO3LF", "LCMX03LF-1300C", 8}}, - {0x012B2043, {"lattice", "MachXO3LF", "LCMX03LF-1300E", 8}}, - {0x612BB043, {"lattice", "MachXO3LF", "LCMX03LF-2100C", 8}}, - {0x012B3043, {"lattice", "MachXO3LF", "LCMX03LF-2100E", 8}}, - {0x612BC043, {"lattice", "MachXO3LF", "LCMX03LF-4300C", 8}}, - {0x012B4043, {"lattice", "MachXO3LF", "LCMX03LF-4300E", 8}}, - {0x612BD043, {"lattice", "MachXO3LF", "LCMX03LF-6900C", 8}}, - {0x612B5043, {"lattice", "MachXO3LF", "LCMX03LF-6900E", 8}}, - {0x012BE043, {"lattice", "MachXO3LF", "LCMX03LF-9400C", 8}}, - {0x012B6043, {"lattice", "MachXO3LF", "LCMX03LF-9400E", 8}}, + {0x412b2043, {"lattice", "MachXO3L", "LCMXO3L-1300E", 8}}, + {0x412b3043, {"lattice", "MachXO3L", "LCMXO3L-2100E", 8}}, + {0x412b4043, {"lattice", "MachXO3L", "LCMXO3L-4300E", 8}}, + {0x412b5043, {"lattice", "MachXO3L", "LCMXO3L-6900E", 8}}, + {0x412b6043, {"lattice", "MachXO3L", "LCMXO3L-9400E", 8}}, + {0x412bb043, {"lattice", "MachXO3L", "LCMXO3L-2100C", 8}}, + {0x412bc043, {"lattice", "MachXO3L", "LCMXO3L-4300C", 8}}, + {0x412bd043, {"lattice", "MachXO3L", "LCMXO3L-6900C", 8}}, + {0x412be043, {"lattice", "MachXO3L", "LCMXO3L-9400C", 8}}, + {0xc12b2043, {"lattice", "MachXO3L", "LCMXO3L-640E", 8}}, + {0xc12b3043, {"lattice", "MachXO3L", "LCMXO3L-1300E", 8}}, + {0xc12b4043, {"lattice", "MachXO3L", "LCMXO3L-2100E", 8}}, + {0xc12bb043, {"lattice", "MachXO3L", "LCMXO3L-1300C", 8}}, + {0xc12bc043, {"lattice", "MachXO3L", "LCMXO3L-2100C", 8}}, + {0xc12bd043, {"lattice", "MachXO3L", "LCMXO3L-4300C", 8}}, + + {0x612b2043, {"lattice", "MachXO3LF", "LCMXO3LF-1300E", 8}}, + {0x612b3043, {"lattice", "MachXO3LF", "LCMXO3LF-2100E", 8}}, + {0x612b4043, {"lattice", "MachXO3LF", "LCMXO3LF-4300E", 8}}, + {0x612b5043, {"lattice", "MachXO3LF", "LCMXO3LF-6900E", 8}}, + {0x612b6043, {"lattice", "MachXO3LF", "LCMXO3LF-9400E", 8}}, + {0x612bb043, {"lattice", "MachXO3LF", "LCMXO3LF-2100C", 8}}, + {0x612bc043, {"lattice", "MachXO3LF", "LCMXO3LF-4300C", 8}}, + {0x612bd043, {"lattice", "MachXO3LF", "LCMXO3LF-6900C", 8}}, + {0x612be043, {"lattice", "MachXO3LF", "LCMXO3LF-9400C", 8}}, + {0xe12b2043, {"lattice", "MachXO3LF", "LCMXO3LF-640E", 8}}, + {0xe12b3043, {"lattice", "MachXO3LF", "LCMXO3LF-1300E", 8}}, + {0xe12b4043, {"lattice", "MachXO3LF", "LCMXO3LF-2100E", 8}}, + {0xe12bb043, {"lattice", "MachXO3LF", "LCMXO3LF-1300C", 8}}, + {0xe12bc043, {"lattice", "MachXO3LF", "LCMXO3LF-2100C", 8}}, + {0xe12bd043, {"lattice", "MachXO3LF", "LCMXO3LF-4300C", 8}}, {0x012e3043, {"lattice", "MachXO3D", "LCMX03D-9400HC", 8}},