OpenCores
URL https://opencores.org/ocsvn/avalon-wishbone-bridge/avalon-wishbone-bridge/trunk

Subversion Repositories avalon-wishbone-bridge

[/] [avalon-wishbone-bridge/] [trunk/] [UVM/] [tb.sv] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sumanta.ch
//`include "uvm_pkg.sv"
2
//`include "uvm_macros.svh"
3
//`include "avalon_m_if.sv"
4
//`include "av_test_pkg.sv"
5
//`include "../Download/uvm_agents-master/src/wishbone_b3/wishbone_b3_if.sv"
6
//`include "../../av2wb/av2wb.sv"
7
import env_pkg::*;
8
module tb;
9
logic clock,rst_n;
10
logic [0:2] S;
11
logic x;
12
integer count=0;
13
 
14
wb_if #(32,64,2) wb(clock,rst_n);
15
avalon_if #(32,64,2) av(clock,rst_n);
16
//always @(posedge clock) begin
17
//      if(count==3) count<=0;
18
//      else if(wb.stb && wb.cyc) count<=count+1;
19
//      else count<=count;
20
//end
21
//assign wb.ack=count[1] && count[0];
22
//assign wb.ack=wb.stb && wb.cyc;
23
//assign dut_if_h.slave.read=1'b1;
24
//assign dut_if_h.slave.read=1'b1;
25
av2wb  i_dut(clock,rst_n,av,wb);
26
 
27
import uvm_pkg::*;
28
import questa_uvm_pkg::*;
29
import av_test_pkg::*;
30
 
31
 
32
initial begin rst_n<=1'b0;#10 rst_n<=1'b0;#20 rst_n<=1'b1; end
33
always begin
34
        clock<=1'b0 ;
35
        forever
36
        #10 clock=~clock;
37
end
38
 
39
 
40
initial begin
41
 
42
//uvm_config_db#(virtual dut_if)::set(null,"*.dut_agent_h.*","dut_if",dut_if_h);
43
//                                   cntxt,inst_name,field_name,value
44
uvm_config_db#(int)            ::set(null, "", "recording_detail", 400);
45
uvm_config_db#(uvm_bitstream_t)::set(null, "", "recording_detail", 400);
46
//uvm_config_db#(virtual avalon_if #(32,64,2))::set(null,"uvm_test_top.av_env_h.av_agent_h","DUT_IF",av);
47
uvm_config_db#(virtual avalon_if #(32,64,2))::set(null,"uvm_test_top.m_env.av_agent_h","DUT_IF",av);
48
uvm_config_db #(virtual wb_if#(32,64,2))::set(null, "uvm_test_top", "WB_vif" , wb);
49
// cntxt null becasue tb is a module not a class.
50
run_test("test");
51
end
52
always@* begin
53
#10000 rst_n<=1'b0;
54
#10000 clock<=1'b0;
55
end
56
 
57
endmodule

powered by: WebSVN 2.1.0

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