vta.environment
#
Configurable VTA Hareware Environment scope.
Module Contents#
Classes#
Internal development context |
|
Hardware configuration object. |
Functions#
Initialize the default global env |
|
|
Get the current VTA Environment. |
Get the VTA HW path. |
|
|
Returns PkgConfig pkg config object. |
- class vta.environment.DevContext(env)[源代码]#
Bases:
object
Internal development context
This contains all the non-user facing compiler internal context that is hold by the Environment.
Parameters#
- envEnvironment
The environment hosting the DevContext
Note#
This class is introduced so we have a clear separation of developer related, and user facing attributes.
- class vta.environment.Environment(cfg)[源代码]#
Bases:
object
Hardware configuration object.
This object contains all the information needed for compiling to a specific VTA backend.
Parameters#
- cfgdict of str to value.
The configuration parameters.
Example#
# the following code reconfigures the environment # temporarily to attributes specified in new_cfg.json new_cfg = json.load(json.load(open("new_cfg.json"))) with vta.Environment(new_cfg): # env works on the new environment env = vta.get_env()