mirror of https://github.com/openXC7/prjxray.git
Added bit2fasm targets to Makefiles
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
This commit is contained in:
parent
0c244f242d
commit
421af109b1
|
|
@ -1,9 +1,13 @@
|
|||
BASE_PATH = $(abspath $(PWD)/../../../)
|
||||
VIVADO = /opt/Xilinx/Vivado/2017.2/bin/vivado
|
||||
PART = xc7a35tcsg324-1
|
||||
BIT2FASM_ARGS = --db-root "$(BASE_PATH)/database/artix7" --part "$(BASE_PATH)/database/artix7/$(PART)" --verbose
|
||||
|
||||
all: top.bit
|
||||
all: top.fasm
|
||||
|
||||
clean:
|
||||
@rm -f *.bit
|
||||
@rm -f *.fasm
|
||||
@rm -rf build
|
||||
|
||||
.PHONY: all clean
|
||||
|
|
@ -12,3 +16,12 @@ top.bit: $(VIVADO)
|
|||
mkdir -p build
|
||||
cd build && $(VIVADO) -mode batch -source ../top.tcl -nojournal -tempDir build -log vivado.log -verbose
|
||||
cp build/*.bit ./
|
||||
|
||||
top.fasm: top.bit
|
||||
PYTHONPATH="$(BASE_PATH):$(BASE_PATH)/utils:$(BASE_PATH)/third_party/fasm" \
|
||||
PATH="$(BASE_PATH)/build/tools:$(PATH)" \
|
||||
python3 \
|
||||
$(BASE_PATH)/utils/bit2fasm.py \
|
||||
$(BIT2FASM_ARGS) \
|
||||
top.bit >top.fasm \
|
||||
|| (rm -f top.fasm && exit -1)
|
||||
|
|
|
|||
|
|
@ -1,19 +1,22 @@
|
|||
YOSYS_PATH = $(abspath ../../../third_party/yosys)
|
||||
YOSYS = $(YOSYS_PATH)/yosys
|
||||
BASE_PATH = $(abspath $(PWD)/../../../)
|
||||
YOSYS = $(BASE_PATH)/third_party/yosys/yosys
|
||||
VIVADO = /opt/Xilinx/Vivado/2017.2/bin/vivado
|
||||
PART = xc7a35tcsg324-1
|
||||
BIT2FASM_ARGS = --db-root "$(BASE_PATH)/database/artix7" --part "$(BASE_PATH)/database/artix7/$(PART)" --verbose
|
||||
|
||||
all: top.bit
|
||||
all: top.fasm
|
||||
|
||||
clean:
|
||||
@rm -f *.edif
|
||||
@rm -f *.bit
|
||||
@rm -f *.fasm
|
||||
@rm -f *.log
|
||||
@rm -rf build
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
$(YOSYS):
|
||||
cd $(YOSYS_PATH) && make config-gcc && make -j$(shell nproc)
|
||||
cd $(BASE_PATH)/third_party/yosys && make config-gcc && make -j$(shell nproc)
|
||||
|
||||
top.edif: $(YOSYS)
|
||||
$(YOSYS) -s synth.ys -l yosys.log
|
||||
|
|
@ -22,3 +25,12 @@ top.bit: $(VIVADO) top.edif
|
|||
mkdir -p build
|
||||
cd build && $(VIVADO) -mode batch -source ../top.tcl -nojournal -tempDir build -log vivado.log -verbose
|
||||
cp build/*.bit ./
|
||||
|
||||
top.fasm: top.bit
|
||||
PYTHONPATH="$(BASE_PATH):$(BASE_PATH)/utils:$(BASE_PATH)/third_party/fasm" \
|
||||
PATH="$(BASE_PATH)/build/tools:$(PATH)" \
|
||||
python3 \
|
||||
$(BASE_PATH)/utils/bit2fasm.py \
|
||||
$(BIT2FASM_ARGS) \
|
||||
top.bit >top.fasm \
|
||||
|| (rm -f top.fasm && exit -1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue