writeMem :: Int -> Int -> Sim ()
writeMem base size = componentLookup MemoryManager >>= \x -> case x of
    Nothing  -> error "no instantiated memory manager"
    Just cId -> do (MM_ACK s) <- invoke MemoryManager cId (Write base size)
                   runUntilAll cId size [s]
writeMem :: Int -> Int -> Sim ()
writeMem base size = componentLookup MemoryManager >>= \x -> case x of
    Nothing  -> error "no instantiated memory manager"
    Just cId -> do (MM_ACK s) <- invoke MemoryManager cId (Write base size)
                   runUntilAll cId size [s]
writeMem base size = componentLookup MemoryManager >>= \x -> case x of
    Nothing  -> error "no instantiated memory manager"
    Just cId -> do (MM_ACK s) <- invoke MemoryManager cId (Write base size)
                   runUntilAll cId size [s]