NVPModel¶
- class jtop.core.nvpmodel.NVPModel(controller, nvpmodel)¶
Bases:
object
The NVP Model control voltage regulators, and power tree to optimize power efficiency. It supports three optimized power budgets, such as 10 watts, 15 watts, and 30 watts. For each power budget, several configurations are possible with various CPU frequencies and number of cores online.
Capping the memory, CPU, and GPU frequencies, and number of online CPU, GPU TPC, DLA and PVA cores at a prequalified level confines the module to the target mode.
This method simplify in a set of functions and variables this controller.
with jtop() as jetson: if jetson.ok(): # Read current nvpmodel name print(jetson.nvpmodel) # List of all nvpmodel available models = jetson.nvpmodel.models print(models) # You can write a string for a name jetson.nvpmodel = models[0] # or an the ID name is also allowed jetson.nvpmodel = 0
You can also increase/decrease the ID
with jtop() as jetson: if jetson.ok(): jetson.nvpmodel += 1 # or jetson.nvpmodel = jetson.nvpmodel + 1
Read how to use in
nvpmodel
- get_all_nvpmodels()¶
All nvp models available for this board
with jtop() as jetson: if jetson.ok(): # list of NVP models available print(jetson.nvpmodel.get_all_nvpmodels()) # same of print(jetson.nvpmodel.models)
- Returns:
List os string with all nvpmodels name
- Return type:
- get_default()¶
Return a
dict
with the default status for this boardwith jtop() as jetson: if jetson.ok(): default = jetson.nvpmodel.get_default() print(default)
output
- Returns:
default NVP model
- Return type:
- get_nvpmodel_id()¶
Read che current nvpmodel ID status selected
with jtop() as jetson: if jetson.ok(): # Read current nvpmodel ID print(jetson.nvpmodel.get_nvpmodel_id()) # same of print(jetson.nvpmodel.id)
- Returns:
nvpmodel ID
- Return type:
- get_nvpmodel_name()¶
Read che current nvpmodel ID name selected
with jtop() as jetson: if jetson.ok(): # Read current nvpmodel ID print(jetson.nvpmodel.get_nvpmodel_name()) # same of print(jetson.nvpmodel.name) # or print(jetson.nvpmodel)
- Returns:
nvpmodel ID name
- Return type:
- property id¶
Read che current nvpmodel ID status selected
with jtop() as jetson: if jetson.ok(): # Read current nvpmodel ID print(jetson.nvpmodel.id)
- Returns:
nvpmodel ID
- Return type:
- is_running()¶
Return the status of the NVP Model service, if True the service is already running.
- Returns:
status nvpmodel service
- Return type:
- property models¶
All nvp models available for this board
with jtop() as jetson: if jetson.ok(): # list of NVP models available print(jetson.nvpmodel.models)
- Returns:
List os string with all nvpmodels name
- Return type:
- property name¶
Read che current nvpmodel ID name selected
with jtop() as jetson: if jetson.ok(): # Read current nvpmodel name print(jetson.nvpmodel.name) # same of print(jetson.nvpmodel)
- Returns:
nvpmodel ID name
- Return type:
- set_nvpmodel_id(nvpmodel_id, force=False)¶
Set a new NVP model by ID. The list of nvpmodel available is with
get_all_nvpmodels()
ormodels
.with jtop() as jetson: if jetson.ok(): # Set a new NVP Model by ID jetson.nvpmodel.set_nvpmodel_id(0, force=False) # same of jetson.nvpmodel = 0
- Parameters:
- Raises:
ValueError – the variable is not an int
JtopException – nvpmodel name doesn’t’ exist
- set_nvpmodel_name(nvpmodel_name, force=False)¶
Set a new NVP model by name. The list of nvpmodel available is with
get_all_nvpmodels()
ormodels
.with jtop() as jetson: if jetson.ok(): # Set a new NVP Model by name jetson.nvpmodel.set_nvpmodel_name("15W", force=False) # same of jetson.nvpmodel = "15W"
- Parameters:
- Raises:
ValueError – the variable is not a string
JtopException – nvpmodel name doesn’t’ exist