#=======================================================================
|
#=======================================================================
|
# 6.375 Makefile for enc-par
|
# 6.375 Makefile for enc-par
|
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
# $Id: Makefile,v 1.1 2008-06-26 17:58:43 jamey.hicks Exp $
|
# $Id: Makefile,v 1.1 2008-06-26 17:58:43 jamey.hicks Exp $
|
#
|
#
|
# This makefile will use Cadence Encounter to place and route
|
# This makefile will use Cadence Encounter to place and route
|
# a gate-level verilog netlist.
|
# a gate-level verilog netlist.
|
#
|
#
|
|
|
default : all
|
default : all
|
|
|
basedir = ../..
|
basedir = ../..
|
|
|
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
# Sources
|
# Sources
|
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
|
|
vsrcs = ../dc/current/synthesized.v
|
vsrcs = ../dc/current/synthesized.v
|
|
|
# Specify what the toplevel verilog module is
|
# Specify what the toplevel verilog module is
|
|
|
toplevel = mkH264
|
toplevel = mkH264
|
|
|
# Specify the floorplan if it exists.
|
# Specify the floorplan if it exists.
|
|
|
#floorplan = ../enc-fp/current/floorplan.fp
|
#floorplan = ../enc-fp/current/floorplan.fp
|
|
|
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
# Build rules
|
# Build rules
|
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
|
|
build_suffix := $(shell date +%Y-%m-%d_%H-%M)
|
build_suffix := $(shell date +%Y-%m-%d_%H-%M)
|
build_dir := build-$(build_suffix)
|
build_dir := build-$(build_suffix)
|
curr_build_dir := current
|
curr_build_dir := current
|
curr_build_dir_tstamp := current/timestamp.txt
|
curr_build_dir_tstamp := current/timestamp.txt
|
par_verilog := $(curr_build_dir)/par.v
|
par_verilog := $(curr_build_dir)/par.v
|
vsrc_unique := synthesized_unique.v
|
vsrc_unique := synthesized_unique.v
|
|
|
par_conf := par.conf
|
par_conf := par.conf
|
par_tcl := par.tcl
|
par_tcl := par.tcl
|
par_sdc := par.sdc
|
par_sdc := par.sdc
|
scripts := $(par_conf) $(par_tcl) $(par_sdc)
|
scripts := $(par_conf) $(par_tcl) $(par_sdc)
|
makegen_tcl := make_generated_vars.tcl
|
makegen_tcl := make_generated_vars.tcl
|
|
|
libdir = $(MIT6375_HOME)/libs/tsl180/tsl18fs120
|
libdir = $(MIT6375_HOME)/libs/tsl180/tsl18fs120
|
par_vars = \
|
par_vars = \
|
set VERILOG_SRC { $(vsrc_unique) }; \
|
set VERILOG_SRC { $(vsrc_unique) }; \
|
set VERILOG_TOPLEVEL $(toplevel); \
|
set VERILOG_TOPLEVEL $(toplevel); \
|
set FLOORPLAN "$(addprefix ../, $(floorplan))"; \
|
set FLOORPLAN "$(addprefix ../, $(floorplan))"; \
|
set TIMELIBS_MAX { $(libdir)/lib/tsl18fs120_max.lib }; \
|
set TIMELIBS_MAX { $(libdir)/lib/tsl18fs120_max.lib }; \
|
set TIMELIBS_MIN { $(libdir)/lib/tsl18fs120_min.lib }; \
|
set TIMELIBS_MIN { $(libdir)/lib/tsl18fs120_min.lib }; \
|
set TIMELIBS_TYP { $(libdir)/lib/tsl18fs120_typ.lib }; \
|
set TIMELIBS_TYP { $(libdir)/lib/tsl18fs120_typ.lib }; \
|
set LEF_FILES { $(libdir)/lef/tsl18_6lm.lef $(libdir)/lef/tsl18fs120.lef }; \
|
set LEF_FILES { $(libdir)/lef/tsl18_6lm.lef $(libdir)/lef/tsl18fs120.lef }; \
|
|
|
define new-build-dir-cmds
|
define new-build-dir-cmds
|
mkdir $(build_dir)
|
mkdir $(build_dir)
|
rm -f $(curr_build_dir)
|
rm -f $(curr_build_dir)
|
ln -s $(build_dir) $(curr_build_dir)
|
ln -s $(build_dir) $(curr_build_dir)
|
cp $(scripts) $(curr_build_dir)
|
cp $(scripts) $(curr_build_dir)
|
echo '$(par_vars)' > $(curr_build_dir)/$(makegen_tcl)
|
echo '$(par_vars)' > $(curr_build_dir)/$(makegen_tcl)
|
endef
|
endef
|
|
|
new-build-dir :
|
new-build-dir :
|
$(new-build-dir-cmds)
|
$(new-build-dir-cmds)
|
|
|
$(par_verilog) : $(vsrcs) $(floorplan) $(scripts)
|
$(par_verilog) : $(vsrcs) $(floorplan) $(scripts)
|
$(new-build-dir-cmds)
|
$(new-build-dir-cmds)
|
cd $(curr_build_dir); \
|
cd $(curr_build_dir); \
|
uniquifyNetlist -top $(toplevel) $(vsrc_unique) $(addprefix ../, $(vsrcs)); \
|
uniquifyNetlist -top $(toplevel) $(vsrc_unique) $(addprefix ../, $(vsrcs)); \
|
encounter -nowin -init $(par_tcl) | tee enc.log; \
|
encounter -nowin -init $(par_tcl) | tee enc.log; \
|
cd ..
|
cd ..
|
|
|
par : $(par_verilog)
|
par : $(par_verilog)
|
|
|
junk +=
|
junk +=
|
|
|
.PHONY : par new-build-dir
|
.PHONY : par new-build-dir
|
|
|
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
# Default make target
|
# Default make target
|
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
|
|
all : par
|
all : par
|
|
|
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
# Clean up
|
# Clean up
|
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
|
|
clean :
|
clean :
|
rm -rf build-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9]-[0-9][0-9] \
|
rm -rf build-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9]-[0-9][0-9] \
|
current $(junk) *~ \#*
|
current $(junk) *~ \#*
|
|
|