diff options
Diffstat (limited to 'fpga/hp_lcd_driver/smh-ac415.mk')
-rw-r--r-- | fpga/hp_lcd_driver/smh-ac415.mk | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/fpga/hp_lcd_driver/smh-ac415.mk b/fpga/hp_lcd_driver/smh-ac415.mk index 7c2d649..2fdacc5 100644 --- a/fpga/hp_lcd_driver/smh-ac415.mk +++ b/fpga/hp_lcd_driver/smh-ac415.mk @@ -3,6 +3,9 @@ include relpath.mk BOARD=smh-ac415 FAMILY=Cyclone IV E PART=EP4CE15F23C8 +CPART1=CFI_64M +CPART2=QSPI_64M +#EPCS16 TOP=hp_lcd_driver BUILD=build_${BOARD} OF=output_files @@ -30,9 +33,15 @@ FIT=${BUILD}/${OF}/$(PROJECT).fit.rpt ASM=${BUILD}/${OF}/$(PROJECT).asm.rpt ASM=${BUILD}/${OF}/$(PROJECT).sta.rpt SOF=${BUILD}/${OF}/${PROJECT}.sof +COF=${BUILD}/${OF}/${PROJECT}.cof +POF=${BUILD}/${OF}/${PROJECT}.pof +#JIC=${BUILD}/${OF}/${PROJECT}.jic +CDF=${BUILD}/${OF}/${PROJECT}.cdf SVF=${BUILD}/${PROJECT}.svf +PSVF=${BUILD}/${PROJECT}-p.svf -default:${SVF} +default:${SVF} ${PSVF} + echo ${PSVF} ${BUILD}/%.vhd ${BUILD}/%.qip:%.vhdl @@ -81,6 +90,56 @@ ${STA}:${FIT} svf:${SVF} ${SVF}:${SOF} (cd ${BUILD} && run_quartus quartus_cpf ${CPF_ARGS} $(call relpath,$<,${BUILD}) $(call relpath,$@,${BUILD}) ) +#${JIC}:${SOF} +# (cd ${BUILD} && run_quartus quartus_cpf -c -s ${PART} -d ${CPART} $(call relpath,$<,${BUILD}) $(call relpath,$@,${BUILD}) ) +#${SVFP}:${JIC} +# (cd ${BUILD} && run_quartus quartus_cpf ${CPF_ARGS} $(call relpath,$<,${BUILD}) $(call relpath,$@,${BUILD}) ) + + +${COF}: ${SOF} + echo '<?xml version="1.0" encoding="US-ASCII" standalone="yes"?>' > $@ + echo '<cof>' >> $@ + echo ' <eprom_name>${CPART_1}</eprom_name>' >> $@ + echo ' <output_filename>$(call relpath,${POF},${BUILD})</output_filename>' >> $@ + echo ' <n_pages>1</n_pages>' >> $@ + echo ' <width>1</width>' >> $@ + echo ' <mode>0</mode>' >> $@ + echo ' <sof_data>' >> $@ + echo ' <user_name>Page_0</user_name>' >> $@ + echo ' <page_flags>1</page_flags>' >> $@ + echo ' <bit0>' >> $@ + echo ' <sof_filename>$(call relpath,${SOF},${BUILD})</sof_filename>' >> $@ + echo ' </bit0>' >> $@ + echo ' </sof_data>' >> $@ + echo ' <version>5</version>' >> $@ + echo ' <create_cvp_file>0</create_cvp_file>' >> $@ + echo ' <options>' >> $@ + echo ' <map_file>1</map_file>' >> $@ + echo ' <option_start_address>0</option_start_address>' >> $@ + echo ' <dynamic_compression>0</dynamic_compression>' >> $@ + echo ' </options>' >> $@ + echo '</cof>' >> $@ + +${POF}:${COF} + (cd ${BUILD} && run_quartus quartus_cpf -c $(call relpath,$<,${BUILD})) +# (cd ${BUILD} && run_quartus quartus_cpf -c -d EPCQ64 $(call relpath,$<,${BUILD}) $(call relpath,$@,${BUILD}) ) + +${CDF}:${POF} + echo 'JedecChain;' > $@ + echo ' FileRevision(JESD32A);' >> $@ + echo ' DefaultMfr(6E);' >> $@ + echo '' >> $@ + echo ' P ActionCode(Ign)' >> $@ + echo ' Device PartName(${CPART2}) MfrSpec(OpMask(0) SEC_Device(QSPI_64MB) Child_OpMask(3 0 0 0) FullPath("$(call relpath,${SOF},${BUILD})") PFLPath("$(call relpath,${POF},${BUILD})"));' >> $@ + echo '' >> $@ + echo 'ChainEnd;' >> $@ + echo '' >> $@ + echo 'AlteraBegin;' >> $@ + echo ' ChainType(JTAG);' >> $@ + echo 'AlteraEnd;' >> $@ + +${PSVF}:${CDF} + (cd ${BUILD} && run_quartus quartus_cpf ${CPF_ARGS} $(call relpath,$<,${BUILD}) $(call relpath,$@,${BUILD}) ) |