################################################################################
## Notes: runs with "gmake" only, not with "make"
## Top level Makefile for compiling Vera/NTB environment.
## $Id: Makefile,v 1.6.4.2 2008/06/19 08:36:03 ib135226 Exp $
################################################################################
################################################################################
################################################################################
ILU_PEU_DIR
:= ${DV_ROOT}/verif
/env
/ilu_peu
/vera
PKT_DIR
:= ${DV_ROOT}/verif
/env
/common
/vera
/niu_ippktgen
COMMON_DIR
:= ${DV_ROOT}/verif
/env
/common
/vera
TCU_DIR
:= ${DV_ROOT}/verif
/env
/tcu
/vera
NIU_UTIL_DIR
:= ${DV_ROOT}/verif
/env
/niu
/vera
/niu_utils
/include
NIU_PKT_DIR
:= ${DV_ROOT}/verif
/env
/common
/vera
/niu_ippktgen
/include
NIU_DMC_UTIL_DIR
:= ${DV_ROOT}verif
/env
/niu
/vera
/dmc_utils
CTOP
:= ${DV_ROOT}/verif
/env
/common
/coverage
# Add new generic defines to existing config file line -vera_build_args=VERA_SYS_DEFS="".
# for any user to use and over-ride at will via command line. Leave alone in here.
ALL_VERA_DEFS
:= $(VERA_SYS_DEFS
) $(VERA_DEFS
)
ALL_VERA_DEFS
+= $(RTL_NO_SPC_LIST
)
ifdef FC_JTAG_DEBUG_COVERAGE
VERA_DEFS_COV
+= -DFC_JTAG_DEBUG_COVERAGE
ALL_VERA_DEFS
+= -DUSE_JTAG_DRIVER
#this macro was already there before OpenSparc T2
ALL_VERA_DEFS
+= -DFC_NO_PEU_VERA
# added these 3 macros for OpenSPARC
ALL_VERA_DEFS
+= -DFC_NO_PEU_T2
ALL_VERA_DEFS
+= -DFC_NO_NIU_T2
ALL_VERA_DEFS
+= -DPEU_SYSTEMC_T2
ALL_VERA_DEFS
+= -DNIU_SYSTEMC_T2
ALL_VERA_DEFS
+= -DBUILD_USE_BOBO
-DUSE_BOBO
${PWD}/include ${PWD}/classes
${PWD}/interfaces
${PWD} \
$(COMMON_DIR
)/ccxDevices \
$(COMMON_DIR
)/include $(COMMON_DIR
)/classes
$(COMMON_DIR
)/interfaces \
$(TCU_DIR
)/include $(NIU_UTIL_DIR
) $(NIU_PKT_DIR
) $(PKT_DIR
) $(PKT_DIR
)/include \
${PWD}/..
/..
/..
/..
/design
/sys
/iop
/cpu
/rtl
${PWD}/include ${PWD}/classes
${PWD}/interfaces
${PWD} \
$(COMMON_DIR
)/ccxDevices \
$(COMMON_DIR
)/include $(COMMON_DIR
)/classes
$(COMMON_DIR
)/interfaces \
${PWD}/..
/..
/..
/..
/design
/sys
/iop
/cpu
/rtl
siu_ncu_mondo_checker.vr \
siu_ncu_mondo_checker.vr \
siu_ncu_mondo_checker.vr \
# these files also need headers made by vera
COV_UNITS_ILU_PEU
+= ilu_peu
VERA_DEFS_COV
+= -DFC_COVERAGE
VERA_DEFS_GATE
+= -DGATESIM
VERA_DEFS_GATE
+= -DDMU_GATE
VERA_DEFS_GATE
+= -DNIU_GATE
VERA_DEFS_GATE
+= -DNCU_GATE
VERA_DEFS_GATE
+= -DMCU_GATE
VERA_DEFS_GATE
+= -DCCX_GATE
VERA_DEFS_GATE
+= -DTCU_GATE
VERA_DEFS_GATE
+= -DEFU_GATE
FC_COMMON_INCLUDE
:= $(wildcard $(COMMON_DIR
)include/*.vri
)
FC_IOS_RAS
:= ${DV_ROOT}/verif
/env
/ios
/vera
/include/ios_verilog_tasks.vri
# targets list. .vro's we want to make.
# files in ORDERD_VRH will have headers made too
ORDERD_VRH
:= $(patsubst %.vr
,$(VERA_LIBDIR
)/%.vrh
,$(ORDERD_LIST_VRH
))
ORDERD_VRO
:= $(patsubst %.vr
,$(VERA_LIBDIR
)/%.vro
,$(ORDERD_LIST
))
VERA_DEP
:= $(foreach dir,$(VPATH
),$(wildcard $(dir)/*.vr
*))
# vera command line defines
SPACE
:= $(EMPTY
) $(EMPTY
)
VERA_INCDIR
:= $(subst $(SPACE
),$(SPACE
)-I
,$(VPATH
))
VERA_INCDIR
:= -I
$(VERA_INCDIR
) -I.
# NTB command line defines
NTB_INCDIR
:= $(subst $(SPACE
),+,$(VPATH
))
NTB_INCDIR
:= -ntb_incdir
$(NTB_INCDIR
)
NTB_OPTS
:= -ntb_opts compat
+verbose
# add for 7.1.1 +file_by_file
VERA_VRH
:= vera
-cmp
-DFC_BENCH
${ALL_VERA_DEFS} ${VERA_DEFS_COV} ${VERA_DEFS_GATE} $(VERA_INCDIR
) -max_error
5 -q
-g
-H
VERA_VRO
:= vera
-cmp
-DFC_BENCH
${ALL_VERA_DEFS} ${VERA_DEFS_COV} ${VERA_DEFS_GATE} $(VERA_INCDIR
) -max_error
5 -q
-g
VERA_NTB
:= vcs
-ntb
-ntb_define NTB
-ntb_define FC_BENCH
-ntb_cmp
-ntb_sname cmp_test
-ntb_filext .vr
+.vrh
+.vri
+.vrl
$(NTB_OPTS
) $(NTB_INCDIR
) $(ORDERD_LIST
) -Mupdate
################################################################################
################################################################################
NIU_DMC_UTIL_DIR
:= ${DV_ROOT}/verif
/env
/niu
/vera
/niu_utils
/include
NIU_DMC_UTIL_COMMON_INCLUDE
:= $(wildcard $(NIU_DMC_UTIL_DIR
)/*.vri
)
NIU_DMC_UTIL_COMMON_INCLUDE
:= $(subst $(NIU_DMC_UTIL_DIR
),$(VERA_LIBDIR
),$(NIU_DMC_UTIL_COMMON_INCLUDE
))
NIU_DMC_UTILS_DIR
:= ${DV_ROOT}/verif
/env
/niu
/vera
/dmc_utils
NIU_DMC_UTILS
:= $(NIU_DMC_UTILS_DIR
)/niu_dmc_descr.vr
NIU_DMC_UTILS
+= $(NIU_DMC_UTILS_DIR
)/niu_dmc_descr_ring.vr
NIU_DMC_UTILS
+= $(NIU_DMC_UTILS_DIR
)/niu_dma.vr
NIU_DMC_UTILS
:= $(subst $(NIU_DMC_UTILS_DIR
),$(VERA_LIBDIR
),$(NIU_DMC_UTILS
))
NIU_DMC_UTILS_VRH
:= $(patsubst %.vr
,%.vrh
,$(NIU_DMC_UTILS
))
NIU_DMC_UTILS_VRO
:= $(patsubst %.vr
,%.vro
,$(NIU_DMC_UTILS
))
################################################################################
################################################################################
NIU_UTIL_DIR
:= ${DV_ROOT}/verif
/env
/niu
/vera
/niu_utils
/include
NIU_UTIL_COMMON_INCLUDE
:= $(wildcard $(NIU_UTIL_DIR
)/*.vri
)
NIU_UTIL_COMMON_INCLUDE
:= $(subst $(NIU_UTIL_DIR
),$(VERA_LIBDIR
),$(NIU_UTIL_COMMON_INCLUDE
))
NIU_UTILS_DIR
:= ${DV_ROOT}/verif
/env
/niu
/vera
/niu_utils
NIU_UTILS
:= $(NIU_UTILS_DIR
)/mbox_class.vr
NIU_UTILS
+= $(NIU_UTILS_DIR
)/get_mbox_id.vr
NIU_UTILS
+= $(NIU_UTILS_DIR
)/cMesg.vr
NIU_UTILS
+= $(NIU_UTILS_DIR
)/niu_cntrl.vr
NIU_UTILS
:= $(subst $(NIU_UTILS_DIR
),$(VERA_LIBDIR
),$(NIU_UTILS
))
NIU_UTILS_VRH
:= $(patsubst %.vr
,%.vrh
,$(NIU_UTILS
))
NIU_UTILS_VRO
:= $(patsubst %.vr
,%.vro
,$(NIU_UTILS
))
################################################################################
################################################################################
NIU_PKT_DIR
:= ${DV_ROOT}/verif
/env
/common
/vera
/niu_ippktgen
/include
NIU_PKT_COMMON_INCLUDE
:= $(wildcard $(NIU_PKT_DIR
)/*.vri
)
NIU_PKT_COMMON_INCLUDE
:= $(subst $(NIU_PKT_DIR
),$(VERA_LIBDIR
),$(NIU_PKT_COMMON_INCLUDE
))
NIU_PKTS_DIR
:= ${DV_ROOT}/verif
/env
/common
/vera
/niu_ippktgen
NIU_PKTS
:= $(NIU_PKTS_DIR
)/mac_db.vr
NIU_PKTS
+= $(NIU_PKTS_DIR
)/ipp_db.vr
NIU_PKTS
+= $(NIU_PKTS_DIR
)/fflp_db.vr
NIU_PKTS
+= $(NIU_PKTS_DIR
)/flow_db.vr
NIU_PKTS
+= $(NIU_PKTS_DIR
)/flow_db_tasks.vr
NIU_PKTS
+= $(NIU_PKTS_DIR
)/pack_db.vr
NIU_PKTS
+= $(NIU_PKTS_DIR
)/pcg_token.vr
NIU_PKTS
+= $(NIU_PKTS_DIR
)/pg_top_pp.vr
NIU_PKTS
+= $(NIU_PKTS_DIR
)/pc_top_pp.vr
NIU_PKTS
:= $(subst $(NIU_PKTS_DIR
),$(VERA_LIBDIR
),$(NIU_PKTS
))
NIU_PKTS_VRH
:= $(patsubst %.vr
,%.vrh
,$(NIU_PKTS
))
NIU_PKTS_VRO
:= $(patsubst %.vr
,%.vro
,$(NIU_PKTS
))
################################################################################
################################################################################
$(VERA_LIBDIR
)/systemTapClass.vr \
$(VERA_LIBDIR
)/tcu_siu_packet.vr \
$(VERA_LIBDIR
)/tcu_tasks.vr \
$(VERA_LIBDIR
)/sys_registers.vr \
$(VERA_LIBDIR
)/ucb_monitor.vr \
$(VERA_LIBDIR
)/sys_reset.vr
TCU_VRH
:= $(patsubst %.vr
,%.vrh
,$(TCU_ORDERD_LIST
))
TCU_VRO
:= $(patsubst %.vr
,%.vro
,$(TCU_ORDERD_LIST
))
TCU_PACKETS
:= $(TCU_DIR
)/packets
/tcu_siu_packet.vr
TCU_PACKETS
+= $(wildcard $(TCU_DIR
)/packets
/*.vr
)
TCU_PACKETS
:= $(subst $(TCU_DIR
)/packets
,$(VERA_LIBDIR
),$(TCU_PACKETS
))
TCU_PACKETS_VRH
:= $(patsubst %.vr
,%.vrh
,$(TCU_PACKETS
))
TCU_PACKETS_VRO
:= $(patsubst %.vr
,%.vro
,$(TCU_PACKETS
))
$(TCU_PACKETS_VRH
) $(TCU_PACKETS_VRO
) \
################################################################################
################################################################################
$(VERA_LIBDIR
)/ucb_monitor.vr
$(VERA_LIBDIR
)/ucb_monitor.vr \
$(VERA_LIBDIR
)/ccu_clks_states.vr \
$(VERA_LIBDIR
)/ccu_checker.vr \
$(VERA_LIBDIR
)/cluster_hdr_chkr.vr \
$(VERA_LIBDIR
)/ccu_clk_chkr_4fc.vr \
$(VERA_LIBDIR
)/cluster_hdrs_mon.vr
CCU_CLKS_VRH
:= $(patsubst %.vr
,%.vrh
,$(CCU_ORDERD_LIST
))
CCU_CLKS_VRO
:= $(patsubst %.vr
,%.vro
,$(CCU_ORDERD_LIST
))
################################################################################
$(VERA_LIBDIR
)/%.vrh
: $(VERA_LIBDIR
)/%.vr
cd
$(VERA_LIBDIR
); $(VERA_VRH
) $(notdir $<) $(notdir $(@
:%.vrh
=%))
$(VERA_LIBDIR
)/%.vro
: $(VERA_LIBDIR
)/%.vr
cd
$(VERA_LIBDIR
); $(VERA_VRO
) $(notdir $<) $(notdir $@
)
$(VERA_LIBDIR
)/%: $(NIU_DMC_UTIL_DIR
)/%
$(VERA_LIBDIR
)/%: $(NIU_UTIL_DIR
)/%
$(VERA_LIBDIR
)/%: $(NIU_UTILS_DIR
)/%
$(VERA_LIBDIR
)/%: $(NIU_PIO_INCLUDE_DIR
)/%
$(VERA_LIBDIR
)/%: $(NIU_PIO_DIR
)/%
$(VERA_LIBDIR
)/%.vr
: $(TCU_DIR
)/classes
/%.vr
$(VERA_LIBDIR
)/%.vr
: $(TCU_DIR
)/packets
/%.vr
################################################################################
################################################################################
# this ifdef includes neither PEU nor NIU
vera
: makedir copy_stuff \
$(CCU_CLKS_VRH
) $(CCU_CLKS_VRO
) \
$(FC_COMMON_INCLUDE
) $(COV_UNIT_NCU
) \
$(COV_UNIT_L2
) $(COV_UNIT_MCU
) $(COV_UNIT_DMU
) $(COV_UNIT_SIU
) \
# does not include PEU, but includes NIU
vera
: makedir copy_stuff \
$(CCU_CLKS_VRH
) $(CCU_CLKS_VRO
) \
$(FC_COMMON_INCLUDE
) $(COV_UNIT_NCU
) \
$(COV_UNIT_L2
) $(COV_UNIT_MCU
) $(COV_UNIT_DMU
) $(COV_UNIT_SIU
) \
# includes both PEU and NIU
vera
: makedir copy_stuff \
$(CCU_CLKS_VRH
) $(CCU_CLKS_VRO
) \
$(FC_COMMON_INCLUDE
) $(COV_UNIT_NCU
) \
$(COV_UNIT_L2
) $(COV_UNIT_MCU
) $(COV_UNIT_DMU
) $(COV_UNIT_SIU
) \
ntb
: makedir
$(VERA_LIBDIR
)/libtb.so
@if
(test ! -d
$(VERA_LIBDIR
)) then mkdir
$(VERA_LIBDIR
) ; fi
@
$(ECHO
) "copy_stuff: tgt"
@cp
-f
$(THIS_DIR
)/include/*vcon
* $(VERA_LIBDIR
)
@cp
-f
$(VERA_DEP
) $(VERA_LIBDIR
)
@cp
-f
${PWD}/fc_top.vr
$(VERA_LIBDIR
)
# Changed avoid copying CVS dirs
# @cp -f ${PWD}/classes/* $(VERA_LIBDIR)
@cp
-f
$(patsubst %CVS
, , $(wildcard ${PWD}/classes
/*)) $(VERA_LIBDIR
)
@cp
-f
$(PKT_DIR
)/*vr
$(VERA_LIBDIR
)
# Changed avoid copying CVS dirs
# @cp -f $(PKT_DIR)/include/* $(VERA_LIBDIR)
@cp
-f
$(patsubst %CVS
, , $(wildcard $(PKT_DIR
)/include/*)) $(VERA_LIBDIR
)
@
rm -f
$(VERA_LIBDIR
)/..
/fc_top_shell.v
cd
${DV_ROOT}/verif
/env
/fc/vera
/niu_chk
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
)
cd
${DV_ROOT}/verif
/env
/fc/vera
/stubs
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
) GATESIM
=1
cd
${DV_ROOT}/verif
/env
/fc/vera
/stubs
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
)
@
$(ECHO
) "NIU: tgt if GATE"
cd
${DV_ROOT}/verif
/env
/niu
/vera
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
) N2_FC
=1 NIU_GATE
=1
cd
${DV_ROOT}/verif
/env
/niu
/vera
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
) N2_FC
=1
@
$(ECHO
) "NIU_UTILS: tgt"
$(NIU_UTIL_COMMON_INCLUDE
) $(NIU_UTILS_VRH
) $(NIU_UTILS_VRO
)
@
$(ECHO
) "NIU_IPPKTGEN: tgt "
cd
${DV_ROOT}/verif
/env
/common
/vera
/niu_ippktgen
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
)
@
$(ECHO
) "NIU_TOKEN: tgt"
cd
${DV_ROOT}/verif
/env
/niu
/vera
/niu_tokens
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
)
@
$(ECHO
) "NIU_RX_CHK: tgt"
cd
${DV_ROOT}/verif
/env
/niu
/rxc_sat
/vera
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
)
cd
${DV_ROOT}/verif
/env
/siu
/vera
; gmake siu_mon VERA_LIBDIR
=$(VERA_LIBDIR
) NO_0INMGR
=1
cd
${DV_ROOT}/verif
/env
/ilu_peu
/vera
; gmake
-f Makefile VERA_LIBDIR
=$(VERA_LIBDIR
) N2_FC
=1 NO_0INMGR
=1
cd
${DV_ROOT}/verif
/env
/fc/loadngo
/c
; gmake
cd
${DV_ROOT}/verif
/env
/ios
/vera
/ras
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
) N2_FC
=1 GATESIM
=1
cd
${DV_ROOT}/verif
/env
/ios
/vera
/ras
; gmake VERA_LIBDIR
=$(VERA_LIBDIR
) N2_FC
=1
MAKE_CMD
:= $(MAKE
) --no-print-directory
-j
$(p
)
@
$(ECHO
) "[Building ncu Interface coverage"
if
(test -d
$(CTOP
)/ncu
) then \
if
(test -f Makefile
) then
$(MAKE_CMD
) ; fi
) \
@
$(ECHO
) "Done with ncu Interface coverage]"
@
$(ECHO
) "Building l2sat Interface coverage"
if
(test -d
$(CTOP
)/l2sat
) then \
if
(test -f Makefile
) then
$(MAKE_CMD
) ; fi
) \
@
$(ECHO
) "Done with l2 Interface coverage]"
@
$(ECHO
) "[Building mcu Interface coverage"
if
(test -d
$(CTOP
)/mcusat
) then \
if
(test -f Makefile
) then
$(MAKE_CMD
) ; fi
) \
@
$(ECHO
) "Done with mcu Interface coverage]"
@
$(ECHO
) "[Building dmu Interface coverage"
if
(test -d
$(CTOP
)/dmu
) then \
if
(test -f Makefile
) then
$(MAKE_CMD
) ; fi
) \
@
$(ECHO
) "Done with dmu Interface coverage]"
@
$(ECHO
) "[Building siu Interface coverage"
if
(test -d
$(CTOP
)/siu
) then \
if
(test -f Makefile
) then
$(MAKE_CMD
) ; fi
) \
@
$(ECHO
) "Done with siu Interface coverage]"
@
$(ECHO
) "[Building fc Interface coverage"
if
(test -d
$(CTOP
)/fc) then \
if
(test -f Makefile
) then
$(MAKE_CMD
) ; fi
) \
@
$(ECHO
) "Done with fc Interface coverage]"
ilu_peu
: $(VERA_LIBDIR
)/plusArgMacros.vri
@
$(ECHO
) "[Building ilu_peu Interface coverage"
if
(test -d
$(CTOP
)/ilu_peu
) then \
if
(test -f Makefile
) then
$(MAKE_CMD
) ; fi
) \
@
$(ECHO
) "Done with ilu_peu Interface coverage]"
rm -rf
$(VERA_LIBDIR
)/* ; rm -rf
$(VERA_LIBDIR
)/..
/fc_top_shell.v
cd
${DV_ROOT}/verif
/model
/verilog
/niu
/sparse_mem_model
/pli
/src
; gmake
clean; \
rm -rf
$(VERA_LIBDIR
)/* ; rm -rf
$(VERA_LIBDIR
)/..
/fc_top_shell.v
# @rm -f $(VERA_LIBDIR)/libtb.so $(VERA_LIBDIR)/*.vcon
# @rm -f $(VERA_LIBDIR)/*.vro $(VERA_LIBDIR)/*.vcon $(VERA_LIBDIR)/*.vshell $(VERA_LIBDIR)/*.proj*
@echo
"<<VERA_LIBDIR>>" $(VERA_LIBDIR
)
@echo
"<<VERA_INCDIR>>" $(VERA_INCDIR
)
@echo
"<<VERA_DEP>>" $(VERA_DEP
)
@echo
"<<ORDERED_VRO>>" $(ORDERD_VRO
)
@echo
"<<ORDERED_VRH>>" $(ORDERD_VRH
)
# this is here ONLY so users can do "gmake vrh" to get help.
# do not add anything here! do not change this!
# See ORDERD_VRH for making vrh files.
@echo
"To make a vrh for your class do --> " $(VERA_VRH
) "path_to_class"
################################################################################
################################################################################
$(VERA_LIBDIR
)/%.vro
: %.vr
$(VERA_DEP
)
@echo
">>>> Vera: compiling $(notdir $<)"
$(VERA_LIBDIR
)/libtb.so
: $(VERA_DEP
)
@echo
">>>> Vera: compiling NTB testbench libtb.so"
cd
$(VERA_LIBDIR
) ; $(VERA_NTB
) ; cd
$(THIS_DIR
) ; mv
-f
*.vshell
$(VERA_LIBDIR
)/..
/fc_top_shell.v
################################################################################
# Denali and Report stuff
################################################################################
denali_vera_dir
= $(denali_dir
)/ddvapi
/vera
#----------------------------------------------------------------------------
# Denali Environment Variables
#----------------------------------------------------------------------------
# Use the .denalirc located in PEU TB home directory
export DENALIRC
= $(DV_ROOT
)/verif
/env
/ilu_peu
/.denalirc
#----------------------------------------------------------------
#----------------------------------------------------------------
$(DV_ROOT
)/verif
/env
/fnx
/clib
/report
/report.a
:
#----------------------------------------------------------------
#----------------------------------------------------------------
$(DV_ROOT
)/verif
/env
/fnx
/clib
/DenaliPCIE
/denali_pcie.so
:
################################################################################
#----------------------------------------------------------------
# Get the common definitions if we haven't already
#----------------------------------------------------------------
#include $(DV_ROOT)/verif/env/fnx/runsim/makefiles/Makefile.defs
#----------------------------------------------------------------
#----------------------------------------------------------------