Skip to content

Instantly share code, notes, and snippets.

@emusan
Created May 15, 2014 22:23
Show Gist options
  • Select an option

  • Save emusan/e2ffe0ecd7b7253f27f9 to your computer and use it in GitHub Desktop.

Select an option

Save emusan/e2ffe0ecd7b7253f27f9 to your computer and use it in GitHub Desktop.
just a quick example makefile
PROJECT_NAME = graph_radius
PART = xc3s250e-cp132-5
# Set the amount of output that will be displayed (xflow or silent generally)
INTSTYLE = xflow
BUILD_DIR = build
all: syn tran map par trce bit
syn:
@echo "Make: Synthesizing"
@mkdir -p $(BUILD_DIR)
@cd $(BUILD_DIR); \
xst \
-intstyle $(INTSTYLE) \
-ifn "../ise/$(PROJECT_NAME).xst" \
-ofn "$(PROJECT_NAME).syr"
tran:
@echo "Make: Translate"
@cd $(BUILD_DIR); \
ngdbuild \
-intstyle $(INTSTYLE) \
-dd _ngo \
-nt timestamp \
-uc ../ucf/$(PROJECT_NAME).ucf \
-p $(PART) $(PROJECT_NAME).ngc $(PROJECT_NAME).ngd
map:
@echo "Make: Map"
@cd $(BUILD_DIR); \
map \
-intstyle $(INTSTYLE) \
-p $(PART) \
-cm area \
-ir off \
-pr off \
-c 100 \
-o $(PROJECT_NAME).ncd $(PROJECT_NAME).ngd $(PROJECT_NAME).pcf
par:
@echo "Make: Place and Route"
@cd $(BUILD_DIR); \
par \
-w \
-intstyle $(INTSTYLE) \
-ol high \
-t 1 \
-xe n \
-mt off $(PROJECT_NAME).ncd $(PROJECT_NAME).ncd $(PROJECT_NAME).pcf
trce:
@echo "Make: Trace"
@cd $(BUILD_DIR); \
trce \
-intstyle $(INTSTYLE) \
-v 3 \
-s 5 \
-n 3 \
-fastpaths \
-xml $(PROJECT_NAME).twx $(PROJECT_NAME).ncd \
-o $(PROJECT_NAME).twr $(PROJECT_NAME).pcf
bit:
@echo "Make: Bitgen"
@cd $(BUILD_DIR); \
bitgen \
-intstyle $(INTSTYLE) \
-f ../ise/$(PROJECT_NAME).ut $(PROJECT_NAME).ncd
@cp $(BUILD_DIR)/$(PROJECT_NAME).bit .
clean:
rm -R $(BUILD_DIR)
rm $(PROJECT_NAME).bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment