summaryrefslogtreecommitdiff
path: root/tests/asicworld/code_verilog_tutorial_which_clock.v
blob: 418a2cfac27d993d05fb70c38ded9f7076fcb008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module which_clock (x,y,q,d);
input x,y,d;
output q;
reg q;

always @ (posedge x or posedge y)
   if (x) 
     q <= 1'b0;
   else
     q <= d;

endmodule