Skip to content

Commit 0a46296

Browse files
author
Ben Davis
committed
Updated to resolve some compile errors discovered
1 parent 6f3df9d commit 0a46296

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
# Tooling directories
55
.dvt/*
6+
.nvim/
7+
.vscode/
68

79
# Documentation Build Files
810
docs/html

proj.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# FastSandPM Manifest
2+
####################################################################################################
3+
[package]
4+
5+
name="apb_agent"
6+
version="0.1.0"
7+
description="An APB UVM Agent"

src/agent/apb_monitor.svh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,16 @@ class apb_monitor#(`_APB_AGENT_PARAM_DEFS) extends uvm_monitor;
133133
if (m_cfg.agent_mode == APB_REQUESTER_AGENT) begin
134134
apb_transaction#(`_APB_AGENT_PARAM_MAP) req;
135135

136-
req = trans.clone();
136+
if (!$cast(req, trans.clone())) begin
137+
`uvm_fatal(
138+
get_type_name(),
139+
$sformatf(
140+
"Unable to cast transaction (%s) to req (%s)",
141+
trans.get_type_name(),
142+
apb_transaction#(`_APB_AGENT_PARAM_MAP)::type_name
143+
)
144+
)
145+
end
137146
req.data = m_vif.pwdata;
138147
req_ap.write(req);
139148
end
@@ -168,4 +177,4 @@ class apb_monitor#(`_APB_AGENT_PARAM_DEFS) extends uvm_monitor;
168177

169178
endtask : run_phase
170179

171-
endclass : apb_monitor
180+
endclass : apb_monitor

0 commit comments

Comments
 (0)