aboutsummaryrefslogtreecommitdiffstats
path: root/examples/simple.v
blob: 077ae0a590f222ac8c46a920bab352581853fe80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module and_comb(input wire  in1,
                input wire  in2,
                output wire out
                );

   and and1(out, in1, in2);

endmodule

module main;
   reg a, b;
   wire c;

   and_comb gate(.in1(a), .in2(b), .out(c));

   initial
     begin
        a = 1'b1;
        b = 1'b1;
        #1;
        $display("%d & %d = %d", a, b, c);
        $finish;
     end
endmodule