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

refactoring of examples #322

Merged
merged 12 commits into from
Jun 28, 2023

Conversation

JuanSapriza
Copy link
Contributor

@JuanSapriza JuanSapriza commented Jun 28, 2023

During the testing of all example apps we faced several minor issues that can be tackled without affecting each other. We will be assessing those issues in this PR.
So far this includes:

  • Changing occurrences of printf for PRINTF so it can be disabled by default for simulation and enabled for FPGA:
/* Change this value to 0 to disable prints for FPGA and enable them for simulation. */
#define DEFAULT_PRINTF_BEHAVIOR 1

/* By default, printfs are activated for FPGA and disabled for simulation. */
#ifdef TARGET_PYNQ_Z2 
    #define ENABLE_PRINTF DEFAULT_PRINTF_BEHAVIOR
#else 
    #define ENABLE_PRINTF !DEFAULT_PRINTF_BEHAVIOR
#endif

#if ENABLE_PRINTF
  #define PRINTF(fmt, ...)    printf(fmt, ## __VA_ARGS__)
#else
  #define PRINTF(...)
#endif 
  • Add \r on PRINTFs to better visualize them on screen.
  • Rename example apps so they follow the standard example_*.
  • Reduced the size of large buffers in dma and i2s examples so they don't require more memory banks.
  • Standardized some PRINTF messages of success and failure

…during simulation using some viewers. Defaulted MEMORY_BANKS to 3 to let ram-retention-examples be tested without changes. Reduced the size of buffers in i2s and dma examples
Makefile Outdated Show resolved Hide resolved
@davideschiavone
Copy link
Member

let me know when I need to review it, do not set it as a draft PR when it is ready @JuanSapriza

@davideschiavone davideschiavone changed the title Refactoring of examples refactoring of examples Jun 28, 2023
@JuanSapriza JuanSapriza marked this pull request as ready for review June 28, 2023 13:45
@JuanSapriza
Copy link
Contributor Author

let me know when I need to review it, do not set it as a draft PR when it is ready @JuanSapriza

It should be good now. I was planning on leaving this as a draft until we finish all tests, but we can merge and open a new one if we need.

Copy link
Member

@davideschiavone davideschiavone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to change the set_retentive app

@davideschiavone davideschiavone merged commit 90d9c11 into esl-epfl:main Jun 28, 2023
@JuanSapriza JuanSapriza deleted the pr_examples_refactoring branch June 28, 2023 16:12
JuanSapriza added a commit to JuanSapriza/HEEPsilon that referenced this pull request Oct 5, 2023
Update code from upstream repository https://github.com/esl-
epfl/x-heep.git to revision 086884bed017d7778d1c6309533fdf0505a220e2

* Improved the comments on the eXtendingHEEP readme (esl-
  epfl/x-heep#360) (JuanSapriza)
* Modified the way of realizing if an app is external or not
  (JuanSapriza)
* add script to simulate all apps (esl-epfl/x-heep#341) (JuanSapriza)
* [app] fix APPs on flash_exec (esl-epfl/x-heep#357) (Davide
  Schiavone)
* adding attributes and mux pad parameters in mcu-gen (esl-
  epfl/x-heep#349) (Davide Schiavone)
* change signal names in power manager to reflex polarity (esl-
  epfl/x-heep#352) (Simone Machetti)
* fix power gating core app (esl-epfl/x-heep#355) (Davide Schiavone)
* add cv32e40px (esl-epfl/x-heep#353) (Davide Schiavone)
* moved fpnew in its own directory (esl-epfl/x-heep#351) (Davide
  Schiavone)
* update cv32e40p divider (esl-epfl/x-heep#350) (Davide Schiavone)
* fix external pad gen (esl-epfl/x-heep#346) (Davide Schiavone)
* fix mcu-gen (esl-epfl/x-heep#345) (Davide Schiavone)
* update GPIO driver (esl-epfl/x-heep#246) (Hossein Taji)
* fix interleaved bus (esl-epfl/x-heep#340) (Daniel Vázquez)
* fix esl-epfl/x-heep#338 (esl-epfl/x-heep#339) (Davide Schiavone)
* Initialized variables to 0 inside functions. Removed printf comments
  (esl-epfl/x-heep#334) (JuanSapriza)
* made the dma_is_ready() function non-optimizable at all. (esl-
  epfl/x-heep#333) (JuanSapriza)
* fix SPI apps (esl-epfl/x-heep#327) (Davide Schiavone)
* Include x-heep.h to all apps that need it (esl-epfl/x-heep#329)
  (JuanSapriza)
* Added soc_ctrl-reg_top warning to waiver (esl-epfl/x-heep#326)
  (JuanSapriza)
* fix several applications (esl-epfl/x-heep#325) (Davide Schiavone)
* Tries to use cmake3. If that is not available, go ahead with cmake
  (esl-epfl/x-heep#323) (JuanSapriza)
* Improve the timing of cv32e40x by removing the debug triggers (esl-
  epfl/x-heep#324) (David Mallasén Quintana)
* refactoring of examples (esl-epfl/x-heep#322) (JuanSapriza)
* expose internal master ports to external devices (esl-
  epfl/x-heep#268) (Michele Caon)
* Interrupt ID to the intr handlers of the PLIC (esl-epfl/x-heep#315)
  (JuanSapriza)
* add ports to DMA to write to addresses coming from port2 of DMA
  (esl-epfl/x-heep#320) (Davide Schiavone)
* DMA HAL - clean PR (esl-epfl/x-heep#317) (JuanSapriza)
* Cleaning up flags (esl-epfl/x-heep#316) (Davide Schiavone)
* Add support for externally defined external pads in `Makefile` (esl-
  epfl/x-heep#312) (Michele Caon)
* Linker load flash refactor fill memory (esl-epfl/x-heep#294)
  (jmiranda)
* add i2s peripheral (esl-epfl/x-heep#203) (Tim Frey)
* Add example ADC schematic (esl-epfl/x-heep#309) (Cyril)
* Update `cv32e40x` version to `0.9.0` (esl-epfl/x-heep#308) (Michele
  Caon)
* integration of an AMS peripheral example (esl-epfl/x-heep#270)
  (Cyril)
* Update FuseSoC remote (esl-epfl/x-heep#307) (Michele Caon)
* fix USE_SPI_FLASH for FPGA (esl-epfl/x-heep#301) (Davide Schiavone)
* add ifdef peripheral included (esl-epfl/x-heep#288) (Davide
  Schiavone)
* Added command in CI to include all peripherals before building.
  (esl-epfl/x-heep#293) (JuanSapriza)
* fix esl-epfl/x-heep#291 (esl-epfl/x-heep#292) (Davide Schiavone)
* fix example_power_gating_core app (esl-epfl/x-heep#286) (Simone
  Machetti)
* fix esl-epfl/x-heep#266 and esl-epfl/x-heep#289 (esl-
  epfl/x-heep#290) (Davide Schiavone)
* Added compilation warning. (esl-epfl/x-heep#287) (Simone Machetti)
* fix Linux FEMU (esl-epfl/x-heep#285) (Simone Machetti)
* added logo (esl-epfl/x-heep#283) (Simone Machetti)
* update cv32e40p (esl-epfl/x-heep#269) (Davide Schiavone)
* Add makefile variable for compiler prefix (esl-epfl/x-heep#278)
  (David Mallasén Quintana)
* CI to verify that apps can be built on every push/PR (esl-
  epfl/x-heep#239) (JuanSapriza)
* App fix + sh compilation script (esl-epfl/x-heep#267) (jmiranda)
* update common cells (esl-epfl/x-heep#262) (Davide Schiavone)
* crt logic update + CMake backend modifications (esl-epfl/x-heep#264)
  (jmiranda)
* External peripheral app bug fix and refactor (esl-epfl/x-heep#259)
  (Stefano Albini)
* Update CMakebackend (esl-epfl/x-heep#258) (jmiranda)
* rv_plic HAL refactor (esl-epfl/x-heep#240) (Stefano Albini)
* Add LICENSE (davide schiavone)
* Add F-HEEP to the eXtendingHEEP list (esl-epfl/x-heep#257) (David
  Mallasén Quintana)
* add fast interrupt enable register (esl-epfl/x-heep#256) (Tim Frey)
* improved interrupt integration (esl-epfl/x-heep#255) (Tim Frey)
* Peripherals structs _reserved fields renaming (esl-epfl/x-heep#254)
  (Stefano Albini)
* adding bitfield_read/write functions (esl-epfl/x-heep#253) (Hossein
  Taji)
* add interleaved bus (esl-epfl/x-heep#237) (Daniel Vázquez)
* fix parameters when there are no external domains (esl-
  epfl/x-heep#247) (Davide Schiavone)
* Corrected two comments and removed the FIC part in the power gating
  example. (esl-epfl/x-heep#248) (JuanSapriza)
* make example external periph shorter (esl-epfl/x-heep#232) (Davide
  Schiavone)
* Minor modification on Readme (esl-epfl/x-heep#245) (jmiranda)
* Fixing APPs and Compilation issues + FreeRTOS HEAP mem (esl-
  epfl/x-heep#238) (jmiranda)
* updating fast intr ctrl based on structure (esl-epfl/x-heep#235)
  (Hossein Taji)
* [hw] adding peripheral inclusion/exclusion configuration (esl-
  epfl/x-heep#244) (Davide Schiavone)
* add PDM2PCM peripheral (esl-epfl/x-heep#192) (grinningmosfet)
* Peripherals struct multireg and address mismatch fix (esl-
  epfl/x-heep#234) (Stefano Albini)
* fix for VCS (esl-epfl/x-heep#229) (Cyril)
* Build external sources with external drivers (esl-epfl/x-heep#227)
  (JuanSapriza)
* add verilator run app command (esl-epfl/x-heep#228) (Tim Frey)
* add tc_clk_xor2 (esl-epfl/x-heep#225) (Tim Frey)
* fix venv / conda envs (esl-epfl/x-heep#221) (Davide Schiavone)
* update common cells (esl-epfl/x-heep#223) (Davide Schiavone)

Signed-off-by: Juan Sapriza <juan.sapriza@epfl.ch>
JuanSapriza added a commit to JuanSapriza/HEEPsilon that referenced this pull request Oct 24, 2023
Update code from upstream repository https://github.com/esl-
epfl/x-heep.git to revision df569a88fc7eaa447645262f0d3a76dd22c519f7

* enable mcycle in matadd examples (esl-epfl/x-heep#413) (Davide
  Schiavone)
* reduce FPGA frequencz to 15MHz to accomodate FPU (esl-
  epfl/x-heep#404) (Davide Schiavone)
* fix cv32e4  verilator waivers (esl-epfl/x-heep#402) (Davide
  Schiavone)
* fix GPIO HAL by adding selection of GPIO domain (esl-
  epfl/x-heep#385) (Davide Schiavone)
* update vendor fpu_ss (esl-epfl/x-heep#397) (Davide Schiavone)
* fix cv32e40px fpga (esl-epfl/x-heep#396) (Davide Schiavone)
* add fpu over cv-x-if in tb (esl-epfl/x-heep#392) (Davide Schiavone)
* SEGGER Embedded Studio support for X-HEEP (esl-epfl/x-heep#370)
  (jmiranda)
* Squashed commit of the following: (jmiranda)
* Always use `MCU_CFG` variable in `Makefile` (esl-epfl/x-heep#391)
  (Michele Caon)
* update cv32e40p (esl-epfl/x-heep#389) (Davide Schiavone)
* update cv32e40px (esl-epfl/x-heep#388) (Davide Schiavone)
* use jtag i/o from harness when not using jtag dpi (esl-
  epfl/x-heep#379) (Davide Schiavone)
* Fix esl-epfl/x-heep#336 (esl-epfl/x-heep#364) (JuanSapriza)
* add minimal configuration for mcu-gen (esl-epfl/x-heep#378) (Davide
  Schiavone)
* PLIC handlers array (esl-epfl/x-heep#363) (JuanSapriza)
* Update README.md (jmiranda)
* Choose linker compiler and sim/nosim in test_all.sh (esl-
  epfl/x-heep#359) (JuanSapriza)
* Modified the two target header files so that they add a define with
  a value. That is then used to modify the PRINTF logic in all apps
  (esl-epfl/x-heep#361) (JuanSapriza)
* add obi fifo stage to/from peripherals (esl-epfl/x-heep#200) (Davide
  Schiavone)
* added support for clock-gating external subsystems (esl-
  epfl/x-heep#354) (Simone Machetti)
* Improved the comments on the eXtendingHEEP readme (esl-
  epfl/x-heep#360) (JuanSapriza)
* Modified the way of realizing if an app is external or not
  (JuanSapriza)
* add script to simulate all apps (esl-epfl/x-heep#341) (JuanSapriza)
* [app] fix APPs on flash_exec (esl-epfl/x-heep#357) (Davide
  Schiavone)
* adding attributes and mux pad parameters in mcu-gen (esl-
  epfl/x-heep#349) (Davide Schiavone)
* change signal names in power manager to reflex polarity (esl-
  epfl/x-heep#352) (Simone Machetti)
* fix power gating core app (esl-epfl/x-heep#355) (Davide Schiavone)
* add cv32e40px (esl-epfl/x-heep#353) (Davide Schiavone)
* moved fpnew in its own directory (esl-epfl/x-heep#351) (Davide
  Schiavone)
* update cv32e40p divider (esl-epfl/x-heep#350) (Davide Schiavone)
* fix external pad gen (esl-epfl/x-heep#346) (Davide Schiavone)
* fix mcu-gen (esl-epfl/x-heep#345) (Davide Schiavone)
* update GPIO driver (esl-epfl/x-heep#246) (Hossein Taji)
* fix interleaved bus (esl-epfl/x-heep#340) (Daniel Vázquez)
* fix esl-epfl/x-heep#338 (esl-epfl/x-heep#339) (Davide Schiavone)
* Initialized variables to 0 inside functions. Removed printf comments
  (esl-epfl/x-heep#334) (JuanSapriza)
* made the dma_is_ready() function non-optimizable at all. (esl-
  epfl/x-heep#333) (JuanSapriza)
* fix SPI apps (esl-epfl/x-heep#327) (Davide Schiavone)
* Include x-heep.h to all apps that need it (esl-epfl/x-heep#329)
  (JuanSapriza)
* Added soc_ctrl-reg_top warning to waiver (esl-epfl/x-heep#326)
  (JuanSapriza)
* fix several applications (esl-epfl/x-heep#325) (Davide Schiavone)
* Tries to use cmake3. If that is not available, go ahead with cmake
  (esl-epfl/x-heep#323) (JuanSapriza)
* Improve the timing of cv32e40x by removing the debug triggers (esl-
  epfl/x-heep#324) (David Mallasén Quintana)
* refactoring of examples (esl-epfl/x-heep#322) (JuanSapriza)
* expose internal master ports to external devices (esl-
  epfl/x-heep#268) (Michele Caon)

Signed-off-by: Juan Sapriza <juan.sapriza@epfl.ch>
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.

2 participants