mirror of
https://github.com/verilator/verilator.git
synced 2025-01-10 00:27:35 +00:00
a8f83d5758
The goal of this patch is to move functionality related to constructing the thread entry points and then invoking them out of V3EmitC (and into V3Partition). The long term goal being enabling V3EmitC to emit functions partitioned based on header dependencies. V3EmitC having to deal with only AstCFunc instances and no other magic will facilitate this. In this patch: - We construct AstCFuncs for each thread entry point in V3Partition::finalize and move AstMTaskBody nodes under these functions. - Add the invocation of the threads as text statements within the AstExecGraph, so they are still invoked where the exec graph is located. (the entry point functions are still referenced via AstCCall or AstAddOrCFunc, so lazy declarations of referenced functions are created automatically). - Explicitly handle MTask state variables (VlMTaskVertex in verilated_threads.h) within Verilator, so no need to text bash a lot of these any more (some text refs still remain but they are all created next to each other within V3Partition.cpp). The effect of all this on the emitted code should be nothing but some identifier/ordering changes. No functional change intended.
36 lines
1.4 KiB
Perl
Executable File
36 lines
1.4 KiB
Perl
Executable File
#!/usr/bin/env perl
|
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
|
#
|
|
# Copyright 2003 by Wilson Snyder. This program is free software; you
|
|
# can redistribute it and/or modify it under the terms of either the GNU
|
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
|
# Version 2.0.
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
scenarios(simulator => 1);
|
|
|
|
top_filename("t/t_inst_tree.v");
|
|
my $out_filename = "$Self->{obj_dir}/V$Self->{name}.xml";
|
|
|
|
compile(
|
|
v_flags2 => ["t/$Self->{name}.vlt",
|
|
$Self->wno_unopthreads_for_few_cores()]
|
|
);
|
|
|
|
if ($Self->{vlt_all}) {
|
|
file_grep("$out_filename", qr/\<var fl="e70" loc=".*?" name="u.u0.u0.z0" dtype_id="\d+" vartype="logic" origName="z0" public="true" public_flat_rd="true" public_flat_rw="true"\/\>/i);
|
|
file_grep("$out_filename", qr/\<var fl="e85" loc=".*?" name="u.u0.u0.u0.u0.z1" dtype_id="\d+" vartype="logic" origName="z1" public="true" public_flat_rd="true" public_flat_rw="true"\/\>/i);
|
|
file_grep("$out_filename", qr/\<var fl="e83" loc=".*?" name="u.u0.u1.u0.u0.z" dtype_id="\d+" vartype="logic" origName="z" public="true" public_flat_rd="true" public_flat_rw="true"\/\>/i);
|
|
}
|
|
|
|
execute(
|
|
check_finished => 1,
|
|
expect =>
|
|
'\] (%m|.*t\.ps): Clocked
|
|
',
|
|
);
|
|
|
|
ok(1);
|
|
1;
|