123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- // Code your testbench here
- // or browse Examples
-
-
- `timescale 1ns/1ps;
- module tb();
- reg inClk, inEN, inTaste;
- wire outReadTemp;
- wire outTasteAktiv;
-
- reg [7:0] inData;
- reg inEndOfConv;
- wire outDataValid;
- wire [7:0] outData;
-
-
-
- timer t1 (.inClk(inClk),
- .inTaste(inTaste),
- .inEN(inEN),
- .outReadTemp(outReadTemp),
- .outTasteAktiv(outTasteAktiv));
-
-
- parallelport p1 (.inData(inData),
- .inClk(inClk),
- .inTimerMeas(outReadTemp),
- .inEndOfConv(inEndOfConv),
- .outDataValid(outDataValid),
- .outData(outData));
-
-
- always #83 inClk <= ~inClk;
- always #1000000000 inEndOfConv <= ~inEndOfConv;
- always #100000000 inData = inData +1;
-
- initial begin
- //$dumpfile("dump.vcd");
- //$dumpvars;
- inClk <= 0;
- inEN <= 0;
- inTaste <= 0;
-
- inData <= 8'b0;
- inEndOfConv <= 0;
- #1000000000
- inTaste = 1;
- #1000000000
- #1000000000
- #1000000000
- inTaste = 0;
- #1000000000
- inEN <= 1;
- #1000000000
- inEN <= 0;
- #1000000000
-
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- #1000000000
-
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- #1000000000
-
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- #1000000000
-
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- #1000000000
- $stop;
- end
- endmodule
|