diff options
Diffstat (limited to 'tests/bind/basic.sv')
-rw-r--r-- | tests/bind/basic.sv | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bind/basic.sv b/tests/bind/basic.sv new file mode 100644 index 000000000..ce0d04c48 --- /dev/null +++ b/tests/bind/basic.sv @@ -0,0 +1,20 @@ +// A basic example of the bind construct + +module foo (input logic a, input logic b, output logic c); + // Magic happens here... +endmodule + +module bar (input a, input b, output c); + assign c = a ^ b; +endmodule + +module top (); + logic u, v, w; + foo foo_i (.a (u), .b (v), .c (w)); + + bind foo bar bound_i (.*); + + always_comb begin + assert(w == u ^ v); + end +endmodule |