Sha256: fb42129690adec1a05187ae2bc50948fd62ebad36ad1960b373650599f08a85d

Contents?: true

Size: 1.32 KB

Versions: 3

Compression:

Stored size: 1.32 KB

Contents

require 'origen'
require_relative '../config/application.rb'
module OrigenVerilog
  # THIS FILE SHOULD ONLY BE USED TO LOAD RUNTIME DEPENDENCIES
  # If this plugin has any development dependencies (e.g. dummy DUT or other models that are only used
  # for testing), then these should be loaded from config/boot.rb

  autoload :Parser,    'origen_verilog/parser'
  autoload :Node,      'origen_verilog/node'
  autoload :Processor, 'origen_verilog/processor'
  autoload :TopLevel,  'origen_verilog/top_level'

  module Verilog
    autoload :Parser,    'origen_verilog/verilog/parser'
    autoload :Node,      'origen_verilog/verilog/node'
    autoload :Processor, 'origen_verilog/verilog/processor'
    autoload :Writer,    'origen_verilog/verilog/writer'
    autoload :Evaluator, 'origen_verilog/verilog/evaluator'
  end
  module Preprocessor
    autoload :Parser,    'origen_verilog/preprocessor/parser'
    autoload :Node,      'origen_verilog/preprocessor/node'
    autoload :Processor, 'origen_verilog/preprocessor/processor'
    autoload :Writer,    'origen_verilog/preprocessor/writer'
  end

  # Returns an AST for the given file
  def self.parse_file(file, options = {})
    # Evaluates all compiler directives
    ast = Preprocessor::Parser.parse_file(file).process
    # Now parse as verilog
    Verilog::Parser.parse(ast.to_s)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
origen_verilog-0.2.2 lib/origen_verilog.rb
origen_verilog-0.2.1 lib/origen_verilog.rb
origen_verilog-0.2.0 lib/origen_verilog.rb