fpga: x400: zbx: Improve Lattice make flow
Original-commit: fa8559bb0f334d80e08798d415117cedf86be923
This commit is contained in:
@@ -31,7 +31,10 @@ BUILD_DIAMOND_DESIGN = \
|
||||
cp $(TOOLS_DIR)/scripts/dmd_design_build.tcl $(4)/build.tcl; \
|
||||
cd $(4); \
|
||||
echo "BUILDER: Implementating design..."; \
|
||||
pnmainc build.tcl > $(1)_log.txt ; \
|
||||
$(DIAMOND_EXE) build.tcl > $(1)_log.txt ; \
|
||||
echo "BUILDER: Parsing reports..."; \
|
||||
grep "Cumulative negative slack: 0 (0+0)" impl1/$(1)_impl1.twr ; \
|
||||
if [ $$? -ne 0 ]; then exit 1; fi; \
|
||||
echo "BUILDER: Generating bitfile..."; \
|
||||
ddtcmd -oft -svfsingle -if $(5)/$(1)_$(5).jed \
|
||||
-dev $(2) -op "FLASH Erase,Program,Verify" -revd \
|
||||
|
||||
@@ -15,6 +15,12 @@ RESOLVE_PATH = $(1)
|
||||
RESOLVE_PATHS = "$(1)"
|
||||
endif
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
DIAMOND_EXE = "pnmainc"
|
||||
else
|
||||
DIAMOND_EXE = "diamondc"
|
||||
endif
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Project Setup
|
||||
# -------------------------------------------------------------------
|
||||
@@ -46,7 +52,7 @@ GIT_HASH_VERILOG_DEF = "GIT_HASH=32'h$(GIT_HASH)"
|
||||
@echo "BUILDER: Checking tools..."
|
||||
@echo -n "* "; bash --version | grep bash || (echo "ERROR: Bash not found in environment. Please install it"; exit 1;)
|
||||
@echo -n "* "; python3 --version || (echo "ERROR: Python not found in environment. Please install it"; exit 1;)
|
||||
@echo -n "* "; which pnmainc 2>&1 | grep diamond|| (echo "ERROR: Diamond TCL Console not found in environment."; exit 1;)
|
||||
@echo -n "* "; which $(DIAMOND_EXE) 2>&1 | grep diamond || (echo "ERROR: Diamond TCL Console not found in environment."; exit 1;)
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Intermediate build dirs
|
||||
|
||||
Reference in New Issue
Block a user