PDA

View Full Version : what reslove_bindings and do _resolve_bindings for?



ahan
07-04-2008, 06:21 PM
Dear all,
I saw a lot of predefine function in ovm_component.svh.
How can I found the detail application for these function?
Thank you!

kurts
07-07-2008, 11:20 PM
Hi ahan,

When you call connect() on a port to connect it to a channel, the connection is not actually made. Instead, a "notification" is made that this connection needs to happen at a later time. Normally, OVM collects all these notifications from throughout the hierarchy, and then actually makes all the connections at once. This happens just before the end of elaboration phase. OVM does this by calling do_resolve_bindings() from ovm_root.

do_resolve_bindings is a function that traverses the hierarchy and calls resolve_bindings on each child.

resolve_bindings is a virtual function that does nothing for a regular component, but is overridden in ovm_connector to finalize port/export/imp connections. It does this by calling resolve_bindings_all, which traverses the connection chain in the correct order and makes all the handle assignments.


You can find the implementation of resolve_bindings and resolve_bindings_all in ovm_connector_base.svh and you can see the top-level call to do_resolve_bindings in ovm_root.svh. The implementation of do_resolve_bindings is in ovm_component.sv

-Kurt

ahan
07-10-2008, 07:48 AM
Thank you,kurts!