Class: OrigenAhbDev::BLOCK

Inherits:
Object
  • Object
show all
Includes:
Origen::Model
Defined in:
lib/origen_ahb_dev/block.rb

Overview

Dummy sub-block for inclusion in top-level dut

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ BLOCK

Initialize block



7
8
9
# File 'lib/origen_ahb_dev/block.rb', line 7

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

Instance Method Details

#instantiate_registers(options = {}) ⇒ Object

Create block-level registers



12
13
14
15
# File 'lib/origen_ahb_dev/block.rb', line 12

def instantiate_registers(options = {})
  add_reg :control, 0x00, 32, data: { pos: 0, bits: 32 }
  add_reg :status, 0x04, 32, data: { pos: 0, bits: 32 }
end