Bug 605

Summary: Extend ECP5_FPGA wiki page with JTAG testing/boot procedure for Libre-SOC test chip
Product: Libre-SOC's first SoC Reporter: Cole Poirier <colepoirier>
Component: Source CodeAssignee: Luke Kenneth Casson Leighton <lkcl>
Status: RESOLVED FIXED    
Severity: normal CC: colepoirier, libre-soc-bugs
Priority: Normal    
Version: unspecified   
Hardware: PC   
OS: Linux   
See Also: https://bugs.libre-soc.org/show_bug.cgi?id=517
https://bugs.libre-soc.org/show_bug.cgi?id=698
NLnet milestone: NLNet.2019.10.043.Wishbone total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0 parent task for budget allocation: 383
child tasks for budget allocation: The table of payments (in EUR) for this task; TOML format:
Bug Depends on: 517    
Bug Blocks: 383    
Deadline: 2021-03-10   

Description Cole Poirier 2021-02-24 00:28:11 GMT
Once #517 JTAG STLINKv2 to FPGA connection guide wiki is complete:

* lckl to outline Libre-SOC test chip boot via jtag procedure for testing on FPGA before the test ASIC is taped-out

*cole to make the wiki page and help with refining the JTAG process until lkcl is satisfied that it is totally correct

*note* lkcl I set the due date to two weeks from the creation of this bug report because it needs to be tested prior to the ASIC being taped out, which I believe is sometime in march, please adjust the due date as you see fit

ecp5_fpga wiki url: https://libre-soc.org/HDL_workflow/ECP5_FPGA/

Precursor bug report currently in its final stages: https://bugs.libre-soc.org/show_bug.cgi?id=517

Bug #517 covers the creation and the wiki page that provides instructions on the  the setup of STLINKv2 to FPGA wiring, ensuring their correctness so when connected to power and used as as specified, the devices do not blow up and release all the magic computer smoke they require to function.

SOC JTAG testing steps(?):
* Put processor into HALT
* Upload binary to address 0xXXXX via STLINKv2
* Profit?
Comment 1 Luke Kenneth Casson Leighton 2021-03-01 18:51:57 GMT
(In reply to Cole Poirier from comment #0)
> Once #517 JTAG STLINKv2 to FPGA connection guide wiki is complete:
> 
> * lkcl to outline Libre-SOC test chip boot via jtag procedure for testing on
> FPGA before the test ASIC is taped-out

in the README is the version for sim.py
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/litex/florent/README.txt;h=2cab663850af1c530d852f948bf79e5795bb7e2a;hb=HEAD

the FPGA and ASIC variant is near-identical.
Comment 2 Luke Kenneth Casson Leighton 2021-03-01 18:58:39 GMT
also this can be run (it uploads bytes 0x1 and 0x2 presently, needs to be given a filename)
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/debug/firmware_upload.py;hb=HEAD

it can be used to talk jtagremote protocol (via openocd) so that it actually
connects directly to the FPGA (or ASIC) and uploads firmware to it.