polarfire-soc / polarfire-soc-documentation

PolarFire SoC Documentation
Other
37 stars 19 forks source link

Documentation on SBIC? #13

Closed bkzshabbaz closed 2 years ago

bkzshabbaz commented 2 years ago

I'm trying to create a custom MPFSoC design with our own functionality in the FPGA fabric co-existing with the MSS. Is there documentation on how to generate the Intel-Hex file for programming the eNVM client in Libero? Is there documentation on the Intel-Hex file header that needs to be pre-pended to the binary ELF file before the MSS will boot from eNVM? I only found out about this by poking in the boot mode 1 directory that gets created in SoftConsole when programming for boot mode 1. Where does dummySbic.bin come from? Is there a utility that creates it?

hughbreslin commented 2 years ago

Hey @bkzshabbaz Have you seen the SoftConsole MPFS Boot Mode Programmer documentation? Its available here. The boot mode programmer is bundled with SoftConsole and its used to generate Libero friendly Intel Hex files and you can find the utility and its sources in [SoftConsole Install]/extras/mpfs.

bkzshabbaz commented 2 years ago

Thanks, @hughbreslin. The Java source code also gives good insight on the format of the SBIC. For some reason UG0881 only describes the first 208 bytes of the SBIC.

hughbreslin commented 2 years ago

Excellent I'm glad that helped, were you able to get enough information to close this issue? Would it have helped if our boot-modes-fundamentals document mentioned the boot mode programmer in SoftConsole?

bkzshabbaz commented 2 years ago

Is SoftConsole the only way to get the eNVM programmed with the application? It definitely would've helped if there was some documentation to describe how Libero can be the last tool used in the development chain.

hughbreslin commented 2 years ago

You can also program the eNVM using Libero (which is actually what the boot mode programmer in SoftConsole does, using the fpgenprog tool in the Libero installation). To do this you need to open the "Configure Design Initialization Data and Memories" view and in the eNVM tab you can add additional clients to your bitstream: image

To add your application to Libero as a hex file you're probably going to need to run the boot mode programmer in SoftConsole in dry run mode to create a Libero friendly hex file and then add that in. You can find / modify the arguments passed to the tool from the external tool configurations: image

We do have this document with an outline of the design flow but it could probably do with an update to include some more info on the boot modes. Thank you for the feedback, we'll have a look into the docs and how we could make the information clearer :)

bkzshabbaz commented 2 years ago

To add your application to Libero as a hex file you're probably going to need to run the boot mode programmer in SoftConsole in dry run mode to create a Libero friendly hex file and then add that in. You can find / modify the arguments passed to the tool from the external tool configurations:

I think it would be super helpful if what you just said above were placed here: https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/software-development/polarfire-soc-software-tool-flow.md#programming-envm

I'll leave it up to you to decide where to put it though :)

Thank you.

hughbreslin commented 2 years ago

Cool thank you for the feedback :)

hughbreslin commented 2 years ago

Hey @bkzshabbaz I'm closing this issue as it seems resolved, feel free to open it back up if you need any further clarification :)