Jump to content

Recommended Posts

  • 2 weeks later...
  • 1 month later...

Hi All

In my transection class I have int , enum , structure. I am using the field macros which is placed inside of the `ovm_object_utils_begin and 'ovm_object_utils_end macro blocks. I am not very sure which field micro to use for the structure. can i use `ovm_field_object for the same.

typedef enum { NOP, WRITE, READ } ocp_Mcmd_enum;

typedef struct 
{
bit bAssignedToCh_A;
bit bAssignedToCh_B;
shortint unsigned ulMessageLength;
bit bMessageValid;
bit bPPIndicator;
int unsigned ulHeaderCRC;
}sv_TxBufferData;

class my_transfer extends ovm_sequence_item; 
rand bit [15:0] Maddr;
rand ocp_Mcmd_enum Mcmd;
rand bit [31:0] Mdata;
rand sv_TxBufferData txBuf;

`ovm_object_utils_begin(my_transfer)
`ovm_field_int (Maddr, OVM_ALL_ON)
`ovm_field_enum (ocp_Mcmd_enum, Mcmd, OVM_ALL_ON)
`ovm_field_int (Mdata, OVM_ALL_ON)
//what field macro to use for txBuf;:confused:
`ovm_object_utils_end
function new (string name = " my_transfer_inst", ovm_sequencer_base 
sequencer = null, ovm_sequence parent_seq = null);
super.new(name, sequencer, parent_seq);
endfunction : new

endclass     http://www.besanttechnologies.com/training-courses/php-training/php-training-institute-in-chennai  |   http://www.besanttechnologies.com/training-courses/cloud-computing-training/vmware-training-institute-in-chennai

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...