diff --git a/Changes b/Changes index 8d22254cf..1bb71a385 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,8 @@ The contributors that suggested a given feature are shown in []. Thanks! * Verilator 4.021 devel +*** Examples have been renamed. + * Verilator 4.020 2019-10-06 diff --git a/Makefile.in b/Makefile.in index e0adba72e..69addc1d3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -104,8 +104,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ SHELL = /bin/sh SUBDIRS = src test_regress \ - examples/hello_world_c examples/hello_world_sc \ - examples/tracing_c examples/tracing_sc \ + examples/make_hello_c \ + examples/make_hello_sc \ + examples/make_tracing_c \ + examples/make_tracing_sc \ INFOS = README README.html README.pdf \ verilator.txt verilator.html verilator.pdf @@ -182,8 +184,8 @@ INST_PROJ_BIN_FILES = \ DISTFILES := $(DISTFILES_INC) EXAMPLES_FIRST = \ - examples/hello_world_c \ - examples/hello_world_sc \ + examples/make_hello_c \ + examples/make_hello_sc \ EXAMPLES = $(EXAMPLES_FIRST) $(filter-out $(EXAMPLES_FIRST), $(sort $(wildcard examples/*))) @@ -328,10 +330,10 @@ installdata: ; for p in $(VL_INST_INC_SRCDIR_FILES) ; do \ $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \ done - $(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/hello_world_c - $(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/hello_world_sc - $(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/tracing_c - $(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/tracing_sc + $(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/make_hello_c + $(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/make_hello_sc + $(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/make_tracing_c + $(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/make_tracing_sc cd $(srcdir) \ ; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \ $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \ @@ -352,10 +354,10 @@ uninstall: -rmdir $(DESTDIR)$(pkgdatadir)/include/gtkwave -rmdir $(DESTDIR)$(pkgdatadir)/include/vltstd -rmdir $(DESTDIR)$(pkgdatadir)/include - -rmdir $(DESTDIR)$(pkgdatadir)/examples/hello_world_c - -rmdir $(DESTDIR)$(pkgdatadir)/examples/hello_world_sc - -rmdir $(DESTDIR)$(pkgdatadir)/examples/tracing_c - -rmdir $(DESTDIR)$(pkgdatadir)/examples/tracing_sc + -rmdir $(DESTDIR)$(pkgdatadir)/examples/make_hello_c + -rmdir $(DESTDIR)$(pkgdatadir)/examples/make_hello_sc + -rmdir $(DESTDIR)$(pkgdatadir)/examples/make_tracing_c + -rmdir $(DESTDIR)$(pkgdatadir)/examples/make_tracing_sc -rmdir $(DESTDIR)$(pkgdatadir)/examples -rmdir $(DESTDIR)$(pkgdatadir) -rmdir $(DESTDIR)$(pkgconfigdir) diff --git a/README.pod b/README.pod index 5e1e915c9..c551224ba 100644 --- a/README.pod +++ b/README.pod @@ -252,10 +252,10 @@ The directories in the package directory are as follows: Changes => Version history bin/verilator => Compiler Wrapper invoked to Verilate code docs/ => Additional documentation - examples/hello_world_c => Example simple Verilog->C++ conversion - examples/hello_world_sc => Example simple Verilog->SystemC conversion - examples/tracing_c => Example Verilog->C++ with tracing - examples/tracing_sc => Example Verilog->SystemC with tracing + examples/make_hello_c => Example GNU-make simple Verilog->C++ conversion + examples/make_hello_sc => Example GNU-make simple Verilog->SystemC conversion + examples/make_tracing_c => Example GNU-make Verilog->C++ with tracing + examples/make_tracing_sc => Example GNU-make Verilog->SystemC with tracing include/ => Files that should be in your -I compiler path include/verilated*.cpp => Global routines to link into your simulator include/verilated*.h => Global headers diff --git a/bin/verilator b/bin/verilator index 941435e1b..29f375989 100755 --- a/bin/verilator +++ b/bin/verilator @@ -4252,7 +4252,7 @@ Add the --trace switch to Verilator, and in your top level C code, call Verilated::traceEverOn(true). Then create a VerilatedVcdC object, and in your main loop call "trace_object->dump(time)" every time step, and finally call "trace_object->close()". For an example, see below and the -examples/tracing_c/sim_main.cpp file of the distribution. +examples/make_tracing_c/sim_main.cpp file of the distribution. You also need to compile verilated_vcd_c.cpp and add it to your link, preferably by adding the dependencies in $(VK_GLOBAL_OBJS) to your @@ -4284,7 +4284,7 @@ Add the --trace switch to Verilator, and in your top level C sc_main code, include verilated_vcd_sc.h. Then call Verilated::traceEverOn(true). Then create a VerilatedVcdSc object as you would create a normal SystemC trace file. For an example, see the call to VerilatedVcdSc in the -examples/tracing_sc/sc_main.cpp file of the distribution, and below. +examples/make_tracing_sc/sc_main.cpp file of the distribution, and below. Alternatively you may use the C++ trace mechanism described in the previous question, however the timescale and timeprecision will not inherited from @@ -4372,7 +4372,7 @@ Verilator_coverage reads the logs/coverage.dat file(s), and creates an annotated source code listing showing code coverage details. For an example, after running 'make test' in the Verilator distribution, -see the examples/tracing_c/logs directory. Grep for lines starting +see the examples/make_tracing_c/logs directory. Grep for lines starting with '%' to see what lines Verilator believes need more coverage. =item Where is the translate_off command? (How do I ignore a construct?) diff --git a/examples/hello_world_c/.gitignore b/examples/make_hello_c/.gitignore similarity index 100% rename from examples/hello_world_c/.gitignore rename to examples/make_hello_c/.gitignore diff --git a/examples/hello_world_c/Makefile b/examples/make_hello_c/Makefile similarity index 94% rename from examples/hello_world_c/Makefile rename to examples/make_hello_c/Makefile index 8d985c503..e1c969991 100644 --- a/examples/hello_world_c/Makefile +++ b/examples/make_hello_c/Makefile @@ -21,7 +21,7 @@ endif # This is intended to be a minimal example. Before copying this to start a # real project, it is better to start with a more complete example, -# e.g. examples/tracing_c. +# e.g. examples/make_tracing_c. # If $VERILATOR_ROOT isn't in the environment, we assume it is part of a # package install, and verilator is in your path. Otherwise find the @@ -42,7 +42,7 @@ default: @echo "-- RUN ---------------------" obj_dir/Vtop @echo "-- DONE --------------------" - @echo "Note: Once this example is understood, see examples/tracing_c." + @echo "Note: Once this example is understood, see examples/make_tracing_c." @echo "Note: Also see the EXAMPLE section in the verilator manpage/document." ###################################################################### diff --git a/examples/hello_world_c/sim_main.cpp b/examples/make_hello_c/sim_main.cpp similarity index 100% rename from examples/hello_world_c/sim_main.cpp rename to examples/make_hello_c/sim_main.cpp diff --git a/examples/hello_world_c/top.v b/examples/make_hello_c/top.v similarity index 100% rename from examples/hello_world_c/top.v rename to examples/make_hello_c/top.v diff --git a/examples/hello_world_sc/.gitignore b/examples/make_hello_sc/.gitignore similarity index 100% rename from examples/hello_world_sc/.gitignore rename to examples/make_hello_sc/.gitignore diff --git a/examples/hello_world_sc/Makefile b/examples/make_hello_sc/Makefile similarity index 95% rename from examples/hello_world_sc/Makefile rename to examples/make_hello_sc/Makefile index dbb827b7e..10344d1a2 100644 --- a/examples/hello_world_sc/Makefile +++ b/examples/make_hello_sc/Makefile @@ -21,7 +21,7 @@ endif # This is intended to be a minimal example. Before copying this to start a # real project, it is better to start with a more complete example, -# e.g. examples/tracing_sc. +# e.g. examples/make_tracing_sc. # If $VERILATOR_ROOT isn't in the environment, we assume it is part of a # package install, and verilator is in your path. Otherwise find the @@ -51,7 +51,7 @@ run: @echo "-- RUN ---------------------" obj_dir/Vtop @echo "-- DONE --------------------" - @echo "Note: Once this example is understood, see examples/tracing_sc." + @echo "Note: Once this example is understood, see examples/make_tracing_sc." @echo "Note: Also see the EXAMPLE section in the verilator manpage/document." ###################################################################### diff --git a/examples/hello_world_sc/sc_main.cpp b/examples/make_hello_sc/sc_main.cpp similarity index 100% rename from examples/hello_world_sc/sc_main.cpp rename to examples/make_hello_sc/sc_main.cpp diff --git a/examples/hello_world_sc/top.v b/examples/make_hello_sc/top.v similarity index 100% rename from examples/hello_world_sc/top.v rename to examples/make_hello_sc/top.v diff --git a/examples/tracing_c/.gitignore b/examples/make_tracing_c/.gitignore similarity index 100% rename from examples/tracing_c/.gitignore rename to examples/make_tracing_c/.gitignore diff --git a/examples/tracing_c/Makefile b/examples/make_tracing_c/Makefile similarity index 100% rename from examples/tracing_c/Makefile rename to examples/make_tracing_c/Makefile diff --git a/examples/tracing_c/Makefile_obj b/examples/make_tracing_c/Makefile_obj similarity index 100% rename from examples/tracing_c/Makefile_obj rename to examples/make_tracing_c/Makefile_obj diff --git a/examples/tracing_c/input.vc b/examples/make_tracing_c/input.vc similarity index 100% rename from examples/tracing_c/input.vc rename to examples/make_tracing_c/input.vc diff --git a/examples/tracing_c/sim_main.cpp b/examples/make_tracing_c/sim_main.cpp similarity index 99% rename from examples/tracing_c/sim_main.cpp rename to examples/make_tracing_c/sim_main.cpp index 436e0fb3d..c8003611e 100644 --- a/examples/tracing_c/sim_main.cpp +++ b/examples/make_tracing_c/sim_main.cpp @@ -23,7 +23,7 @@ double sc_time_stamp() { } int main(int argc, char** argv, char** env) { - // This is a more complicated example, please also see the simpler examples/hello_world_c. + // This is a more complicated example, please also see the simpler examples/make_hello_c. // Prevent unused variable warnings if (0 && argc && argv && env) {} diff --git a/examples/tracing_c/sub.v b/examples/make_tracing_c/sub.v similarity index 100% rename from examples/tracing_c/sub.v rename to examples/make_tracing_c/sub.v diff --git a/examples/tracing_c/top.v b/examples/make_tracing_c/top.v similarity index 96% rename from examples/tracing_c/top.v rename to examples/make_tracing_c/top.v index 2c43ae498..beae05605 100644 --- a/examples/tracing_c/top.v +++ b/examples/make_tracing_c/top.v @@ -5,7 +5,7 @@ // ====================================================================== // This is intended to be a complex example of several features, please also -// see the simpler examples/hello_world_c. +// see the simpler examples/make_hello_c. module top ( diff --git a/examples/tracing_sc/.gitignore b/examples/make_tracing_sc/.gitignore similarity index 100% rename from examples/tracing_sc/.gitignore rename to examples/make_tracing_sc/.gitignore diff --git a/examples/tracing_sc/Makefile b/examples/make_tracing_sc/Makefile similarity index 100% rename from examples/tracing_sc/Makefile rename to examples/make_tracing_sc/Makefile diff --git a/examples/tracing_sc/Makefile_obj b/examples/make_tracing_sc/Makefile_obj similarity index 100% rename from examples/tracing_sc/Makefile_obj rename to examples/make_tracing_sc/Makefile_obj diff --git a/examples/tracing_sc/input.vc b/examples/make_tracing_sc/input.vc similarity index 100% rename from examples/tracing_sc/input.vc rename to examples/make_tracing_sc/input.vc diff --git a/examples/tracing_sc/sc_main.cpp b/examples/make_tracing_sc/sc_main.cpp similarity index 99% rename from examples/tracing_sc/sc_main.cpp rename to examples/make_tracing_sc/sc_main.cpp index e0e13202e..b2d704aec 100644 --- a/examples/tracing_sc/sc_main.cpp +++ b/examples/make_tracing_sc/sc_main.cpp @@ -20,7 +20,7 @@ #include "Vtop.h" int sc_main(int argc, char* argv[]) { - // This is a more complicated example, please also see the simpler examples/hello_world_c. + // This is a more complicated example, please also see the simpler examples/make_hello_c. // Prevent unused variable warnings if (0 && argc && argv) {} diff --git a/examples/tracing_sc/sub.v b/examples/make_tracing_sc/sub.v similarity index 100% rename from examples/tracing_sc/sub.v rename to examples/make_tracing_sc/sub.v diff --git a/examples/tracing_sc/top.v b/examples/make_tracing_sc/top.v similarity index 96% rename from examples/tracing_sc/top.v rename to examples/make_tracing_sc/top.v index 2c43ae498..beae05605 100644 --- a/examples/tracing_sc/top.v +++ b/examples/make_tracing_sc/top.v @@ -5,7 +5,7 @@ // ====================================================================== // This is intended to be a complex example of several features, please also -// see the simpler examples/hello_world_c. +// see the simpler examples/make_hello_c. module top ( diff --git a/nodist/install_test b/nodist/install_test index 2fbe0f897..74e99ec9c 100755 --- a/nodist/install_test +++ b/nodist/install_test @@ -58,7 +58,7 @@ sub test { run("/bin/mkdir -p $prefix"); run("cd $blddir && make install"); run("test -e $prefix/share/man/man1/verilator.1"); - run("test -e $prefix/share/verilator/examples/tracing_c/Makefile"); + run("test -e $prefix/share/verilator/examples/make_tracing_c/Makefile"); run("test -e $prefix/share/verilator/include/verilated.h"); run("test -e $prefix/bin/verilator"); run("test -e $prefix/bin/verilator_bin");