-
Notifications
You must be signed in to change notification settings - Fork 7
/
reg_intf_pkg.sv
56 lines (50 loc) · 2.07 KB
/
reg_intf_pkg.sv
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
47
48
49
50
51
52
53
54
55
56
// Copyright 2018 ETH Zurich and University of Bologna.
// Copyright and related rights are licensed under the Solderpad Hardware
// License, Version 0.51 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
// or agreed to in writing, software, hardware and materials distributed under
// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
//
// Florian Zaruba <[email protected]>
/// A simple register interface.
///
/// This is pretty much as simple as it gets. Transactions consist of only one
/// phase. The master sets the address, write, write data, and write strobe
/// signals and pulls valid high. Once pulled high, valid must remain high and
/// none of the signals may change. The transaction completes when both valid
/// and ready are high. Valid must not depend on ready. The slave presents the
/// read data and error signals. These signals must be constant while valid and
/// ready are both high.
package reg_intf;
/// 32 bit address, 32 bit data request package
typedef struct packed {
logic [31:0] addr;
logic write;
logic [31:0] wdata;
logic [3:0] wstrb;
logic valid;
} reg_intf_req_a32_d32;
/// 32 bit address, 64 bit data request package
typedef struct packed {
logic [31:0] addr;
logic write;
logic [63:0] wdata;
logic [7:0] wstrb;
logic valid;
} reg_intf_req_a32_d64;
/// 32 bit Response packages
typedef struct packed {
logic [31:0] rdata;
logic error;
logic ready;
} reg_intf_resp_d32;
/// 32 bit Response packages
typedef struct packed {
logic [63:0] rdata;
logic error;
logic ready;
} reg_intf_resp_d64;
endpackage