Class: OrigenStandardSubblocks::RAMController
- Inherits:
-
Object
- Object
- OrigenStandardSubblocks::RAMController
- Includes:
- Origen::Controller
- Defined in:
- lib/origen_standard_subblocks/RAM/ram_controller.rb
Instance Method Summary collapse
-
#[](index) ⇒ Origen:Registers::Reg
Shortcut for
mem
, where the base address is added to the index. -
#[]=(index, data) ⇒ Origen::Registers::BitCollection
Shortcut for
mem.write!
, where the base address is added to the index.
Instance Method Details
#[](index) ⇒ Origen:Registers::Reg
TODO:
Add support for negative index notation & ranges.
TODO:
Add support for bounds checking.
Shortcut for mem
, where the base address is added to the
index.
21 22 23 |
# File 'lib/origen_standard_subblocks/RAM/ram_controller.rb', line 21 def [](index) dut.mem(start_addr + (4 * index)) end |
#[]=(index, data) ⇒ Origen::Registers::BitCollection
TODO:
Add support for negative index notation & ranges.
TODO:
Add support for bounds checking.
Shortcut for mem.write!
, where the base address is added to
the index.
34 35 36 |
# File 'lib/origen_standard_subblocks/RAM/ram_controller.rb', line 34 def []=(index, data) self[index].write!(data) end |