Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AKAYA
Novice
5,091 Views

can we access a specific page of the flash memory to store certain code?

using MAX10 fpga. i need to create a boot program. The boot code need to be stored to a specific location and application code in other location. The boot code need to be wriiten in a specific page of the sector, rest will be used for storing application code. Is it possible to access a specific page for writing the data( certain code) ?

0 Kudos
16 Replies
Nooraini_Y_Intel
Employee
42 Views

Hi AKAYA,

 

I'm assuming the boot program you are referring to, is the configuration image (.sof file). Typically you can store the configuration image either in CFM0 (compressed configuration image 0) or CFM0+CFM1(uncompressed configuration image 0) sector memory. When power up, the MAX 10 will be program with this configuration image 0 and start to function. Then remaining flash sector memory such as CFM2, UFM0 and UFM can be use to store any other data such as your application code. For details on the MAX 10 memory sector, you can refer to chapter 2.1.2.2.1. Configuration Flash Memory Sectors in the MAX 10 FPGA Configuration User Guide from the link below:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/max-10/ug_m10_config.pdf

 

You can use the On-Chip Flash IP in MAX 10 to access the memory block to write (store) your application code. You can refer to the MAX 10 User Flash Memory User Guide from the link below:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/max-10/ug_m10_ufm.pdf

 

Regards,

Nooraini

 

AKAYA
Novice
42 Views

Thanks for the reply...

 

Am using dual configuration so there is no need for CFM boot.

The boot program i need to design is for UFM. The boot program along with the application code should be stored in the UFM itself. so for that i need to access a specific page from the sector. can we do that?

Nooraini_Y_Intel
Employee
42 Views

Hi AKAYA,

  

As mentioned previously, you can use the On-Chip Flash IP in MAX 10 to access the memory block to write (store) your application code in UFM0 and UFM memory block. The details information can be refer to the MAX 10 User Flash Memory User Guide from the link below:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/max-10/ug_m10_ufm.pdf

 

Regards,

Nooraini

 

AKAYA
Novice
42 Views

The problem is not for storing the application code. Storing just the application code can be done. But, there is a boot program which also to be written into a specific page of the UFM so that the rest of the location can be made available to the application code. How can we do that??

Nooraini_Y_Intel
Employee
42 Views

Hi Akaya,

 

Yes, it is the same method. You can use the On-Chip Flash IP in MAX 10 to access the memory block to write (store) your application code/boot program or whatever you desire to store in the specific memory location UFM0 and UFM1/2 memory block. Again, please do read the MAX 10 User Flash Memory User Guide for the details to perform the erase, read and write operation:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/max-10/ug_m10_ufm.pdf

 

You can also refer to AN741 for the available example design:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/an/an741.pdf

The design is available from the link below:

https://fpgacloud.intel.com/devstore/platform/15.0.0/Standard/max10-remote-system-upgrade-rsu-over-u...

 

Regards,

Nooraini

 

 

AKAYA
Novice
42 Views

thank you for the reply...

 

I have read the user manual. There are procedure to write into a sector but not into a specific page.

 

My doubt is whether we can write an entire code in just one page of the UFM without accessing a entire block.

 

 

Nooraini_Y_Intel
Employee
42 Views

Hi Akaya,

 

You can still access the UFM block independently such as UFM0 and UFM1/2 base on the address of the sector. As long you have perform erase and un-protect the sector UFM0 or UFM1 or UFM2 , then you can set the address that you want to write the data. The address of each memory block is shown in the Address Mapping of the On Chip Flash IP.

 

Regards,

Nooraini

AKAYA
Novice
42 Views

thanks for the reply

 

BOOT_CODE.pngBut we need to access a single page of the sector and not the entire sector at a time.

erasing the page can be done. but can we write into a single page?

 

the above image is the example operation which need to be performed. is it possible?

Nooraini_Y_Intel
Employee
42 Views

Hi Akaya,

 

The above page mode (that you are asking) is not supported in the CFM and UFM memory block.

 

Regards,

Nooraini

 

AKAYA
Novice
42 Views

thank you for the reply

 

So i can't make access to a sihgle page to write the code?

 

can we make two seperate projects( one contain boot program and other for application code on same QSYS) and combine them?

 

 

Nooraini_Y_Intel
Employee
42 Views

Hi Akaya,

 

Again, please refer to the MAX 10 User Flash Memory User Guide. The MAX 10 User Flash Memory User Guide has explained clearly the supported erase, read and write operation available.

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/max-10/ug_m10_ufm.pdf

 

I'm not sure what is the difference between "boot program" and "application code" referring to your context here. You can create multiple project as long you need to instantiate the On Chip IP flash in your project design in order to access the CFM and UFM memory block. Again, please refer to AN741 for the available example design that should help to answer your questions:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/an/an741.pdf

The design is available from the link below:

https://fpgacloud.intel.com/devstore/platform/15.0.0/Standard/max10-remote-system-upgrade-rsu-over-u...

 

Regards,

Nooraini

 

AKAYA
Novice
42 Views

thank you for the reply...

 

but the document which you said to refer does not contain any details about the write operation for page section.

 

for my work the boot and application code, both are different...

 

so I need to work on page section to store both differently but in the same flash memory..

 

AKAYA
Novice
42 Views

thanks for the reply...

 

The problem am facing is that am not sure if we can write an program in just a single page of the UFM, not using the entire sector as such

In my project both the application code and the boot code are different.

 

The manual you asked to refer has only details for writing into the sector of the UFM and does not have any idea about the write operation for the page section.

Can you suggest some other way to sort it out

Nooraini_Y_Intel
Employee
42 Views

Hi Akaya,

 

You can only use the available function/feature as stated in the user guide or handbook. Since user guide or handbook does not explain the above page mode option thus this feature is not supported in the CFM and UFM memory block.

 

Regards,

Nooraini

AKAYA
Novice
42 Views

thanks for the reply....

 

I need to store only part of a code into the page. Can we do that?

Nooraini_Y_Intel
Employee
42 Views

Hi Akaya,

 

Please refer the user guide/handbook on what features are available and use as it is. You can still access the UFM block independently such as UFM0 and UFM1/2 base on the address of the sector. As long you have perform erase and un-protect the sector UFM0 or UFM1 or UFM2 , then you can set the address that you want to write the data. The address of each memory block is shown in the Address Mapping of the On Chip Flash IP. Thank you. 

 

Regards,

Nooraini

 

Reply