The Agent
Hands-on to implement a simple UVM ambient with RAL
The Agent
Okay, focusing in the RAL components that will be in agent, we have basically two main objectives:
Instantiate the adapter
Build it in
build_phase()
This is very simple, the agent with only these two elements:
class cthulhu_agent extends uvm_agent;
`uvm_component_utils(cthulhu_agent)
cthulhu_adapter m_adapter;
function new(string name, uvm_component parent);
super.new(name, parent);
endfunction : new
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
m_adapter = cthulhu_adapter.type_id::create("m_adapter");
endfunction : build_phase
We can see that it is the same proccess to insert any component in agent. The complete code of agent is located in Source Code page. Now, the ambient is something like this:
CC BY-SA 4.0 João Pedro Melquiades Gomes. Last modified: February 02, 2023. Website built with Franklin.jl and the Julia programming language.