lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.51k stars 745 forks source link

[opentitan SW test ] The hello world ROM program #19221

Open houdonghui1 opened 1 year ago

houdonghui1 commented 1 year ago

Description

Hello Mr.engineer,I need your help. I encountered a problem while testing 'hello world'. https://opentitan.org/guides/getting_started/setup_fpga.html#manually-loading-fpga-bitstreams-and-bootstrapping-opentitan-software-with-opentitantool I attempted to import the test program into Opentitan's FLASH for execution When I run “bazel run //sw/host/opentitantool bootstrap $(ci/scripts/target-location.sh//sw/device/examples/hello_world:hello_world_fpga_cw310_bin)” Ubuntu display Error: SFDP header contains incorrect signature: 0xff00010a. What is the problem causing this? I went to the official website to search for the content of SFDP, and after thinking about it, I believe that there is a problem with the program in the ROM. The file I am currently using is "testrom_fga_cw310.39. scr. vmem" in my FPGA project. Does the ROM program not match the opentitna hardware? May I ask which ROM data initialization file is used in the "hello world" testing experiment for OpenTitan?

image

fpgauser commented 1 year ago

Hello @houdonghui1 , were you able to get your question resolved? I am in a similar situation. Since it wasn't possible to get a CW310 board, I used a Xilinx ZCU102 board connected with jumpers to a Arduino DUE board which contains a SAM3X chip. I am able to get test_rom to boot but am unable to SPI boot load the application. I get a similar SFDP header error. Logic analyzer shows active SPI and strap signals so I know the ARM is active and trying to do something. Any help appreciated. -John

houdonghui1 commented 1 year ago

Hello @houdonghui1 , were you able to get your question resolved? I am in a similar situation. Since it wasn't possible to get a CW310 board, I used a Xilinx ZCU102 board connected with jumpers to a Arduino DUE board which contains a SAM3X chip. I am able to get test_rom to boot but am unable to SPI boot load the application. I get a similar SFDP header error. Logic analyzer shows active SPI and strap signals so I know the ARM is active and trying to do something. Any help appreciated. -John

Hello, I have designed a PCB containing SAM3X to supplement the gap between my board and CW310, and integrated it in the FPGA section according to the original timing constraints. In this way, I obtained the correct bitstream and guided the test examples correctly during testing. f08b9fe7eb9653c9503ceec60f5c126

fpgauser commented 1 year ago

Thanks for your reply!
Nice work.

Wondering what, if any, changes you made to the opentitan hw/sw? Or is it an exact replica?

Did you use the same vmem files you showed earlier? test_rom_fpga_cw310.39.scr.vmem img_rma.24.vmem

Also, did you modify the SAM3X ARM code or are you using the binary from the newae site?

I have some problem with the SPI bus between SAM3X and the FPGA. An SPI transaction is initiated by the SAM3X, but nothing comes back from the FPGA:

image

-John