-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gowin: Implement User Flash programming for GW1N9 #499
gowin: Implement User Flash programming for GW1N9 #499
Conversation
Looking at the diff from the PR, it seems like my attempt at fixing indentation issues modified more core than I expected. Should I remove those lines from this PR? |
It looks good, but I have a question: is mcufw principle is not working in this case? The approach here looks similar to the one for 4k. Thanks |
b5a591f
to
46ff6cb
Compare
Hi, I just force pushed a newer version of this MR. I kept separate arguments for mcufw and userflash to avoid confusion (Gowin documentation clearly distinguishes between the two). Let me know what you think? |
Globally this PR is ready to be merged. |
I don't really think the argument parsing is much of a concern here. I can run some benchmarks if you want though. I understand your concerns regarding the user experience being affected by extra arguments. However I can't think of a better solution, that's both doesn't require complicated setup and that would be easy to discover. |
Applied Thanks @jeanthom! |
Hi,
Gowin FPGA with built-in flash memory offer a separate "user flash" zone (documentation), either accessible from programmable logic, or used as system memory for the EMCU. This memory can be configured by JTAG, but this isn't documented at the moment. We've reversed how flashing was performed for the GW1N9 FPGAs by sniffing the JTAG wires: it works in the same way you flash the bitstream, but with a different base address.
This PR implements user flash programming for GW1N(R)9 FPGAs (other models probably have different base addresses). The documentation lists this addition as experimental because of the reverse engineered nature of this development. A few safeguards have been implemented to prevent misuse of this functionality (FPGA model checking, file size).
Jean