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

FPGA Programming by Command Line

Sulaiman
Novice
2,239 Views

Hi,

 

I have finished project implemented in Standard Quartus18.1 for MAX10 device. The final bitstream is encrypted. Currently, I use Quartus Programmer GUI, to program each device. However, I would like to implement command line tool which program fpga automatically.

In Programmer GUI, I am merging ekp together with pof file (by right clicking on the pof file and selecting add ekp file). How can I do this by command line?

 

Best Regards,

Sulaiman

0 Kudos
9 Replies
NurAiman_M_Intel
Employee
2,222 Views

Hi,


Thank you for contacting Intel community.


Per my understanding, you would like to use command line to program FPGA? If yes, kindly refer to Intel MAX 10 configuration user guide below:


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


Regards,

Aiman


0 Kudos
Sulaiman
Novice
2,214 Views
Hi,

Yes I would like to use command line to program FPGA but with encrypted pof.
I can not find it in pdf file. Can you determine the page number?

Regards,
Sulaiman
0 Kudos
ak6dn
Valued Contributor III
2,183 Views

I use the 'make' system to run a command line compilation of a design using Quartus.

Here is my Makefile:

 

DESIGN=DE0_PDP8 

all:: generate report

generate::
	$(QUARTUS_BIN)/quartus_map $(DESIGN) --write_settings_files=off
	$(QUARTUS_BIN)/quartus_fit $(DESIGN) --write_settings_files=off --seed=1
	$(QUARTUS_BIN)/quartus_asm $(DESIGN) --write_settings_files=off
	$(QUARTUS_BIN)/quartus_sta $(DESIGN)
	$(QUARTUS_BIN)/quartus_sta -t generate_timing.tcl $(DESIGN) 10
	$(QUARTUS_BIN)/quartus_eda $(DESIGN) --write_settings_files=off -c $(DESIGN)
	$(QUARTUS_BIN)/quartus_cpf -c $(DESIGN).cof

report::
	@-echo ' '
	-egrep --color -i '\([0-9]+ violated\)' TQ_*.rpt
	@-echo ' '
	-egrep -vi '^this panel reports' TQ_fmax_summary.rpt
	@-echo ' '

clean::
	-rm -f $(DESIGN).*.rpt $(DESIGN).*.summary $(DESIGN).*.smsg $(DESIGN).map
	-rm -f $(DESIGN)_assignment_defaults.qdf TQ_*.rpt PLL*.txt meminit.txt
	-rm -f $(DESIGN).done $(DESIGN).map $(DESIGN).pof $(DESIGN).sof $(DESIGN).jic
	-rm -f $(DESIGN).pin $(DESIGN).jdi $(DESIGN).qws $(DESIGN).*.ddb $(DESIGN).sld
	-rm -rf db incremental_db simulation

# the end

 

 
To setup the Quartus environment (I use multiple versions, this sets up 16.0) I first run this shell script:

 

#!/bin/bash
#
export QUARTUS_BASE=/cygdrive/C/Tools/Altera/16.0
export QUARTUS_ROOTDIR=${QUARTUS_BASE}/quartus
if [ -e ${QUARTUS_BASE}/quartus/bin64 ] ; then
  export QUARTUS_BIN=${QUARTUS_BASE}/quartus/bin64
else
  export QUARTUS_BIN=${QUARTUS_BASE}/quartus/bin
fi
export QSYS_ROOTDIR=${QUARTUS_BASE}/quartus/sopc_builder/bin
export SOPC_KIT_NIOS2=${QUARTUS_BASE}/nios2eds
#
echo QUARTUS_BASE=${QUARTUS_BASE}
echo QUARTUS_ROOTDIR=${QUARTUS_ROOTDIR}
echo QUARTUS_BIN=${QUARTUS_BIN}
echo QSYS_ROOTDIR=${QSYS_ROOTDIR}
echo SOPC_KIT_NIOS2=${SOPC_KIT_NIOS2}
#
# the end

 

 
Then in the design directory I just type 'make' and wait for it to finish. No GUI needed. I run under CYGWIN unix environment on Win10 64b.

0 Kudos
Sulaiman
Novice
2,167 Views

Hi,

 

I am using the following command to program FPGA:

quartus_pgm -m JTAG -o p;design.pof

 

When we want to program encrypted pof, we have 2 files(.ekp, .pof). We can program them together or separately.  These methods are found in "Intel® MAX® 10 FPGA Configuration User Guide" document at page 51 but by GUI.

Can I do one of these methods by quartus_pgm commands.

 

Regards,

Sulaiman

0 Kudos
NurAiman_M_Intel
Employee
2,063 Views

Hi,


Apologize for the delay in response as I did not received the notification.

Have you try the method suggested by our friend below:


ak6dn
Valued Contributor II
Re: Re:FPGA Programming by Command Line
Message Body

I use the 'make' system to run a command line compilation of a design using Quartus.

Here is my Makefile:

 

DESIGN=DE0_PDP8 

all:: generate report

generate::
 $(QUARTUS_BIN)/quartus_map $(DESIGN) --write_settings_files=off
 $(QUARTUS_BIN)/quartus_fit $(DESIGN) --write_settings_files=off --seed=1
 $(QUARTUS_BIN)/quartus_asm $(DESIGN) --write_settings_files=off
 $(QUARTUS_BIN)/quartus_sta $(DESIGN)
 $(QUARTUS_BIN)/quartus_sta -t generate_timing.tcl $(DESIGN) 10
 $(QUARTUS_BIN)/quartus_eda $(DESIGN) --write_settings_files=off -c $(DESIGN)
 $(QUARTUS_BIN)/quartus_cpf -c $(DESIGN).cof

report::
 @-echo ' '
 -egrep --color -i '\([0-9]+ violated\)' TQ_*.rpt
 @-echo ' '
 -egrep -vi '^this panel reports' TQ_fmax_summary.rpt
 @-echo ' '

clean::
 -rm -f $(DESIGN).*.rpt $(DESIGN).*.summary $(DESIGN).*.smsg $(DESIGN).map
 -rm -f $(DESIGN)_assignment_defaults.qdf TQ_*.rpt PLL*.txt meminit.txt
 -rm -f $(DESIGN).done $(DESIGN).map $(DESIGN).pof $(DESIGN).sof $(DESIGN).jic
 -rm -f $(DESIGN).pin $(DESIGN).jdi $(DESIGN).qws $(DESIGN).*.ddb $(DESIGN).sld
 -rm -rf db incremental_db simulation

# the end

 

 
To setup the Quartus environment (I use multiple versions, this sets up 16.0) I first run this shell script:

 

#!/bin/bash
#
export QUARTUS_BASE=/cygdrive/C/Tools/Altera/16.0
export QUARTUS_ROOTDIR=${QUARTUS_BASE}/quartus
if [ -e ${QUARTUS_BASE}/quartus/bin64 ] ; then
  export QUARTUS_BIN=${QUARTUS_BASE}/quartus/bin64
else
  export QUARTUS_BIN=${QUARTUS_BASE}/quartus/bin
fi
export QSYS_ROOTDIR=${QUARTUS_BASE}/quartus/sopc_builder/bin
export SOPC_KIT_NIOS2=${QUARTUS_BASE}/nios2eds
#
echo QUARTUS_BASE=${QUARTUS_BASE}
echo QUARTUS_ROOTDIR=${QUARTUS_ROOTDIR}
echo QUARTUS_BIN=${QUARTUS_BIN}
echo QSYS_ROOTDIR=${QSYS_ROOTDIR}
echo SOPC_KIT_NIOS2=${SOPC_KIT_NIOS2}
#
# the end

 

 
Then in the design directory I just type 'make' and wait for it to finish. No GUI needed. I run under CYGWIN unix environment on Win10 64b.

Post TimeApr 24, 2021 5:34:22 PM


Let me know if it is succesful or not.


Regards,

Aiman


0 Kudos
Sulaiman
Novice
2,058 Views

Hi,

 

I didn't do the method from our friend. I think this method for generating the programming files.

My question is explained below:

I am using the following command to program FPGA:

quartus_pgm -m JTAG -o p;design.pof

 

When we want to program encrypted pof, we have 2 files(.ekp, .pof). We can program them together or separately.  These methods are found in "Intel® MAX® 10 FPGA Configuration User Guide" document at page 51 but by GUI.

 

Can I do one of these methods by quartus_pgm commands or other command.

 

Regards,

Sulaiman

 

 

 

0 Kudos
NurAiman_M_Intel
Employee
2,044 Views

Hi,


You can use quartus_pgm command to program pofbut not ekp. Please see below link:

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/manual/tclscriptrefmnl.pdf (page 76-79)


Regards,

Aiman


0 Kudos
Sulaiman
Novice
2,007 Views

Hi, 

 

I understand from you, we can only program encrypted pof using GUI programmer!

 

Regards,

Sulaiman

NurAiman_M_Intel
Employee
1,966 Views

I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you


0 Kudos
Reply