Unused variables (plus some more white space fixes)

This commit is contained in:
Martin Beynon 2021-11-19 15:11:02 +00:00
parent 07752c37e2
commit 393bf1d28b
2 changed files with 95 additions and 102 deletions

View File

@ -33,7 +33,7 @@
# define FEA_MSPI_PERSIST (1 << 11) /* Master SPI Port Persistence 0=Disabled (Default), 1=Enabled */
# define FEA_BOOT_SEQ_SEL (0x07 << 12) /* Boot Sequence selection (used along with Master SPI Port Persistence bit) */
# define FEA_I2C_DG_RANGE_SEL (1 << 15) /* I2C deglitch filter range selection on primary I2C port2 0= 8 to 25 ns range (Default) 1= 16 to 50 ns range */
# define FEA_VERSION_RB_PROT (1 << 16) /* Version Rollback Protection1 0= Disabled (Default) 1= Enabled (Checks if current version of bitstream is similar to the one that is goi>
# define FEA_VERSION_RB_PROT (1 << 16) /* Version Rollback Protection1 0= Disabled (Default) 1= Enabled */
# define FEA_RESERVED_ZERO (0xffff << 17)
/* Feature Row element defines */
@ -249,11 +249,9 @@ void FeaParser::parseFeatureRowAndFeabits(const vector<string> &content)
int FeaParser::parse()
{
_ss.str(_raw_data);
std::vector<string>lines;
int first_pos;
char instr;
_ss.str(_raw_data);
lines = readFeaFile();
/* empty or end of file */

View File

@ -1385,7 +1385,7 @@ bool Lattice::programFeabits_MachXO3D(uint32_t feabits)
if (_verify) {
for(int i = 0; i < 4; i++) {
if ((feabits >> (8*i)) & 0xff != rx[i]) {
if (((feabits >> (8*i)) & 0xff) != rx[i]) {
printf("\tVerify Failed...\n");
return false;
}
@ -1533,9 +1533,7 @@ bool Lattice::program_fea_MachXO3D()
bool Lattice::program_intFlash_MachXO3D()
{
bool err, ufm_flag;
uint64_t featuresRow;
uint16_t feabits;
bool err;
uint32_t erase_op = 0, prog_op = 0;
vector<string> data;
int offset, fuse_count;
@ -1570,7 +1568,7 @@ bool Lattice::program_intFlash_MachXO3D()
/* this is the size of an CFGx+UFMx area in bits (hence the / 128) */
fuse_count = _jed.get_fuse_count() / 128;
for (int i = 0; i < _jed.nb_section(); i++) {
for (size_t i = 0; i < _jed.nb_section(); i++) {
std::string area_name;
data = _jed.data_for_section(i);
@ -1583,7 +1581,6 @@ bool Lattice::program_intFlash_MachXO3D()
erase_op = 0;
prog_op = 0;
ufm_flag = false;
/* if the offset > total fuse count, then this file must be configured
* for the 2nd config sector (CFG1), so adjust offset */
@ -1634,7 +1631,6 @@ bool Lattice::program_intFlash_MachXO3D()
prog_op = FLASH_UFM_ADDR_UFM1;
area_name = "EBR (UFM1)";
}
ufm_flag = true;
}
else {
/* NOT SUPPORTING NON-ZERO OFFSET WRITES...*/
@ -1697,7 +1693,6 @@ bool Lattice::program_intFlash_MachXO3D()
}
area_name = "UFM3";
}
ufm_flag = true;
}
else {
printf("Processing CFG data (offset: %d (0x%x))\n", offset, offset);