Class: PipelineSim::MainMem
- Inherits:
-
Object
- Object
- PipelineSim::MainMem
- Defined in:
- pipeline_simulation.rb
Overview
This is the class that creates the simulated main memory
Initialization:
main_memory = PipelineSim::MainMem.new(size)
After initialization, @content is the only thing that can be changed
Definition of parameters:
size: integer, reflects the total size of main memory array
Instance Attribute Summary collapse
-
#content ⇒ Array
Returns the content of the cache.
Instance Method Summary collapse
-
#initialize(size) ⇒ MainMemory
constructor
Initializes new MainMemory object.
Constructor Details
#initialize(size) ⇒ MainMemory
Note:
This function just creates dummy data in the main memory. Currently it fills it with hexadecimal numbers.
Initializes new MainMemory object
375 376 377 |
# File 'pipeline_simulation.rb', line 375 def initialize(size) @content = initialize_content(size) end |
Instance Attribute Details
#content ⇒ Array
Returns the content of the cache
369 370 371 |
# File 'pipeline_simulation.rb', line 369 def content @content end |