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.

51 lines
729 B

2 years ago
  1. `timescale 1ns / 1ns
  2. module test_transmitter;
  3. // Inputs
  4. reg clk_50m;
  5. reg rst_n;
  6. reg [7:0] din;
  7. reg wr_en;
  8. wire tx;
  9. wire tx_busy;
  10. wire rxclk_en;
  11. wire txclk_en;
  12. baud_rate_gen baud_rate_gen_impl (
  13. .clk_50m (clk_50m),
  14. .rxclk_en(rxclk_en),
  15. .txclk_en(txclk_en)
  16. );
  17. transmitter transmitter_impl (
  18. .din(din),
  19. .wr_en(wr_en),
  20. .clk_50m(clk_50m),
  21. .clken(txclk_en),
  22. .tx(tx),
  23. .tx_busy(tx_busy)
  24. );
  25. initial begin
  26. // Initialize Inputs
  27. clk_50m = 0;
  28. rst_n = 0;
  29. #10;
  30. rst_n = 1;
  31. #11;
  32. din = 8'h55;
  33. wr_en = 1'b1;
  34. #15;
  35. wr_en = 0;
  36. #300000;
  37. $stop;
  38. end
  39. always #10 clk_50m = ~clk_50m; //20ns 50MHZ
  40. endmodule