OpenCores
URL https://opencores.org/ocsvn/sdr_ctrl/sdr_ctrl/trunk

Subversion Repositories sdr_ctrl

[/] [sdr_ctrl/] [trunk/] [verif/] [tb/] [tb_core.sv] - Diff between revs 53 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 53 Rev 56
Line 68... Line 68...
// Application Interface bus
// Application Interface bus
//-------------------------------------------
//-------------------------------------------
reg                   app_req            ; // Application Request
reg                   app_req            ; // Application Request
reg  [8:0]            app_req_len        ; // Burst Request length
reg  [8:0]            app_req_len        ; // Burst Request length
wire                  app_req_ack        ; // Application Request Ack
wire                  app_req_ack        ; // Application Request Ack
reg [29:0]            app_req_addr       ; // Application Address
reg [24:0]            app_req_addr       ; // Application Address
reg                   app_req_wr_n       ; // 1 -> Read, 0 -> Write
reg                   app_req_wr_n       ; // 1 -> Read, 0 -> Write
reg [dw-1:0]          app_wr_data        ; // Write Data
reg [dw-1:0]          app_wr_data        ; // Write Data
reg [dw/8-1:0]        app_wr_en_n        ; // Write Enable, Active Low
reg [dw/8-1:0]        app_wr_en_n        ; // Write Enable, Active Low
wire                  app_rd_valid       ; // Read Valid
wire                  app_rd_valid       ; // Read Valid
wire                  app_last_rd        ; // Last Read Valid
wire                  app_last_rd        ; // Last Read Valid
Line 476... Line 476...
          @ (negedge sdram_clk);
          @ (negedge sdram_clk);
 
 
       $display("Status: Burst-No: %d  Write Address: %x  WriteData: %x ",i,Address,app_wr_data);
       $display("Status: Burst-No: %d  Write Address: %x  WriteData: %x ",i,Address,app_wr_data);
   end
   end
   app_req           = 0;
   app_req           = 0;
   app_wr_en_n       = 4'hF;
   app_wr_en_n    = 'hx;
 
   app_req_wr_n   = 'hx;
 
   app_req_addr   = 'hx;
 
   app_req_len    = 'hx;
 
 
 
 
end
end
endtask
endtask
 
 
Line 493... Line 496...
begin
begin
 
 
   Address = afifo.pop_front();
   Address = afifo.pop_front();
   bl      = bfifo.pop_front();
   bl      = bfifo.pop_front();
 
 
 
   @ (negedge sdram_clk);
   app_req        = 1;
   app_req        = 1;
   app_wr_en_n    = 0;
   app_wr_en_n    = 0;
   app_req_wr_n   = 1;
   app_req_wr_n   = 1;
   app_req_addr   = Address[29:2];
   app_req_addr   = Address[29:2];
   app_req_len    = bl;
   app_req_len    = bl;
Line 505... Line 509...
      do begin
      do begin
          @ (posedge sdram_clk);
          @ (posedge sdram_clk);
      end while(app_req_ack == 1'b0);
      end while(app_req_ack == 1'b0);
      @ (negedge sdram_clk);
      @ (negedge sdram_clk);
      app_req           = 0;
      app_req           = 0;
 
      app_wr_en_n    = 'hx;
 
      app_req_wr_n   = 'hx;
 
      app_req_addr   = 'hx;
 
      app_req_len    = 'hx;
 
 
      for(j=0; j < bl; j++) begin
      for(j=0; j < bl; j++) begin
         wait(app_rd_valid == 1);
         wait(app_rd_valid == 1);
         exp_data        = dfifo.pop_front(); // Exptected Read Data
         exp_data        = dfifo.pop_front(); // Exptected Read Data
         if(app_rd_data !== exp_data) begin
         if(app_rd_data !== exp_data) begin

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.