source:
vis_dev/vis-2.3/models/debug/and2.v
@
35
| Last change on this file since 35 was 33, checked in by , 14 years ago | |
|---|---|
| File size: 192 bytes | |
| Line | |
|---|---|
| 1 | module andgate(clk,a,b); |
| 2 | input clk; |
| 3 | input a; |
| 4 | input b; |
| 5 | |
| 6 | reg c; |
| 7 | wire x; |
| 8 | wire y; |
| 9 | |
| 10 | initial c = 0; |
| 11 | |
| 12 | assign x = a & b; |
| 13 | assign y = (a)?b:x; |
| 14 | |
| 15 | always @(posedge clk) |
| 16 | begin |
| 17 | c = ~x + c; |
| 18 | end |
| 19 | endmodule |
| 20 | |
| 21 |
Note: See TracBrowser
for help on using the repository browser.
![(please configure the [header_logo] section in trac.ini)](/trac/verif_tools/chrome/site/your_project_logo.png)