file name : packet_def.e
<'
packet_kind_t : [ small, medium, large]
'>
file name : packet.e
<’
struct packet_s {
Addr: uint (bits: 32);
Kind: packet_kind_t;
my_method () is {
// define the actions required e.g parity_calculation
};
// call the above mentioned method in run phase
run() is also {
my_method();
};
}; // end of struct def
'>
file name : packet_top.e
<'
import packet_def.e;
import packet.e;
extend sys {
pkt : packet_s ;
};
'>
// Writing the Top Test case for applying constraints
file name : packet_test.e
<'
import packet_top.e;
extend packet_s {
keep soft Kind = = Small ;
keep soft addr in [10..40];
};
‘>
No comments:
Post a Comment