Skip to content
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

[hw/sw] update flash load linker script, data_interleaved and data_flash_only sections #399

Merged

Conversation

davideschiavone
Copy link
Member

@davideschiavone davideschiavone commented Oct 11, 2023

  • flash_load linker now is aligned with the on_chip linker, with different regions for code and data

  • added data_interleaved section for mapping data on those memory banks

  • added flash_only section for big data that cannot be mapped to sram

  • modified crt0 to use the flash BSP

  • bump to 2KB the pre-fetched code that the bootROM reads in flash_load mode as more functions are used in crt0 due to BSP

  • test all APPs on-chip

  • test all APPs flash_load

  • test all APPs flash_exec

  • check spi_write examples on FPGA

  • all tests work except for the flash_only data that reports all 0s value read back.

  • check spi_write examples on sim

  • check spi_read examples on FPGA

  • check spi_read examples on sim

  • add flash_data_only example

  • add data_interleaved example

  • check performance differences on 1 app (e.g. matadd)

  • check freeRTOS on FPGA

@davideschiavone
Copy link
Member Author

replacing #398

@davideschiavone davideschiavone marked this pull request as draft October 11, 2023 13:05
@davideschiavone davideschiavone marked this pull request as ready for review October 13, 2023 09:38
@davideschiavone davideschiavone changed the title Update flash load linker with data_interleaved section update flash load linker with data_interleaved section Oct 13, 2023
@davideschiavone davideschiavone changed the title update flash load linker with data_interleaved section [sw] update flash load booting with data_interleaved section Oct 13, 2023
@davideschiavone
Copy link
Member Author

note to myself @davideschiavone,

So far the SPI examples fail (when flash_load is used) as they have been built under the assumption that LMA=VMA,
whereas data in FLASH are not anymore at the same offset

We may need to use symbols from the linker script to get the offset displacement and add it to the application data addresses
to do the flash2memory copies

https://stackoverflow.com/questions/8398755/access-symbols-defined-in-the-linker-script-by-application

https://downloads.ti.com/docs/esd/SPRUI03/using-linker-symbols-in-c-c-applications-slau1318080.html

@davideschiavone davideschiavone changed the title [sw] update flash load booting with data_interleaved section [sw] update flash load linker script, add data_interleaved and data_flash_only section Feb 1, 2024
@davideschiavone davideschiavone marked this pull request as ready for review February 2, 2024 14:02
@davideschiavone davideschiavone changed the title [sw] update flash load linker script, add data_interleaved and data_flash_only section [sw] update flash load linker script, data_interleaved and data_flash_only sections Feb 13, 2024
@davideschiavone davideschiavone changed the title [sw] update flash load linker script, data_interleaved and data_flash_only sections [hw/sw] update flash load linker script, data_interleaved and data_flash_only sections Feb 13, 2024
@davideschiavone davideschiavone merged commit 120b37b into esl-epfl:main Feb 13, 2024
3 checks passed
@davideschiavone davideschiavone deleted the update_flash_load_linker branch February 23, 2024 15:14
mbelda added a commit to mbelda/HEEPsilon that referenced this pull request Mar 15, 2024
Update code from upstream repository https://github.com/esl-
epfl/x-heep.git to revision 76d58efe7b9dec0723c1cb9aaf8ad76ad6c85373

* Update ci (esl-epfl/x-heep#454) (Luigi Giuffrida)
* fix num of FPGAs in README (Davide Schiavone)
* Porting Ultrascale ZCU104 board (esl-epfl/x-heep#435) (jmiranda)
* Add absolute path to `CMakeLists.txt` match statements (esl-
  epfl/x-heep#469) (Michele Caon)
* add SystemC example (esl-epfl/x-heep#443) (Davide Schiavone)
* Structs multireg fix (esl-epfl/x-heep#466) (Stefano Albini)
* add Coremark and update cv32e40p (esl-epfl/x-heep#465) (Davide
  Schiavone)
* add tiled matmul (esl-epfl/x-heep#464) (Davide Schiavone)
* fix software errors/warnings (esl-epfl/x-heep#462) (Davide
  Schiavone)
* add xcelium support (esl-epfl/x-heep#452) (Davide Schiavone)
* Add matmul example (esl-epfl/x-heep#461) (Davide Schiavone)
* fix typo in debug_ss (esl-epfl/x-heep#460) (Luigi Giuffrida)
* update riscv_dbg (esl-epfl/x-heep#230) (Davide Schiavone)
* Fix esl-epfl/x-heep#430 (esl-epfl/x-heep#459) (David Mallasén
  Quintana)
* fix esl-epfl/x-heep#447 (esl-epfl/x-heep#453) (Davide Schiavone)
* fix typo (esl-epfl/x-heep#458) (Luigi Giuffrida)
* add OpenOCD BSCAN configuration file  (esl-epfl/x-heep#457) (Luis
  Waucquez)
* Removed repeated code in dma hal (esl-epfl/x-heep#456) (Juan-n-only)
* Fix linker script generation (esl-epfl/x-heep#451) (Luigi Giuffrida)
* Add a target to the Makefile to directly program the FPGA (esl-
  epfl/x-heep#450) (Luigi Giuffrida)
* [hw/sw] update flash load linker script, data_interleaved and
  data_flash_only sections (esl-epfl/x-heep#399) (Davide Schiavone)
* add simple accelerator example (esl-epfl/x-heep#446) (Davide
  Schiavone)
* change python format for Bootrom (esl-epfl/x-heep#442) (Davide
  Schiavone)
* fix memset bug (esl-epfl/x-heep#439) (Mattia Consani)
* update cv32e40px with dual-read support (esl-epfl/x-heep#441)
  (Davide Schiavone)
* Added X-HEEP Reference. (esl-epfl/x-heep#440) (Simone Machetti)
* add w25q128 flash BSP (esl-epfl/x-heep#433) (Mattia Consani)
* removed FEMU (esl-epfl/x-heep#437) (Simone Machetti)
* update cve2 (esl-epfl/x-heep#284) (Davide Schiavone)
* porting X-HEEP to the nexys FPGA (esl-epfl/x-heep#432) (Davide
  Schiavone)
* Add standard and quad write functionality to flash model (esl-
  epfl/x-heep#426) (Mattia Consani)
* revert 🐛 introduced in last revendor of iceprog (davide
  schiavone)
* Add `example_spi_host_quadIO`  (esl-epfl/x-heep#401) (Mattia
  Consani)
* fix minimal cfg with stack and heap size (esl-epfl/x-heep#431)
  (Davide Schiavone)
* Update verible url (esl-epfl/x-heep#428) (David Mallasén Quintana)
* expose DMA slots externally + external FIFO example (esl-
  epfl/x-heep#417) (grinningmosfet)
* Updated the documentation on how to add external interrupts (esl-
  epfl/x-heep#427) (Juan-n-only)
* add citation in readme (Davide Schiavone)
* Fix run-blinky-freertos command (esl-epfl/x-heep#424) (jmiranda)
* Compilation fix (esl-epfl/x-heep#422) (jmiranda)
* add stack and heap size as parameters to mcu-gen (esl-
  epfl/x-heep#419) (Luigi Giuffrida)

Signed-off-by: mbelda <[email protected]>
JoseCalero added a commit to esl-epfl/HEEPsilon that referenced this pull request Oct 8, 2024
* fixes on sw for interleaved memory

* revendor x-heep

* Update esl_epfl_x_heep to esl-epfl/x-heep@76d58ef

Update code from upstream repository https://github.com/esl-
epfl/x-heep.git to revision 76d58efe7b9dec0723c1cb9aaf8ad76ad6c85373

* Update ci (esl-epfl/x-heep#454) (Luigi Giuffrida)
* fix num of FPGAs in README (Davide Schiavone)
* Porting Ultrascale ZCU104 board (esl-epfl/x-heep#435) (jmiranda)
* Add absolute path to `CMakeLists.txt` match statements (esl-
  epfl/x-heep#469) (Michele Caon)
* add SystemC example (esl-epfl/x-heep#443) (Davide Schiavone)
* Structs multireg fix (esl-epfl/x-heep#466) (Stefano Albini)
* add Coremark and update cv32e40p (esl-epfl/x-heep#465) (Davide
  Schiavone)
* add tiled matmul (esl-epfl/x-heep#464) (Davide Schiavone)
* fix software errors/warnings (esl-epfl/x-heep#462) (Davide
  Schiavone)
* add xcelium support (esl-epfl/x-heep#452) (Davide Schiavone)
* Add matmul example (esl-epfl/x-heep#461) (Davide Schiavone)
* fix typo in debug_ss (esl-epfl/x-heep#460) (Luigi Giuffrida)
* update riscv_dbg (esl-epfl/x-heep#230) (Davide Schiavone)
* Fix esl-epfl/x-heep#430 (esl-epfl/x-heep#459) (David Mallasén
  Quintana)
* fix esl-epfl/x-heep#447 (esl-epfl/x-heep#453) (Davide Schiavone)
* fix typo (esl-epfl/x-heep#458) (Luigi Giuffrida)
* add OpenOCD BSCAN configuration file  (esl-epfl/x-heep#457) (Luis
  Waucquez)
* Removed repeated code in dma hal (esl-epfl/x-heep#456) (Juan-n-only)
* Fix linker script generation (esl-epfl/x-heep#451) (Luigi Giuffrida)
* Add a target to the Makefile to directly program the FPGA (esl-
  epfl/x-heep#450) (Luigi Giuffrida)
* [hw/sw] update flash load linker script, data_interleaved and
  data_flash_only sections (esl-epfl/x-heep#399) (Davide Schiavone)
* add simple accelerator example (esl-epfl/x-heep#446) (Davide
  Schiavone)
* change python format for Bootrom (esl-epfl/x-heep#442) (Davide
  Schiavone)
* fix memset bug (esl-epfl/x-heep#439) (Mattia Consani)
* update cv32e40px with dual-read support (esl-epfl/x-heep#441)
  (Davide Schiavone)
* Added X-HEEP Reference. (esl-epfl/x-heep#440) (Simone Machetti)
* add w25q128 flash BSP (esl-epfl/x-heep#433) (Mattia Consani)
* removed FEMU (esl-epfl/x-heep#437) (Simone Machetti)
* update cve2 (esl-epfl/x-heep#284) (Davide Schiavone)
* porting X-HEEP to the nexys FPGA (esl-epfl/x-heep#432) (Davide
  Schiavone)
* Add standard and quad write functionality to flash model (esl-
  epfl/x-heep#426) (Mattia Consani)
* revert 🐛 introduced in last revendor of iceprog (davide
  schiavone)
* Add `example_spi_host_quadIO`  (esl-epfl/x-heep#401) (Mattia
  Consani)
* fix minimal cfg with stack and heap size (esl-epfl/x-heep#431)
  (Davide Schiavone)
* Update verible url (esl-epfl/x-heep#428) (David Mallasén Quintana)
* expose DMA slots externally + external FIFO example (esl-
  epfl/x-heep#417) (grinningmosfet)
* Updated the documentation on how to add external interrupts (esl-
  epfl/x-heep#427) (Juan-n-only)
* add citation in readme (Davide Schiavone)
* Fix run-blinky-freertos command (esl-epfl/x-heep#424) (jmiranda)
* Compilation fix (esl-epfl/x-heep#422) (jmiranda)
* add stack and heap size as parameters to mcu-gen (esl-
  epfl/x-heep#419) (Luigi Giuffrida)

Signed-off-by: mbelda <[email protected]>

* revendor x-heep Luigi fix

* Update esl_epfl_x_heep to LuigiGiuffrida98/x-heep@849539d

Update code from upstream repository
https://github.com/Luigi2898/x-heep.git to revision
849539ddf996926f9b679837f3bc84c0799287bb

Signed-off-by: mbelda <[email protected]>

* 1. Port ZCU / 2. fix xdc file for the ZCU / 3. Fix top to include dif clk for ZCU

* added new pin and constraint files

* removed vendor modification

* Add matmul example

* Add matmul os example

* Add transformer example

* add transformer example

* reduced transformer example

* adapt minimal cfg for the cgra

* revendorizing oe-cgra

* revendorizing x-heep

* fix makefile and .core files

* Fixing .core for heepsilon

* Fixing .core for heepsilon: adding parameters

* Fixing .core for heepsilon: adding parameters v2

* Update .core and xheep vendor

* Re-vendorizing x-heep to last commit

* Updating HEEPsilon to the final version, plus fixing CGRA memory generation conflicts (generate_sram_...tcl(s))

* deleting fpga xheep link

---------

Signed-off-by: mbelda <[email protected]>
Co-authored-by: mbelda <[email protected]>
Co-authored-by: Miranda Calero José Angel <[email protected]>
JoseCalero added a commit to esl-epfl/HEEPsilon that referenced this pull request Oct 8, 2024
* fixes on sw for interleaved memory

* revendor x-heep

* Update esl_epfl_x_heep to esl-epfl/x-heep@76d58ef

Update code from upstream repository https://github.com/esl-
epfl/x-heep.git to revision 76d58efe7b9dec0723c1cb9aaf8ad76ad6c85373

* Update ci (esl-epfl/x-heep#454) (Luigi Giuffrida)
* fix num of FPGAs in README (Davide Schiavone)
* Porting Ultrascale ZCU104 board (esl-epfl/x-heep#435) (jmiranda)
* Add absolute path to `CMakeLists.txt` match statements (esl-
  epfl/x-heep#469) (Michele Caon)
* add SystemC example (esl-epfl/x-heep#443) (Davide Schiavone)
* Structs multireg fix (esl-epfl/x-heep#466) (Stefano Albini)
* add Coremark and update cv32e40p (esl-epfl/x-heep#465) (Davide
  Schiavone)
* add tiled matmul (esl-epfl/x-heep#464) (Davide Schiavone)
* fix software errors/warnings (esl-epfl/x-heep#462) (Davide
  Schiavone)
* add xcelium support (esl-epfl/x-heep#452) (Davide Schiavone)
* Add matmul example (esl-epfl/x-heep#461) (Davide Schiavone)
* fix typo in debug_ss (esl-epfl/x-heep#460) (Luigi Giuffrida)
* update riscv_dbg (esl-epfl/x-heep#230) (Davide Schiavone)
* Fix esl-epfl/x-heep#430 (esl-epfl/x-heep#459) (David Mallasén
  Quintana)
* fix esl-epfl/x-heep#447 (esl-epfl/x-heep#453) (Davide Schiavone)
* fix typo (esl-epfl/x-heep#458) (Luigi Giuffrida)
* add OpenOCD BSCAN configuration file  (esl-epfl/x-heep#457) (Luis
  Waucquez)
* Removed repeated code in dma hal (esl-epfl/x-heep#456) (Juan-n-only)
* Fix linker script generation (esl-epfl/x-heep#451) (Luigi Giuffrida)
* Add a target to the Makefile to directly program the FPGA (esl-
  epfl/x-heep#450) (Luigi Giuffrida)
* [hw/sw] update flash load linker script, data_interleaved and
  data_flash_only sections (esl-epfl/x-heep#399) (Davide Schiavone)
* add simple accelerator example (esl-epfl/x-heep#446) (Davide
  Schiavone)
* change python format for Bootrom (esl-epfl/x-heep#442) (Davide
  Schiavone)
* fix memset bug (esl-epfl/x-heep#439) (Mattia Consani)
* update cv32e40px with dual-read support (esl-epfl/x-heep#441)
  (Davide Schiavone)
* Added X-HEEP Reference. (esl-epfl/x-heep#440) (Simone Machetti)
* add w25q128 flash BSP (esl-epfl/x-heep#433) (Mattia Consani)
* removed FEMU (esl-epfl/x-heep#437) (Simone Machetti)
* update cve2 (esl-epfl/x-heep#284) (Davide Schiavone)
* porting X-HEEP to the nexys FPGA (esl-epfl/x-heep#432) (Davide
  Schiavone)
* Add standard and quad write functionality to flash model (esl-
  epfl/x-heep#426) (Mattia Consani)
* revert 🐛 introduced in last revendor of iceprog (davide
  schiavone)
* Add `example_spi_host_quadIO`  (esl-epfl/x-heep#401) (Mattia
  Consani)
* fix minimal cfg with stack and heap size (esl-epfl/x-heep#431)
  (Davide Schiavone)
* Update verible url (esl-epfl/x-heep#428) (David Mallasén Quintana)
* expose DMA slots externally + external FIFO example (esl-
  epfl/x-heep#417) (grinningmosfet)
* Updated the documentation on how to add external interrupts (esl-
  epfl/x-heep#427) (Juan-n-only)
* add citation in readme (Davide Schiavone)
* Fix run-blinky-freertos command (esl-epfl/x-heep#424) (jmiranda)
* Compilation fix (esl-epfl/x-heep#422) (jmiranda)
* add stack and heap size as parameters to mcu-gen (esl-
  epfl/x-heep#419) (Luigi Giuffrida)

Signed-off-by: mbelda <[email protected]>

* revendor x-heep Luigi fix

* Update esl_epfl_x_heep to LuigiGiuffrida98/x-heep@849539d

Update code from upstream repository
https://github.com/Luigi2898/x-heep.git to revision
849539ddf996926f9b679837f3bc84c0799287bb

Signed-off-by: mbelda <[email protected]>

* 1. Port ZCU / 2. fix xdc file for the ZCU / 3. Fix top to include dif clk for ZCU

* added new pin and constraint files

* removed vendor modification

* Add matmul example

* Add matmul os example

* Add transformer example

* add transformer example

* reduced transformer example

* adapt minimal cfg for the cgra

* revendorizing oe-cgra

* revendorizing x-heep

* fix makefile and .core files

* Fixing .core for heepsilon

* Fixing .core for heepsilon: adding parameters

* Fixing .core for heepsilon: adding parameters v2

* Update .core and xheep vendor

* Re-vendorizing x-heep to last commit

* Updating HEEPsilon to the final version, plus fixing CGRA memory generation conflicts (generate_sram_...tcl(s))

* deleting fpga xheep link

* revendorizing x-heep to fix ci issues

* revendorizing x-heep and cgra to fix ci issues

* revendorizing x-heep and cgra to fix ci issues

---------

Signed-off-by: mbelda <[email protected]>
Co-authored-by: mbelda <[email protected]>
Co-authored-by: Miranda Calero José Angel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants