Your Ad Here

Thursday, March 12, 2009

Creation of Stimulus using e-language

In order to start verification process, we need to generate the input stimulus defined by protocol for the given DUT (Device under Test) either using a random approach or using a constrained random. To generate the required information we need to declare the struct followed by the corresponding fields. Each field should be of Specific type either predefined or user-defined (e.g enumerated types). To generate the defined fields we make use of Specman elite generator to generate each field with a random value unless it is not constrained. Let’s consider a Network packet having data, length and address, which are to be generated randomly.

Ex : Let's look at the Network Packet Structure definition
file name : packet.e

<’
struct packet_s {

Addr: uint (bits: 2);
Len: uint (bits: 6);
Data: list of byte;

};
‘>


once the struct is defined, it needs to be Instantiated at the specman top level for generation.

Ex : file name top.e

<'
import Packet.e ;

extend sys {

packet : packet_s; // Instantiate the packet struct

};

‘>

No comments:

Post a Comment