-
Notifications
You must be signed in to change notification settings - Fork 0
/
rggen_bus_if.veryl
56 lines (51 loc) · 1.17 KB
/
rggen_bus_if.veryl
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
import rggen_rtl_pkg::*;
pub interface rggen_bus_if #(
param ADDRESS_WIDTH: u32 = 16,
param BUS_WIDTH: u32 = 32,
param STROBE_WIDTH: u32 = BUS_WIDTH / 8
) {
var valid: logic;
var access: rggen_access;
var address: logic<ADDRESS_WIDTH>;
var write_data: logic<BUS_WIDTH>;
var strobe: logic<STROBE_WIDTH>;
var ready: logic;
var status: rggen_status;
var read_data: logic<BUS_WIDTH>;
function ack() -> logic {
return valid && ready;
}
modport master {
valid: output,
access: output,
address: output,
write_data: output,
strobe: output,
ready: input,
status: input,
read_data: input,
ack: import
}
modport slave {
valid: input,
access: input,
address: input,
write_data: input,
strobe: input,
ready: output,
status: output,
read_data: output,
ack: import
}
modport monitor {
valid: input,
access: input,
address: input,
write_data: input,
strobe: input,
ready: input,
status: input,
read_data: input,
ack: import
}
}