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