You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trentmeester edited this page Dec 13, 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.
This class is basic C++ which allows reading and writing to hardware. For good examples on how to use this singleton to access the PCI address space try referencing file tnvme/GrpPciRegisters/allPciRegs_r10b.cpp in function RunCoreTest(). For good examples on how to use this for controller space register access try referencing file tnvme/GrpCtrlRegisters/allCtrlRegs_r10b.cpp.