mirror of
https://github.com/verilator/verilator.git
synced 2025-04-05 20:22:41 +00:00
Add SYSTEMC_INCLUDE and SYSTEMC_LIBDIR
This commit is contained in:
parent
6e8640bf1b
commit
2396181bc5
4
Changes
4
Changes
@ -6,6 +6,10 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
* Verilator 3.831****
|
* Verilator 3.831****
|
||||||
|
|
||||||
|
** Support SystemC 2.3.0 prerelease. This requires setting the new
|
||||||
|
SYSTEMC_INCLUDE and SYSTEMC_LIBDIR variables in place of now
|
||||||
|
deprecated SYSTEMC and SYSTEMC_ARCH. [Iztok Jeras]
|
||||||
|
|
||||||
**** Suppress VARHIDDEN on dpi import arguments. [Ruben Diez]
|
**** Suppress VARHIDDEN on dpi import arguments. [Ruben Diez]
|
||||||
|
|
||||||
**** Support "generate for (genvar i=0; ...". [David Kravitz]
|
**** Support "generate for (genvar i=0; ...". [David Kravitz]
|
||||||
|
@ -1103,8 +1103,8 @@ We then can compile it
|
|||||||
And link with SystemC. Note your path to the libraries may vary,
|
And link with SystemC. Note your path to the libraries may vary,
|
||||||
depending on the operating system.
|
depending on the operating system.
|
||||||
|
|
||||||
export SYSTEMC=/path/to/where/systemc/was/built/or/installed
|
export SYSTEMC_LIBDIR=/path/to/where/libsystemc.a/exists
|
||||||
g++ -L$SYSTEMC/lib-linux ../sc_main.o Vour__ALL*.o verilated.o \
|
g++ -L$SYSTEMC_LIBDIR ../sc_main.o Vour__ALL*.o verilated.o \
|
||||||
-o Vour -lsystemc
|
-o Vour -lsystemc
|
||||||
|
|
||||||
And now we run it
|
And now we run it
|
||||||
@ -1240,24 +1240,39 @@ or ccache; see the documentation for those programs.
|
|||||||
|
|
||||||
=item SYSTEMC
|
=item SYSTEMC
|
||||||
|
|
||||||
Required for SystemC output mode. If set, specifies the directory
|
Deprecated. Used only if SYSTEMC_INCLUDE or SYSTEMC_LIBDIR is not set. If
|
||||||
containing the SystemC distribution. This is used to find the SystemC
|
set, specifies the directory containing the SystemC distribution. If not
|
||||||
include files. If not specified, it will come from a default optionally
|
specified, it will come from a default optionally specified at configure
|
||||||
specified at configure time (before Verilator was compiled).
|
time (before Verilator was compiled).
|
||||||
|
|
||||||
=item SYSTEMC_ARCH
|
=item SYSTEMC_ARCH
|
||||||
|
|
||||||
Specifies the architecture name used by the SystemC kit. This is the part
|
Deprecated. Used only if SYSTEMC_LIBDIR is not set. Specifies the
|
||||||
after the dash in the lib-{...} directory name created by a 'make' in the
|
architecture name used by the SystemC kit. This is the part after the dash
|
||||||
SystemC distribution. If not set, Verilator will try to intuit the proper
|
in the lib-{...} directory name created by a 'make' in the SystemC
|
||||||
setting, or use the default optionally specified at configure time (before
|
distribution. If not set, Verilator will try to intuit the proper setting,
|
||||||
Verilator was compiled). .
|
or use the default optionally specified at configure time (before Verilator
|
||||||
|
was compiled).
|
||||||
|
|
||||||
=item SYSTEMC_CXX_FLAGS
|
=item SYSTEMC_CXX_FLAGS
|
||||||
|
|
||||||
Specifies additional flags that are required to be passed to GCC when
|
Specifies additional flags that are required to be passed to GCC when
|
||||||
building the SystemC model.
|
building the SystemC model.
|
||||||
|
|
||||||
|
=item SYSTEMC_INCLUDE
|
||||||
|
|
||||||
|
If set, specifies the directory containing the systemc.h header file. If
|
||||||
|
not specified, it will come from a default optionally specified at
|
||||||
|
configure time (before Verilator was compiled), or computed from
|
||||||
|
SYSTEMC/include.
|
||||||
|
|
||||||
|
=item SYSTEMC_LIBDIR
|
||||||
|
|
||||||
|
If set, specifies the directory containing the libsystemc.a library. If not
|
||||||
|
specified, it will come from a default optionally specified at configure
|
||||||
|
time (before Verilator was compiled), or compted from
|
||||||
|
SYSTEMC/lib-SYSTEMC_ARCH.
|
||||||
|
|
||||||
=item SYSTEMPERL
|
=item SYSTEMPERL
|
||||||
|
|
||||||
Specifies the directory containing the SystemPerl distribution kit. This
|
Specifies the directory containing the SystemPerl distribution kit. This
|
||||||
|
@ -93,10 +93,10 @@ VM_SUPPORT += $(VM_SUPPORT_FAST) $(VM_SUPPORT_SLOW)
|
|||||||
##### SystemC or SystemPerl builds
|
##### SystemC or SystemPerl builds
|
||||||
|
|
||||||
ifeq ($(VM_SP_OR_SC),1)
|
ifeq ($(VM_SP_OR_SC),1)
|
||||||
CPPFLAGS += $(SYSTEMC_CXX_FLAGS) -I$(SYSTEMC)/include
|
CPPFLAGS += $(SYSTEMC_CXX_FLAGS) -I$(SYSTEMC_INCLUDE)
|
||||||
LDFLAGS += $(SYSTEMC_CXX_FLAGS) -L$(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)
|
LDFLAGS += $(SYSTEMC_CXX_FLAGS) -L$(SYSTEMC_LIBDIR)
|
||||||
SC_LIBS = -lsystemc
|
SC_LIBS = -lsystemc
|
||||||
ifneq ($(wildcard $(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)/*numeric_bit*),)
|
ifneq ($(wildcard $(SYSTEMC_LIBDIR)/*numeric_bit*),)
|
||||||
# Systemc 1.2.1beta
|
# Systemc 1.2.1beta
|
||||||
SC_LIBS += -lnumeric_bit -lqt
|
SC_LIBS += -lnumeric_bit -lqt
|
||||||
endif
|
endif
|
||||||
|
16
readme.pod
16
readme.pod
@ -72,14 +72,10 @@ Download the latest package from that site, and decompress.
|
|||||||
|
|
||||||
If you will be using SystemC (vs straight C++ output), download SystemC
|
If you will be using SystemC (vs straight C++ output), download SystemC
|
||||||
2.0.1 from L<http://www.systemc.org>. Follow their installation
|
2.0.1 from L<http://www.systemc.org>. Follow their installation
|
||||||
instructions. You will need to set the SYSTEMC environment variable to
|
instructions. You will need to set SYSTEMC_INCLUDE to point to the
|
||||||
point to this download. Also, setenv SYSTEMC_ARCH to the architecture name
|
include directory with systemc.h in it, and SYSTEMC_LIBDIR to points
|
||||||
you used with SystemC, generally 'linux' or 'cygwin'.
|
to the directory with libsystemc.a in it. (Older installations may
|
||||||
|
set SYSTEMC and SYSTEMC_ARCH instead.)
|
||||||
Verilator assumes you did a make in the SystemC kit directory and SYSTEMC
|
|
||||||
points to that directory. There must be appropriate files in
|
|
||||||
C<$SYSTEMC/include> and C<$SYSTEMC/lib-linux> for SystemC compilation to
|
|
||||||
work.
|
|
||||||
|
|
||||||
=item
|
=item
|
||||||
|
|
||||||
@ -101,8 +97,8 @@ C<cd> to the Verilator directory containing this README.
|
|||||||
|
|
||||||
You now have to decide how you're going to eventually install the kit.
|
You now have to decide how you're going to eventually install the kit.
|
||||||
|
|
||||||
Note Verilator builds the current value of VERILATOR_ROOT, SYSTEMC,
|
Note Verilator builds the current value of VERILATOR_ROOT, SYSTEMC_INCLUDE,
|
||||||
SYSTEMC_ARCH, SYSTEMPERL, and SYSTEMPERL_INCLUDE as defaults into the
|
SYSTEMC_LIBDIR, SYSTEMPERL, and SYSTEMPERL_INCLUDE as defaults into the
|
||||||
executable, so try to have them correct before configuring.
|
executable, so try to have them correct before configuring.
|
||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
16
readme.texi
16
readme.texi
@ -106,11 +106,11 @@ Unix system.
|
|||||||
@enumerate
|
@enumerate
|
||||||
@item
|
@item
|
||||||
If you will be using SystemC (vs straight C++ output), download
|
If you will be using SystemC (vs straight C++ output), download
|
||||||
SystemC 2.0.1 from @url{http://www.systemc.org}. Follow their
|
SystemC from @url{http://www.systemc.org}. Follow their installation
|
||||||
installation instructions. As described in the System-Perl README,
|
instructions. You will need to set SYSTEMC_INCLUDE to point to the
|
||||||
you will need to set SYSTEMC and/or SYSTEMC_KIT to point to this
|
include directory with systemc.h in it, and SYSTEMC_LIBDIR to points
|
||||||
download. Also, set SYSTEMC_ARCH to the architecture name you used
|
to the directory with libsystemc.a in it. (Older installations may
|
||||||
with SystemC, generally 'linux' or 'cygwin'.
|
set SYSTEMC and SYSTEMC_ARCH instead.)
|
||||||
|
|
||||||
@item
|
@item
|
||||||
If you will be using SystemC, download and install Verilog-Perl,
|
If you will be using SystemC, download and install Verilog-Perl,
|
||||||
@ -132,8 +132,8 @@ Type @samp{./configure} to configure Verilator for your system.
|
|||||||
If you are configuring Verilator to be part of a RPM or other
|
If you are configuring Verilator to be part of a RPM or other
|
||||||
distribution package system, you may want to use the --enable-defenv
|
distribution package system, you may want to use the --enable-defenv
|
||||||
configure flag. This will take the current value of VERILATOR_ROOT,
|
configure flag. This will take the current value of VERILATOR_ROOT,
|
||||||
SYSTEMC, SYSTEMC_ARCH, SYSTEMPERL, and SYSTEMPERL_INCLUDE and build
|
SYSTEMC_INCLUDE, SYSTEMC_LIBDIR, SYSTEMPERL, and SYSTEMPERL_INCLUDE
|
||||||
them as defaults into the executable.
|
and build them as defaults into the executable.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Type @samp{make} to compile Verilator.
|
Type @samp{make} to compile Verilator.
|
||||||
@ -176,7 +176,7 @@ $VERILATOR_ROOT/bin/verilator, which will find the path to all needed
|
|||||||
files.
|
files.
|
||||||
|
|
||||||
Verilator assumes you did a make in the SystemC kit directory. If not, you will need
|
Verilator assumes you did a make in the SystemC kit directory. If not, you will need
|
||||||
to populate @samp{$SYSTEMC/include} and @samp{$SYSTEMC/lib-linux} appropriately.
|
to populate @samp{$SYSTEMC_INCLUDE} and @samp{$SYSTEMC_LIBDIR} appropriately.
|
||||||
|
|
||||||
If you will be modifying Verilator, you will probably want a second
|
If you will be modifying Verilator, you will probably want a second
|
||||||
stable copy of this kit for others to use while you experiment.
|
stable copy of this kit for others to use while you experiment.
|
||||||
|
@ -111,6 +111,8 @@ endif
|
|||||||
ifeq ($(CFG_WITH_DEFENV),yes)
|
ifeq ($(CFG_WITH_DEFENV),yes)
|
||||||
CPPFLAGS += -DDEFENV_SYSTEMC=\"$(SYSTEMC)\"
|
CPPFLAGS += -DDEFENV_SYSTEMC=\"$(SYSTEMC)\"
|
||||||
CPPFLAGS += -DDEFENV_SYSTEMC_ARCH=\"$(SYSTEMC_ARCH)\"
|
CPPFLAGS += -DDEFENV_SYSTEMC_ARCH=\"$(SYSTEMC_ARCH)\"
|
||||||
|
CPPFLAGS += -DDEFENV_SYSTEMC_INCLUDE=\"$(SYSTEMC_INCLUDE)\"
|
||||||
|
CPPFLAGS += -DDEFENV_SYSTEMC_LIBDIR=\"$(SYSTEMC_LIBDIR)\"
|
||||||
CPPFLAGS += -DDEFENV_SYSTEMPERL=\"$(SYSTEMPERL)\"
|
CPPFLAGS += -DDEFENV_SYSTEMPERL=\"$(SYSTEMPERL)\"
|
||||||
CPPFLAGS += -DDEFENV_SYSTEMPERL_INCLUDE=\"$(SYSTEMPERL_INCLUDE)\"
|
CPPFLAGS += -DDEFENV_SYSTEMPERL_INCLUDE=\"$(SYSTEMPERL_INCLUDE)\"
|
||||||
ifeq ($(VERILATOR_ROOT),) # Use what we're given, or intuit
|
ifeq ($(VERILATOR_ROOT),) # Use what we're given, or intuit
|
||||||
|
@ -137,6 +137,10 @@ public:
|
|||||||
of.puts("SYSTEMPERL = "+V3Options::getenvSYSTEMPERL()+"\n");
|
of.puts("SYSTEMPERL = "+V3Options::getenvSYSTEMPERL()+"\n");
|
||||||
of.puts("# Path to SystemPerl kit includes (from $SYSTEMPERL_INCLUDE)\n");
|
of.puts("# Path to SystemPerl kit includes (from $SYSTEMPERL_INCLUDE)\n");
|
||||||
of.puts("SYSTEMPERL_INCLUDE = "+V3Options::getenvSYSTEMPERL_INCLUDE()+"\n");
|
of.puts("SYSTEMPERL_INCLUDE = "+V3Options::getenvSYSTEMPERL_INCLUDE()+"\n");
|
||||||
|
of.puts("# SystemC include directory with systemc.h (from $SYSTEMC_INCLUDE)\n");
|
||||||
|
of.puts(string("SYSTEMC_INCLUDE ?= ")+V3Options::getenvSYSTEMC_INCLUDE()+"\n");
|
||||||
|
of.puts("# SystemC library directory with libsystemc.a (from $SYSTEMC_LIBDIR)\n");
|
||||||
|
of.puts(string("SYSTEMC_LIBDIR ?= ")+V3Options::getenvSYSTEMC_LIBDIR()+"\n");
|
||||||
|
|
||||||
of.puts("\n### Switches...\n");
|
of.puts("\n### Switches...\n");
|
||||||
of.puts("# SystemPerl output mode? 0/1 (from --sp)\n");
|
of.puts("# SystemPerl output mode? 0/1 (from --sp)\n");
|
||||||
@ -147,7 +151,7 @@ public:
|
|||||||
of.puts(string("VM_SP_OR_SC = ")+(v3Global.opt.systemC()?"1":"0")+"\n");
|
of.puts(string("VM_SP_OR_SC = ")+(v3Global.opt.systemC()?"1":"0")+"\n");
|
||||||
of.puts("# Deprecated\n");
|
of.puts("# Deprecated\n");
|
||||||
of.puts(string("VM_PCLI = ")+(v3Global.opt.systemC()?"0":"1")+"\n");
|
of.puts(string("VM_PCLI = ")+(v3Global.opt.systemC()?"0":"1")+"\n");
|
||||||
of.puts("# SystemC architecture to find link library path (from $SYSTEMC_ARCH)\n");
|
of.puts("# Deprecated: SystemC architecture to find link library path (from $SYSTEMC_ARCH)\n");
|
||||||
of.puts(string("VM_SC_TARGET_ARCH = ")+V3Options::getenvSYSTEMC_ARCH()+"\n");
|
of.puts(string("VM_SC_TARGET_ARCH = ")+V3Options::getenvSYSTEMC_ARCH()+"\n");
|
||||||
|
|
||||||
of.puts("\n### Vars...\n");
|
of.puts("\n### Vars...\n");
|
||||||
|
@ -414,13 +414,6 @@ string V3Options::getenvSYSTEMC() {
|
|||||||
var = DEFENV_SYSTEMC;
|
var = DEFENV_SYSTEMC;
|
||||||
setenvStr("SYSTEMC", var, "Hardcoded at build time");
|
setenvStr("SYSTEMC", var, "Hardcoded at build time");
|
||||||
}
|
}
|
||||||
// Only correct or check it if we really need the value
|
|
||||||
if (v3Global.opt.usingSystemCLibs()) {
|
|
||||||
if (var == "") {
|
|
||||||
v3fatal("Need $SYSTEMC in environment\n"
|
|
||||||
"Probably System-C isn't installed, see http://www.systemc.org\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,6 +444,47 @@ string V3Options::getenvSYSTEMC_ARCH() {
|
|||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string V3Options::getenvSYSTEMC_INCLUDE() {
|
||||||
|
string var = getenvStr("SYSTEMC_INCLUDE","");
|
||||||
|
if (var == "" && string(DEFENV_SYSTEMC_INCLUDE) != "") {
|
||||||
|
var = DEFENV_SYSTEMC_INCLUDE;
|
||||||
|
setenvStr("SYSTEMC_INCLUDE", var, "Hardcoded at build time");
|
||||||
|
}
|
||||||
|
if (var == "") {
|
||||||
|
string sc = getenvSYSTEMC();
|
||||||
|
if (sc != "") var = sc+"/include";
|
||||||
|
}
|
||||||
|
// Only correct or check it if we really need the value
|
||||||
|
if (v3Global.opt.usingSystemCLibs()) {
|
||||||
|
if (var == "") {
|
||||||
|
v3fatal("Need $SYSTEMC_INCLUDE in environment or when Verilator configured\n"
|
||||||
|
"Probably System-C isn't installed, see http://www.systemc.org\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return var;
|
||||||
|
}
|
||||||
|
|
||||||
|
string V3Options::getenvSYSTEMC_LIBDIR() {
|
||||||
|
string var = getenvStr("SYSTEMC_LIBDIR","");
|
||||||
|
if (var == "" && string(DEFENV_SYSTEMC_LIBDIR) != "") {
|
||||||
|
var = DEFENV_SYSTEMC_LIBDIR;
|
||||||
|
setenvStr("SYSTEMC_LIBDIR", var, "Hardcoded at build time");
|
||||||
|
}
|
||||||
|
if (var == "") {
|
||||||
|
string sc = getenvSYSTEMC();
|
||||||
|
string arch = getenvSYSTEMC_ARCH();
|
||||||
|
if (sc != "" && arch != "") var = sc+"/lib-"+arch;
|
||||||
|
}
|
||||||
|
// Only correct or check it if we really need the value
|
||||||
|
if (v3Global.opt.usingSystemCLibs()) {
|
||||||
|
if (var == "") {
|
||||||
|
v3fatal("Need $SYSTEMC_LIBDIR in environment or when Verilator configured\n"
|
||||||
|
"Probably System-C isn't installed, see http://www.systemc.org\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return var;
|
||||||
|
}
|
||||||
|
|
||||||
string V3Options::getenvSYSTEMPERL() {
|
string V3Options::getenvSYSTEMPERL() {
|
||||||
// Must be careful to set SYSTEMPERL_INCLUDE first else we'd setenv
|
// Must be careful to set SYSTEMPERL_INCLUDE first else we'd setenv
|
||||||
// SYSTEMPERL which would override a DEFENVed SYSTEMPERL_INCLUDE.
|
// SYSTEMPERL which would override a DEFENVed SYSTEMPERL_INCLUDE.
|
||||||
@ -1096,6 +1130,8 @@ void V3Options::showVersion(bool verbose) {
|
|||||||
cout << " Compiled in defaults if not in environment:\n";
|
cout << " Compiled in defaults if not in environment:\n";
|
||||||
cout << " SYSTEMC = " << DEFENV_SYSTEMC<<endl;
|
cout << " SYSTEMC = " << DEFENV_SYSTEMC<<endl;
|
||||||
cout << " SYSTEMC_ARCH = " << DEFENV_SYSTEMC_ARCH<<endl;
|
cout << " SYSTEMC_ARCH = " << DEFENV_SYSTEMC_ARCH<<endl;
|
||||||
|
cout << " SYSTEMC_INCLUDE = " << DEFENV_SYSTEMC_INCLUDE<<endl;
|
||||||
|
cout << " SYSTEMC_LIBDIR = " << DEFENV_SYSTEMC_LIBDIR<<endl;
|
||||||
cout << " SYSTEMPERL = " << DEFENV_SYSTEMPERL<<endl;
|
cout << " SYSTEMPERL = " << DEFENV_SYSTEMPERL<<endl;
|
||||||
cout << " SYSTEMPERL_INCLUDE = " << DEFENV_SYSTEMPERL_INCLUDE<<endl;
|
cout << " SYSTEMPERL_INCLUDE = " << DEFENV_SYSTEMPERL_INCLUDE<<endl;
|
||||||
cout << " VERILATOR_ROOT = " << DEFENV_VERILATOR_ROOT<<endl;
|
cout << " VERILATOR_ROOT = " << DEFENV_VERILATOR_ROOT<<endl;
|
||||||
@ -1105,6 +1141,8 @@ void V3Options::showVersion(bool verbose) {
|
|||||||
cout << " PERL = " << getenvStr("PERL","")<<endl;
|
cout << " PERL = " << getenvStr("PERL","")<<endl;
|
||||||
cout << " SYSTEMC = " << getenvStr("SYSTEMC","")<<endl;
|
cout << " SYSTEMC = " << getenvStr("SYSTEMC","")<<endl;
|
||||||
cout << " SYSTEMC_ARCH = " << getenvStr("SYSTEMC_ARCH","")<<endl;
|
cout << " SYSTEMC_ARCH = " << getenvStr("SYSTEMC_ARCH","")<<endl;
|
||||||
|
cout << " SYSTEMC_INCLUDE = " << getenvStr("SYSTEMC_INCLUDE","")<<endl;
|
||||||
|
cout << " SYSTEMC_LIBDIR = " << getenvStr("SYSTEMC_LIBDIR","")<<endl;
|
||||||
cout << " SYSTEMPERL = " << getenvStr("SYSTEMPERL","")<<endl;
|
cout << " SYSTEMPERL = " << getenvStr("SYSTEMPERL","")<<endl;
|
||||||
cout << " SYSTEMPERL_INCLUDE = " << getenvStr("SYSTEMPERL_INCLUDE","")<<endl;
|
cout << " SYSTEMPERL_INCLUDE = " << getenvStr("SYSTEMPERL_INCLUDE","")<<endl;
|
||||||
cout << " VERILATOR_ROOT = " << getenvStr("VERILATOR_ROOT","")<<endl;
|
cout << " VERILATOR_ROOT = " << getenvStr("VERILATOR_ROOT","")<<endl;
|
||||||
|
@ -340,6 +340,8 @@ class V3Options {
|
|||||||
static string getenvPERL();
|
static string getenvPERL();
|
||||||
static string getenvSYSTEMC();
|
static string getenvSYSTEMC();
|
||||||
static string getenvSYSTEMC_ARCH();
|
static string getenvSYSTEMC_ARCH();
|
||||||
|
static string getenvSYSTEMC_INCLUDE();
|
||||||
|
static string getenvSYSTEMC_LIBDIR();
|
||||||
static string getenvSYSTEMPERL();
|
static string getenvSYSTEMPERL();
|
||||||
static string getenvSYSTEMPERL_INCLUDE();
|
static string getenvSYSTEMPERL_INCLUDE();
|
||||||
static string getenvVERILATOR_ROOT();
|
static string getenvVERILATOR_ROOT();
|
||||||
|
@ -586,6 +586,8 @@ int main(int argc, char** argv, char** env) {
|
|||||||
// Check environment
|
// Check environment
|
||||||
V3Options::getenvSYSTEMC();
|
V3Options::getenvSYSTEMC();
|
||||||
V3Options::getenvSYSTEMC_ARCH();
|
V3Options::getenvSYSTEMC_ARCH();
|
||||||
|
V3Options::getenvSYSTEMC_INCLUDE();
|
||||||
|
V3Options::getenvSYSTEMC_LIBDIR();
|
||||||
V3Options::getenvSYSTEMPERL();
|
V3Options::getenvSYSTEMPERL();
|
||||||
V3Options::getenvSYSTEMPERL_INCLUDE();
|
V3Options::getenvSYSTEMPERL_INCLUDE();
|
||||||
|
|
||||||
|
@ -49,6 +49,12 @@
|
|||||||
#ifndef DEFENV_SYSTEMC_ARCH
|
#ifndef DEFENV_SYSTEMC_ARCH
|
||||||
# define DEFENV_SYSTEMC_ARCH ""
|
# define DEFENV_SYSTEMC_ARCH ""
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef DEFENV_SYSTEMC_INCLUDE
|
||||||
|
# define DEFENV_SYSTEMC_INCLUDE ""
|
||||||
|
#endif
|
||||||
|
#ifndef DEFENV_SYSTEMC_LIBDIR
|
||||||
|
# define DEFENV_SYSTEMC_LIBDIR ""
|
||||||
|
#endif
|
||||||
#ifndef DEFENV_SYSTEMPERL
|
#ifndef DEFENV_SYSTEMPERL
|
||||||
# define DEFENV_SYSTEMPERL ""
|
# define DEFENV_SYSTEMPERL ""
|
||||||
#endif
|
#endif
|
||||||
|
@ -583,7 +583,7 @@ sub compile {
|
|||||||
elsif ($param{vlt}) {
|
elsif ($param{vlt}) {
|
||||||
my @cmdargs = $self->compile_vlt_flags(%param);
|
my @cmdargs = $self->compile_vlt_flags(%param);
|
||||||
|
|
||||||
if ($self->sc_or_sp && !defined $ENV{SYSTEMC}) {
|
if ($self->sc_or_sp && !defined $ENV{SYSTEMC} && !defined $ENV{SYSTEMC_INCLUDE}) {
|
||||||
$self->skip("Test requires SystemC; ignore error since not installed\n");
|
$self->skip("Test requires SystemC; ignore error since not installed\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1495,7 +1495,11 @@ Run using Verilator.
|
|||||||
|
|
||||||
=item SYSTEMC
|
=item SYSTEMC
|
||||||
|
|
||||||
Root directory name of SystemC kit.
|
Root directory name of SystemC kit. Only used if SYSTEMC_INCLUDE not set.
|
||||||
|
|
||||||
|
=item SYSTEMC_INCLUDE
|
||||||
|
|
||||||
|
Directory name with systemc.h in it.
|
||||||
|
|
||||||
=item VERILATOR_GHDL
|
=item VERILATOR_GHDL
|
||||||
|
|
||||||
|
@ -22,9 +22,10 @@ export VERILATOR_ROOT
|
|||||||
include $(VERILATOR_ROOT)/include/verilated.mk
|
include $(VERILATOR_ROOT)/include/verilated.mk
|
||||||
|
|
||||||
DEBUG_ON = --debug
|
DEBUG_ON = --debug
|
||||||
|
SYSTEMC_TESTING ?= $(SYSTEMC)$(SYSTEMC_INCLUDE)
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
ifneq ($(SYSTEMC),)
|
ifneq ($(SYSTEMC_TESTING),)
|
||||||
test_default: precopy prep preproc compile run
|
test_default: precopy prep preproc compile run
|
||||||
test_debug: precopy prep_dbg preproc compile run
|
test_debug: precopy prep_dbg preproc compile run
|
||||||
else
|
else
|
||||||
@ -59,7 +60,7 @@ obj_dir:
|
|||||||
|
|
||||||
nosc:
|
nosc:
|
||||||
@echo
|
@echo
|
||||||
@echo %Skip: SYSTEMC not in environment
|
@echo %Skip: SYSTEMC_INCLUDE not in environment
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@ -25,7 +25,7 @@ LDFLAGS += $(SYSTEMC_CXX_FLAGS)
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
# Linking final exe -- presumes have a sim_main.cpp
|
# Linking final exe -- presumes have a sim_main.cpp
|
||||||
|
|
||||||
SC_LIB = $(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)/libsystemc.a
|
SC_LIB = $(SYSTEMC_LIBDIR)/libsystemc.a
|
||||||
|
|
||||||
simx: sc_main.o $(VK_GLOBAL_OBJS) \
|
simx: sc_main.o $(VK_GLOBAL_OBJS) \
|
||||||
$(VM_PREFIX)__ALL.a $(SC_LIB)
|
$(VM_PREFIX)__ALL.a $(SC_LIB)
|
||||||
|
@ -28,7 +28,7 @@ LDFLAGS += $(SYSTEMC_CXX_FLAGS)
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
# Linking final exe -- presumes have a sim_main.cpp
|
# Linking final exe -- presumes have a sim_main.cpp
|
||||||
|
|
||||||
SC_LIB = $(SYSTEMC)/lib-$(VM_SC_TARGET_ARCH)/libsystemc.a
|
SC_LIB = $(SYSTEMC_LIBDIR)/libsystemc.a
|
||||||
|
|
||||||
simx: sc_main.o $(VK_GLOBAL_OBJS) \
|
simx: sc_main.o $(VK_GLOBAL_OBJS) \
|
||||||
$(VM_PREFIX)__ALL.a $(SC_LIB)
|
$(VM_PREFIX)__ALL.a $(SC_LIB)
|
||||||
|
Loading…
Reference in New Issue
Block a user