pass along reset paramaters to provide control to the caller

Upsteam-Status: Submitted [https://github.com/traucucayre/openFPGALoader]
  - Submitted to upstream, waiting approval
This commit is contained in:
Rodrigo Rengifo 2023-09-10 20:46:08 -07:00
parent c417ce6746
commit 5e9cc7c440
3 changed files with 4 additions and 4 deletions

View File

@ -137,9 +137,9 @@ using namespace std;
#define PUBKEY_LENGTH_BYTES 64 /* length of the public key (MachXO3D) in bytes */
Lattice::Lattice(Jtag *jtag, const string filename, const string &file_type,
Device::prog_type_t prg_type, std::string flash_sector, bool verify, int8_t verbose):
Device::prog_type_t prg_type, std::string flash_sector, bool verify, int8_t verbose, bool skip_load_bridge, bool skip_reset):
Device(jtag, filename, file_type, verify, verbose),
SPIInterface(filename, verbose, 0, verify),
SPIInterface(filename, verbose, 0, verify, skip_load_bridge, skip_reset),
_fpga_family(UNKNOWN_FAMILY), _flash_sector(LATTICE_FLASH_UNDEFINED)
{
if (prg_type == Device::RD_FLASH) {

View File

@ -22,7 +22,7 @@ class Lattice: public Device, SPIInterface {
public:
Lattice(Jtag *jtag, std::string filename, const std::string &file_type,
Device::prog_type_t prg_type, std::string flash_sector, bool verify,
int8_t verbose);
int8_t verbose, bool skip_load_bridge, bool skip_reset);
uint32_t idCode() override;
int userCode();
void reset() override {}

View File

@ -567,7 +567,7 @@ int main(int argc, char **argv)
args.prg_type, args.external_flash, args.verify, args.verbose);
} else if (fab == "lattice") {
fpga = new Lattice(jtag, args.bit_file, args.file_type,
args.prg_type, args.flash_sector, args.verify, args.verbose);
args.prg_type, args.flash_sector, args.verify, args.verbose, args.skip_load_bridge, args.skip_reset);
} else if (fab == "colognechip") {
fpga = new CologneChip(jtag, args.bit_file, args.file_type,
args.prg_type, args.board, args.cable, args.verify, args.verbose);