How to create custom indexed imp_port and connect multiple exports to it

Sometimes the RTL being verified contains multiple instances of the same interface, where the prediction process only slightly differs. This snippet will present you with a solution for scalable scoreboard in such cases.

Let’s assume our environment consists of an array of agents of size AGENTS_NUM, each containing a monitor with an export. UVM does not provide a solution to implement a TLM write_() function which would allow a scoreboard to listen to all agents with a single call to it and also make it aware of each agent’s index, so here’s how one can create such a thing.

How_to_create_custom_indexed_imp_port_and_connect_multiple_exports_to_it

This custom uvm_port requires an index in the constructor to pass it later to write(). If provided, as shown below, then the write() function will be called for any seq_item coming from any monitor with index provided to indicate the sender.

How_to_create_custom_indexed_imp_port_and_connect_multiple_exports_to_it_

And connection in env is clean and smooth, as it’s just a for-loop.

Contact Us

Please, enter your details below. We will get back to you as fast as we can.

This website uses cookies to ensure you get the best experience on our website.

Get Cogita

Please, enter your details below. We will get back to you as fast as we can.

Thank you!

We will get in touch soon.

Get a Quote

Please, enter your details below. We will get back to you as fast as we can.