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).
浙公网安备 33010602011771号