This commit is contained in:
Wilson Snyder 2023-02-23 05:47:56 -05:00
parent 003a8cfe75
commit cfe0fdd5cc
8 changed files with 53 additions and 53 deletions

View File

@ -400,8 +400,8 @@ accesses the above signal "readme" would be:
vpiHandle vh1 = vpi_handle_by_name((PLI_BYTE8*)"TOP.our.readme", NULL);
if (!vh1) vl_fatal(__FILE__, __LINE__, "sim_main", "No handle found");
const char* name = vpi_get_str(vpiName, vh1);
const char* type = vpi_get_str(vpiType, vh1);
const int size = vpi_get(vpiSize, vh1);
const char* type = vpi_get_str(vpiType, vh1);
const int size = vpi_get(vpiSize, vh1);
printf("register name: %s, type: %s, size: %d\n", name, type, size); // Prints "register name: readme, type: vpiReg, size: 32"
s_vpi_value v;

View File

@ -10,7 +10,7 @@ module t (/*AUTOARG*/);
e0,
e1,
e2,
e3
e3
} EN;
initial begin

View File

@ -52,7 +52,7 @@ if (!-r catfile($root, ".git")) {
}
}
if (keys %names) {
error("Files like stdint.h instead of cstdint:\n ", join("\n ", sort keys %names));
error("Files like stdint.h instead of cstdint:\n ", join("\n ", sort keys %names));
}
}

View File

@ -10,9 +10,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(simulator => 1);
compile(
fails=>0,
);
compile();
ok(1);
1;

View File

@ -7,48 +7,50 @@
// SPDX-License-Identifier: CC0-1.0
interface intf;
logic l;
function void f1();
endfunction
function void f2();
endfunction
function void f3();
endfunction
function void f4();
endfunction
logic l;
function void f1();
endfunction
function void f2();
endfunction
function void f3();
endfunction
function void f4();
endfunction
modport mpi (
import f1, f2,
input l,
import f3, f4
);
modport mpo (
output l,
import f1, f2, f3, f4
);
modport mpi
(
import f1, f2,
input l,
import f3, f4
);
modport mpo
(
output l,
import f1, f2, f3, f4
);
endinterface
module mo (intf.mpo intf0);
function void ef1();
intf0.f1();
intf0.f2();
endfunction
function void ef2();
intf0.f3();
intf0.f4();
endfunction
function void ef1();
intf0.f1();
intf0.f2();
endfunction
function void ef2();
intf0.f3();
intf0.f4();
endfunction
initial begin
ef1();
ef2();
end
initial begin
ef1();
ef2();
end
endmodule
module mi (intf.mpi intf0);
endmodule
module t;
intf intf0();
mi mi(.*);
mo mo(.*);
intf intf0();
mi mi(.*);
mo mo(.*);
endmodule

View File

@ -68,8 +68,8 @@ module t (/*AUTOARG*/
generate
for (g=0; g<2; ++g) begin
always_comb gen_arr_packed[g] = d;
always_comb gen_arr_unpacked[g] = d;
always_comb gen_arr_packed[g] = d;
always_comb gen_arr_unpacked[g] = d;
end
endgenerate

View File

@ -6,9 +6,9 @@
module t ();
initial begin
$dumpfile("dump.vcd");
$dumpvars();
end
initial begin
$dumpfile("dump.vcd");
$dumpvars();
end
endmodule

View File

@ -6,13 +6,13 @@
module t ();
function automatic void func();
endfunction
export "DPI-C" function func;
function automatic void func();
endfunction
export "DPI-C" function func;
initial begin
$dumpfile("dump.vcd");
$dumpvars();
end
initial begin
$dumpfile("dump.vcd");
$dumpvars();
end
endmodule