Home Neural Network NIOS II – FW does not work with compiler optimization turned on

NIOS II – FW does not work with compiler optimization turned on

0
NIOS II – FW does not work with compiler optimization turned on

[ad_1]

Pricey help group,

 

I’ve an issue with the habits of the firmware if the challenge is inbuilt launch mode with optimization enabled.

The issue happens throughout the write-to-flash routine. I exploit Generic Serial Flash Interface Intel® FPGA IP and was impressed by the intel_generic_serial_flash_interface_top instance to create the code to jot down a block of knowledge to the Flash. Within the instance, the memcpy operate transfers information into the Flash. I do not know if the essential level of the operate is the memcpy, but when optimization is turned on, the firmware appears to carry out no write operation to the Flash: the operate returns no errors, so it makes me consider that all the pieces was executed appropriately, however after a examine, there wasn’t the anticipated information in reminiscence. Whereas with the identical code constructed with optimization turned off, the firmware works correctly.

The flash_write_function, which generates the issue, is hooked up. 

 

My questions are:

  1. Why this habits?

  2. Is it potential to make use of memcpy as a write operate on Flash?

  3. Is it potential to show off optimization for a block of code?

 

I am utilizing:

naand_0-1711546924941.png

 

The NIOS information cache is disabled, whereas the instruction cache is enabled (see beneath). I use solely the IORD and IOWR features to carry out registers and peripherals accesses.

naand_1-1711546964158.png

 

Listed below are the Nios II Software Properties:

naand_2-1711549525906.png

[ad_2]