quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bullet_green_ball.gif Introduction

Like Verilog, VHDL and Specman, Vera also supports all the standard data types and also some advance data types as shown below.

   

space.gif

  • integer
  • register
  • string
  • event
  • Enumerated Types
  • Virtual Ports
  • Arrays
  • Smart Queues
  • Class
  • Coverage Group
   

space.gif

We will be looking this in detail in next few pages with examples.

   

space.gif

   

space.gif

  ../images/main/bulllet_4dots_orange.gif Integer

Integers are signed variables. The upper limit for integer sizes is dependent on the host machine On 32 bit machines, the allowed

   

space.gif

range is between -2,147,483,648 (32'h8000_0000) through 0 to 2,147,483,647 (32'h7FFF_FFFF). An integer may become X (unknown) when it is not initialized or when an undefined value is stored.

   

space.gif

Syntax integer variable_name [=initial_value]; variable_name

   

space.gif

Must be a valid identifier. initial_value Specifies the initial value for the declared variable. If this specification is omitted, the initial value of the declared variable is x (unknown).

   

space.gif

  ../images/main/bullet_star_pink.gif Example : Integer
   

space.gif


  1 program integer_t {
  2   // Declare
  3   integer i;
  4   // Declare and init value
  5   integer j = 0;
  6   // Declare multiple and assign
  7   integer m,n,o,p = 100;
  8   // Print all the values
  9   printf("value of i %d\n",i);
 10   printf("value of j %d\n",j);
 11   printf("value of m %d\n",m);
 12   printf("value of n %d\n",n);
 13   printf("value of o %d\n",o);
 14   printf("value of p %d\n",p);
 15 
 16 }
You could download file integer_t.vr here
   

space.gif

  ../images/main/bullet_star_pink.gif Simulation : Integer
   

space.gif

 value of i           x
 value of j           0
 value of m           x
 value of n           x
 value of o           x
 value of p         100
   

space.gif

   

space.gif

   

space.gif

   

space.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

  

Copyright © 1998-2014

Deepak Kumar Tala - All rights reserved

Do you have any Comment? mail me at:deepak@asic-world.com