| View previous topic :: View next topic |
| Author |
Message |
hearmy339 Newbie


Joined: Jan 13, 2010 Posts: 3
|
Posted: Thu Jan 14, 2010 9:38 pm Post subject: VMm RALF file problem |
|
|
Hi, everyone.
I am a new verification engineer. Currently we have met a trouble in doing register read/write test by using VMM ralf file. The IP we are verifying has some registers which share the same base address but have different fields structure, for a simple example:
1. register A and register B are both using 0x1000_0000 as base address,
2. bit 27 is used by register A as RW attribute, but bit 27 is not used by register B as writing has no effect, reading return with 0 attribute.
If we make a ralf file for REG A, and case if IP internally select REG B, the register read/write test will fail.
If we make a ralf file for REG B, then the bit 27 of register A will be bypassed without testing.
Should we make two ralf files? How to solve this problem?
Thanks! |
|
| Back to top |
|
 |
thinkver Senior


Joined: Jun 26, 2009 Posts: 89
|
Posted: Wed Feb 03, 2010 9:11 am Post subject: Re: VMm RALF file problem |
|
|
| hearmy339 wrote: | | some registers which share the same base address but have different fields structure |
How does the chip know what register is being accessed? _________________ Yaron Ilani
yaron@thinkverification.com |
|
| Back to top |
|
 |
Janick Site Admin


Joined: Nov 29, 2003 Posts: 1317 Location: Ottawa, ON Canada
|
Posted: Wed Feb 03, 2010 10:03 am Post subject: Re: VMm RALF file problem |
|
|
| hearmy339 wrote: | | Should we make two ralf files? How to solve this problem? |
Remember that a RALF file is a TCL file.
You can use TCl commands and expressions to modify the interpretation of a RALF file according to the desired context or use.
Of course, if that interpretation can be changed dynamically at run-time, then you need to implement the mirroring behavior using callback extensions and the predict() methods. |
|
| Back to top |
|
 |
hearmy339 Newbie


Joined: Jan 13, 2010 Posts: 3
|
Posted: Tue Feb 09, 2010 2:55 am Post subject: Re: VMm RALF file problem |
|
|
| Janick wrote: | | hearmy339 wrote: | | Should we make two ralf files? How to solve this problem? |
Remember that a RALF file is a TCL file.
You can use TCl commands and expressions to modify the interpretation of a RALF file according to the desired context or use.
Of course, if that interpretation can be changed dynamically at run-time, then you need to implement the mirroring behavior using callback extensions and the predict() methods. |
Thanks for your help! I will try.  |
|
| Back to top |
|
 |
hearmy339 Newbie


Joined: Jan 13, 2010 Posts: 3
|
Posted: Tue Feb 09, 2010 2:58 am Post subject: Re: VMm RALF file problem |
|
|
| thinkver wrote: | | hearmy339 wrote: | | some registers which share the same base address but have different fields structure |
How does the chip know what register is being accessed? |
There is a register C which could configure the IP to choose REG A or REG B before IP starts to work. |
|
| Back to top |
|
 |
thinkver Senior


Joined: Jun 26, 2009 Posts: 89
|
Posted: Tue Feb 09, 2010 3:49 am Post subject: Re: VMm RALF file problem |
|
|
| hearmy339 wrote: | | thinkver wrote: | | hearmy339 wrote: | | some registers which share the same base address but have different fields structure |
How does the chip know what register is being accessed? |
There is a register C which could configure the IP to choose REG A or REG B before IP starts to work. |
If this is a static configuration I'd look into generating the RAL model just before compilation (use a pre-processing script). I'm not sure if RALF supports compile directives - Janick can probably tell us.
If register C might be changed during simulation I'd model those two registers in my reference model and use the predict() and other API functions as Janick suggested above. The first method is simple, and keeps the inner field structure. The latter might make you lose any field structure when accessing the reg ("flat" register).
I hope this helps. Would love to hear other thoughts/suggestions. _________________ Yaron Ilani
yaron@thinkverification.com |
|
| Back to top |
|
 |
|