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

Subversion Repositories ahb2wishbone

[/] [ahb2wishbone/] [branches/] [toomuch/] [svtb/] [avm_svtb/] [global.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
// package decleration
2
package global;
3
 
4
parameter  int DWIDTH =32;
5
parameter  int AWIDTH =16;
6
parameter  int cyc_prd = 10;
7
 
8
typedef struct {
9
        rand logic [AWIDTH-1:0]adr;
10
        rand logic [DWIDTH-1:0]dat;
11
        logic [1:0] mode; // htrans
12
        logic wr; // hwrite
13
} ahb_req_pkt;
14
 
15
typedef struct {
16
        rand logic [DWIDTH-1:0]dat;
17
        logic rdy;// hready
18
} ahb_res_pkt;
19
 
20
typedef struct {
21
        bit flag1;
22
        bit flag2;
23
        logic wr;
24
        logic sel;
25
        logic [1:0]mode;
26
        logic [AWIDTH-1:0]adr1;
27
        logic [AWIDTH-1:0]adr2;
28
        logic [DWIDTH-1:0]dat1;
29
        logic [DWIDTH-1:0]dat2;
30
} monitor_pkt;
31
// convert to strings
32
function string convert2string(ahb_req_pkt p);
33
string s;
34
        $sformat(s,"adr:%0d dat:%0d mst_mode:%0d Wr_Rd:%0d",p.adr,p.dat,p.mode,p.wr);
35
        return s;
36
endfunction
37
 
38
 
39
endpackage

powered by: WebSVN 2.1.0

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