uvm ahb adapter

1. define ahb_adapter

class ahb_adapter extends uvm_reg_adapter;

define 2 functions:

virtual function uvm_sequence_item reg2bus(const ref uvm_reg_bus_op rw);

virtual function void bus2reg(uvm_sequence_item bus_item, ref uvm_reg_bus_op rw);

reg2bus translates uvm_reg_bus_op into an ahb transacton, while bus2reg doing inversely. notice that, reg2bus should make the ahb transaction as the return value.

2. instantiate ahb_adapter, then add to the ral model by ral_model_h.default_map.set_sequencer(ahb_sequencer_h, adapter_h).

 

posted on 2018-09-03 15:32  lybinger  阅读(803)  评论(0)    收藏  举报

导航