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:

list

get_default()

Return a dict with the default status for this board

with jtop() as jetson:
    if jetson.ok():
        default = jetson.nvpmodel.get_default()
        print(default)

output

# {'name': '15W', 'id': 0}
Returns:

default NVP model

Return type:

dict

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:

int

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:

str

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:

int

is_running()

Return the status of the NVP Model service, if True the service is already running.

Returns:

status nvpmodel service

Return type:

bool

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:

list

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:

str

set_nvpmodel_id(nvpmodel_id, force=False)

Set a new NVP model by ID. The list of nvpmodel available is with get_all_nvpmodels() or models.

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:
  • nvpmodel_id (int) – nvpmodel ID

  • force (bool, optional) – Force set nvpmodel (can reboot your board), defaults to False

Raises:
set_nvpmodel_name(nvpmodel_name, force=False)

Set a new NVP model by name. The list of nvpmodel available is with get_all_nvpmodels() or models.

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:
  • nvpmodel_name (str) – name nvpmodel

  • force (bool, optional) – Force set nvpmodel (can reboot your board), defaults to False

Raises:
property status

Return a list with a NVP model status. If when you set an NVP Model, something going wrong, you will read here the output

with jtop() as jetson:
    if jetson.ok():
        # Read current nvpmodel status
        print(jetson.nvpmodel.status)

Output

# [True True True True ... True]
Returns:

Status NVP Models

Return type:

list