Skip to content

Registers

trentmeester edited this page Dec 14, 2011 · 3 revisions

Register access is controlled by gRegisters and is of type class Registers. It is a global object, which is why it has a ‘g’ prefixed. It is created automatically by the framework and is guaranteed to exist before any test assumes control. It is also a singleton; meaning only 1 object of its kind will ever exist for each running instance of tnvme. The main job of the gRegisters is to control the reading and writing to any register of a DUT. This includes both the PCI address space and the controller's address space which is pointed to by BAR0/BAR1.

For good examples on how to use this singleton to access the PCI address space please reference file tnvme/GrpPciRegisters/allPciRegs_r10b.cpp in function RunCoreTest(). For good examples on how to use this for controller space register access referencing file tnvme/GrpCtrlRegisters/allCtrlRegs_r10b.cpp.

Clone this wiki locally