• 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

Compiler (Views)

Running The Compiler


The compiler is launched via the Origen compile command, see the command line help to get details of the most up to date options:

origen compile -h

As this is such a common command it has a short cut alias:

origen c -h

The compiler can be run on a single file:

origen c app/templates/bench/dut_regs.h.erb

or on a whole directory:

origen c app/templates/bench

In the case of running on a directory the compiler will recursively compile the contents of all contained sub-directories. The sub-directory structure will be maintained and mirrored in the compiler output directory.

The given path can even be somewhere outside of the Origen application:

origen c /proj/c28/eagle/jim/rtl_v

A commonly used option is to specify the output directory:

origen c app/templates/bench -o output/compiled_bench_code

By default the compiled files will be put in output or whatever directory is returned by the config.output_directory attribute defined by config/application.rb.

Submit to the LSF, by appending -l and optionally interactively wait for completion:

origen c app/templates/bench -l -w

Regression Testing

Every time Origen compiles a file it will check to see if it has compiled it before, and if so it will compare the current version to the previous version and alert if there is a difference. This can be used to check for regressions when making changes that you don’t want to affect the output, or to verify that the change is what you intended in cases where you are intentionally modifying the output.

In the case of a difference being found Origen will automatically present you with the diff command to run if you want to view the change.

To accept changes or to start tracking the differences in a file (or files) run the following command after compiling:

origen save all

Programmatically Launching the Compiler

If you start writing your own commands you may want to launch the compiler from Ruby, do that as follows:

Origen.app.runner.launch action: :compile,
                          files: "path/to/input/file.erb"

Additionally the following options can be supplied:

output: "path/to/output/dir",       # Override the default output directory
output_file_name: "my_name.txt",    # Specify the output file name, by default is the name of the input file
output_sub_dir: "testflow",         # Specify a subdirectory to be appended to the default output directory
# The combination of these two options will run the compiler silently, allowing your application
# code to handle all presentation of information about the created file to the user 
quiet: true,                        # Don't log to the console
check_for_changes: false,           # Don't check the output file for changes to a previous version
# You can supply a hash of options that will be accessible within the template as 'options'
options: { some_attr: true, some_other_attr: 20 }

This can be combined with Target Loops to run the compiler for multiple targets.

A compile job can also be posted to the LSF by supplying the same options that you would use on the command line like this:

Origen.lsf.submit_origen_job("c path/to/input")

Comments

Generated with the Origen Semiconductor Developer's Kit

Origen is released under the terms of the MIT license