Jump to content


Recommended Posts

Thanks Dave.

Here is my real concern. I set an initial value of flag in build_phase of upper layer component. Down component is also getting the value using get function build_phase. Now my upper level component may change this flag multiple time in run_phase. Can I see that updated value in lower level without calling get in run_phase?

Link to comment
Share on other sites

Okay Dave. Let me try explaining a better way.

I have two components C1 and C2. they both run state machine individually based on the transactions they are receiving plus the value of flags, which are shared between them. In both state machines one of the state in each is programming. When C1 is programming(signal c1_active) C2 can not program. c1_active,which is shared signal, prevents C2 from programming. and When C2 is programming(signal c2_active) and C1 ask to program C2 will quit(disable c2_active) and C1 will start programming. So C1 should be able to set c1_active, C2 should be able to set c2_active, C1 should be able to disable c2_active, and C2 should be able to read c1_active.

Let me if you have further doubt.

Link to comment
Share on other sites

  • 4 weeks later...

To my understanding, you can use uvm_config_db. Try the following:

1): define a class (calss c1_c2_status), incldue c1_active / c2_active in it.

2): then create an object (c1_c2_status status;) in compoent C1 and C2 (but don't create it).

3): create an object (c1_c2_status status_top) in your env (you need create this object). And in build phase. use uvm_config_db to pass the handle of status_top to C1.status and C2.status.

4): then both compoent C1 an C2 can r/w c1_active, c2_active.

The same as dave_59 has said before. Please see below:

Rather than setting and getting values from the configuration database, it is much more efficient to create a configuration object, use the configuration database to set and get a handle to the object once, and then modify the configuration object members as needed.

See https://verificationacademy.com/cookbook/Config/Overview

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...