Skip to content

Commit aa52420

Browse files
committed
Updated Quartus Makefile and the reference project
1 parent 111dbc6 commit aa52420

File tree

16 files changed

+182
-177
lines changed

16 files changed

+182
-177
lines changed
Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,2 @@
1-
# -------------------------------------------------------------------------- #
2-
#
3-
# Copyright (C) 2017 Intel Corporation. All rights reserved.
4-
# Your use of Intel Corporation's design tools, logic functions
5-
# and other software and tools, and its AMPP partner logic
6-
# functions, and any output files from any of the foregoing
7-
# (including device programming or simulation files), and any
8-
# associated documentation or information are expressly subject
9-
# to the terms and conditions of the Intel Program License
10-
# Subscription Agreement, the Intel Quartus Prime License Agreement,
11-
# the Intel MegaCore Function License Agreement, or other
12-
# applicable license agreement, including, without limitation,
13-
# that your use is for the sole purpose of programming logic
14-
# devices manufactured by Intel and sold by Intel or its
15-
# authorized distributors. Please refer to the applicable
16-
# agreement for further details.
17-
#
18-
# -------------------------------------------------------------------------- #
19-
#
20-
# Quartus Prime
21-
# Version 17.0.0 Build 595 04/25/2017 SJ Standard Edition
22-
# Date created = 11:22:30 September 26, 2018
23-
#
24-
# -------------------------------------------------------------------------- #
25-
26-
QUARTUS_VERSION = "17.0"
27-
DATE = "11:22:30 September 26, 2018"
28-
29-
# Revisions
301

312
PROJECT_REVISION = "test"

example_projects/fast_counter_iterative_test/Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ VAR = $(shell seq $(VAR_START) ${VAR_STOP})
2323
JOBS = $(addprefix job,${VAR})
2424

2525

26-
.PHONY: all fmax clean
26+
.PHONY: all report clean
2727

2828

2929
all: fmax
@@ -36,18 +36,24 @@ ${JOBS}: job%:
3636
$(MAKE) -C ./$* stap
3737

3838
fmax: ${JOBS}
39-
echo "FMAX summary report for iterative compilation" | tee > ./fmax.rpt; \
39+
echo '# FMAX summary report for iterative compilation' > ./fmax.csv; \
4040
for (( var = $(VAR_START); var <= $(VAR_STOP); var++ )); do \
41-
echo "$$var" | tee >> ./fmax.rpt; \
41+
{ echo $$var ', '; \
42+
cat ./$$var/OUTPUT/test.sta.rpt | \
43+
grep -A2 '; Fmax ; Restricted Fmax ; Clock Name ; Note ;' | \
44+
tail -n1 | cut -d\; -f3 | cut -d' ' -f2; echo ', '; \
4245
cat ./$$var/OUTPUT/test.sta.rpt | \
4346
grep -A3 '; Fmax ; Restricted Fmax ; Clock Name ; Note ;' | \
44-
tail -n2 | tee >> ./fmax.rpt; \
47+
tail -n1 | cut -d\; -f3 | cut -d' ' -f2; } >> ./fmax.csv; \
4548
done; \
46-
echo 'fmax.rpt file done'
49+
echo 'fmax.csv file done'
50+
51+
report: ./fmax.csv
52+
cat ./fmax.csv
4753

4854
clean:
4955
for (( var = $(VAR_START); var <= $(VAR_STOP); var++ )); do \
5056
rm -rfv ./$$var; \
51-
rm -rfv ./fmax.rpt; \
57+
rm -rfv ./fmax.csv; \
5258
done
5359

example_projects/fast_counter_iterative_test/base/Makefile

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
PROJ_DIR = $(shell pwd)
3030
PROJ = $(shell ls -1 *.qpf | tail -n1 | awk '{ gsub(".qpf","") } 1' )
3131
#SRCS = $(shell ls -R1 SOURCE/*.{v,sv,vh,sdc,tcl,hex,bin} 2>/dev/null | grep -v ':' )
32-
SRCS = $(shell ls -R1 SOURCE/* )
32+
SRCS = $(shell ls -R1 SOURCE/* )
3333

3434
QPF = $(PROJ).qpf
3535
QSF = $(PROJ).qsf
@@ -46,9 +46,11 @@ FIT_REPORT = ./OUTPUT/$(PROJ).fit.rpt
4646

4747
DSE_CONFIG = $(PROJ).dse
4848

49-
TARGET_IP = '192.168.1.1'
50-
TARGET_PORT = 'USB-1'
51-
TARGET_CHIP = '1'
49+
TARGET_IP = 192.168.1.1
50+
TARGET_PORT = USB-1
51+
TARGET_CHIP = 1
52+
53+
QUARTUS_DIR = /cygdrive/c/intelFPGA_lite/20.1/quartus/bin64/
5254

5355

5456

@@ -69,7 +71,7 @@ gui:
6971

7072
$(MAP_REPORT): $(SRCS) $(QPF) $(QSF)
7173
$(shell if test -f $(PRE_SCRIPT); then quartus_sh -t $(PRE_SCRIPT) compile $(PROJ) $(PROJ); fi )
72-
quartus_map --no_banner \
74+
$(QUARTUS_DIR)quartus_map --no_banner \
7375
--read_settings_files=on \
7476
--write_settings_files=off \
7577
--64bit $(PROJ) -c $(PROJ)
@@ -78,10 +80,10 @@ map: $(PROJ).map.rpt
7880

7981

8082
$(FIT_REPORT): $(MAP_REPORT)
81-
# quartus_cdb --read_settings_files=on \
83+
# $(QUARTUS_DIR)quartus_cdb --read_settings_files=on \
8284
# --write_settings_files=off \
8385
# --64bit $(PROJ) -c $(PROJ)
84-
quartus_fit --no_banner \
86+
$(QUARTUS_DIR)quartus_fit --no_banner \
8587
--read_settings_files=on \
8688
--write_settings_files=off \
8789
--inner_num=1 \
@@ -94,30 +96,30 @@ fit: $(FIT_REPORT)
9496

9597

9698
$(SOF): $(FIT_REPORT)
97-
quartus_asm --no_banner \
99+
$(QUARTUS_DIR)quartus_asm --no_banner \
98100
--read_settings_files=off \
99101
--write_settings_files=off \
100102
--64bit $(PROJ) -c $(PROJ)
101103
asm: $(SOF)
102104

103105

104106
sta: $(FIT_REPORT)
105-
quartus_sta $(PROJ) -c $(PROJ)
107+
$(QUARTUS_DIR)quartus_sta $(PROJ) -c $(PROJ)
106108
#$(shell if test -f $(POST_SCRIPT); then quartus_sh -t $(POST_SCRIPT) compile $(PROJ) $(PROJ); fi )
107109

108110
stap: $(FIT_REPORT)
109-
quartus_sta --parallel --model=slow $(PROJ) -c $(PROJ)
111+
$(QUARTUS_DIR)quartus_sta --parallel --model=slow $(PROJ) -c $(PROJ)
110112
#$(shell if test -f $(POST_SCRIPT); then quartus_sh -t $(POST_SCRIPT) compile $(PROJ) $(PROJ); fi )
111113

112114

113115
$(POF): $(SOF)
114-
quartus_cpf --no_banner \
116+
$(QUARTUS_DIR)quartus_cpf --no_banner \
115117
-c $(SOF) $(POF)
116118
$(RBF): $(SOF)
117-
quartus_cpf --no_banner \
119+
$(QUARTUS_DIR)quartus_cpf --no_banner \
118120
-c $(SOF) $(RBF)
119121
$(JAM): $(SOF)
120-
quartus_cpf --no_banner \
122+
$(QUARTUS_DIR)quartus_cpf --no_banner \
121123
-c $(SOF) $(JAM)
122124
sof: $(SOF)
123125
pof: $(POF)
@@ -126,17 +128,17 @@ jam: $(JAM)
126128

127129

128130
prog: sof
129-
quartus_pgm --no_banner \
131+
$(QUARTUS_DIR)quartus_pgm --no_banner \
130132
-c "USB-Blaster on $(TARGET_IP) [$(TARGET_PORT)]" -m jtag \
131133
-o "P;$(SOF)@$(TARGET_CHIP)"
132134

133135
prog_pof: pof
134-
quartus_pgm --no_banner \
136+
$(QUARTUS_DIR)quartus_pgm --no_banner \
135137
-c "USB-Blaster on $(TARGET_IP) [$(TARGET_PORT)]" -m jtag \
136138
-o "BVP;$(POF)@$(TARGET_CHIP)"
137139

138140
prog_rbf: rbf
139-
quartus_pgm --no_banner \
141+
$(QUARTUS_DIR)quartus_pgm --no_banner \
140142
-c "USB-Blaster on $(TARGET_IP) [$(TARGET_PORT)]" -m jtag \
141143
-o "BVP;$(RBF)@$(TARGET_CHIP)"
142144

@@ -159,7 +161,7 @@ clean:
159161

160162

161163
dse: $(DSE_CONFIG)
162-
quartus_dse --no_banner \
164+
$(QUARTUS_DIR)quartus_dse --no_banner \
163165
--terminate off \
164166
--num-parallel-processors 10 \
165167
--auto-discover-files on \
@@ -200,7 +202,7 @@ gtkwave: $(SRCS)
200202

201203

202204
stp:
203-
quartus_stp --no_banner \
205+
$(QUARTUS_DIR)quartus_stp --no_banner \
204206
$(QPF)
205207

206208

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# junk files
3+
*.qws
4+
*_assignment_defaults.qdf
5+
c5_pin_model_dump.txt
6+
*.ipregen.rpt
7+
*_summary.csv
8+
*_early_pwr.csv
9+
10+
# junk directories
11+
/.qsys_edit
12+
/db
13+
/incremental_db
14+
/greybox_tmp
15+
16+
# design space explorer
17+
/dse
18+
dse1_base.qpf
19+
dse1_base.qsf
20+
*.dse.rpt
21+
*.archive.rpt

0 commit comments

Comments
 (0)