78a79,81
> if options.memchecker:
> system.memchecker = MemChecker()
>
85a89,103
> if options.memchecker:
> dcache_mon = MemCheckerMonitor(warn_only=True)
> dcache_real = dcache
>
> # Do not pass the memchecker into the constructor of
> # MemCheckerMonitor, as it would create a copy; we require
> # exactly one MemChecker instance.
> dcache_mon.memchecker = system.memchecker
>
> # Connect monitor
> dcache_mon.mem_side = dcache.cpu_side
>
> # Let CPU connect to monitors
> dcache = dcache_mon
>
93a112,118
>
> if options.memchecker:
> # The mem_side ports of the caches haven't been connected yet.
> # Make sure connectAllPorts connects the right objects.
> system.cpu[i].dcache = dcache_real
> system.cpu[i].dcache_mon = dcache_mon
>