Add regression tests for invalid non-blocking writes to SV constructs
Current regression tests only cover checking for invalid non-blocking writes to constructs that are valid in Verilog. Add two tests to additionally cover some SystemVerilog constructs. * Non-blocking writes to members of a struct typed variable with automatic lifetime * Non-blocking writes to class typed variables with automatic lifetime Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
e7d3e7440d
commit
070fc2aedc
|
|
@ -0,0 +1,18 @@
|
||||||
|
// Check that it is not possible to perform non-blocking assignments to fields
|
||||||
|
// of structs with automatic lifetime.
|
||||||
|
|
||||||
|
module test;
|
||||||
|
|
||||||
|
task automatic auto_task;
|
||||||
|
struct packed {
|
||||||
|
logic x;
|
||||||
|
} s;
|
||||||
|
s.x <= 10;
|
||||||
|
$display("FAILED");
|
||||||
|
endtask
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
auto_task;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
// Check that it is not possible to perform non-blocking assignments to a class
|
||||||
|
// object variable with automatic lifetime.
|
||||||
|
|
||||||
|
module test;
|
||||||
|
|
||||||
|
class C;
|
||||||
|
endclass
|
||||||
|
|
||||||
|
task automatic auto_task;
|
||||||
|
C c1, c2;
|
||||||
|
c1 <= c2;
|
||||||
|
$display("FAILED");
|
||||||
|
endtask
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
auto_task;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
@ -104,6 +104,8 @@ assign_op_oob normal,-g2009 ivltests
|
||||||
assign_op_real_array normal,-g2009 ivltests
|
assign_op_real_array normal,-g2009 ivltests
|
||||||
assign_op_real_array_oob normal,-g2009 ivltests
|
assign_op_real_array_oob normal,-g2009 ivltests
|
||||||
assign_op_type normal,-g2009 ivltests
|
assign_op_type normal,-g2009 ivltests
|
||||||
|
automatic_error14 CE,-g2005-sv ivltests
|
||||||
|
automatic_error15 CE,-g2005-sv ivltests
|
||||||
bitp1 normal,-g2005-sv ivltests
|
bitp1 normal,-g2005-sv ivltests
|
||||||
bits normal,-g2005-sv ivltests
|
bits normal,-g2005-sv ivltests
|
||||||
bits2 normal,-g2005-sv ivltests
|
bits2 normal,-g2005-sv ivltests
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue