Projektdaten für das ESY1B Praktikum im Sommersemester 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

testbench.sv 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // Code your testbench here
  2. // or browse Examples
  3. `timescale 1ns/1ps;
  4. module tb();
  5. reg inClk, inEN, inTaste;
  6. wire outReadTemp;
  7. wire outTasteAktiv;
  8. reg [7:0] inData;
  9. reg inEndOfConv;
  10. wire outDataValid;
  11. wire [7:0] outData;
  12. timer t1 (.inClk(inClk),
  13. .inTaste(inTaste),
  14. .inEN(inEN),
  15. .outReadTemp(outReadTemp),
  16. .outTasteAktiv(outTasteAktiv));
  17. parallelport p1 (.inData(inData),
  18. .inClk(inClk),
  19. .inTimerMeas(outReadTemp),
  20. .inEndOfConv(inEndOfConv),
  21. .outDataValid(outDataValid),
  22. .outData(outData));
  23. always #83 inClk <= ~inClk;
  24. always #1000000000 inEndOfConv <= ~inEndOfConv;
  25. always #100000000 inData = inData +1;
  26. initial begin
  27. //$dumpfile("dump.vcd");
  28. //$dumpvars;
  29. inClk <= 0;
  30. inEN <= 0;
  31. inTaste <= 0;
  32. inData <= 8'b0;
  33. inEndOfConv <= 0;
  34. #1000000000
  35. inTaste = 1;
  36. #1000000000
  37. #1000000000
  38. #1000000000
  39. inTaste = 0;
  40. #1000000000
  41. inEN <= 1;
  42. #1000000000
  43. inEN <= 0;
  44. #1000000000
  45. #1000000000
  46. #1000000000
  47. #1000000000
  48. #1000000000
  49. #1000000000
  50. #1000000000
  51. #1000000000
  52. #1000000000
  53. #1000000000
  54. #1000000000
  55. #1000000000
  56. #1000000000
  57. #1000000000
  58. #1000000000
  59. #1000000000
  60. #1000000000
  61. #1000000000
  62. #1000000000
  63. #1000000000
  64. #1000000000
  65. #1000000000
  66. #1000000000
  67. #1000000000
  68. #1000000000
  69. $stop;
  70. end
  71. endmodule