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 16, 2011
·
4 revisions
The controller configuration is called gCtrlrConfig and is of type class CtrlrConfig. 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 gCtrlrConfig is to control the overall configuration of a DUT.
The gCtrlrConfig is where you will find the interface to control such things as:
Access to the DUT’s Controller Configuration (CC) register.
Enabling/Disabling the DUT.
It is important to understand that although a test can access the DUT’s CC register directly by using the gRegister singleton and setting a custom value for the CC.EN bit, it is highly discouraged. If this backdoor disabling occurs, it will be done without the gRsrcMngr being notified and resources which require sudden lifetime annihilation will not be cleaned up immediately. The gCtrlrConfig and gRsrcMngr are wired via subject-observer design pattern classes to allow proper notification of sudden death scenarios. Hence as a lesson to learn, if the gCtrlrConfig allows the controlling of a particular feature, then use it as opposed to direct register writes using gRegisters.