# Layered Agents and Analysis Ports

**URL:** <https://verificationacademy.com/forums/t/layered-agents-and-analysis-ports/31538>\
**Category:** UVM\
**Tags:** UVM, layered-agent-uvm\_analysis\_port\
**Created:** [February 23, 2016, 9:36am UTC](https://verificationacademy.com/forums/t/layered-agents-and-analysis-ports/31538 "2016-02-23T09:36:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phill\_Ferg](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@Phill\_Ferg](https://verificationacademy.com/forums/u/Phill_Ferg)\
**Post date:** [February 23, 2016, 9:36am UTC](https://verificationacademy.com/forums/t/layered-agents-and-analysis-ports/31538/1 "2016-02-23T09:36:17Z")

</div>

I have been watching this great video from Tom:  
[https://verificationacademy.com/sessions/layered-sequences/video/252?play=1](https://verificationacademy.com/sessions/layered-sequences/video/252?play=1)

However i think there is a slight flaw, either that i have misunderstood the setup in the video. Tom discussed having a layered agent which extends uvm\_subscriber.  
He then connects the analysis\_export of this class into the monitor component(also a uvm\_subscriber). The intention here is provide access to the implementation of the write() method from the monitor to the analysis\_export on the layered agent.

This seems sensible… however, if you extend uvm\_subscriber you need to overwrite the write() method. This is in conflict by connecting analysis\_export.connect(m\_mon.analysis\_export) in the connect\_phase() of the layered agent.

My solution thoughts: turn the layered agent into a uvm\_component with an additional uvm\_analysis\_export then connect that post as the example or maintain the layered agent being a uvm\_subscriber and call the write() method of the m\_mon from within the write() method of the layered agent.
