Commit Graph

308 Commits

Author SHA1 Message Date
Wilson Snyder
e02f97854c Deprecate 'vluint64_t' and similar types (#3255). 2022-03-27 15:27:40 -04:00
Yutetsu TAKATSUKASA
e29132377e
Fix driver.pl when expected value is 0 (#3339)
* Tests: use defined() to accept $expvalue==0

* Tests: Update expected stats of t_cast_huge in --vltmt mode
2022-03-06 14:43:28 +09:00
Wilson Snyder
ca42be982c Copyright year update. 2022-01-01 08:26:40 -05:00
Yutetsu TAKATSUKASA
0658a7654f
Add tests of tracing SystemC model verilated with --hierarchical (#3252)
* Tests: Add t_hier_block_sc_trace(fst|vcd) that tests tracing hierarchical block on SystemC.

* Add a check that elaboration is done before a trace file is opened.

* Add a check that elaboration is done before trace() is called to verilated SystemC model.

* Tests: call sc_core::sc_start(sc_core::SC_ZERO_TIME) before opening a trace file

* Tests: Fix t_trace_two_sc to call sc_start before opening trace

* Use vl_fatal as suggested in PR review.
2021-12-23 08:41:11 +09:00
Wilson Snyder
66d70c8b37 Internal coverage: Fix some test runs having conflicting sources. 2021-10-05 20:22:29 -04:00
Wilson Snyder
f1b8b1d99b Format: perltidy spacing cleanup. No functional change. 2021-09-08 18:45:25 -04:00
Wilson Snyder
c678e7ec3e Format: perltidy spacing cleanup. No functional change. 2021-09-07 23:50:28 -04:00
Wilson Snyder
496b9f9c63 Tests: Add difftree test. 2021-09-04 08:27:59 -04:00
Geza Lore
5adc856950 Tests: ignore all hashes in files_identical
Also add 'h' prefix to all printed hashes, to reduce ambiguity. No
functional change.
2021-08-11 16:55:11 +01:00
Wilson Snyder
f937e3282f Tests: Ignore DepSet hash numbers. (#3083) 2021-07-25 11:20:19 -04:00
Geza Lore
ab4063f098 Emit implementations into separate files based on required headers.
This patch partitions AstCFuncs under an AstNodeModule based on which
header files they require for their implementation, and emits them
into separate files based on the distinct dependency sets. This helps
with incremental recompilation of the output C++.
2021-07-22 18:01:07 +01:00
Geza Lore
d4e73e215e Tests: fail test if vcddiff aborts, fix failing tests
Tests used to silently pass when vcddiff aborted. Now fixed. Updated
large array trace reference files for FST, added same reference files
for VCD.

Developers need to update their local vcddiff.
2021-07-01 23:22:25 +01:00
Morten Borup Petersen
2c813488f4
Tests: Add simulator benchmarking data option for regression tests (#3054)
This commit adds the '--simbenchmark' option to the regression test compile command.
The option is not intended as a fully-fledged benchmarking infrastructure, but rather a
utility for easily generating cycle- and execution time information when executing a verilated test.

As an example use case, the included test file shows how optimization level is varied across
three different builds+simulations, with the statistics for each run output to the same file in
the output directory.

Future work:
- 'sim_time' in the generated top-level main file should be a parameter.
- Given the above, the test execution script from verilog-sim-benchmark can be integrated
to generate better estimates of cycles/second through varying 'sim_time' over multiple executions.
2021-07-01 11:17:55 -04:00
Geza Lore
24b5215cf9 Add --enable-m32 to configure 2021-06-14 00:37:59 +01:00
Wilson Snyder
9d3e800311 Commentary 2021-06-13 12:03:53 -04:00
Geza Lore
0edf1f0c94
Add ccache-report target to standard Makefile (#3011)
Using the standard model Makefile, when in addition to an explicit
target, the target 'ccache-report' is also given, a summary of ccache
hits/misses during this invocation of 'make' will be prited at the end
of the build.
2021-06-07 00:56:30 +01:00
Wilson Snyder
aba3883092 Commentary on MULTIDRIVEN (#2972). 2021-05-19 08:14:14 -04:00
Yutetsu TAKATSUKASA
5e56f4d11b
Tests: Enable undefined behavior sanitizor when --sanitize is set. (#2923) 2021-05-08 08:20:26 -04:00
Wilson Snyder
aedd16225a Tests: Don't expose version numbers 2021-04-24 10:33:49 -04:00
Wilson Snyder
adce7ecf4b Documentation has been rewritten into a book format. 2021-04-11 18:55:06 -04:00
Àlex Torregrosa
2b2680770b
Improve scope types in FST and VCD traces (#2805). 2021-04-07 09:55:11 -04:00
Àlex Torregrosa
a29ac44af9
Add FST SystemC tracing (#2806) 2021-04-06 16:18:58 -04:00
Wilson Snyder
c8d8e95d52 Tests: Honor make_top_shell=>0 (#2847). 2021-04-01 08:52:48 -04:00
Wilson Snyder
07de647cd7 Tests: On first file_identical miscompare look for others 2021-03-18 18:45:34 -04:00
Wilson Snyder
2feb46fc5d Tests: Refactor t_vpi_time_cb to avoid shared object 2021-03-12 12:08:11 -05:00
Wilson Snyder
9483ebefae Internal code coverage cleanups. 2021-03-07 21:05:15 -05:00
Wilson Snyder
2cad22a22a
Add simulation context (VerilatedContext) (#2660). (#2813)
**   Add simulation context (VerilatedContext) to allow multiple fully independent
      models to be in the same process.  Please see the updated examples.
**   Add context->time() and context->timeInc() API calls, to set simulation time.
      These now are recommended in place of the legacy sc_time_stamp().
2021-03-07 11:01:54 -05:00
Wilson Snyder
92f02c9db7 Tests: Adjust eta 2021-03-03 18:58:17 -05:00
Wilson Snyder
57d1404f40 Tests: Cleanup to return instead of exit 2021-02-25 19:26:36 -05:00
Wilson Snyder
00c3bafe7d Tests: With --gdbsim build with ggdb 2021-02-25 19:20:11 -05:00
Wilson Snyder
e44563fddc Tests: Use vl_time_stamp64 where reasonable 2021-02-16 20:14:30 -05:00
Wilson Snyder
ae311200bf Tests: Pass tool to allow ifdefs in VPI C code. 2021-02-03 19:29:24 -05:00
Wilson Snyder
828fa80afa Tests: Add common use_libvpi for multiple simulators 2021-02-03 18:59:27 -05:00
Àlex Torregrosa
e77e4e1fe6
Improve struct scopes when dumping structs to VCD (#2776) 2021-02-03 14:40:21 -05:00
Wilson Snyder
ab5d4bd51d Tests: Abstract out common test comparison 2021-01-12 18:31:23 -05:00
Wilson Snyder
bd602d0e2d Copyright year update 2021-01-01 10:29:54 -05:00
Wilson Snyder
b8b9170f9d Remove Unix::Processors dependency 2020-12-23 16:07:14 -05:00
Yutetsu TAKATSUKASA
ce9293fcb3
Fix memory leaks found in trace related tests (#2708)
* Fix memory leak of t_trace_cat and t_trace_cat_renew

* Fix memory leak of t_trace_c_api

* Fix memory leak in t_trace_public_func and t_trace_public_func_vlt

* Fix memory leaks in t_flat_build (and probably more).

* Use unique_ptr in testcases
2020-12-17 08:31:47 +09:00
Todd Strader
b75901b3eb
Fix VPI module tree (#2704) 2020-12-16 11:46:57 -05:00
Yutetsu TAKATSUKASA
d9ef4ac435
Rename --asan to --sanitize (#2705) 2020-12-15 21:07:27 -05:00
Yutetsu TAKATSUKASA
176cc5a196
Add --asan option that enables address sanitizer to the test driver (#2700)
* Experimentally add --vltasan which enables address sanitizer

Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
2020-12-16 07:33:26 +09:00
Wilson Snyder
74ef35d3b3 Support $cast and new CASTCONST warning. 2020-12-05 22:58:36 -05:00
Wilson Snyder
b49be06a5a Tests: Standard wording. 2020-11-12 18:50:05 -05:00
Wilson Snyder
7e5f562500 Tests: Use internal sed as external croaks on binary. 2020-10-14 09:30:15 -04:00
Wilson Snyder
069eb97eca SystemC 2.3.0 or newer (SYSTEMC_VERSION >= 20111121) is now required. 2020-08-29 10:45:47 -04:00
Wilson Snyder
698e0fbbd1 configure: Try compiler flags to get to C++11 (#2502) 2020-08-17 07:40:07 -04:00
Geza Lore
09806d7576 Update fstapi.c to latest (fix undefined thread behaviour) 2020-06-30 19:50:41 +01:00
Geza Lore
7342cf278a Travis: Add 32-bit build on focal 2020-06-28 20:11:22 +01:00
Geza Lore
378d947702 Travis: Add FreeBSD build + portability fixes 2020-06-28 15:37:24 +01:00
Wilson Snyder
5a622fd9db Tests: Temporary fix for (#2407) 2020-06-05 07:28:51 -04:00