latticeSSPI: ECP5 driver for Slave SPI mode

This commit is contained in:
Gwenhael Goavec-Merou
2025-06-19 08:34:29 +02:00
parent 21d4fccf28
commit dede406ebc
5 changed files with 451 additions and 25 deletions
+12 -3
View File
@@ -28,6 +28,7 @@
#include "gowin.hpp"
#include "ice40.hpp"
#include "lattice.hpp"
#include "latticeSSPI.hpp"
#include "libusb_ll.hpp"
#include "jtag.hpp"
#include "part.hpp"
@@ -284,9 +285,17 @@ int main(int argc, char **argv)
board->reset_pin, board->done_pin, board->oe_pin,
args.verify, args.verbose);
} else if (board->manufacturer == "lattice") {
target = new Ice40(spi, args.bit_file, args.file_type,
args.prg_type,
board->reset_pin, board->done_pin, args.verify, args.verbose);
if (board->fpga_part == "ice40") {
target = new Ice40(spi, args.bit_file, args.file_type,
args.prg_type,
board->reset_pin, board->done_pin, args.verify, args.verbose);
} else if (board->fpga_part == "ecp5") {
target = new LatticeSSPI(spi, args.bit_file, args.file_type, args.verbose);
} else {
printError("Error (SPI mode): " + board->fpga_part +
" is an unsupported/unknown Lattice Model");
return EXIT_FAILURE;
}
} else if (board->manufacturer == "colognechip") {
target = new CologneChip(spi, args.bit_file, args.file_type, args.prg_type,
board->reset_pin, board->done_pin, DBUS6, board->oe_pin,