Skip to content

Commit

Permalink
[setups/osflow] support 'svf' target for ECP5 devices
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Jul 7, 2021
1 parent 80a021a commit 530e92b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
8 changes: 6 additions & 2 deletions setups/examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ run:
BOARD_SRC=$(EXAMPLES)/neorv32_$(BOARD)_BoardTop_$(DESIGN).vhd \
TOP=neorv32_$(BOARD)_BoardTop_$(DESIGN) \
ID=$(DESIGN) \
$(TASK) \
&& $(MV) $(OSFLOW)/$(BITSTREAM) ./
$(TASK)
IMPL="$${BITSTREAM%%.*}"; for item in ".bit" ".svf"; do \
if [ -f "$(OSFLOW)/$$IMPL$$item" ]; then \
$(MV) "$(OSFLOW)/$$IMPL$$item" ./; \
fi \
done

# Boards

Expand Down
5 changes: 5 additions & 0 deletions setups/osflow/PnR_Bit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ ${IMPL}.${PNR2BIT_EXT}: $(IMPL).json $(CONSTRAINTS)

${IMPL}.bit: ${IMPL}.${PNR2BIT_EXT}
$(PACKTOOL) $< $@

ifeq ($(DEVICE_SERIES),ecp5)
${IMPL}.svf: ${IMPL}.${PNR2BIT_EXT}
$(PACKTOOL) --svf $@ $<
endif
8 changes: 6 additions & 2 deletions setups/osflow/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ endif
include synthesis.mk
include PnR_Bit.mk

.PHONY: syn impl bit clean
.PHONY: syn impl bit svf clean

syn: ${IMPL}.json
impl: ${IMPL}.${PNR2BIT_EXT}
bit: ${IMPL}.bit

ifeq ($(DEVICE_SERIES),ecp5)
svf: ${IMPL}.svf
endif

clean:
rm -rf *.{${PNR2BIT_EXT},bit,cf,dfu,history,json,o} *-report.txt
rm -rf *.{${PNR2BIT_EXT},bit,cf,dfu,history,json,o,svf} *-report.txt

include boards/$(BOARD).mk

0 comments on commit 530e92b

Please sign in to comment.