soleshka Posted November 8, 2019 Report Share Posted November 8, 2019 Hello Experts, We have implementation of AHB sequence item having hwrada as well hrdata data without any additional override sequence classes for each case. We have implemented (more properly reused what was there) the following generic adapter bus2reg implementation : virtual function void bus2reg(uvm_sequence_item bus_item, ref uvm_reg_bus_op rw); ahb_ivc_seq_item ahb_bus_adapter; if (!$cast(ahb_bus_adapter, bus_item)) begin `uvm_fatal("NOT_AHB_BUS_ADAPTER_TYPE","Provided bus_item is not of the correct type") return; end rw.kind = (!ahb_bus_adapter.ahb_hwrite) ? UVM_READ : UVM_WRITE; rw.addr = ahb_bus_adapter.ahb_haddr; rw.data = ahb_bus_adapter.ahb_hrdata ; rw.n_bits = (ahb_bus_adapter.ahb_hsize == 3'b010) ? 32 : 8; rw.status = UVM_IS_OK; endfunction : bus2reg; Shouldn't there be something like : // rw.data = (!ahb_bus_adapter.ahb_hwrite) ? ahb_bus_adapter.ahb_hrdata : ahb_bus_adapter.ahb_hwdata; instead of the bold line ? As it seems to me the old peace of code was refering to case there is only one data line.. Thank you for any advice , Oleg Greenberg Quote Link to comment Share on other sites More sharing options...
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.