aboutsummaryrefslogtreecommitdiff
path: root/MicSim/components/caretaker.py
diff options
context:
space:
mode:
Diffstat (limited to 'MicSim/components/caretaker.py')
-rw-r--r--MicSim/components/caretaker.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/MicSim/components/caretaker.py b/MicSim/components/caretaker.py
index ab20fba..6153350 100644
--- a/MicSim/components/caretaker.py
+++ b/MicSim/components/caretaker.py
@@ -1,13 +1,15 @@
#!/usr/bin/python
+from components.ram import Ram
+
class Caretaker:
- def __init__(self):
+ def __init__(self,ramSize):
self.objects=dict() # Create empty objects pool
# Add registers to pool
for reg in ["MAR","MDR", "PC", "MBR", "SP","LV","CPP","TOS","OPC","H"]:
self.objects[reg]=0
- self.objects["RAM"]=None
+ self.objects["RAM"]=Ram(self,ramSize)
def __getitem__(self,key):
if key=="MBRU": # If we ask for unsigned