Skip to content

Commit

Permalink
Added monitor info when assertion gets triggered
Browse files Browse the repository at this point in the history
Signed-off-by: Anderson Ignacio da Silva <anderson@aignacio.com>
  • Loading branch information
aignacio committed Sep 7, 2024
1 parent abf839d commit a164bfc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
8 changes: 4 additions & 4 deletions cocotbext/ahb/ahb_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# License : MIT license <Check LICENSE>
# Author : Anderson I. da Silva (aignacio) <anderson@aignacio.com>
# Date : 27.10.2023
# Last Modified Date: 15.06.2024
# Last Modified Date: 07.09.2024
import cocotb
import logging
import random
Expand Down Expand Up @@ -85,7 +85,7 @@ async def _monitor_recv(self):
pass
else:
raise AssertionError(
"AHB PROTOCOL VIOLATION: Master.hwdata signal should not change before slave.hready == 1"
f"[{self.bus.name}/{self.name}] AHB PROTOCOL VIOLATION: Master.hwdata signal should not change before slave.hready == 1"
)

# Previous cycle we started a txn and slave was ready, and now it is still ready
Expand All @@ -97,7 +97,7 @@ async def _monitor_recv(self):
slave_error_prev == 0
):
raise AssertionError(
"AHB PROTOCOL VIOLATION: Slave is not following the 2-cyle error response \
f"[{self.bus.name}/{self.name}] AHB PROTOCOL VIOLATION: Slave is not following the 2-cyle error response \
- ARM IHI 0033B.b (ID102715) - Section 5.1.3"
)

Expand Down Expand Up @@ -231,7 +231,7 @@ def _check_signals(self, stable):
pass
else:
raise AssertionError(
f"AHB PROTOCOL VIOLATION: Master.{signal} signal should not change before slave.hready == 1"
f"[{self.bus.name}/{self.name}] AHB PROTOCOL VIOLATION: Master.{signal} signal should not change before slave.hready == 1"
)


Expand Down
2 changes: 1 addition & 1 deletion cocotbext/ahb/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.3"
__version__ = "0.3.4"
31 changes: 16 additions & 15 deletions docs_utils/template.gtkw
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[*]
[*] GTKWave Analyzer v3.4.0 (w)1999-2022 BSI
[*] Sun Dec 10 16:59:29 2023
[*] Fri Sep 6 22:51:52 2024
[*]
[dumpfile] "run_dir/sim_build_icarus_test_ahb_lite_sram_no_errors/ahb_template.fst"
[dumpfile_mtime] "Sun Dec 10 16:52:49 2023"
[dumpfile_size] 1031
[savefile] "/Users/aignacio/projects/cocotbext-ahb/docs_utils/template.gtkw"
[dumpfile] "run_dir/sim_build_icarus_test_ahb_lite_monitor_scoreboard_data_width_32_bits/ahb_template.fst"
[dumpfile_mtime] "Fri Sep 6 22:50:43 2024"
[dumpfile_size] 11612
[savefile] "docs_utils/template.gtkw"
[timestart] 0
[size] 2680 1028
[size] 1896 1028
[pos] 2007 278
*-14.146851 30000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
*-15.647337 32000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 253
[signals_width] 263
[sst_expanded] 1
Expand All @@ -23,21 +23,22 @@ ahb_template.hclk
ahb_template.hsel
@22
ahb_template.haddr[31:0]
@29
ahb_template.hwrite
@28
ahb_template.hwrite
ahb_template.hready_in
ahb_template.hsize[2:0]
ahb_template.hburst[2:0]
@100000028
ahb_template.htrans[1:0]
@28
ahb_template.hready_in
ahb_template.hburst[2:0]
@22
ahb_template.hrdata[31:0]
@28
ahb_template.hwdata[31:0]
@200
-
@29
ahb_template.hready
@28
ahb_template.hresp
@22
ahb_template.hwdata[31:0]
ahb_template.hrdata[31:0]
[pattern_trace] 1
[pattern_trace] 0

0 comments on commit a164bfc

Please sign in to comment.