Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `timescale 1ns / 1ps
  2.  
  3. ////////////////////////////////////////////////////////////////////////////////
  4. // Company:
  5. // Engineer:Visnovszky Lilla
  6. //
  7. // Create Date:   13:23:08 10/25/2014
  8. // Design Name:   uart
  9. // Module Name:   C:/.Xilinx/uart/test.v
  10. // Project Name:  uart
  11. // Target Device:  
  12. // Tool versions:  
  13. // Description:
  14. //
  15. // Verilog Test Fixture created by ISE for module: uart
  16. //
  17. // Dependencies:
  18. //
  19. // Revision:
  20. // Revision 0.01 - File Created
  21. // Additional Comments:
  22. //
  23. ////////////////////////////////////////////////////////////////////////////////
  24.  
  25. module test;
  26.  
  27.     // Inputs
  28.     reg clk;
  29.     reg rst;
  30.     reg [3:0] bcd0;
  31.     reg [3:0] bcd1;
  32.  
  33.     // Outputs
  34.     wire tx_out;
  35.  
  36.     // Instantiate the Unit Under Test (UUT)
  37.     uart uut (
  38.         .clk(clk),
  39.         .rst(rst),
  40.         .bcd0(bcd0),
  41.         .bcd1(bcd1),
  42.         .tx_out(tx_out)
  43.     );
  44.  
  45.     initial begin
  46.         // Initialize Inputs, alapértékek beállítása
  47.         clk = 0;
  48.         rst = 1;
  49.         bcd0 = 0;
  50.         bcd1 = 0;
  51.  
  52.         // Wait 100 ns for global reset to finish
  53.         #100;
  54.        
  55.         // A születési dátumom kivitele: 04.27.
  56.         rst=0;
  57.         bcd0=4;
  58.         bcd1=0;
  59.         #200;
  60.         bcd0=7;
  61.         bcd1=2;
  62.  
  63.     end
  64. //initial begin
  65. //clk=0;
  66. //rst=1;
  67. //bcd0=4;
  68. //bcd1=0;
  69. //#8;
  70. //rst=0;
  71. //#8
  72. //bcd0=7;
  73. //bcd1=2;
  74. //end
  75.  
  76. //órajel generálása:
  77. always #1
  78. clk<=~clk;
  79. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement