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
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"