Class: OrigenARM::Cores::CortexM::Base
- Includes:
- Origen::Model, Registers
- Defined in:
- lib/origen_arm/cores/cortexm/base_cortexm/cortexm.rb,
lib/origen_arm/cores/cortexm/base_cortexm/cortexm_registers.rb
Direct Known Subclasses
Defined Under Namespace
Modules: Registers
Instance Attribute Summary collapse
-
#enter_debug_mode_delay_cycles ⇒ Object
readonly
Returns the value of attribute enter_debug_mode_delay_cycles.
-
#exit_debug_mode_delay_cycles ⇒ Object
readonly
Returns the value of attribute exit_debug_mode_delay_cycles.
-
#read_debug_register_delay ⇒ Object
readonly
Returns the value of attribute read_debug_register_delay.
-
#write_debug_register_delay ⇒ Object
readonly
Returns the value of attribute write_debug_register_delay.
Instance Method Summary collapse
-
#_registers_scope ⇒ Module
Returns the location of the
Registers
module. -
#initialize(options = {}) ⇒ Base
constructor
Initialize the CortexM base.
Methods included from Registers
instantiate_core_registers, instantiate_registers
Constructor Details
#initialize(options = {}) ⇒ Base
For the most part, enter/exit debug mode delay cycles should be the same, so the same override will affect both. For these to be truely different, both options must be given.
Initialize the CortexM base.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/origen_arm/cores/cortexm/base_cortexm/cortexm.rb', line 25 def initialize(={}) # Initialize any common registers followed by the core's own registers. # Note that the core's #initialize_registers could re-configure or # remove any common registers that aren't actually common to that core. OrigenARM::Cores::CortexM::Base::Registers.instantiate_registers(self, ) unless [:no_init_common_registers] instantiate_registers() if respond_to?(:instantiate_registers) @enter_debug_mode_delay_cycles = [:enter_debug_mode_delay_cycles] || [:exit_debug_mode_delay_cycles] || 50 @exit_debug_mode_delay_cycles = [:exit_debug_mode_delay_cycles] || [:enter_debug_mode_delay_cycles] || 50 @write_debug_register_delay = [:write_debug_register_delay] || 1000 @read_debug_register_delay = [:read_debug_register_delay] || 1000 super end |
Instance Attribute Details
#enter_debug_mode_delay_cycles ⇒ Object (readonly)
Returns the value of attribute enter_debug_mode_delay_cycles
10 11 12 |
# File 'lib/origen_arm/cores/cortexm/base_cortexm/cortexm.rb', line 10 def enter_debug_mode_delay_cycles @enter_debug_mode_delay_cycles end |
#exit_debug_mode_delay_cycles ⇒ Object (readonly)
Returns the value of attribute exit_debug_mode_delay_cycles
11 12 13 |
# File 'lib/origen_arm/cores/cortexm/base_cortexm/cortexm.rb', line 11 def exit_debug_mode_delay_cycles @exit_debug_mode_delay_cycles end |
#read_debug_register_delay ⇒ Object (readonly)
Returns the value of attribute read_debug_register_delay
13 14 15 |
# File 'lib/origen_arm/cores/cortexm/base_cortexm/cortexm.rb', line 13 def read_debug_register_delay @read_debug_register_delay end |
#write_debug_register_delay ⇒ Object (readonly)
Returns the value of attribute write_debug_register_delay
12 13 14 |
# File 'lib/origen_arm/cores/cortexm/base_cortexm/cortexm.rb', line 12 def write_debug_register_delay @write_debug_register_delay end |
Instance Method Details
#_registers_scope ⇒ Module
Returns the location of the Registers
module.
45 46 47 |
# File 'lib/origen_arm/cores/cortexm/base_cortexm/cortexm.rb', line 45 def _registers_scope eval("#{self.class.to_s}::Registers") end |