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

Subversion Repositories ahb2wishbone

[/] [ahb2wishbone/] [trunk/] [svtb/] [avm_svtb/] [ahb_wb_top.sv] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 toomuch
// top module
2
`include "../../src/ahb2wb.v"
3
`timescale 1ns/ 1ps
4
 
5
import ahb_wb_pkg::*;
6
import global::*;
7
 
8
module ahb_wb_top;
9
 
10
logic clk ='b0;
11
logic reset ='b1;
12
 
13
        ahb_wb_if inf1(); // interface instance from ahb to bridge
14
        stimulus_gen TB_M(inf1.master_ab,clk,reset); // AHB master instance
15
 
16
        ahb2wb DUT ( // interface connection from AHB(stimulus gen) to bridge
17
                   .hclk(inf1.slave_ab.hclk),
18
                   .hresetn(inf1.slave_ab.hresetn),
19
                   .haddr(inf1.slave_ab.haddr),
20
                   .hwdata(inf1.slave_ab.hwdata),
21
                   .htrans(inf1.slave_ab.htrans),
22
                   .hburst(inf1.slave_ab.hburst),
23
                   .hsize(inf1.slave_ab.hsize),
24
                   .hwrite(inf1.slave_ab.hwrite),
25
                   .hsel(inf1.slave_ab.hsel),
26
                   .hready(inf1.slave_ab.hready),
27
                   .hrdata(inf1.slave_ab.hrdata),
28
                   .hresp(inf1.slave_ab.hresp),
29
                   // interface connection from bridge to wishbone(memory)
30
                   .cyc_o(inf1.master_bw.cyc_o),
31
                   .stb_o(inf1.master_bw.stb_o),
32
                   .we_o(inf1.master_bw.we_o),
33
                   .dat_o(inf1.master_bw.dat_o),
34
                   .adr_o(inf1.master_bw.adr_o),
35
                   .ack_i(inf1.master_bw.ack_i),
36
                   .dat_i(inf1.master_bw.dat_i),
37
                   .clk_i(inf1.master_bw.clk_i),
38
                   .rst_i(inf1.master_bw.rst_i));
39
        ahb_wb_env env; // enviornment class
40
 
41
// reset generation
42
initial
43
        begin
44
                env = new(inf1);
45
                $display ("\n@%0d:Testcase begin",$time);
46
                #13  reset='b0;
47
                #33 reset ='b1;
48
                $display ("\n@%0d:Reset done",$time);
49
                TB_M.initial_setup();
50
                $display ("\n@%0d:Initial setup done",$time);
51
                env.do_test();
52
                $display ("\n@%0d do_test over",$time);
53
                $finish;
54
 
55
        end
56
 
57
//clock generation
58
initial
59
        forever
60
                #(cyc_prd/2)  clk = ~clk;
61
endmodule

powered by: WebSVN 2.1.0

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