In reply to Manirama:
A few things I see here:
(1) class write_seq extends a_sequence#(seq_item);
a_sequences is considered as a base sequence and this should be parameterized with seq_item.
The class definition should be only:
class write_seq extends a_sequence;
(2) You are doing strange things in your body task. First you are randomizing the sequence for some reason I do not understand and then you have dedicated write commands to registers or do you want to assign values to seg_item data_members. Please clarify.
(3) Then you are calling methods which are unnecessary.
Your body task should be like this:
req = seq_item::type_id::create("req");
req.randomize(); // this line only if there are additional data members to be randomized
req.write_awid_i = 4'b0001;
req.write_addr_i = 4'b0000;
req.write_length_i = 4'b0000;
req.write_size_i = 3'b100;
req.write_burst_i = 2'b00;
req.write_lock_i = 2'b00;
req.write_wid_i = 4'b0001;
req.write_datav_i = 1'b1;
req.write_strb_i = 4'b1111;
endtask : body