ManMe Posted February 5, 2013 Report Posted February 5, 2013 (edited) Is it possible to implement analysis port in user call back class? or is it possible to implement only in component derived from uvm_component? Edited February 6, 2013 by ManMe Quote
jadec Posted February 12, 2013 Report Posted February 12, 2013 uvm_analysis_imp requires that the implementation be a component, but uvm_analysis_port can be instantiated outside of a component: uvm_analysis_port #( my_obj ) myport = new( "myport", null ); It might make debugging more difficult, but the port functionality doesn't require it. Quote
tfitz Posted February 14, 2013 Report Posted February 14, 2013 While it is possible to instantiate an analysis_port outside of a component, as jadec shows, it's not recommended. Perhaps if you could describe what you're ultimately trying to achieve, we might be able to suggest a better alternative. Quote
basili Posted July 7, 2022 Report Posted July 7, 2022 Apologies for the necropost, but I'm trying to do the same the OP is doing. I have a VIP that exposes a callback to access its internal states and I want to pack that state into a transaction and transfer it to a subscriber for some further processing. I've described the usecase here: https://verificationacademy.com/forums/uvm/analysis-port-wrapped-callback but unfortunately not many answers so far... Anyone from this forum open to chime in? Quote
David Black Posted July 7, 2022 Report Posted July 7, 2022 If you understand SystemVerilog class-based syntax properly, you will see that you simply are describing a UVM subscriber. You could alternatively use the general purpose UVM callback mechanism. Quote
basili Posted July 11, 2022 Report Posted July 11, 2022 On 7/7/2022 at 2:48 PM, David Black said: you simply are describing a UVM subscriber. Hi David, I'm not entirely sure to understand what you mean. A UVM subscriber is essentially a uvm_component with an associated analysis_export at my disposal. My VIP exposes a callback (not an analysis_port) so how can I 'attach' the analysis_export of my subscriber to my callback? My preferred way would be to instantiate an analysis_port in my callback and have it connected to my subscriber analysis_export. Alternatively I could get the handle of subscriber in my callback and simply pass the transaction to the subscriber write function, without going through proper port connection, but I find this strategy less than ideal. On 7/7/2022 at 2:48 PM, David Black said: You could alternatively use the general purpose UVM callback mechanism. I'm not sure what you mean by that, although I do understand what's the general purpose callback mechanism in UVM. My VIP already has a callback that's executed right before the packet is to be transmitted onto the interface and therefore it gives us the possibility to check/modify several attributes of the packet. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.