anchor.diff:  // SOFTWARE.
   
   import FIFO::*;
  -import SPI::*;
   import GetPut::*;
  -
  +import Connectable :: *;
  +import PCIE :: *; // ConnectableWithClocks
  +import Clocks :: *;
  +
  +import GetPutWithClocks :: *;
   import Zynq::*;
   import Imageon::*;
   import HDMI::*;
  
positive.code:    WriteChan dma_debug_write_chan = dma.write.writeChannels[1];
     //BlueScope#(64,64) spiBlueScope <- mkBlueScope(32, dma_debug_write_chan);
     //module mkSyncBlueScope#(Integer samples, WriteChan wchan, Clock sClk, Reset sRst, Clock dClk, Reset dRst)(BlueScope#(dataWidth, triggerWidth))
     BlueScopeInternal bsi <- mkBlueScopeInternal(32, dma_debug_write_chan, indication.bsIndication);
     
      //BlueScope#(xsviDataWidth,xsviDataWidth) xsviBlueScope <- mkBlueScope(1024);
      SensorToVideo converter <- mkSensorToVideo;
      HdmiOut hdmiOut <- mkHdmiOut;
  
      rule rxfifo_response;
          let v <- control.rxfifo_response.get();
          indication.coreIndication.spi_rxfifo_value(v);
      endrule
  
      // could use mkConnection here
      rule xsviData;
          let xsviData = control.xsviData();
  	converter.in.put(xsviData);
  	//xsviBlueScope.dataIn(pack(xsviData), pack(xsviData));
      endrule
  
      rule hdmiData;
          let rgb888VideoData <- converter.out.get();
          hdmiOut.rgb.put(rgb888VideoData);
      endrule
  
      interface CoreRequest coreRequest;
      method Action set_spi_control(Bit#(32) v);
  
negative.code: 
  interface ImageCaptureIndication;
      interface CoreIndication coreIndication;
      //interface BlueScopeIndication bsIndication;
  endinterface
  
  interface ImageCaptureRequest;
     interface CoreRequest coreRequest;
     //interface BlueScopeRequest bsRequest;
     interface ImageonVita imageon;
     interface HDMI hdmi;
  endinterface
   
  module mkImageCaptureRequest#(Clock hdmi_clock, 
      ImageCaptureIndication indication)(ImageCaptureRequest) provisos (Bits#(XsviData,xsviDataWidth));
  
      Clock defaultClock <- exposeCurrentClock();
      Reset defaultReset <- exposeCurrentReset();
      Reset hdmi_reset <- mkSyncReset(2, defaultReset, hdmi_clock);
  
      ImageonVitaController imageonVita <- mkImageonVitaController();
      ImageonControl control = imageonVita.control;
      //jcaBlueScope#(64,64) spiBlueScope <- mkBlueScope(1024);
  