APB RAL Integration Guide: Step-by-Step
APB RAL Integration Guide: Step-by-Step
The sequence starts with defining registers in a specification, followed by creating an IP-XACT representation. This feeds into uvm_reggen to produce RAL classes. The adapter then connects these to the bus protocol (e.g., APB/AXI). Finally, connect the setup to the DUT, enabling a functional path for verification .
The RAL adapter converts abstract operations into concrete bus transactions (apb_tx), which the APB driver then translates into physical pin activity, ensuring register actions reflect correctly on the hardware, facilitating thorough unit testing .
The APB interface facilitates register data transport by providing a standard set of signals like 'pclk', 'psel', 'penable', 'pwrite', 'paddr', 'pwdata', and 'prdata'. These manage the selection, enabling, writing, and address signaling necessary for accessing and manipulating DUT registers .
The final step summary outlines a consistent methodology from register specification to DUT integration, demonstrating flexibility and scalability across different protocols. By changing only the adapter, this approach ensures reliable and standard verification processes are maintained across APB, AXI-Lite, and PCIe .
To connect a register model to an APB sequencer, you must set the default map of the register model to use the sequencer and adapter via regmodel.default_map.set_sequencer(apb_sequencer, adapter). This connection allows register-level operations to initiate corresponding APB bus transactions .
Mirroring in RAL involves maintaining a local copy of register states, mirroring changes from writes and reads. Prediction is used to update this mirror for register changes without bus access, such as status bits set by hardware, ensuring the mirror accurately reflects the real-time state of the system .
Building and locking the RAL model during the build_phase is crucial to prevent accidental runtime modifications. Locking ensures the register map's integrity, allowing only planned updates through appropriate sequences .
The RAL adapter is the bridge between the register world and the bus world. It converts uvm_reg_bus_op objects produced by RAL into apb_tx transactions suitable for the APB bus interface, enabling abstract register operations to result in actual bus activity .
IP-XACT is used because it provides a single definition shared by RTL, firmware, and verification, eliminating manual register coding errors and scaling efficiently to thousands of registers .
Sequences in the UVM environment abstract operations at the register level, interacting with registers and fields rather than bus protocols. This independence allows them to be reused across different verification environments that may use various communication protocols like APB, AXI, or PCIe .