Use correct format specifier for printing uint64_t.

This commit is contained in:
Catherine 2023-12-22 21:07:23 +00:00
parent a38efe9e48
commit bca3bd6623
2 changed files with 2 additions and 2 deletions

View File

@ -1048,7 +1048,7 @@ void Lattice::displayReadReg(uint64_t dev)
uint8_t err;
printf("displayReadReg\n");
if (dev & 1<<0) printf("\tTRAN Mode\n");
printf("\tConfig Target Selection : %lx\n", (dev >> 1) & 0x07);
printf("\tConfig Target Selection : %llx\n", (dev >> 1) & 0x07);
if (dev & 1<<4) printf("\tJTAG Active\n");
if (dev & 1<<5) printf("\tPWD Protect\n");
if (dev & 1<<6) printf("\tOTP\n");

View File

@ -385,7 +385,7 @@ Xilinx::Xilinx(Jtag *jtag, const std::string &filename,
if (read_dna) {
if (_fpga_family == ARTIX_FAMILY || _fpga_family == KINTEXUS_FAMILY) {
uint64_t dna = Xilinx::fuse_dna_read();
printf("{\"dna\": \"0x%016lx\"}\n", dna);
printf("{\"dna\": \"0x%016llx\"}\n", dna);
} else {
throw std::runtime_error("Error: read_xadc only supported for Artix 7");
}