jtag: ckeck highest nibble to prevent confusion between Cologne Chip GateMate and Efinix Trion T4/T8 devices

This commit is contained in:
Patrick Urban 2021-12-11 16:35:30 +01:00
parent 49e6602b9f
commit e4971897d7
1 changed files with 7 additions and 1 deletions

View File

@ -136,7 +136,13 @@ int Jtag::detectChain(int max_dev)
for (int ii=0; ii < 4; ii++)
tmp |= (rx_buff[ii] << (8*ii));
if (tmp != 0 && tmp != 0xffffffff) {
tmp &= 0xffffffff;
/* ckeck highest nibble to prevent confusion between Cologne Chip
* GateMate and Efinix Trion T4/T8 devices
*/
if (tmp != 0x20000001)
tmp &= 0x0fffffff;
else
tmp &= 0xffffffff;
_devices_list.insert(_devices_list.begin(), tmp);
/* search for irlength in fpga_list or misc_dev_list */