Files
verilator/test_regress/Makefile
T

92 lines
2.6 KiB
Makefile
Raw Normal View History

2006-08-26 11:35:28 +00:00
#*****************************************************************************
#
# DESCRIPTION: Verilator Example: Makefile for inside source directory
#
# This calls the object directory makefile. That allows the objects to
# be placed in the "current directory" which simplifies the Makefile.
#
2023-01-01 10:18:39 -05:00
# Copyright 2003-2023 by Wilson Snyder. This program is free software; you
# can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
2006-08-26 11:35:28 +00:00
#
#****************************************************************************/
default: test
2006-08-26 11:35:28 +00:00
# This must point to the root of the VERILATOR kit
VERILATOR_ROOT := $(shell pwd)/..
export VERILATOR_ROOT
# Pick up PERL and other variable settings
include $(VERILATOR_ROOT)/include/verilated.mk
2006-08-26 11:35:28 +00:00
######################################################################
2006-08-26 11:35:28 +00:00
ifneq ($(VCS_HOME),)
2020-01-24 20:10:44 -05:00
#Default to off, even with vcs; not all tests are ensured to be working
#PRODUCTS += --vcs
2006-08-26 11:35:28 +00:00
endif
ifneq ($(NC_ROOT),)
2020-01-24 20:10:44 -05:00
#Default to off, even with vcs; not all tests are ensured to be working
#PRODUCTS += --nc
2006-08-26 11:35:28 +00:00
endif
# Run tests in parallel. Requires Parallel::Forker to be installed.
ifeq ($(CFG_WITH_LONGTESTS),yes)
DRIVER_FLAGS ?= -j 0 --quiet --rerun
2006-08-26 11:35:28 +00:00
endif
2015-11-28 17:33:01 -05:00
.SUFFIXES:
2006-08-26 11:35:28 +00:00
######################################################################
SCENARIOS ?= --vlt --vltmt --dist
2020-03-07 21:38:44 -05:00
DRIVER_HASHSET ?=
2019-06-27 11:26:25 -04:00
.PHONY: test
2006-08-26 11:35:28 +00:00
test:
2020-03-07 21:38:44 -05:00
$(PERL) driver.pl $(DRIVER_FLAGS) $(SCENARIOS) $(DRIVER_HASHSET)
2006-08-26 11:35:28 +00:00
######################################################################
vcs:
$(PERL) driver.pl $(DRIVER_FLAGS) --vcs --stop
######################################################################
nc:
$(PERL) driver.pl $(DRIVER_FLAGS) --nc --stop
######################################################################
vlt:
$(PERL) driver.pl $(DRIVER_FLAGS) --vlt --stop
2006-08-26 11:35:28 +00:00
2018-07-22 20:54:28 -04:00
vltmt:
$(PERL) driver.pl $(DRIVER_FLAGS) --vltmt --stop
2006-08-26 11:35:28 +00:00
######################################################################
random:
$(PERL) driver.pl $(DRIVER_FLAGS) --optimize : --stop
random_forever:
while ( VERILATOR_NO_DEBUG=1 CPPFLAGS_ADD=-Wno-error $(MAKE) random ) ; do \
echo ; \
done
2017-10-26 19:14:05 -04:00
#######################################################################
# Informational - used by some tests
print-cxx-version:
$(CXX) --version
2006-08-26 11:35:28 +00:00
######################################################################
maintainer-copy::
clean mostlyclean distclean maintainer-clean::
2018-05-07 20:42:28 -04:00
-rm -rf obj_* simv* simx* csrc cov_work INCA_libs *.log *.key logs vc_hdrs.h
2020-05-16 13:28:03 -04:00
-rm -rf t/obj_*