forked from github/verilator
Compare commits
2 Commits
master
...
huge-inclu
Author | SHA1 | Date | |
---|---|---|---|
|
2c330a18d7 | ||
|
0b49e7cbd2 |
@ -9,19 +9,34 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
print("// DESCR" + "IPTION: Generated by verilator_includer via makefile")
|
print("// DESCR" + "IPTION: Generated by verilator_includer via makefile")
|
||||||
|
print("#ifndef VERILATOR_INCLUDED")
|
||||||
|
print("#define VERILATOR_INCLUDED")
|
||||||
|
|
||||||
re_arg_d = re.compile(r'^-D([^=]+)=(.*)')
|
re_arg_d = re.compile(r'^-D([^=]+)=(.*)')
|
||||||
|
|
||||||
|
|
||||||
|
def include(arg):
|
||||||
|
print("#include \"%s\"" % (arg))
|
||||||
|
|
||||||
|
|
||||||
for arg in sys.argv[1:]:
|
for arg in sys.argv[1:]:
|
||||||
match_d = re_arg_d.match(arg)
|
match_d = re_arg_d.match(arg)
|
||||||
if match_d:
|
if match_d:
|
||||||
print("#define %s %s" % (match_d.group(1), match_d.group(2)))
|
print("#define %s %s" % (match_d.group(1), match_d.group(2)))
|
||||||
|
elif os.path.exists(arg):
|
||||||
|
include(arg)
|
||||||
else:
|
else:
|
||||||
print("#include \"%s\"" % (arg))
|
files = glob.glob(arg)
|
||||||
|
for file in files:
|
||||||
|
include(file)
|
||||||
|
|
||||||
|
print("#endif")
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
|
@ -183,7 +183,7 @@ ifneq ($(VM_PARALLEL_BUILDS),1)
|
|||||||
|
|
||||||
VK_OBJS += $(VM_PREFIX)__ALL.o
|
VK_OBJS += $(VM_PREFIX)__ALL.o
|
||||||
$(VM_PREFIX)__ALL.cpp: $(addsuffix .cpp, $(VM_FAST) $(VM_SLOW))
|
$(VM_PREFIX)__ALL.cpp: $(addsuffix .cpp, $(VM_FAST) $(VM_SLOW))
|
||||||
$(VERILATOR_INCLUDER) -DVL_INCLUDE_OPT=include $^ > $@
|
$(VERILATOR_INCLUDER) -DVL_INCLUDE_OPT=include "$(VM_PREFIX)*.cpp" > $@
|
||||||
all_cpp: $(VM_PREFIX)__ALL.cpp
|
all_cpp: $(VM_PREFIX)__ALL.cpp
|
||||||
else
|
else
|
||||||
# Parallel build: Each .cpp file by itself. This can be somewhat slower for
|
# Parallel build: Each .cpp file by itself. This can be somewhat slower for
|
||||||
|
@ -681,7 +681,7 @@ sub new {
|
|||||||
$self->{status_filename} ||= "$self->{obj_dir}/V" . $self->{name} . ".status";
|
$self->{status_filename} ||= "$self->{obj_dir}/V" . $self->{name} . ".status";
|
||||||
$self->{run_log_filename} ||= "$self->{obj_dir}/vlt_sim.log";
|
$self->{run_log_filename} ||= "$self->{obj_dir}/vlt_sim.log";
|
||||||
$self->{coverage_filename} ||= "$self->{obj_dir}/coverage.dat";
|
$self->{coverage_filename} ||= "$self->{obj_dir}/coverage.dat";
|
||||||
$self->{main_filename} ||= "$self->{obj_dir}/$self->{VM_PREFIX}__main.cpp";
|
$self->{main_filename} ||= "$self->{obj_dir}/main__$self->{VM_PREFIX}__main.cpp";
|
||||||
($self->{top_filename} ||= $self->{pl_filename}) =~ s/\.pl$//;
|
($self->{top_filename} ||= $self->{pl_filename}) =~ s/\.pl$//;
|
||||||
($self->{golden_filename} ||= $self->{pl_filename}) =~ s/\.pl$/.out/;
|
($self->{golden_filename} ||= $self->{pl_filename}) =~ s/\.pl$/.out/;
|
||||||
if (-e ($self->{top_filename} . ".vhd")) { # If VHDL file exists
|
if (-e ($self->{top_filename} . ".vhd")) { # If VHDL file exists
|
||||||
|
Loading…
Reference in New Issue
Block a user