Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Farshad Chowdhury
  3. Verification of Digital Systems
  4. Testbench for SRT
  5.  
  6. Purpose: This test bench was written to verify each transactor of the synchronous reciver transmitter.
  7. This test bench was designed to test and verify the given code for the SRT to the given spec. This test stimulates the code
  8. and ensures the code behaves in matter that correspeonds to the given software spec. This will ensure that there are no bugs
  9. or unexpected behavoir.
  10.  
  11. */
  12.  
  13. `timescale 1ns/1ns
  14.  
  15.  
  16. module testbench;
  17. integer i; //clock int
  18.    reg       srt_clk_in;     // Clock Input
  19.    reg      srt_rst_l_in;   // Active Low Reset Input
  20.    // Bus Interface
  21.    reg       srt_en_l_in;    // Active Low Bus Enable Input
  22.    reg       srt_wr_l_in;    // Active Low Bus Enable Input
  23.    reg       srt_rd_l_in;    // Active Low Bus Enable Input
  24.    reg [4:0] srt_addr_in;    // Address Input
  25.    reg [7:0] srt_data_inout; // Bidirectional Data Bus
  26.    // Serial Interface
  27.    reg       srt_ser_in;     // Serial Data Input
  28.    reg      srt_ser_out;     // Serial Data Output
  29.  
  30.   //initialize DUT (SRT)
  31.  
  32.     srt UUT(
  33.         .srt_clk_in(srt_clk_in),    
  34.         .srt_rst_l_in(srt_rst_l_in),  
  35.         .srt_en_l_in(srt_en_l_in),    
  36.         .srt_wr_l_in(srt_wr_l_in),  
  37.         .srt_rd_l_in(srt_rd_l_in),  
  38.         .srt_addr_in(srt_addr_in),  
  39.         .srt_data_inout(srt_data_inout),
  40.         .srt_ser_in(srt_ser_in),    
  41.         .srt_ser_out(srt_ser_out)    
  42.     );
  43.     initial begin
  44.     $monitor(
  45.         srt_clk_in,
  46.         srt_rst_l_in,
  47.         srt_en_l_in,
  48.         srt_wr_l_in,
  49.         srt_rd_l_in,
  50.         srt_addr_in,  
  51.         srt_data_inout,
  52.         srt_ser_in,    
  53.         srt_ser_out
  54.     );
  55.     for( i=0; i<1;i=(i+1)) begin
  56.     srt_clk_in=i;
  57.     end
  58. end
  59.  
  60.    
  61. endmodule // srt_tb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement