summaryrefslogtreecommitdiff
path: root/mk/builtin/peakrdl_intfs/avalon_mm_intf.sv
blob: 1d3d0c3f0f9608762f7f812942e06d9f0a8bcbe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
interface avalon_mm_intf #(
    parameter DATA_WIDTH = 32,
    parameter ADDR_WIDTH = 32 // Important! Avalon uses word addressing
);
    // Command
    logic read;
    logic write;
    logic waitrequest;
    logic [ADDR_WIDTH-1:0] address;
    logic [DATA_WIDTH-1:0] writedata;
    logic [DATA_WIDTH/8-1:0] byteenable;

    // Response
    logic readdatavalid;
    logic writeresponsevalid;
    logic [DATA_WIDTH-1:0] readdata;
    logic [1:0] response;

    modport host (
        output read,
        output write,
        input waitrequest,
        output address,
        output writedata,
        output byteenable,

        input readdatavalid,
        input writeresponsevalid,
        input readdata,
        input response
    );

    modport agent (
        input read,
        input write,
        output waitrequest,
        input address,
        input writedata,
        input byteenable,

        output readdatavalid,
        output writeresponsevalid,
        output readdata,
        output response
    );
endinterface