Sha256: 50738559c2a8671061eaaf667ee319cb18ed5947831759e795b69de711221842

Contents?: true

Size: 979 Bytes

Versions: 10

Compression:

Stored size: 979 Bytes

Contents

module OrigenARMDebug
  class APController
    include Origen::Controller
    include Helpers

    def write_register(reg_or_val, options = {})
      if reg_or_val.try(:owner) == model
        log "Write AP (#{model.name}) register #{reg_or_val.name.to_s.upcase}: #{reg_or_val.data.to_hex}" do
          parent.dp.write_register(reg_or_val)
          apreg_access_wait.cycles
        end
      else
        fail 'No Resource-specific transport defined for MDM-AP (#model.name})'
      end
    end

    def read_register(reg_or_val, options = {})
      if reg_or_val.try(:owner) == model
        log "Read AP (#{model.name}) register #{reg_or_val.name.to_s.upcase}: #{Origen::Utility.read_hex(reg_or_val)}" do
          parent.dp.read_register(reg_or_val, apacc_wait_states: apreg_access_wait)
        end
      else
        fail 'No Resource-specific transport defined for MDM-AP (#model.name})'
      end
    end

    def base_address
      model.base_address
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
origen_arm_debug-1.3.1 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.3.0 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.2.0 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.1.4 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.1.3 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.1.2 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.1.1 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.1.0 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.0.2 lib/origen_arm_debug/ap_controller.rb
origen_arm_debug-1.0.1 lib/origen_arm_debug/ap_controller.rb