• Guides
  • Videos
  • Publications
  • API
  • Github
  • Community
  • Release Notes
  • Plugins
Installing Origen
  • Introduction
  • How to Install
  • How to Install (Windows)
  • Company Customization
  • Understanding Gems
  • Invoking Considerations
  • Workspace Management
Getting Started with Origen
  • Core concepts
  • Creating a New App
  • Directory Structure
  • The Initial Commit
  • Creating New Files
  • Understanding Blocks
  • Application Architecture
Runtime Environment
  • Introduction
  • Mode
  • Environment
  • Target
  • Production Targets
  • Global Setup
  • Load Order
  • Programming
Models
  • Introduction
  • Naming
  • Definition & Hierarchy
  • Adding Attributes
  • Versioning
  • Bugs & Features
  • Package, Mode & Configuration
  • Registers
  • Pins
  • Power Domains
  • Hardware Attributes
  • Parameters
  • Specifications
  • Fuses
  • Generic Components
  • Creating Your Own Components
Compiler (Views)
  • Introduction
  • Creating Templates
  • Using Sub-Templates
  • Helpers
  • Running The Compiler
  • Inline Compiler
Controllers
  • Introduction
  • Shadow Controllers
  • Direct Controllers
Pattern Generator
  • Introduction
  • Creating Patterns
  • Pins
  • Timing and Waiting
  • Registers
  • Documenting Patterns
  • Generating by Name
  • Common API
  • J750 API
  • V93K API
  • UltraFlex API
  • STIL & Other Formats
  • Custom Testers
  • Running The PatGen
  • Concurrent Patterns
Test Program Generator
  • Introduction
  • Philosophy
  • Creating Flows
  • Managing Flow Control
  • Creating an Interface
  • Additional Resources
  • Dynamic Custom Code
  • Characterization API
  • J750 API
  • V93K Common API
  • V93K SMT7 API
  • V93K SMT8 API
  • UltraFLEX API
  • Documenting the Program
  • Creating Custom Testers
  • Running the ProgGen
Decompilation
  • Overview & Example
  • Decompiling, Adding Pins, & Executing
  • Working with Decompiled Patterns
  • Platform Specifics
Simulation
  • Introduction
  • How It Works
  • Compiling the DUT
  • AMS Support
  • Environment Setup
  • Application Setup
  • Simulating Patterns
  • Simulating Flows
  • Direct DUT Manipulation
  • Simulator Log Output
  • Artifacts
  • Debugging
Documentation Generator
  • Introduction
  • Markdown
  • Linking
  • Styling
  • Testing
  • API Generation
  • Deploying
Plugins
  • Introduction
  • Using a Plugin
  • Creating a Plugin
  • Current & Default Plugins
  • Dev Environment
  • Dev Considerations
  • Paths & Origen.root
  • Config & Origen.app
Miscellaneous
  • Revision Control
  • Origen Remotes
  • Lint Testing
  • Session Store
  • LSF API
  • Users, Emails & Maillists
  • Utilities & Helpers
  • Ruby Extensions
  • Logger
  • Adding Commands
  • Overriding Commands
  • Callbacks
  • Application Callbacks
  • Miscellaneous Topics
Advanced Topics
  • Introduction
  • Invocation Customization
  • Custom App Generators

Runtime Environment

Environment


All environments are defined by files that reside in the environment directory. Environments are regular Ruby files and they should be simply named:

<identifier>.rb

In a test engineering application where the environment is used to select the target test platform, they are normally named after the tester, e.g.

environment
|-- j750.rb
|-- uflex.rb
|-- v93k.rb
`-- jlink.rb

Creating an Environment

To create a new environment, simply create the file containing whatever Ruby code you need. They are usually very concise and in a test engineering application would normally only instantiate the target tester driver, here are some examples:

# environment/j750.rb
$tester = OrigenTesters::J750.new

# environment/v93k.rb
$tester = OrigenTesters::V93K.new

# environment/jlink.rb
$tester = OrigenDebuggers::JLink.new

If the given driver supports configuration options, then you may have some variations for a given platform - e.g. j750_probe.rb to configure the driver slightly differently for generating probe test patterns:

# environment/j750_probe.rb
$tester = OrigenTesters::J750.new
$tester.available_power_supplies = 64

Setting a Default Environment

A default environment can be defined that will be used withing a new workspace unless the user specifies otherwise. This is not required and should only be added if it makes sense within the context of the application - i.e. you may choose not to have a default to avoid the situation where the user builds something without really understanding what configuration they are targeting.

A default is specified by creating an environment file called environment/default.rb, typically this is a symbolic link to another environment file:

ln -s environment/j750.rb environment/default.rb

Getting and Setting the Environment

The current environment for a given application workspace can be queried by running the origen environment command, or origen e for short, this will show you the content of the current environment file:

> origen e

Current environment: j750.rb
**********************************************************************
  $tester = OrigenTesters::J750.new
**********************************************************************

The environment can be changed by running the same command and supplying the desired environment:

> origen e environment/j750.rb

> origen e v93k

As shown above, a full path or any snippet which is enough to uniquely identify one of the available environment files is sufficient.

Additionally all Origen commands allow an override to be supplied at runtime:

> origen g my_pattern -e jlink

Comments

Generated with the Origen Semiconductor Developer's Kit

Origen is released under the terms of the MIT license