Unable to program Gowin GW1N-1 FPGA using dirtyJtag adapter

Open
#564 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by reproducing the reported programming attempt on a Gowin GW1N-1 using the dirtyJtag adapter and the mentioned testfile.fs; compare its verbose log with the FT2232 log. Investigate the reported CRC check failure and differing status-register values. Done means programming with dirtyJtag completes with a successful CRC check, as it does with FT2232.

Written by the indexing model from the issue text.

Description

bug

Verbose log using dirtyJtag adapter (https://github.com/phdussud/pico-dirtyJtag):

empty
write to flash
Jtag frequency : requested 6000000Hz -> real 6000000Hz
found 1 devices
index 0:
	idcode 0x900281b
	manufacturer Gowin
	family GW1N
	model  GW1N-1
	irlength 8
File type : fs
Parse file Parse testfile.fs: 
checksum 0x249c
Done
DONE
bitstream header infos
CRCCheck: ON
Compress: OFF
ConfDataLength: 274
LoadingRate: 2500000
ProgramDoneBypass: OFF
SPIAddr: 00000000
SecurityBit: ON
idcode: 0900281b
Jtag frequency : requested 2500000Hz -> real 2500000Hz
Erase SRAM before erase sram: displayReadReg 00015421
	CRC Error
	Memory Erase
	Non-JTAG configuration is active
	Gowin VLD
	Security Final
	POR
pollFlag: 150a1 (80)
pollFlag: 110a1 (20)
after erase sram: displayReadReg 000110a1
	CRC Error
	Memory Erase
	System Edit Mode
	Gowin VLD
	POR
pollFlag: 11421 (0)
after erase sram: displayReadReg 00011421
	CRC Error
	Memory Erase
	Non-JTAG configuration is active
	Gowin VLD
	POR
DONE
pollFlag: 110a1 (80)
Erase FLASH before erase flash: displayReadReg 000110a1
	CRC Error
	Memory Erase
	System Edit Mode
	Gowin VLD
	POR
pollFlag: 110a1 (80)
pollFlag: 11421 (0)
after erase flash: displayReadReg 00011421
	CRC Error
	Memory Erase
	Non-JTAG configuration is active
	Gowin VLD
	POR
DONE

Erasing FLASH: [==================================================] 100.00%
Done
pollFlag: 11421 (0)

write Flash: [===================                               ] 36.05%
write Flash: [=====================================             ] 72.67%
write Flash: [==================================================] 100.00%
Done
pollFlag: 11421 (0)
CRC check : FAIL
Read: 0x00000000 checksum: 0x249c

after program flash: displayReadReg 00019020
	Memory Erase
	Gowin VLD
	Ready
	POR

Expected and correct result using FT2232 adapter:

empty
write to flash
Can't read iSerialNumber field from FTDI: considered as empty string
Jtag frequency : requested 6.00MHz    -> real 6.00MHz   
found 1 devices
index 0:
	idcode 0x900281b
	manufacturer Gowin
	family GW1N
	model  GW1N-1
	irlength 8
File type : fs
Parse file Parse testfile.fs: 
checksum 0x249c
Done
DONE
bitstream header infos
CRCCheck: ON
Compress: OFF
ConfDataLength: 274
LoadingRate: 2500000
ProgramDoneBypass: OFF
SPIAddr: 00000000
SecurityBit: ON
idcode: 0900281b
Jtag frequency : requested 2.50MHz    -> real 2.50MHz   
Erase SRAM before erase sram: displayReadReg 00019020
	Memory Erase
	Gowin VLD
	Ready
	POR
pollFlag: 190a0 (80)
pollFlag: 19080 (0)
pollFlag: 19080 (0)
pollFlag: 190a0 (20)
after erase sram: displayReadReg 000190a0
	Memory Erase
	System Edit Mode
	Gowin VLD
	Ready
	POR
pollFlag: 19020 (0)
after erase sram: displayReadReg 00019020
	Memory Erase
	Gowin VLD
	Ready
	POR
DONE
pollFlag: 190a0 (80)
Erase FLASH before erase flash: displayReadReg 000190a0
	Memory Erase
	System Edit Mode
	Gowin VLD
	Ready
	POR
pollFlag: 190a0 (80)
pollFlag: 19020 (0)
after erase flash: displayReadReg 00019020
	Memory Erase
	Gowin VLD
	Ready
	POR
DONE

Erasing FLASH: [==================================================] 100.00%
Done
pollFlag: 19020 (0)

write Flash: [==================================================] 100.00%
Done
pollFlag: 19020 (0)
CRC check: Success
after program flash: displayReadReg 0001f020
	Memory Erase
	Gowin VLD
	Done Final
	Security Final
	Ready
	POR
Dominant language
C++
Stars
1.7k
Forks
396
Avg merge
2d 4h
Merged PRs (30d)
15

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from trabucayre/openFPGALoader

All issues in trabucayre/openFPGALoader

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.