In reply to sagar@aceic.com:
Ex: a1.txt file contains
APB_W 0x23 0x2222
APB_R 0x25
Steps:
1.$fopen: open d file
2. $fscanf: read the first string word. Based on string read the data
3. case (string )
APB_W: $fscanf(“%h %h”, addr,data);
APB_R : $fscanf(“%h”,addr);
4.based on read or write, assing to transcation variables,
req= xx_transction::type_id ::create(req);
`uvm_do_with(req.addr == addr, req.data==data);
** In my case data is like 0x32, so while reading i should decode it as hex 32. So if i assigning to integer it is reading as “0x32” including x also.but i wan it as only 32. so i used 2 state int variable to assign.
Regards,
Sharana