build.mak

来自「38译码器的设计」· MAK 代码 · 共 33 行

MAK
33
字号
# makefile for SOPC Builder example design

# Quartus files
QPF = $(shell echo *.qpf)
QP = $(notdir $(basename $(QPF)))
QSF = $(QP).qsf

# SOPC Builder files
PTF = $(shell echo *.ptf)
# system name
SYS = $(notdir $(basename $(PTF)))
# output of generated system
GEN = $(SYS)_log.txt

# SOF <- Quartus Project, SOPC Builder PTF
$(QP).sof : $(QPF) $(GEN) $(QSF)
	quartus_cmd $(QP) -c $(QSF)

# SOPC Builder dub & generate
$(GEN): $(PTF)
	sopc_builder $(PTF) \
		--playback_file=$(PTF) \
		--record_file=dubscript.ptf \
		--no_splash; \
		R=$$?; [ $$R = 4 ] || [ $$R = 2 ]
	-mv -f dubscript.ptf dubscript.txt
	sopc_builder $(PTF) \
		--no_splash --script=pin_assignment_script.txt; \
		R=$$?; [ $$R = 4 ] || [ $$R = 2 ]
	sopc_builder $(PTF) \
		--generate --no_splash; \
		[ $$? = 4 ]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?