Runtime Environment
Global Setup
Origen re-loads the runtime environment immediately before every pattern, test program or compile job. Therefore both the target and environment files can be used to set some global state that will later be applied to all patterns or similar.
Note that you cannot actually generate any output from the target or environment, that will only happen from within the pattern, program or template source files. However what you can do is setup some initial state within your models to influence what will be generated by the source files later.
In other words any changes that you make to the models after instantiating them will persist into the remainder of the generation flow. It is not recommended to put a lot of logic into target files, but when used responsibly this can be a useful addition to your tool box.
The target and environment files can also be used
to override any Origen configuration settings that would otherwise be specified in
the config/application.rb
file.
An example might be to set up product-specific LSF strings for utilization tracking:
# target/eagle_1.rb
$dut = MyApp::Eagle.new(version: 1)
Origen.config.lsf.project = "eagle.te"
# target/falcon_1.rb
$dut = MyApp::Falcon.new(version: 1)
Origen.config.lsf.project = "falcon.te"
The Origen runtime environment can be configured to run a prefix command before running any job on the LSF. There is a site config variable now available to define what that prefix command is. By default, if the site_config variable is not defined the prefix is an empty string.
In your origen_site_config.yml file, you can specify the site_config variable as shown below
Origen.site_config.lsf_command_prefix = '/location/where_tool_is_installed/origen_setup'