anchor.diff:  
       let core_to_mem <- mkConnection(core, memorySystem.core[0]);
   
  -    // // Uncached Memory Connection
  -    // FIFO#(UncachedMemReq) externalUncachedReqFIFO <- mkFIFO;
  -    // FIFO#(UncachedMemResp) externalUncachedRespFIFO <- mkFIFO;
  -    // UncachedMemServer externalUncachedMemServer = toGPServer(externalUncachedReqFIFO, externalUncachedRespFIFO);
  -    // UncachedMemClient externalUncachedMemClient = toGPClient(externalUncachedReqFIFO, externalUncachedRespFIFO);
  -    // function Bit#(1) whichServer(UncachedMemReq r);
  -    //     if (r.addr >= mmioBaseAddr ) begin
  -    //         return 1; // mmiocsrs - hardware devices
  -    //     end else begin
  -    //         return 0; // external - software devices
  -    //     end
  -    // endfunction
  -    // function Bool getsResponse(UncachedMemReq r);
  -    //     return True;
  -    // endfunction
  -    // Integer maxPendingReq = 4;
  -    // let uncachedMem <- mkServerJoiner(
  -    //                         whichServer,
  -    //                         getsResponse,
  -    //                         maxPendingReq,
  -    //                         vec(externalUncachedMemServer, mmcsrs.memifc));
  -    // let uncached_mem_connection <- mkConnection(memorySystem.uncachedMemory, uncachedMem);
  -
  -    // Uncached Memory Connection
  -    // connect all uncached memory connections to the memory mapped CSRs
  -    let uncached_mem_connection <- mkConnection(memorySystem.uncachedMemory, mmcsrs.memifc);
  +    // Memory Mapped IO connections
  +    FIFO#(UncachedMemReq) externalMMIOReqFIFO <- mkFIFO;
  +    FIFO#(UncachedMemResp) externalMMIORespFIFO <- mkFIFO;
  +    UncachedMemServer externalMMIOServer = toGPServer(externalMMIOReqFIFO, externalMMIORespFIFO);
  +    UncachedMemClient externalMMIOClient = toGPClient(externalMMIOReqFIFO, externalMMIORespFIFO);
  +    function Bit#(1) whichMMIOServer(UncachedMemReq r);
  +        if (r.addr >= externalMMIOBaseAddr ) begin
  +            return 1; // external devices
  +        end else begin
  +            return 0; // internal devices (memory mapped CSRs)
  +        end
  +    endfunction
  +    Integer maxPendingReq = 4;
  +    function UncachedMemReq adjustMMIOAddress(Addr a, UncachedMemReq r);
  +        r.addr = r.addr - a;
  +        return r;
  +    endfunction
  +    let memoryMappedIO <- mkServerJoiner(
  +                            whichMMIOServer,
  +                            constFn(True), // if a given request gets a response
  +                            maxPendingReq,
  +                            vec(mmcsrs.memifc, transformReq(adjustMMIOAddress(externalMMIOBaseAddr), externalMMIOServer)));
  +    let uncached_mem_connection <- mkConnection(memorySystem.uncachedMemory, memoryMappedIO);
   
       // Cached Memory Connection
  -    // 0x0000_0000 - 0x0000_FFFF : ROM
  -    // 0x8000_0000 - 0x0000_0000 : RAM
       FIFO#(MainMemReq) romReqFIFO <- mkFIFO;
       FIFO#(MainMemResp) romRespFIFO <- mkFIFO;
       MainMemServer romServer = toGPServer(romReqFIFO, romRespFIFO);
  
positive.code: import Vector::*;
  
  import ClientServerUtil::*;
  import ServerUtil::*;
  
  import Abstraction::*;
  
negative.code:     // Main Memory Connection
      interface ram = ramClient;
      interface rom = romClient;
      interface UncachedMemClient mmio = externalMMIOClient;
      interface GenericMemServer extmem = memorySystem.extMemory;
  
      // Interrupts
      method Action triggerExternalInterrupt;
          extInterruptWire <= True;
      endmethod
  endmodule
  
  