mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 17:31:40 +02:00
support and conversion for -> and <->
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
module top;
|
||||
function log_imp;
|
||||
input integer a;
|
||||
input integer b;
|
||||
return a -> b;
|
||||
endfunction
|
||||
function log_eq;
|
||||
input integer a;
|
||||
input integer b;
|
||||
return a <-> b;
|
||||
endfunction
|
||||
initial
|
||||
for (integer a = -2; a <= 2; a++)
|
||||
for (integer b = -2; b <= 2; b++)
|
||||
$display(log_imp(a, b), log_eq(a, b));
|
||||
endmodule
|
||||
@@ -0,0 +1,18 @@
|
||||
module top;
|
||||
function log_imp;
|
||||
input integer a;
|
||||
input integer b;
|
||||
log_imp = !a || b;
|
||||
endfunction
|
||||
function log_eq;
|
||||
input integer a;
|
||||
input integer b;
|
||||
log_eq = !a == !b;
|
||||
endfunction
|
||||
initial begin : foo
|
||||
integer a, b;
|
||||
for (a = -2; a <= 2; a = a + 1)
|
||||
for (b = -2; b <= 2; b = b + 1)
|
||||
$display(log_imp(a, b), log_eq(a, b));
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user