-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #99 from umarcor/osflow-rework
osflow rework
- Loading branch information
Showing
24 changed files
with
184 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.asc | ||
*.bit | ||
*.dfu | ||
*.history | ||
*.json | ||
*-report.txt |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
${IMPL}.asc: $(IMPL).json $(PCF) | ||
${IMPL}.${PNR2BIT_EXT}: $(IMPL).json $(CONSTRAINTS) | ||
$(NEXTPNR) \ | ||
$(PNRFLAGS) \ | ||
--pcf $(PCF) \ | ||
--$(CONSTRAINTS_FORMAT) $(CONSTRAINTS) \ | ||
--json $(IMPL).json \ | ||
--asc $@ 2>&1 | tee nextpnr-report.txt | ||
--${NEXTPNR_OUT} $@ 2>&1 | tee nextpnr-report.txt | ||
|
||
${IMPL}.bit: $(IMPL).asc | ||
$(ICEPACK) $< $@ | ||
${IMPL}.bit: ${IMPL}.${PNR2BIT_EXT} | ||
$(PACKTOOL) $< $@ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.PHONY: all | ||
|
||
# Default target: run all required targets to build the DFU image. | ||
all: $(IMPL).dfu | ||
echo "! Built $(IMPL) for $(BOARD) $(FOMU_REV)" | ||
|
||
# Use dfu-suffix to generate the DFU image from the FPGA bitstream. | ||
${IMPL}.dfu: $(IMPL).bit | ||
$(COPY) $< $@ | ||
dfu-suffix -v 1209 -p 70b1 -a $@ | ||
|
||
# Use df-util to load the DFU image onto the Fomu. | ||
load: $(IMPL).dfu | ||
dfu-util -D $< | ||
|
||
.PHONY: load |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.PHONY: all | ||
|
||
all: bit | ||
echo "! Built $(IMPL) for $(BOARD)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.PHONY: all | ||
|
||
all: bit | ||
echo "! Built $(IMPL) for $(BOARD)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
PCF_PATH ?= constraints | ||
|
||
|
||
ifeq ($(BOARD),Fomu) | ||
|
||
$(info Setting constraints and implementation args for BOARD Fomu) | ||
|
||
# Different Fomu hardware revisions are wired differently and thus | ||
# require different configurations for yosys and nextpnr. | ||
# Configuration is performed by setting the environment variable FOMU_REV accordingly. | ||
|
||
FOMU_REV ?= pvt | ||
|
||
ifeq ($(FOMU_REV),evt1) | ||
YOSYSFLAGS ?= -D EVT=1 -D EVT1=1 -D HAVE_PMOD=1 | ||
PNRFLAGS ?= --up5k --package sg48 | ||
CONSTRAINTS ?= $(PCF_PATH)/fomu-evt2.pcf | ||
else ifeq ($(FOMU_REV),evt2) | ||
YOSYSFLAGS ?= -D EVT=1 -D EVT2=1 -D HAVE_PMOD=1 | ||
PNRFLAGS ?= --up5k --package sg48 | ||
CONSTRAINTS ?= $(PCF_PATH)/fomu-evt2.pcf | ||
else ifeq ($(FOMU_REV),evt3) | ||
YOSYSFLAGS ?= -D EVT=1 -D EVT3=1 -D HAVE_PMOD=1 | ||
PNRFLAGS ?= --up5k --package sg48 | ||
CONSTRAINTS ?= $(PCF_PATH)/fomu-evt3.pcf | ||
else ifeq ($(FOMU_REV),hacker) | ||
YOSYSFLAGS ?= -D HACKER=1 | ||
PNRFLAGS ?= --up5k --package uwg30 | ||
CONSTRAINTS ?= $(PCF_PATH)/fomu-hacker.pcf | ||
else ifeq ($(FOMU_REV),pvt) | ||
YOSYSFLAGS ?= -D PVT=1 | ||
PNRFLAGS ?= --up5k --package uwg30 | ||
CONSTRAINTS ?= $(PCF_PATH)/fomu-pvt.pcf | ||
else | ||
$(error Unrecognized FOMU_REV value. must be "evt1", "evt2", "evt3", "pvt", or "hacker") | ||
endif | ||
|
||
IMPL := neorv32_Fomu_$(FOMU_REV)_$(ID) | ||
|
||
endif | ||
|
||
|
||
ifeq ($(BOARD),iCESugar) | ||
$(info Setting constraints and implementation args for BOARD iCESugar) | ||
|
||
CONSTRAINTS ?= $(PCF_PATH)/iCESugar.pcf | ||
PNRFLAGS ?= --up5k --package sg48 --ignore-loops --timing-allow-fail | ||
IMPL ?= neorv32_iCESugar_$(ID) | ||
|
||
endif | ||
|
||
|
||
ifeq ($(BOARD),UPduino_v3) | ||
$(info Setting constraints and implementation args for BOARD UPduino) | ||
|
||
CONSTRAINTS ?= $(PCF_PATH)/UPduino_v3.pcf | ||
PNRFLAGS ?= --up5k --package sg48 --ignore-loops --timing-allow-fail | ||
IMPL ?= neorv32_UPduino_v3_$(ID) | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
ID ?= impl_1 | ||
|
||
include boards/index.mk | ||
|
||
ifndef TOP | ||
$(error TOP needs to be specified!) | ||
endif | ||
|
||
include filesets.mk | ||
|
||
ifndef DESIGN_SRC | ||
ifndef BOARD_SRC | ||
$(error Neither DESIGN_SRC nor BOARD_SRC were set!) | ||
endif | ||
endif | ||
|
||
include tools.mk | ||
|
||
ifdef GHDL_PLUGIN_MODULE | ||
YOSYSFLAGS += -m $(GHDL_PLUGIN_MODULE) | ||
endif | ||
|
||
include synthesis.mk | ||
include PnR_Bit.mk | ||
|
||
.PHONY: syn impl bit clean | ||
|
||
syn: ${IMPL}.json | ||
impl: ${IMPL}.${PNR2BIT_EXT} | ||
bit: ${IMPL}.bit | ||
|
||
clean: | ||
rm -rf *.{${PNR2BIT_EXT},bit,cf,dfu,history,json,o} *-report.txt | ||
|
||
include boards/$(BOARD).mk |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.