Looking for Verification Language Examples (Vera, e, RAVE) for bus write and read 
Author Message
 Looking for Verification Language Examples (Vera, e, RAVE) for bus write and read

i'm getting ready to evaluate both Specman, VERA, and possibly
Quickbench.  before i call the sales guys, i've been doing some research
for information on High-level Verification Languages .

one thing that i haven't been able to find, though, is a good example
for each of the languages.  most of the info i've read on VERA and 'e'
explain how the language is very powerful but seldom are valid examples
provided (not even in the vendor's spec sheet).  i've never lived in
Missouri, but i'm a big fan of the "show me" mentality.  i think a small
example would be great to back up the strength of the tool.  also, i
think seeing some code, and not just reading about what it looks like,
offers a sense for how easy (or difficult) it is to use the language.

i found part of what i was looking for in Janick's Verification Guild
Archive: a brief example of a bus write procedure using VERA (item 5 at
http://www.*-*-*.com/ ).  the code from that post
follows this message.  after looking at the VERA code for only a minute
or two, it was plain to see what was going on.  thinking about how to do
this in VHDL, i imagined it would take many more than ~25 lines of
code.  perhaps not many more for the general idea of things, but
certainly for good randomization.  i'm not a Verilog user, so i can't
compare the effort needed to reproduce similar stimulus in that
language.  one thing this code is missing (or as far as i can see) is
checking.  but i suppose a readBus() task would be fairly easy to
implement as well.

i'd like to ask users of VERA, Specman, or Quickbench to do one of two
things:

VERA Users : could you write a readBus() task with checking for the
Transaction class?
Specman and Quickbench Users:  could you create, using e or RAVE, the
same stimulus as the VERA code?

Thanks!

--- VERA code follows ---
#include <vera_defines.vrh>

typedef class Transaction;

program myProgram {

   Transaction t;                       // t is of type Transaction

   repeat(100) {                        // write 100 times to the bus
      t = new();                        // random values to bus
      t.writeBus();
   }

   t = new(32'h0000_0000, 32'h1111_afaf);  // write direct value to bus
   t.writeBus();

Quote:
}

class Transaction {

   rand bit[31:0] address;              // allow for address to be
random
   rand bit[31:0] data;                 // allow for data to be random

   constraint c1 {                      // rules for generating address
      address >= 32'h0000_1000;
      address <= 32'h0000_1fff;
   }

   // no rules for data: any value is valid

   task new( (bit[31:0] address = -1), (bit[31:0] data = -1)) {
      void = this.randomize();                  // randomize address,
data
      if (address != -1) this.address = address;
      if (data != -1) this.data = data;
   }

   task writeBus() {
      printf("Writing Bus w/ Addr=%h_%h Data=%h_%h\n",address[31:16],
                                                      address[15:0],
                                                      data[31:16],
                                                      data[15:0]);

      bus.data = data;

      bus.data = 32'hzzzz_zzzz;
   }

Quote:
} // end class Transaction



Sat, 01 Mar 2003 02:47:46 GMT  
 Looking for Verification Language Examples (Vera, e, RAVE) for bus write and read

Micheal:

Let me know if this is what you are looking for.

I have changed a few things.  Moved the randomize task out of the
constructor task new.
fork off the ReadBus process from task new. Include a mailbox to queue
up expected data.
WriteBus puts the data into the mailbox and ReadBus dequeues data and
checks it.

        program MyProgram {
            ........
            repeat(100) {
                        status = t.randomize(); // will randomize the "rand" variables
                        if (status == -1) error("Randomize failed\n");
                        WriteBus();
                        }
            ......
            terminate; //kill of child process
       }

   class Transaction {
        // everything is same except
        integer mbox;

        task new() {

            mbox = alloc(MAILBOX, 0, 1);
            fork { ReadBus(); } join none;

        }

   task ReadBus() {
        integer mboxStatus;

        while (1) {
                mboxStatus = mailbox_get(WAIT, mbox, tExpected, CHECK);
                if (mboxStatus == -1) printf("Error in Mailbox get\n");

                if (tExpected.data !== bus.data) || (tExpected.addr !== bus.addr)
                        error("Mismatch");
        }              
   }



Sat, 01 Mar 2003 08:42:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Looking for Verification Language Examples (Vera, e, RAVE) for bus write and read

2. Comparing Vera to a C/Verilog solution for Design Verification

3. SYSTEMS SCIENCE ANNOUNCES NEW RELEASE OF ITS VERA VERIFICATION SYSTEM

4. VERA verification software for VHDL design

5. using VERA verification software VHDL

6. A useful example for Perl (was Re: Which language can write this but Perl)

7. A useful example for Perl (was Re: Which language can write this but Perl)

8. US-MA Hardware Engineer Verilog, Simulation, Verification, Bus Architecture/Protocols /Recruiter

9. looking for something to write on how to teach LOGO language to children

10. Looking for a simple program written in whatever the language is going to be called ;-)

11. Looking for info on writing own interpretted language...

12. looking for an archive of examples, or a book of examples

 

 
Powered by phpBB® Forum Software