anchor.diff:  import FIFOF::*;
   import Clocks::*;
   import GetPut::*;
  +import GetPutF::*;
   import PCIE::*;
   import GetPutWithClocks::*;
   import Connectable::*;
   import PortalMemory::*;
   import Dma::*;
  -import AxiDma::*;
  +import DmaUtils::*;
   import AxiMasterSlave::*;
   import HDMI::*;
   import XADC::*;
  
positive.code: interface HdmiControlRequest;
      method Action startFrameBuffer0(Int#(32) base);
  endinterface
  interface HdmiControlIndication;
  endinterface
  
  interface HdmiDisplayRequest;
      interface HdmiControlRequest coreRequest;
      interface HdmiInternalRequest coRequest;
      interface DmaConfig dmaRequest;
      interface Axi3Master#(40,64,6) m_axi;
      interface HDMI hdmi;
      interface XADC xadc;
  endinterface
  interface HdmiDisplayIndication;
      interface HdmiControlIndication coreIndication;
      interface HdmiInternalIndication coIndication;
      interface DmaIndication dmaIndication;
  endinterface
  
  module mkHdmiDisplayRequest#(Clock processing_system7_1_fclk_clk1, HdmiDisplayIndication indication)(HdmiDisplayRequest);
      Clock defaultClock <- exposeCurrentClock;
      Reset defaultReset <- exposeCurrentReset;
      Clock hdmi_clock = processing_system7_1_fclk_clk1;
  
negative.code:     Reg#(Bit#(1)) bozobit <- mkReg(0, clocked_by hdmi_clock, reset_by hdmi_reset);
      Reg#(Bit#(8)) segmentIndexReg <- mkReg(0);
      Reg#(Bit#(24)) segmentOffsetReg <- mkReg(0);
  
      Reg#(DmaPointer) referenceReg <- mkReg(-1);
      Reg#(Bit#(40)) streamRdOff <- mkReg(0);
  
      HdmiGenerator hdmiGen <- mkHdmiGenerator(defaultClock, defaultReset,
  					     vsyncPulse, hdmiInternalIndication, clocked_by hdmi_clock, reset_by hdmi_reset);
     
      DmaReadBuffer#(64, 1) dmaReadBuffer <- mkDmaReadBuffer();
      rule readReq if(referenceReg >= 0);
          streamRdOff <= streamRdOff + 16*8;
          dmaReadBuffer.dmaServer.readReq.put(DmaRequest {pointer: referenceReg, offset: streamRdOff, burstLen: 16, tag: 0});
      endrule
     PutF#(DmaData#(64)) sink = (interface PutF;
        method Action put(DmaData#(64) dmadata);
           hdmiGen.request.put(dmadata.data);
        endmethod
        endinterface);
      mkConnectionWithClocks(dmaReadBuffer.dmaServer.readData, sink, defaultClock, defaultReset, hdmi_clock, hdmi_reset);
  
      rule vsyncrule if (vsyncPulse.pulse() && referenceReg >= 0);
         streamRdOff <= 0;
      endrule
  
      rule bozobit_rule;
          bozobit <= ~bozobit;
      endrule
  
      interface HdmiControlRequest controlRequest;
  	method Action startFrameBuffer0(Int#(32) base);
  	    $display("startFrameBuffer %h", base);
              referenceReg <= truncate(pack(base));
  	    hdmiGen.control.setTestPattern(0);
  	endmethod
      endinterface: controlRequest
  
      interface DmaReadClient dmaClient = dmaReadBuffer.dmaClient;
      interface HDMI hdmi = hdmiGen.hdmi;
      interface HdmiInternalRequest internalRequest = hdmiGen.control;
      interface XADC xadc;
          method Bit#(4) gpio;
              return { bozobit, hdmiGen.hdmi.vsync,
  