Verification Guild
A Community of Verification Professionals

 Create an AccountHome | Calendar | Downloads | FAQ | Links | Site Admin | Your Account  

Modules
· Home
· Downloads
· FAQ
· Feedback
· Recommend Us
· Web Links
· Your Account

Advertising

Who's Online
There are currently, 24 guest(s) and 2 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

Login
Nickname

Password

Security Code: Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

  
Verification Guild: Forums

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile  ProfileDigest    Log inLog in 

VMm RALF file problem

 
Post new topic   Reply to topic    Verification Guild Forum Index -> Main
View previous topic :: View next topic  
Author Message
hearmy339
Newbie
Newbie


Joined: Jan 13, 2010
Posts: 3

PostPosted: Thu Jan 14, 2010 9:38 pm    Post subject: VMm RALF file problem Reply with quote

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
View user's profile
thinkver
Senior
Senior


Joined: Jun 26, 2009
Posts: 89

PostPosted: Wed Feb 03, 2010 9:11 am    Post subject: Re: VMm RALF file problem Reply with quote

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
View user's profile Send e-mail Visit poster's website
Janick
Site Admin
Site Admin


Joined: Nov 29, 2003
Posts: 1317
Location: Ottawa, ON Canada

PostPosted: Wed Feb 03, 2010 10:03 am    Post subject: Re: VMm RALF file problem Reply with quote

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
View user's profile Send e-mail Visit poster's website
hearmy339
Newbie
Newbie


Joined: Jan 13, 2010
Posts: 3

PostPosted: Tue Feb 09, 2010 2:55 am    Post subject: Re: VMm RALF file problem Reply with quote

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. Smile
Back to top
View user's profile
hearmy339
Newbie
Newbie


Joined: Jan 13, 2010
Posts: 3

PostPosted: Tue Feb 09, 2010 2:58 am    Post subject: Re: VMm RALF file problem Reply with quote

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
View user's profile
thinkver
Senior
Senior


Joined: Jun 26, 2009
Posts: 89

PostPosted: Tue Feb 09, 2010 3:49 am    Post subject: Re: VMm RALF file problem Reply with quote

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
View user's profile Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Verification Guild Forum Index -> Main All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Verification Guild © 2006 Janick Bergeron
Web site engine's code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.195 Seconds