Sha256: 705914917f0e241f6b9dffd1776ea8942fd1bf6615f0d296a35e163c683b0e57

Contents?: true

Size: 852 Bytes

Versions: 27

Compression:

Stored size: 852 Bytes

Contents

module <%= @namespace %>
  class <%= @options[:name] || 'TopLevel' %>
    include Origen::TopLevel

    def initialize(options = {})
      instantiate_pins(options)
      instantiate_registers(options)
      instantiate_sub_blocks(options)
    end

    def instantiate_pins(options = {})
      add_pin :tclk
      add_pin :tdi
      add_pin :tdo
      add_pin :tms
      add_pin :resetb
      add_pins :port_a, size: 8
    end

    def instantiate_registers(options = {})
    end

    def instantiate_sub_blocks(options = {})
<% @options[:sub_blocks].each do |name, attrs| -%>
<%   if attrs[:instances] -%>
      sub_block :<%= name.underscore %>, instances: <%= attrs[:instances] %>, class_name: '<%= name.camelize %>'
<%   else -%>
      sub_block :<%= name.underscore %>, class_name: '<%= name.camelize %>'
<%   end -%>
<% end -%>
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
origen-0.44.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.43.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.42.2 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.42.1 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.42.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.41.2 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.41.1 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.41.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.40.2 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.40.1 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen-0.40.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-1.2.0 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-1.1.4 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-1.1.3 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-1.1.2 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-1.1.1 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-1.1.0 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-1.0.1 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-1.0.0 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb
origen_app_generators-0.4.0 templates/app_generators/test_engineering/stand_alone_application/lib/top_level.rb