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, 30 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 

Verificaton Methodologies: Testbench's Tyranny

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


Joined: Jul 03, 2008
Posts: 13

PostPosted: Thu Jul 03, 2008 11:04 pm    Post subject: Verificaton Methodologies: Testbench's Tyranny Reply with quote

As a new commer to the SoC Verificaton world at my thirties, I always maintain a gut feeling that there is something wrong with the current practice of simulation based verification. This kindom is obviously under the tyranny of Testbenches (TB). But TB is only the ``vehicle'' to transform more abstract test-cases to more concrete ones. TB is not the ``source'' of the intelligence required in verification. Rolling Eyes

Forgetting that THEMSELVES are really the source of intelligence, verification engineers seem happily tolerate and even enjoy TB's tyranny. They anxiously talk about

. The goodness of seperating HVLs with HDLs
. The OOP style in the HVLs
. The importance of a sophisticated, layered TB structure
. The comparison ``verification methodologies'' (AVM, VVM, OVM, RVM, eVM)

The EDA vendors, propagandize so many ``verification methodologies'', but to me, they are just the ``conventions'' (or even ``regulations'') to construct TBs. (And they want us to buy their ``regulations''! Twisted Evil ). And one of the nightmares for verification engineers is that the conventions always get replaced by newer conventions, so they are not real ``conventions'' at all! Shocked

What on earth is the good of ``OOP, Layered'' TB to a DUT, which is written in plain Verilog modules/VHDL processes ready for synthesis? Shouldn't we focus more on abstract test-cases for DUT rather than on how to polish the already very fanciful TB? After all, the TB is not native to a DUT.
Back to top
View user's profile
stephenh
Senior
Senior


Joined: Jan 06, 2006
Posts: 42
Location: Bristol, England

PostPosted: Fri Jul 04, 2008 8:50 am    Post subject: Reply with quote

I guess the simplest answer is that no matter how intelligent the verification engineer is, there is never enough time, nor enough engineers, to allow the manual creation of all those tests for corner cases, use cases and such like.
The spangly OOP type testbenches are all trying to a greater or lesser extent to provide automation whereby the clever engineer can describe those abstract test cases and let the testbench worry about the stimulus, the checking and the coverage.
So your last paragraph actually answers your question - it's all about abstraction and productivity.

Of course a lot of things complicate matters along the way, such as rapidly growing chip complexity, which leads to the need for more advanced methodology all the time.
And of course the chip industry suffers from perhaps an excessive amount of not-invented-here syndrome, bigotry, and being a very small industry in terms of head count, each person can make a lot of noise, whether or not they have anything informed or constructive to say! Razz

I'll get off my soap-box now before I start to rant Wink
Back to top
View user's profile
glb
Senior
Senior


Joined: Feb 02, 2005
Posts: 114

PostPosted: Fri Jul 04, 2008 10:27 am    Post subject: Re: Verificaton Methodologies: Testbench's Tyranny Reply with quote

xxx wrote:
...
Shouldn't we focus more on abstract test-cases for DUT rather than on how to polish the already very fanciful TB? After all, the TB is not native to a DUT.


Yes, we should - after all the test-cases are the "goal". But somewhere the rubber has to meet the road. How well and painlessly that happens depends on execution/implementation.

The way I see it, the fancy tools/conventions will liberate the engineer, and let him concentrate more on the goal. Unless you're in a situation where one guy "architects" the testcases, and other implements, then you need to be good at both determining the "goal" and executing it.

I guess there's still a lot of growing/pains and acceptance going on to adopt the newer paradigms, so that has eveyone's attention for the last few years. It probably appears that we're missing the forest for the trees.

I hope I understood your point-of-view and this makes senes.

Thanks.
Back to top
View user's profile
xxx
Senior
Senior


Joined: Jul 03, 2008
Posts: 13

PostPosted: Fri Jul 04, 2008 9:27 pm    Post subject: Re: Verificaton Methodologies: Testbench's Tyranny Reply with quote

I think I should put it in this way:
For any simulation practice, there are two worlds,
1. The world IN which the simulation is performed, and
2. The world FOR which the simulation is performed.

DUT, obviously is a piece of a HW in the world-2; but it is a piece of a SW in the world-1;
What is TB then? Same thing, HW in the world-2 but SW in world-1;

The purpose for simulation is definitely the behaviou in world-2, So TB, just as DUT, should be largely regarded as HW in world-2. However, the current trend is to emphasize that TB should be equiped with a lot of fancy SW things in the world-1. I am not saying it is totally worthless, but that the overhead is too big: we should focus on HW in world-2, but instead, we are trapped in the SW in the world-1.

Let us have something constructive. I think there is something missing in most verification-methodologies, at least for an SoC DUT. The missing component is the ``The SW in world-2'' -- the SW native to the DUT rather native to the simulation environment as TB is. This kind of SW does not occupy a proper position in most methodologies, but it contributes a huge part of world-2 behaviours.

Of course, we could regard this SW as the behaviour of the DUT HW. But the intrinsic flexibility of SW makes this view very awkward. Let us view world-2 SW in this way:
. It can write values to DUT components, this is its ``Control'' capability;
. It can read values from DUT components, and it can sense DUT components' behaviours in terms of interrupt/exception. These show its ``observation'' capability.

Now that this kind of SW has control and observation capability to a DUT, just like a TB has the similar stuffs on the the DUT, why cannot there be a SW-centric verification methodology similar to the TB-centric verification methodologies?
Back to top
View user's profile
Janick
Site Admin
Site Admin


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

PostPosted: Sat Jul 05, 2008 7:32 am    Post subject: Reply with quote

SW-centric verification methodologies do exist, but they are found mostly in the diagnostic and initial bring-up phases of a system.

They do not offer sufficient controllability and observability on the other interfaces of the design. For example, how could you, from a purely SW-centric view, generate relevant corner-case stimulus on the ethernet port of a networking SoC? Or verify that the outbound traffic is shaped correctly?

And how are you going to decide which test to write and how will you write them in that SW-centric methodology? Directed low-level read/write tests? or will you invest in building a fancy SW-centric TB to create a higher-level of abstraction? or to support constrained random tests?

That's what all those fancy TB methodologies help do.

Next, there is the performance issue. How are you going to run this software? A model of the processor will be really slow but co-simulation reduces the visibility of the DUT to the SW so it becomes difficult to create specific conditions. Using FPGA-based hardware prototypes or emulator boxes create a very long debug cycle which is too cumbersome for the early stages of the verification.
Back to top
View user's profile Send e-mail Visit poster's website
heritageorchard
Senior
Senior


Joined: Feb 22, 2005
Posts: 122
Location: Boston, Ma

PostPosted: Sat Jul 05, 2008 8:37 am    Post subject: TB pains Reply with quote

Hi,

You are on the right track. The really long pole in a product is the software. So, the sooner you can get the DUT into the hands of the SW folks, the better.

I am sure you know that, as far as the SW is concerned, the world is memory reads/writes and interrupts. That's it.

For example, there are two sides to an IO protocol: the wire protocol and the SW programming interface. I call the objects that interface with the wires monitors and BFMs. I call the SW one a SFM (Software Functional Model). It's interface is memory writes and possibly interrupt handlers. Now of course, the memory interface will use a BFM. But there should be a clean separation from the code decides what registers to access versus HOW those memory accesses happen.

Now the above rant assumes that (1) the company sells a HW/SW product and the the SW can exercise the DUT fully (or the DUT is field programmable).

On to Janick's points:

Quote:
For example, how could you, from a purely SW-centric view, generate relevant corner-case stimulus on the ethernet port of a networking SoC?


I have successfully done that for several companies. Janick is 100% correct in that the arrival time of certain interrupts (which may model the outside network or the chips response to DMA's completing, fifo's at certain levels. etc) is critical. One also has to think about the interactions of several frequencies of interrupts. And I do tend to use some "non-SW" code to walk/randomize these frequencies. But that is just the end result of the systems analysis and design of the DUT/SW/Product.


Quote:
Next, there is the performance issue. How are you going to run this software?


Sigh. How many coders must run machine language? I would argue a scant few. My 20+ years has shown that C/C++ execution on the vehicle (the Windows/Linux box) is sufficient. When I managed the ATi 3D team, that is exactly what we did. And our chips were quite successful.

Good Discussion!
_________________
Mike Mintz
www.trusster.com

"Teal and Truss" A multi-vendor, multi-language, open source verification framework
co-author "Hardware Verification with C++", and "Hardware Verification with SystemVerilog"
Back to top
View user's profile Send e-mail Visit poster's website
xxx
Senior
Senior


Joined: Jul 03, 2008
Posts: 13

PostPosted: Sun Jul 06, 2008 1:52 am    Post subject: Reply with quote

Quote:

They do not offer sufficient controllability and observability on the other interfaces of the design. For example, how could you, from a purely SW-centric view, generate relevant corner-case stimulus on the ethernet port of a networking SoC? Or verify that the outbound traffic is shaped correctly?

And how are you going to decide which test to write and how will you write them in that SW-centric methodology? Directed low-level read/write tests? or will you invest in building a fancy SW-centric TB to create a higher-level of abstraction? or to support constrained random tests?



Don't get me wrong, I am not saying SW can do EVERYTHING, and TB can do NOTHING.

What I really complain about TB is that TB-centric methodology should not let TB do things that is not supposed to do by TB. TB is really powerful tool in filling up test details. TB is also the ultimate observer. But TB has intrinsic problems in high-level control to a DUT. Intuitively, TB is EXTERNAL to a DUT. therefore it has intrinsic weakness to manage the parallelism INTERNAL and NATIVE to a DUT.

So what is the importance of DUT internal parallelism? It is the source of numerous corner cases. What entity is most suitable to manage this parallism? Something NATIVE to the DUT. SW is the best candidate, because SW can do that, and SW should do that.

Quote:

SW-centric verification methodologies do exist, but they are found mostly in the diagnostic and initial bring-up phases of a system.


Yes, that is the mundane usage of SW. But the potential of SW has been greatly underestimated, especially when SW is equiped with the capability of interrupt handling. SW is not strong in directly expose specific HW bugs, but it is a powerful parallelism manager. Why not let us increase the abstraction level of SW, in a similar way we increase the abstraction level in TB?

Quote:

Next, there is the performance issue. How are you going to run this software?

Good questions.
I am assuming that you are not talking about the absolute speed in simulating SW. If you agree that SW should be included in simulation, SW should run on DUT no matter how slow it would be. I think you are asking how much SW is doing meaningful verification job. That would be a serious topic in SW-centric methodology.

Again, I am not saying TB-centric methodology is worthless. It is quite useful, and those fancy SW constructs in TB are really interesting. DUT SW and TB should co-operate rather than compete.
Back to top
View user's profile
Sckoarn
Senior
Senior


Joined: May 23, 2007
Posts: 195
Location: Ottawa, Ontario

PostPosted: Mon Jul 07, 2008 7:21 am    Post subject: Reply with quote

I use a primitive TB system at my work due to the tools I am given. Purely a script driven environment written in VHDL. During the past few development cycles I have come to realize that the simulation test bench is only a way to get to FPGA prototyping ASAP. Once you can get your FPGA prototype going, in what ever form, the verification on the design is accelerated greatly. Or is it that SW is now integrating and those bugs are found at an earlier time in the design cycle?

Regardless, the SW group is now developing their SW at real time or at least much better than can be done in simulation. The DUT development team can now run exhaustive iterations, be it random or directed, in much less time than is possible in simulation.

IMHO, in the long run FPGA prototyping will be the only way to go, because of the near real time or real time that can be achieved. The methodology that will win will be the one that enables easy transition from the simulation to the FPGA prototype. The FPGA prototype would house the TB as well, in this up and coming methodology, hence everything will be running as fast as possible.

I consider the software group as my customer, and it is my job to get them a working DUT as fast as possible so that SW development can be done. We all know SW development has the longest time frames, so getting they working on the actual functioning DUT ASAP is a good thing. The SW team will find bugs in the DUT, which is good, find them sooner rather than too late. The FPGA prototyping methods will be the way of the future, no matter what verification language comes to the for front.

Sckoarn ;(
Back to top
View user's profile
dave_whipp
Senior
Senior


Joined: Jan 06, 2004
Posts: 74
Location: Santa Clara, CA

PostPosted: Mon Jul 07, 2008 10:47 am    Post subject: Re: Verificaton Methodologies: Testbench's Tyranny Reply with quote

xxx wrote:
What on earth is the good of ``OOP, Layered'' TB to a DUT, which is written in plain Verilog modules/VHDL processes ready for synthesis? Shouldn't we focus more on abstract test-cases for DUT rather than on how to polish the already very fanciful TB? After all, the TB is not native to a DUT.


glb wrote:
Yes, we should - after all the test-cases are the "goal". But somewhere the rubber has to meet the road. How well and painlessly that happens depends on execution/implementation.


Interesting discussion, but I'd like to disagree on one assumption: the purpose of verification is no more to create test cases than it is to create a testbench: the purpose of verification is to characterize the implementation with respect to the specification. An additional goal is often integrated into verification: validation. Validation asks, irrespective of the spec, does the design have a useful (desirable, profitable) behavior with respect to the target environment. SW-oriented methodologies generally are focused more on validation than on verification.

It is obviously true that, if you spend all your time polishing one aspect (e.g. the testbench), then your methodology is probably unbalanced. On the other hand, if you have a methodology that allows you to complete most of your verification and validation goals without explicitly creating dut-centric testcases then that is a perfectly valid methodology.

The pendulum of modern verification appears to have swung in this direction. At one extreme, formal verification promises the ability to verify (but not validate) small designs without writing a single testcase. At the other extreme, complex environmental models allow us to setup validation scenarios without really caring what the DUT does: you tell the environment to do some interesting things, and rely on the lower layers of the testbench to perform verification with respect to those scenarios.
Back to top
View user's profile Send e-mail Visit poster's website
xxx
Senior
Senior


Joined: Jul 03, 2008
Posts: 13

PostPosted: Mon Jul 07, 2008 8:52 pm    Post subject: Reply with quote

Quote:

I use a primitive TB system at my work due to the tools I am given. Purely a script driven environment written in VHDL. During the past few development cycles I have come to realize that the simulation test bench is only a way to get to FPGA prototyping ASAP. Once you can get your FPGA prototype going, in what ever form, the verification on the design is accelerated greatly.

Exaclty, a primitive TB has the advantage of being easy to be synthesized. So it can accompany DUT in lower abstraction levels. This another part of ``TB reusability'', which an OOP and layered TB would't give (as far as I know).

Focusing on TB construction has actually defocus our attention on the DUT. Intuitively, building a complex TB require comparable (if not more) effort in building a DUT. A (seemingly) silly question would be: how to verify a TB?

Quote:

IMHO, in the long run FPGA prototyping will be the only way to go, because of the near real time or real time that can be achieved. The methodology that will win will be the one that enables easy transition from the simulation to the FPGA prototype. The FPGA prototype would house the TB as well, in this up and coming methodology, hence everything will be running as fast as possible.


I agree with the part that FPGA allows SW be running faster, with reservation that FPGA prototyping is the ONLY way. I believe a general verification methodology should be independent of the simulation platform.

Quote:

SW-oriented methodologies generally are focused more on validation than on verification.

My interpretation of validation and verification is like this:
If DUT is synthesizable, then we are doing verification; Before that stage, we are validating. They are used to find bugs at different abstraction levels. But beyond that I assume they share the same concept: get the DUT right. So I don't quite get why SW cannot contribute implementation verification. A number of bugs exhibit in intricate SW-HW interactions.

Quote:

On the other hand, if you have a methodology that allows you to complete most of your verification and validation goals without explicitly creating dut-centric testcases then that is a perfectly valid methodology.

Totally agreed.
Back to top
View user's profile
glb
Senior
Senior


Joined: Feb 02, 2005
Posts: 114

PostPosted: Wed Jul 09, 2008 1:09 pm    Post subject: Reply with quote

xxx wrote:

...
So I don't quite get why SW cannot contribute implementation verification. A number of bugs exhibit in intricate SW-HW interactions.
...


Who's saying it can't? It always a judgement call as to what's appropriate. That's why they pay us the big, ever eroding to inflation, bucks.

But HVLs and high-level HDLs and associated methodologies are definitely the way to go 9/10 times.
Back to top
View user's profile
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.236 Seconds