anchor.diff:  import Leds::*;
   
   // generated by tool
  -import ImageonSerdesRequestWrapper::*;
  -import ImageonSerdesIndicationProxy::*;
   import ImageonSensorRequestWrapper::*;
   import ImageonSensorIndicationProxy::*;
  -import HdmiInternalRequestWrapper::*;
  -import HdmiInternalIndicationProxy::*;
   
   // defined by user
  -import IserdesDatadeser::*;
   import Imageon::*;
   import HDMI::*;
   import YUV::*;
   import XilinxCells::*;
   import XbsvXilinxCells::*;
   
  -typedef enum { ImageonSerdesRequest, ImageonSensorRequest, HdmiInternalRequest,
  -    ImageonSerdesIndication, ImageonSensorIndication, HdmiInternalIndication} IfcNames deriving (Eq,Bits);
  +typedef enum { ImageonSensorRequest, ImageonSensorIndication} IfcNames deriving (Eq,Bits);
   
  -interface ImageCapturePins;
  -   interface ImageonSensorPins pins;
  -   interface ImageonSerdesPins serpins;
  +interface FMComms1Pins;
  +   interface FMComms1ADCPins adcpins;
  +   interface FMComms1DACPins dacpins;
      (* prefix="" *)
  -   interface HDMI#(Bit#(HdmiBits)) hdmi;
      method Action fmc_video_clk1(Bit#(1) v);
   endinterface
  -interface ImageCapture;
  -   interface Vector#(6,StdPortal) portals;
  -   interface ImageCapturePins pins;
  +interface FMComms1;
  +   interface Vector#(2,StdPortal) portals;
  +   interface FMComms1Pins pins;
   endinterface
   
  -module mkImageCapture#(Clock fmc_imageon_clk1)(ImageCapture);
  +module mkFMComms1#(Clock fmc_imageon_clk1)(FMComms1);
      Clock defaultClock <- exposeCurrentClock();
      Reset defaultReset <- exposeCurrentReset();
  -   ClockGenerator7AdvParams clockParams = defaultValue;
  -   clockParams.bandwidth          = "OPTIMIZED";
  -   clockParams.compensation       = "ZHOLD";
  -   clockParams.clkfbout_mult_f    = 8.000;
  -   clockParams.clkfbout_phase     = 0.0;
  -   clockParams.clkin1_period      = 6.734007; // 148.5 MHz
  -   clockParams.clkin2_period      = 6.734007;
  -   clockParams.clkout0_divide_f   = 8.000;    // 148.5 MHz
  -   clockParams.clkout0_duty_cycle = 0.5;
  -   clockParams.clkout0_phase      = 0.0000;
  -   clockParams.clkout1_divide     = 32;       // 37.125 MHz
  -   clockParams.clkout1_duty_cycle = 0.5;
  -   clockParams.clkout1_phase      = 0.0000;
  -   clockParams.divclk_divide      = 1;
  -   clockParams.ref_jitter1        = 0.010;
  -   clockParams.ref_jitter2        = 0.010;
   
  -   XClockGenerator7 clockGen <- mkClockGenerator7Adv(clockParams, clocked_by fmc_imageon_clk1);
  -   C2B c2b_fb <- mkC2B(clockGen.clkfbout, clocked_by clockGen.clkfbout);
  -   rule txoutrule5;
  -      clockGen.clkfbin(c2b_fb.o());
  -   endrule
  -   Clock hdmi_clock <- mkClockBUFG(clocked_by clockGen.clkout0);    // 148.5   MHz
      Clock imageon_clock <- mkClockBUFG(clocked_by clockGen.clkout1); //  37.125 MHz
      Reset hdmi_reset <- mkAsyncReset(2, defaultReset, hdmi_clock);
      Reset imageon_reset <- mkAsyncReset(2, defaultReset, imageon_clock);
  
positive.code:    interface slave = ctrl_mux;
     interface masters = nil;
     //interface leds = captureRequestInternal.leds;
     interface ImageCapturePins pins;
         method Action fmc_video_clk1(Bit#(1) v);
             iclock.inputclock(v);
         endmethod
  
negative.code:    endrule
     
     Vector#(6,StdPortal) portal_array;
     portal_array[0] = fmcomms1RequestWrapper.portalIfc; 
     portal_array[1] = fmcomms1IndicationProxy.portalIfc;
     interface Vector portals = portal_array;
  
     interface FMComms1Pins pins;
         interface FMComms1ADCPins adcpins = fromSensor.pins;
         interface ImageonSerdesPins serpins = serdes.pins;
         interface HDMI hdmi = hdmisignals;
     endinterface
  endmodule
  
  module mkPortalTop(PortalTop#(addrWidth,64,FMComms1Pins,0));
     //Clock defaultClock <- exposeCurrentClock();
     //Reset defaultReset <- exposeCurrentReset();
     B2C1 iclock <- mkB2C1();
     Clock iclock_buf <- mkClockBUFG(clocked_by iclock.c);
     FMComms1 ic <- mkFMComms1(iclock_buf);
     
     // instantiate system directory
     StdDirectory dir <- mkStdDirectory(ic.portals);
  