Skip to content

Commit

Permalink
FPGA: Add --freq constraint to nextpnr
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Strömbergson <[email protected]>
  • Loading branch information
secworks authored and dehanj committed Aug 20, 2024
1 parent 7ac4617 commit 35d51be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hw/application_fpga/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ YOSYS_PATH ?=
NEXTPNR_PATH ?=
ICESTORM_PATH ?=

# FPGA target frequency. Should be in sync with the clock frequency
# given by the parameters to the PLL in rtl/clk_reset_gen.v
TARGET_FREQ ?= 21

# Size in 32-bit words, must be divisible by 256 (pairs of EBRs, because 16
# bits wide; an EBR is 128 32-bits words)
BRAM_FW_SIZE ?= 1536
Expand Down Expand Up @@ -256,7 +260,7 @@ synth.json: $(FPGA_SRC) $(VERILOG_SRCS) bram_fw.hex $(P)/data/uds.hex $(P)/data/
$(filter %.v, $^)

application_fpga_par.json: synth.json $(P)/data/$(PIN_FILE)
$(NEXTPNR_PATH)nextpnr-ice40 --ignore-loops --up5k --package sg48 --json $< \
$(NEXTPNR_PATH)nextpnr-ice40 --freq $(TARGET_FREQ) --ignore-loops --up5k --package sg48 --json $< \
--pcf $(P)/data/$(PIN_FILE) --write $@

application_fpga.asc: application_fpga_par.json $(P)/data/uds.hex $(P)/data/udi.hex
Expand Down

0 comments on commit 35d51be

Please sign in to comment.