mirror of
https://github.com/verilator/verilator.git
synced 2025-01-21 05:44:03 +00:00
b4b74d72f0
This API is used if the user copies the process using `fork` and similar OS-level mechanisms. The `at_clone` member function ensures that all model-allocated resources are re-allocated, such that the copied child process/model can simulate correctly. A typical allocated resource is the thread pool, which every model has its own pool.
26 lines
661 B
Perl
Executable File
26 lines
661 B
Perl
Executable File
#!/usr/bin/env perl
|
|
if (!$::Driver) { use strict; use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
|
# DESCRIPTION: Verilator: Verilog Test module for prepareClone/atClone APIs
|
|
#
|
|
# This file ONLY is placed into the Public Domain, for any use,
|
|
# without warranty, 2023 by Yinan Xu.
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
scenarios(vlt_all => 1);
|
|
|
|
compile(
|
|
make_top_shell => 0,
|
|
make_main => 0,
|
|
verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp",
|
|
"-cc"],
|
|
threads => $Self->{vltmt} ? 2 : 1,
|
|
);
|
|
|
|
execute(
|
|
check_finished => 1,
|
|
expect_filename => $Self->{golden_filename},
|
|
);
|
|
|
|
ok(1);
|
|
1;
|