Makefile.incl 8.94 KB
# Standard Makefile for Compass standard cell blocks
#
# Created by Matthew Rohm    6/3/94
#

BOOFILE= /ecad/reality/include/vlsi.boo
COMPASS= ../compass

compass_files: src.db vlsi.boo vlsi.idx vlsi.atr $(COMPASS) $(COMPASS)/compass.db $(COMPASS)/vlsi.boo

syn:  compass_files $(COMPASS)/$(BLOCK).synlog
sch:  $(COMPASS)/$(BLOCK).schlog
apr:  $(COMPASS)/$(BLOCK).aprlog
dpl:  compass_files $(COMPASS)/$(BLOCK).dpllog

#####################################################
#  file setup targets                               #
#####################################################
src.db:
	@/sbin/echo "Creating ./src.db ..."
	@/sbin/echo "v1(0,src)"  > src.db 

vlsi.idx:
	@/sbin/echo "Creating ./vlsi.idx ..."
	@/sbin/echo "src"  > vlsi.idx 

vlsi.atr:
	@/sbin/echo "Creating ./vlsi.atr ..."
	@/sbin/echo '\"7-Jun-94\" \"8:42\"'  > vlsi.atr 
	@/sbin/echo "anyone"  >> vlsi.atr 
	@/sbin/echo "locked"  >> vlsi.atr 
	@/sbin/echo "2"  >> vlsi.atr 

vlsi.boo:
	@/sbin/echo "Creating ./vlsi.boo ..."
	@/sbin/cat $(BOOFILE) > vlsi.boo 

$(COMPASS):
	@/sbin/echo "Creating $(COMPASS) directory ..."
	@/sbin/mkdir $(COMPASS)

$(COMPASS)/compass.db:
	@/sbin/echo "Creating $(COMPASS)/compass.db ..."
	@/sbin/echo "v1(0,compass)"  > $(COMPASS)/compass.db 

$(COMPASS)/vlsi.boo: 
	@/sbin/echo "Creating $(COMPASS)/vlsi.boo ..."
	@/sbin/cat $(BOOFILE) > $(COMPASS)/vlsi.boo 

#####################################################
#  compass dummy scripts                            #
#####################################################
$(BLOCK).schscr:
	@/sbin/echo "Creating dummy schematic script..."
	@/sbin/echo 
	@/sbin/echo '#\!/bin/csh -f'  > $(BLOCK).schscr
	@/sbin/echo '#'             >> $(BLOCK).schscr
	@/sbin/echo ''              >> $(BLOCK).schscr
	@/sbin/echo 'vlsishell << EOF' >> $(BLOCK).schscr
	@/sbin/echo 'set echo on'   >> $(BLOCK).schscr
	@/sbin/echo 'utility makeSCH'  >> $(BLOCK).schscr
	@/sbin/echo 'mkSC $(BLOCK)_p'  >> $(BLOCK).schscr
	@/sbin/echo ''              >> $(BLOCK).schscr
	@/sbin/echo 'quit'          >> $(BLOCK).schscr
	@/sbin/echo 'exit'          >> $(BLOCK).schscr
	@/sbin/echo 'EOF'           >> $(BLOCK).schscr
	@/sbin/echo '#'             >> $(BLOCK).schscr

$(BLOCK).synscr:
	@/sbin/echo "Creating dummy synthesis script..."
	@/sbin/echo 
	@/sbin/echo '#\!/bin/csh -f'  > $(BLOCK).synscr
	@/sbin/echo '#'             >> $(BLOCK).synscr
	@/sbin/echo '# ASICSYN'     >> $(BLOCK).synscr
	@/sbin/echo '#'             >> $(BLOCK).synscr
	@/sbin/echo 'vlsishell << EOF' >> $(BLOCK).synscr
	@/sbin/echo 'set echo on'   >> $(BLOCK).synscr
	@/sbin/echo 'asicsyn'       >> $(BLOCK).synscr
	@/sbin/echo ''              >> $(BLOCK).synscr
	@/sbin/echo '#'             >> $(BLOCK).synscr
	@/sbin/echo '# default flags'          >> $(BLOCK).synscr
	@/sbin/echo 'set hdl verilog'          >> $(BLOCK).synscr
	@/sbin/echo 'set autowrite false'      >> $(BLOCK).synscr
	@/sbin/echo 'set automaticanswer no'   >> $(BLOCK).synscr
	@/sbin/echo ''              >> $(BLOCK).synscr
	@/sbin/echo '#'             >> $(BLOCK).synscr
	@/sbin/echo '# verilog sources' >> $(BLOCK).synscr
	@/sbin/echo '#'             >> $(BLOCK).synscr
	@/sbin/echo 'load [v]$(BLOCK)' >> $(BLOCK).synscr
	@/sbin/echo ''              >> $(BLOCK).synscr
	@/sbin/echo '#'             >> $(BLOCK).synscr
	@/sbin/echo '# load constraint file'     >> $(BLOCK).synscr
	@/sbin/echo 'load [cmd]$(BLOCK)_cons'    >> $(BLOCK).synscr
	@/sbin/echo ''              >> $(BLOCK).synscr
	@/sbin/echo 'exit'          >> $(BLOCK).synscr
	@/sbin/echo 'exit'          >> $(BLOCK).synscr
	@/sbin/echo 'EOF'           >> $(BLOCK).synscr
	@/sbin/echo '#'             >> $(BLOCK).synscr

$(BLOCK)_cons.cmd:
	@/sbin/echo "Creating dummy constraint file..."
	@/sbin/echo 
	@/sbin/echo '# constraint file'    > $(BLOCK)_cons.cmd
	@/sbin/echo ''                     >> $(BLOCK)_cons.cmd
	@/sbin/echo '# global constraints' >> $(BLOCK)_cons.cmd
	@/sbin/echo '#'                    >> $(BLOCK)_cons.cmd
	@/sbin/echo 'set process     slow' >> $(BLOCK)_cons.cmd
	@/sbin/echo 'set temperature 40'   >> $(BLOCK)_cons.cmd
	@/sbin/echo 'set vddlevel    3.0'  >> $(BLOCK)_cons.cmd
	@/sbin/echo 'set maxrampdelay 2.0' >> $(BLOCK)_cons.cmd
	@/sbin/echo ''                     >> $(BLOCK)_cons.cmd
	@/sbin/echo '# block specific constraints' >> $(BLOCK)_cons.cmd
	@/sbin/echo '#'                         >> $(BLOCK)_cons.cmd
	@/sbin/echo '# set frequency 62 clk'    >> $(BLOCK)_cons.cmd
	@/sbin/echo '# set setup 8.0 * --> clk' >> $(BLOCK)_cons.cmd
	@/sbin/echo '# set outdelay 6.0 clk --> *'  >> $(BLOCK)_cons.cmd
	@/sbin/echo '# set inputdelay 6.0 *'        >> $(BLOCK)_cons.cmd
	@/sbin/echo '# set maxdelay 14.0 * --> *'   >> $(BLOCK)_cons.cmd
	@/sbin/echo ''                              >> $(BLOCK)_cons.cmd
	@/sbin/echo '# input drive strengts'  >> $(BLOCK)_cons.cmd
	@/sbin/echo '#'                       >> $(BLOCK)_cons.cmd
	@/sbin/echo '# set drive 0 clk'       >> $(BLOCK)_cons.cmd
	@/sbin/echo ''                        >> $(BLOCK)_cons.cmd
	@/sbin/echo '# output loading'        >> $(BLOCK)_cons.cmd
	@/sbin/echo '#'                       >> $(BLOCK)_cons.cmd
	@/sbin/echo '# set load 0.3 *'        >> $(BLOCK)_cons.cmd
	@/sbin/echo ''                        >> $(BLOCK)_cons.cmd
	@/sbin/echo 'show environment'        >> $(BLOCK)_cons.cmd

$(BLOCK).aprscr:
	@/sbin/echo "Creating dummy place & route script..."
	@/sbin/echo 
	@/sbin/echo '#\!/bin/csh -f' > $(BLOCK).aprscr
	@/sbin/echo '#'             >> $(BLOCK).aprscr
	@/sbin/echo '# CHIPCOMP'    >> $(BLOCK).aprscr
	@/sbin/echo '#'             >> $(BLOCK).aprscr
	@/sbin/echo 'vlsishell << EOF' >> $(BLOCK).aprscr
	@/sbin/echo 'set echo on'   >> $(BLOCK).aprscr
	@/sbin/echo 'utility chipcomp' >> $(BLOCK).aprscr
	@/sbin/echo ''              >> $(BLOCK).aprscr
	@/sbin/echo 'load [nls]$(BLOCK)_p' >> $(BLOCK).aprscr
	@/sbin/echo ''              >> $(BLOCK).aprscr
	@/sbin/echo 'placeBK'       >> $(BLOCK).aprscr
	@/sbin/echo 'placecel'      >> $(BLOCK).aprscr
	@/sbin/echo 'improvecel'    >> $(BLOCK).aprscr
	@/sbin/echo '*'             >> $(BLOCK).aprscr
	@/sbin/echo 'accept'        >> $(BLOCK).aprscr
	@/sbin/echo ''              >> $(BLOCK).aprscr
	@/sbin/echo 'routecel'      >> $(BLOCK).aprscr
	@/sbin/echo ''              >> $(BLOCK).aprscr
	@/sbin/echo 'save pst'      >> $(BLOCK).aprscr
	@/sbin/echo '$(BLOCK)_p'    >> $(BLOCK).aprscr
	@/sbin/echo ''              >> $(BLOCK).aprscr
	@/sbin/echo 'save'          >> $(BLOCK).aprscr
	@/sbin/echo ''              >> $(BLOCK).aprscr
	@/sbin/echo 'quit'          >> $(BLOCK).aprscr
	@/sbin/echo 'exit'          >> $(BLOCK).aprscr
	@/sbin/echo 'EOF'           >> $(BLOCK).aprscr
	@/sbin/echo '#'             >> $(BLOCK).aprscr

$(BLOCK).dplscr:
	@/sbin/echo "Creating dummy datapath layout script..."
	@/sbin/echo 
	@/sbin/echo '#\!/bin/csh -f'  > $(BLOCK).dplscr
	@/sbin/echo '#'             >> $(BLOCK).dplscr
	@/sbin/echo ''              >> $(BLOCK).dplscr
	@/sbin/echo 'vlsishell << EOF' >> $(BLOCK).dplscr
	@/sbin/echo 'exit'          >> $(BLOCK).dplscr
	@/sbin/echo 'EOF'           >> $(BLOCK).dplscr
	@/sbin/echo '#'             >> $(BLOCK).dplscr

###################################################t
#  compass tools targets                            #
#####################################################
$(COMPASS)/$(BLOCK).synlog:  $(BLOCK).synscr $(BLOCK)_cons.cmd $(VSRCS)
	@/sbin/echo "Running synthesis..."
	@/sbin/date | tee $(COMPASS)/$(BLOCK).synlog
	@/sbin/csh $(BLOCK).synscr |& tee -a $(COMPASS)/$(BLOCK).synlog
	@/sbin/date | tee -a $(COMPASS)/$(BLOCK).synlog

$(COMPASS)/$(BLOCK).schlog:  $(BLOCK).schscr
	@/sbin/echo "Generating schematic..."
	@/sbin/date | tee $(COMPASS)/$(BLOCK).schlog
	@/sbin/csh $(BLOCK).schscr |& tee -a $(COMPASS)/$(BLOCK).schlog
	@/sbin/date | tee -a $(COMPASS)/$(BLOCK).schlog

$(COMPASS)/$(BLOCK).aprlog:  $(BLOCK).aprscr
	@/sbin/echo "Running place and route..."
	@/sbin/date | tee $(COMPASS)/$(BLOCK).aprlog
	@/sbin/csh $(BLOCK).aprscr |& tee -a $(COMPASS)/$(BLOCK).aprlog
	@/sbin/date | tee -a $(COMPASS)/$(BLOCK).aprlog

$(COMPASS)/$(BLOCK).dpllog:  $(BLOCK).dplscr $(DPSRC)
	@/sbin/echo "Compiling datapath..."
	@/sbin/date | tee $(COMPASS)/$(BLOCK).dpllog
	@/sbin/csh $(BLOCK).dplscr |& tee -a $(COMPASS)/$(BLOCK).dpllog
	@/sbin/date | tee -a $(COMPASS)/$(BLOCK).dpllog

#####################################################
#  file clean-up targets                            #
#####################################################
cln: 
	@/sbin/echo "Removing ALL generated files for block $(BLOCK) ..."
	-/sbin/rm -f $(COMPASS)/$(BLOCK)*.*cmd*
	-/sbin/rm -f $(COMPASS)/$(BLOCK)*.*log*
	-/sbin/rm -f $(COMPASS)/$(BLOCK)*.*txt*
	-/sbin/rm -f $(COMPASS)/$(BLOCK)*.*pcl*
	-/sbin/rm -f $(COMPASS)/$(BLOCK)*.*cif*
	-/sbin/rm -f $(COMPASS)/$(BLOCK)*.*mcp*
	-/sbin/rm -f $(COMPASS)/$(BLOCK)*.*nl*
	-/sbin/rm -f $(COMPASS)/$(BLOCK)*.*lg*

prune:
	@/sbin/echo "Pruning away useless files ..."
	-/sbin/rm -f *.log 
	-/sbin/rm -f $(COMPASS)/*.cmd*
	-/sbin/rm -f $(COMPASS)/*.log 

clean_all: 
	@/sbin/echo "Removing ALL generated files ..."
	-/sbin/rm -f *.log 
	-/sbin/rm -f vlsi.*
	-/sbin/rm -f src.db
	-/sbin/rm -f $(COMPASS)/*.*