mirror of
https://github.com/trabucayre/openFPGALoader.git
synced 2026-08-30 09:59:03 +02:00
mask idcode upper nibble (version in IEEE 1149.1)
This commit is contained in:
+2
-2
@@ -63,7 +63,7 @@ Gowin::Gowin(Jtag *jtag, const string filename, const string &file_type,
|
||||
verify, verbose), is_gw1n1(false)
|
||||
{
|
||||
_fs = NULL;
|
||||
uint32_t idcode = idCode();
|
||||
uint32_t idcode = _jtag->get_target_device_id();;
|
||||
|
||||
if (!_file_extension.empty()) {
|
||||
if (_file_extension == "fs") {
|
||||
@@ -90,7 +90,7 @@ Gowin::Gowin(Jtag *jtag, const string filename, const string &file_type,
|
||||
_fs->displayHeader();
|
||||
string idcode_str = _fs->getHeaderVal("idcode");
|
||||
uint32_t fs_idcode = std::stoul(idcode_str.c_str(), NULL, 16);
|
||||
if (fs_idcode != idcode) {
|
||||
if ((fs_idcode & 0x0fffffff) != idcode) {
|
||||
throw std::runtime_error("mismatch between target's idcode and fs idcode");
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user