Skip to content

Commit 3ca268b

Browse files
committed
Add some basic protocols
1 parent 4613a6a commit 3ca268b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

protocols/tests/wishbone_manager/wishbone_manager.prot

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,28 @@ struct WBManager {
2626
in i_wb_err: u1,
2727
in i_wb_data: u32
2828
}
29+
30+
31+
prot reset() {
32+
DUT.i_reset := 1'b1;
33+
34+
// Manager sets `cyc` & `stb` both to 0
35+
assert_eq(DUT.o_wb_cyc, 1'b0);
36+
assert_eq(DUT.o_wb_stb, 1'b0);
37+
38+
// Reset means manager is no longer busy
39+
assert_eq(DUT.o_cmd_busy, 1'b0);
40+
41+
// `o_rsp_stb` is 0 since the output doesn't reference a codeword
42+
assert_eq(DUT.o_rsp_stb, 1'b0);
43+
44+
step();
45+
}
46+
47+
#[idle]
48+
prot idle() {
49+
DUT.i_cmd_stb = 1'b1;
50+
assert_eq(DUT.o_cmd_busy, 1'b0);
51+
step();
52+
}
53+

0 commit comments

Comments
 (0)