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

Subversion Repositories apb2spi

[/] [apb2spi/] [trunk/] [tb/] [tb_top.sv] - Blame information for rev 23

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 23 vlnaran
`include "uvm_macros.svh"
2
`include "defines.v"
3
`include "prj_pkg.sv"
4
 
5
module tb_top;
6
 
7
import uvm_pkg::*;
8
import prj_pkg::*;
9
 
10
apb_if apb_if1();
11
spi_if spi_if1();
12
 
13
APB_SPI_top A1(
14
 .PCLK   (apb_if1.PCLK),
15
 .PRESETn(apb_if1.PRESETn),
16
 .PADDR  (apb_if1.PADDR),
17
 .PWRITE (apb_if1.PWRITE),
18
 .PSEL   (apb_if1.PSEL),
19
 .PENABLE(apb_if1.PENABLE),
20
 .PWDATA (apb_if1.PWDATA),
21
 .PRDATA (apb_if1.PRDATA),
22
 .PREADY (apb_if1.PREADY),
23
 .TrFr   (apb_if1.TrFr),
24
 .SCLK   (spi_if1.SCLK),
25
 .MISO   (spi_if1.MISO),
26
 .MOSI   (spi_if1.MOSI),
27
 .SS     (spi_if1.SS)
28
);
29
 
30
initial
31
begin
32
        uvm_config_db#(virtual apb_if)::set(null,"*","apb_vif",apb_if1);
33
        uvm_config_db#(virtual spi_if)::set(null,"*","spi_vif",spi_if1);
34
end
35
 
36
initial
37
begin
38
        apb_if1.PCLK = 1'b0;
39
        apb_if1.PRESETn = 1'b0;
40
        #20 apb_if1.PRESETn = 1'b1;
41
        #5 forever apb_if1.PCLK = ~apb_if1.PCLK;
42
        #100 $finish;
43
end
44
 
45
 
46
endmodule

powered by: WebSVN 2.1.0

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