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

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [core/] [wishbone/] [testbecnh/] [dev_pb_wishbone_ctrl/] [sim/] [wb_slave_if.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dsmv
//////////////////////////////////////////////////////////////////////////////////
2
// Company:         ;)
3
// Engineer:        Kuzmi4
4
// 
5
// Create Date:     14:39:52 05/19/2010 
6
// Design Name:     
7
// Module Name:     wb_slave_if
8
// Project Name:    DS_DMA
9
// Target Devices:  no
10
// Tool versions:   any with SV support
11
// Description: 
12
//
13
//
14
// Revision: 
15
// Revision 0.01 - File Created
16
//
17
//////////////////////////////////////////////////////////////////////////////////
18
 
19
interface wb_slave_if # (parameter time pt_Tdly = 1ns )
20
(
21
    input   i_clk, input i_rst
22
);
23
//////////////////////////////////////////////////////////////////////////////////
24
    // WB SLAVE Input signals:
25
    logic   [31:0]  iv_wbs_addr;
26
    logic   [63:0]  iv_wbs_data;
27
    logic   [ 7:0]  iv_wbs_sel;
28
    logic           i_wbs_we;
29
    logic           i_wbs_cyc;
30
    logic           i_wbs_stb;
31
    logic   [ 2:0]  iv_wbs_cti;     // Cycle Type Identifier Address Tag
32
    logic   [ 1:0]  iv_wbs_bte;     // Burst Type Extension Address Tag
33
    // WB SLAVE Output signals:
34
    logic   [63:0]  ov_wbs_data;    // 
35
    logic           o_wbs_ack;      // 
36
    logic           o_wbs_err;      // error input - abnormal cycle termination
37
    logic           o_wbs_rty;      // retry input - interface is not ready
38
    //  WB SLAVE IRQ Output signals:
39
    logic           o_wds_irq_0;
40
    logic   [ 1:0]  ov_wbs_irq_dmar;
41
 
42
//////////////////////////////////////////////////////////////////////////////////
43
//
44
// Define Clocking block:
45
//
46
default clocking cb @(posedge i_clk);
47
    default input #(pt_Tdly) output #(pt_Tdly);
48
    output ov_wbs_data, o_wbs_ack, o_wbs_err, o_wbs_rty, o_wds_irq_0, ov_wbs_irq_dmar;
49
    input iv_wbs_addr, iv_wbs_data, iv_wbs_sel, i_wbs_we, i_wbs_cyc, i_wbs_stb, iv_wbs_cti, iv_wbs_bte;
50
endclocking
51
//////////////////////////////////////////////////////////////////////////////////
52
//
53
// Tasks:
54
//
55
// Init DATA_OUT
56
task    init;
57
    //
58
    ov_wbs_data     <= 0;
59
    o_wbs_ack       <= 0;
60
    o_wbs_err       <= 0;
61
    o_wbs_rty       <= 0;
62
    o_wds_irq_0     <= 0;
63
    ov_wbs_irq_dmar <= 0;
64
    //
65
endtask
66
 
67
task run;
68
    //
69
 
70
    //
71
endtask
72
 
73
/*
74
task rx_1_word(output [31:0] iv_addr, output [63:0] iv_data);
75
    //
76
 
77
    //
78
endtask
79
//
80
task rx_512_word(output [31:0] iv_addr, output [63:0] iv_data [512]);
81
    //
82
 
83
    //
84
endtask
85
//
86
task tx_1_word(input [31:0] iv_addr, input [63:0] iv_data);
87
    //
88
 
89
    //
90
endtask
91
//
92
task tx_512_word(input [31:0] iv_addr, input [63:0] iv_data [512]);
93
    //
94
 
95
    //
96
endtask
97
*/
98
task set_irq_0(input i_irq_0);
99
    cb.o_wds_irq_0 <= i_irq_0;
100
endtask
101
// 
102
task set_irq_dmar(input [1:0] iv_irq_dmar);
103
    cb.ov_wbs_irq_dmar <= iv_irq_dmar;
104
endtask
105
//////////////////////////////////////////////////////////////////////////////////
106
//
107
// Functions:
108
//
109
// 
110
function automatic get_irq_0;
111
    return o_wds_irq_0;
112
endfunction
113
//
114
function automatic bit [1:0] get_irq_dmar;
115
    return ov_wbs_irq_dmar;
116
endfunction
117
//////////////////////////////////////////////////////////////////////////////////
118
endinterface

powered by: WebSVN 2.1.0

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