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.

tb_Fsm.sv 705B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. `include "Clk_generator.sv"
  2. `include "Fsm.sv"
  3. module tb_Fsm;
  4. wire clk;
  5. logic tim_ready;
  6. logic alarm;
  7. wire adc_en;
  8. wire tim_en;
  9. wire fram_c_en;
  10. wire led_c_en;
  11. Clk_generator clk_gen(.clk(clk));
  12. Fsm myfsm
  13. (
  14. .clk(clk),
  15. .tim_ready(tim_ready),
  16. .alarm(alarm),
  17. .adc_en(adc_en),
  18. .tim_en(tim_en),
  19. .fram_c_en(fram_c_en),
  20. .led_c_en(led_c_en)
  21. );
  22. always @(posedge clk) begin
  23. #1 tim_ready <= ~tim_ready;
  24. end
  25. initial begin
  26. $dumpfile("tb_Fsm.vcd");
  27. $dumpvars(0, tb_Fsm);
  28. #50 $finish;
  29. end
  30. initial begin
  31. #0 tim_ready = 1'b0;
  32. #0 alarm = 1'b0;
  33. end
  34. endmodule