Skip to content

Commit 476669c

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

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ class apb_monitor#(`_APB_AGENT_PARAM_DEFS) extends uvm_monitor;
134134
apb_transaction#(`_APB_AGENT_PARAM_MAP) req;
135135

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

169179
endtask : run_phase
170180

171-
endclass : apb_monitor
181+
endclass : apb_monitor

0 commit comments

Comments
 (0)