trabucayre / openFPGALoader

Universal utility for programming FPGA
https://trabucayre.github.io/openFPGALoader/
Apache License 2.0
1.18k stars 251 forks source link

JTAG init failed with: Unknown device with IDCODE: 0x1100481b (TangNano9k) #187

Closed DxPru closed 2 years ago

DxPru commented 2 years ago

HI

I tried flashing an TangNano9k, but every time it returns the same error.

[dxpru@manjaro pnr]$ openFPGALoader -v -m -b tangnano9k bitstream.fs
write to ram
No cable or board specified: using direct ft2232 interface
Jtag frequency : requested 6.00MHz   -> real 6.00MHz
JTAG init failed with: Unknown device with IDCODE: 0x1100481b

The output doesn't even change when I tried different boards (tangnano, tangnano1k, tangnano4k, littleBee, ...) or even when I didn't specify params.

Thanks in advance

trabucayre commented 2 years ago

Hi, Could you provides openFPGALoader's version?

openFPGALoader -V

9K is a recent addition, no release have this entry -> you must use master branch. Using -b is to have access to informations like cable, but detection isn't based on that.

DxPru commented 2 years ago

Hey,

I've got version v0.5.0 from the offical Repo.

Now I tried with a newer version ( v0.7.0 ) from the openfpgaloader-git aur repo and it worked. Thank you

Martoni commented 2 years ago

I have an id mismatch with tangnano9k with last version :

$ openFPGALoader -f -b tangnano9k impl/pnr/hdmicore.fs 
write to flash
Jtag frequency : requested 6.00MHz   -> real 6.00MHz  
Parse file Parse impl/pnr/hdmicore.fs: 
Done
DONE
fs_idcode 0x1100581b, idcode 0x100481b
Error: Failed to claim FPGA device: mismatch between target's idcode and fs idcode

Using part number written on the chip, to generate bitstream with gowin eda (1.9.8.03) : GW1NR-LV9QN88PC6/I5

trabucayre commented 2 years ago

Hi, According to http://cdn.gowinsemi.com.cn/UG290.pdf p38, your bitstream is for an GW1N(R)-9 but your device is a GW1N(R)-9C. Are you sure to have checked the good one ? My Gowin license is expired I have to request for a new one.

trabucayre commented 2 years ago

In fact this issue is not really openFPGALoader related: fs_idcode come from bit file, and device idcode is read through JTAG in IDCODE register.

Martoni commented 2 years ago

Thanks @trabucayre that works now. Same gowin part number (GW1NR-LV9QN88PC6/I5) can designate two different chip ...

trabucayre commented 2 years ago

It's something easy to manage :)