Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17040 Discussions

Disabling the erase operation

Altera_Forum
Honored Contributor II
1,232 Views

Hi, 

 

is it possible to disable the erase operation when programming the device by using the following command: 

 

quartus_pgm --mode=as --cable=USB-Blaster --operation=pv\;file_name.pof 

 

Now the programmer automatically executes the erase operation before programming the device. 

 

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
492 Views

In General you do not want to disable the erase option, for flash devices. You must at least erase the portion of the flash being programmed by the POF, because of the way FLASH works. 

 

Typically with FLASH devices, a cell is ERASED to all 1's IE 0xFFFFFFF, when you program the device, you can flip bits from the 1 to zero state, but not from 0 to 1. So you say you wanted if the byte had the data 0x55 in it, and you reprogrammed it as 0xAA, you would get 0x00, instead of 0xAA unless you erased that block first. 

 

That being said, there are cases, where your flash is segregated into separate regions with different functions: IE FPGA, Software, Configuration Data Region. where you may want to only re-program one of the regions. 

 

Typically I've used the nios2-flash-program for this task. 

nios2-flash-programmer --epcs --base=0x1800 filname.sof.flash 

 

so I can't directly answer your quartus_pgm question, but there are ways to do it. 

 

Regards, 

 

Pete
0 Kudos
Altera_Forum
Honored Contributor II
492 Views

You can also only erase large sectors - probably 64k bytes. 

There is also a single command to erase the entire chip, not much faster than erasing all the sectors one by one - but simpler.
0 Kudos
Altera_Forum
Honored Contributor II
492 Views

I mean that when using command line programmer, will it be possible to get rid of unnecessary FLASH erase? When FLASH is programmed 1st time erase is not needed.

0 Kudos
Reply