<?xml version="1.0"?>
<lsccip:ip version="1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:lsccip="http://www.latticesemi.com/XMLSchema/Radiant/ip"
        xmlns:xi="http://www.w3.org/2001/XInclude">

  <lsccip:general>
    <lsccip:vendor>latticesemi.com</lsccip:vendor>
    <lsccip:library>ip</lsccip:library>
    <lsccip:name>fpdlink_tx</lsccip:name>
    <lsccip:display_name>FPD-Link Transmitter</lsccip:display_name>
    <lsccip:version>1.9.0</lsccip:version>
    <lsccip:category>Audio_Video_and_Image_Processing</lsccip:category>
    <lsccip:min_radiant_version>2025.1</lsccip:min_radiant_version>
    <lsccip:min_esi_version>2025.1</lsccip:min_esi_version>
    <lsccip:supported_products>
      <lsccip:supported_family name="LIFCL"></lsccip:supported_family>
      <lsccip:supported_family name="LFD2NX">
        <lsccip:supported_device name="LFD2NX-17"/>
	<lsccip:supported_device name="LFD2NX-40"/>
	<lsccip:supported_device name="LFD2NX-9"/>
	<lsccip:supported_device name="LFD2NX-28"/>
	<lsccip:supported_device name="LFD2NX-15"/>
	<lsccip:supported_device name="LFD2NX-25"/>
	<lsccip:supported_device name="LFD2NX-15P"/>
	<lsccip:supported_device name="LFD2NX-25P"/>
      </lsccip:supported_family>
      <lsccip:supported_family name="LFCPNX"></lsccip:supported_family>
      <lsccip:supported_family name="LFMXO5">
        <lsccip:supported_device name="LFMXO5-15D"/>
	<lsccip:supported_device name="LFMXO5-15D-AQA"/>
	<lsccip:supported_device name="LFMXO5-25"/>
	<lsccip:supported_device name="LFMXO5-55T"/>
	<lsccip:supported_device name="LFMXO5-55TD"/>
	<lsccip:supported_device name="LFMXO5-100T"/>
	<lsccip:supported_device name="LFMXO5-25P"/>
      </lsccip:supported_family>
      <lsccip:supported_family name="LAV-AT"></lsccip:supported_family>
      <lsccip:supported_family name="LKH-CT"></lsccip:supported_family>
      <lsccip:supported_family name="LKH-MH"></lsccip:supported_family>
      <lsccip:supported_family name="LN2-CT"></lsccip:supported_family>
      <lsccip:supported_family name="LN2-MH"></lsccip:supported_family>
    </lsccip:supported_products>
    <lsccip:supported_platforms>
      <lsccip:supported_platform name="esi"/>
      <lsccip:supported_platform name="radiant"/>
    </lsccip:supported_platforms>
    
  </lsccip:general>

  <lsccip:settings>
    <lsccip:setting id                 = "FAMILY"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    title              = "Fam"
                    value_expr         = "runtime_info.device_info.architecture(1)"
                    editable           = "False"
                    hidden             = "True"
                    group1             = "General"
    />
    <lsccip:setting id                 = "DEVICE"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_rx"
                    value_type         = "string"
                    title              = "Dev"
                    value_expr         = "runtime_info.device_info.device(1)"
                    editable           = "False"
                    hidden             = "True"
                    group1             = "General"
    />
    
    <!-- PIXEL INTERFACE-->
    <lsccip:setting id                 = "DATA_TYPE"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    title              = "Data Type"
                    options            = "['RGB888','RGB666']"
                    default            = "RGB888"
					description        = "Specify the Data Type."
                    group1             = "Pixel Interface"
    />
    
    <lsccip:setting id                 = "NUM_PIX_TOTAL"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Number of Input Pixels per Clock"
                    value_expr         = "(value_expr_num_pxl(NUM_TX_CH, TX_GEAR))"
                    editable           = "False"
					description        = "Specify the number of Input Pixels per Clock."
                    group1             = "Pixel Interface"
    />
    
	<!-- 2024.1 updates -->
    <!-- original -->
<!--     <lsccip:setting id                 = "AXI4S"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    title              = "Enable AXI4-Stream Receiver Interface"
                    default            = "OFF"
                    editable           = "True"
                    options            = "['ON', 'OFF']"
                    group1             = "Pixel Interface"
    /> -->
	
	<lsccip:setting id                 = "AXI4S"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    title              = "Video Data Interface"
                    default            = "OFF"
                    editable           = "True"
                    options            = "[ ('Native', 'OFF'),
					                        ('AXI4-Stream Rx (Legacy)', 'LEGACY'),
											('Unified Video Streaming Rx', 'UVSI')]"
					description        = "Specify which Video Data Interface is used."
                    group1             = "Pixel Interface"
    />
    
    <!-- Fix for DNG-18709-->
    <lsccip:setting id                 = "AXI4_TDATA_WIDTH"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "AXI4-Stream Data width"
                    value_expr         = "(math.ceil((NUM_TX_LANE*6*NUM_PIX_TOTAL)/8)*8)"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Pixel Interface"
    />

    <!-- UVSI-->
    <lsccip:setting id                 = "CPP"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Colors Per Pixel"
                    value_expr         = "3"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Pixel Interface"
    />	
	
	<lsccip:setting id                 = "BPC"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Bits Per Color"
                    value_expr         = "(value_expr_bpc(DATA_TYPE))"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Pixel Interface"
    />	
	
    <lsccip:setting id                 = "BPP"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Bits Per Color"
                    value_expr         = "(value_expr_bpp(CPP, BPC))"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Pixel Interface"
    />
	
    <lsccip:setting id                 = "TD_WD_IN"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Unified Video Streaming Rx Data width"
                    value_expr         = "(value_expr_tdwd(BPP, NUM_PIX_TOTAL))"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Pixel Interface"
    />
	<!-- UVSI-->
    
    <!-- TRANSMITTER INTERFACE -->
    <lsccip:setting id                 = "NUM_TX_CH"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Number of TX Channels"
                    options            = "[1,2]"
                    default            = "1"
					description        = "Specify how many LVDS Tx channels are used." 
                    group1             = "Transmitter Interface"
    />

    <lsccip:setting id                 = "TX_IF"
                    type               = "input"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    title              = "TX Interface"
                    value_expr         = "'LVDS'"
                    editable           = "False"
					description        = "Specify the I/O Interface."
                    group1             = "Transmitter Interface"
    />

    <lsccip:setting id                 = "FORMAT"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    title              = "Data Mapping Format"
                    options            = "[('Format 1 (JEIDA)', 'JEIDA'),
                                           ('Format 2 (VESA)', 'VESA')]"
                    default            = "VESA"
                    editable           = "True"
					description        = "Specify the Data Mapping Format."
                    group1             = "Transmitter Interface"
    />

    <lsccip:setting id                 = "NUM_TX_LANE"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Number of TX Lanes"
                    value_expr         = "4 if (DATA_TYPE == 'RGB888')
                                            else 3"
                    editable           = "False"
					description        = "Specify the number of data lanes per LVDS Tx channel."
                    group1             = "Transmitter Interface"
    />

    <lsccip:setting id                 = "TX_GEAR"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "TX Gear"
                    value_expr         = "7"
                    editable           = "False"
					description        = "Specify what DDR7:1 gearing is used."
                    group1             = "Transmitter Interface"
    />

    <!-- CLOCK -->
    <lsccip:setting id                 = "TX_BW"
                    type               = "input"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "TX Total Aggregate Bandwidth (Mbps)"
                    value_expr         = "(value_expr_totalbw(NUM_TX_CH, NUM_TX_LANE, TX_LINE_RATE))"
                    editable           = "False"
					description        = "Tx Total Line Rate"
                    group1             = "Clock"
    />

    <lsccip:setting id                 = "TX_LINE_RATE"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "TX Line Rate per lane (Mbps)"
                    value_range        = "(70, 1050) if (FAMILY == 'LAV-AT') else (70, 945)"
                    default            = "945"
					description        = "Target Line Rate per lane"
                    group1             = "Clock"
    />

    <lsccip:setting id                 = "PXL_CLK_MHZ"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "Pixel Clock Frequency (MHz)"
                    value_range        = "(10, 150) if (FAMILY == 'LAV-AT') else (10, 135)"
                    value_expr         = "(TX_LINE_RATE / TX_GEAR)"
                    editable           = "False"
					description        = "Pixel Clock"
                    group1             = "Clock"
    />

    <lsccip:setting id                 = "PXL_CLK_PRD"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "Pixel Clock Period (ns)"
                    value_expr         = "(1000/PXL_CLK_MHZ)"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Clock"
    />

    <lsccip:setting id                 = "LVDS_CLK_MHZ"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "LVDS Output Clock Frequency (MHz)"
                    value_range        = "(10, 150) if (FAMILY == 'LAV-AT') else (10, 135)"
                    value_expr         = "(PXL_CLK_MHZ * (TX_GEAR/7))"
                    editable           = "False"
					description        = "LVDS Clock"
                    group1             = "Clock"
    />

    <lsccip:setting id                 = "LVDS_ECLK_MHZ"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "LVDS ECLK Frequency (MHz)"
                    value_range        = "(35, 525) if (FAMILY == 'LAV-AT') else (35, 472.5)"
                    value_expr         = "(LVDS_CLK_MHZ * 3.5)"
                    editable           = "False"
					description        = "LVDS Edge Clock"
                    group1             = "Clock"
    />

    <lsccip:setting id                 = "LVDS_ECLK_PRD"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "LVDS ECLK Period (ns)"
                    value_expr         = "(1000/LVDS_ECLK_MHZ)"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Clock"
    />

    <lsccip:setting id                 = "SYNC_CLK_MHZ"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "Sync Clock Frequency (MHz)"
                    value_range        = "(10, 150) if (FAMILY == 'LAV-AT') else (10, 135)"
                    drc                = "ext_check_sync_clk(
                                              PXL_CLK_MHZ, SYNC_CLK_MHZ)"
                    default            = "10"
                    editable           = "True"
					description        = "Sync clock. Must be equal or slower than the slowest clock in the system."
                    group1             = "Clock"
    />

    <lsccip:setting id                 = "SYNC_CLK_PRD"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "float"
                    title              = "SYNC_CLK Period (ns)"
                    value_expr         = "(1000/SYNC_CLK_MHZ)"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Clock"
    />

    <!-- MISCELLANEOUS -->
<!--     <lsccip:setting id                 = "AXI4L"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "bool"
                    title              = "Enable AXI4-Lite Interface"
                    bool_value_mapping = "('ON', 'OFF')"
                    default            = "False"
					description        = "Enable AXI4-Lite Interface."
                    group1             = "Miscellaneous"
    />	 -->
	
	<lsccip:setting id                 = "AXI4L"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    title              = "Register Interface"
                    default            = "OFF"
					editable           = "(AXI4S == 'OFF') or (AXI4S == 'UVSI')"
					options            = "[('Off', 'OFF'),
										   ('AXI4-Lite', 'ON')]"
					description        = "Specify Register Interface."
                    group1             = "Miscellaneous"
    />	
	
    <lsccip:setting id                 = "MISC_ON"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "bool"
                    title              = "Enable Miscellaneous Signals"
                    bool_value_mapping = "('ON', 'OFF')"
					value_expr         = "True if (AXI4L == 'OFF') else False"
					editable           = "not (AXI4L == 'ON')"
					description        = "Enable Miscellaneous signals."
                    group1             = "Miscellaneous"
    />

    <lsccip:setting id                 = "DEBUG_ON"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "bool"
                    title              = "Enable Test Mode"
                    bool_value_mapping = "('ON', 'OFF')"
					value_expr         = "True if (AXI4L == 'ON') else False"
	                editable           = "not (AXI4L == 'ON')"
					description        = "Enable Test Mode. When enabled, Tx automatically generate test data inside the system through Test Mode Expected Data in Hex Format and transmit them."
                    group1             = "Miscellaneous"
    />
	
    <lsccip:setting id                 = "PXL_WIDTH"
                    type               = "input"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Number of TX Channels"
                    value_expr         = "24 if (DATA_TYPE == 'RGB888')
                                            else 18"
                    hidden             = "True"
                    editable           = "False"
                    group1             = "Miscellaneous"
    />

    <lsccip:setting id                 = "TEST_DATA_IN"
                    type               = "input"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    default            = "0"
                    output_formatter   = "nostr"
                    title              = "Test mode expected data in Hex format (0x)"
                    drc                = "check_testmodeval(PXL_WIDTH,TEST_DATA_IN)"
                    editable           = "DEBUG_ON"
                    hidden             = "False"
					description        = "Test Data value used when Enable Test Mode is checked."
                    group1             = "Miscellaneous"
    />

    <lsccip:setting id                 = "TEST_DATA"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "string"
                    output_formatter   = "nostr"
                    title              = "Test mode expected data (0x)"
                    value_expr         = "calc_addr_value(PXL_WIDTH, TEST_DATA_IN)"
                    editable           = "False"
                    hidden             = "True"
                    group1             = "Miscellaneous"
    />
	
    <!-- VIDEO INFORMATION-->
	<lsccip:setting id                 = "ACT_WIDTH"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Active Width"
                    value_range        = "(2,65535)"
					default            = "1920"
                    editable           = "AXI4L == 'OFF' and AXI4S == 'UVSI'"
                    group1             = "Video Information"
                    group2             = "Video"
					description        = "Determines the Active Width of the Video Streaming Data in Pixels."
    />
	
    <lsccip:setting id                 = "ACT_HEIGHT"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Active Height"
                    value_range        = "(2,65535)"
					default            = "1080"
                    editable           = "AXI4L == 'OFF' and AXI4S == 'UVSI'"
                    group1             = "Video Information"
                    group2             = "Video"
					description        = "Determines the Active Height of the Video Streaming Data in Lines."
    />
	
    <lsccip:setting id                 = "H_FPORCH"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Horizontal Front Porch"
                    value_range        = "(2,65535)"
					default            = "88"
                    editable           = "AXI4L == 'OFF' and AXI4S == 'UVSI'"
                    group1             = "Video Information"
                    group2             = "Video"
					description        = "Determines the Horizontal Front Porch in Pixels."
    />

    <lsccip:setting id                 = "H_SYNCWD"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Horizontal Sync Width"
                    value_range        = "(2,65535)"
					default            = "44"
                    editable           = "AXI4L == 'OFF' and AXI4S == 'UVSI'"
                    group1             = "Video Information"
                    group2             = "Video"
					description        = "Determines the Horizontal Sync Width in Pixels."
    />

    <lsccip:setting id                 = "H_BPORCH"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Horizontal Back Porch"
                    value_range        = "(2,65535)"
					default            = "148"
                    editable           = "AXI4L == 'OFF' and AXI4S == 'UVSI'"
                    group1             = "Video Information"
                    group2             = "Video"
					description        = "Determines the Horizontal Back Porch in Pixels."
    />

    <lsccip:setting id                 = "V_FPORCH"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Vertical Front Porch"
                    value_range        = "(2,65535)"
					default            = "4"
                    editable           = "AXI4L == 'OFF' and AXI4S == 'UVSI'"
                    group1             = "Video Information"
                    group2             = "Video"
					description        = "Determines the Vertical Front Porch in Lines."
    />

    <lsccip:setting id                 = "V_SYNCWD"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Vertical Sync Width"
                    value_range        = "(2,65535)"
					default            = "5"
                    editable           = "AXI4L == 'OFF' and AXI4S == 'UVSI'"
                    group1             = "Video Information"
                    group2             = "Video"
					description        = "Determines the Vertical Sync Width in Lines."
    />

    <lsccip:setting id                 = "V_BPORCH"
                    type               = "param"
                    conn_mod           = "lscc_fpd_link_tx"
                    value_type         = "int"
                    title              = "Vertical Back Porch"
                    value_range        = "(2,65535)"
					default            = "36"
                    editable           = "AXI4L == 'OFF' and AXI4S == 'UVSI'"
                    group1             = "Video Information"
                    group2             = "Video"
					description        = "Determines the Vertical Back Porch in Lines."
    />
  </lsccip:settings>

  <lsccip:ports>
    <lsccip:port name       = "tstmode_en_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "tstmode_en_i"
                 stick_low  = "not DEBUG_ON or AXI4L == 'ON'"
    />

    <lsccip:port name       = "rdy_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "rdy_o"
                 dangling   = "not MISC_ON or AXI4L == 'ON'"
    />
	
<!-- 	<lsccip:port name       = "rdy_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "rdy_o"
                 dangling   = "not MISC_ON"
    />  -->

    <lsccip:port name       = "rst_n_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "rst_n_i"
    />

    <lsccip:port name       = "sync_clk_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "sync_clk_i"
    />

    <lsccip:port name       = "eclk_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "eclk_i"
    />

    <lsccip:port name       = "pix_data0_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "pix_data0_i"
                 range      = "((NUM_TX_LANE*6) - 1, 0)"
                 stick_low  = "AXI4S=='LEGACY' or AXI4S == 'UVSI'"
    />

    <lsccip:port name       = "pix_data1_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "pix_data1_i"
                 range      = "((NUM_TX_LANE*6) - 1, 0)"
                 stick_low  = "NUM_PIX_TOTAL==1 or AXI4S=='LEGACY' or AXI4S == 'UVSI'"
    />

    <lsccip:port name       = "pix_data2_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "pix_data2_i"
                 range      = "((NUM_TX_LANE*6) - 1, 0)"
                 stick_low  = "NUM_PIX_TOTAL!=4 or AXI4S=='LEGACY' or AXI4S == 'UVSI'"
    />

    <lsccip:port name       = "pix_data3_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "pix_data3_i"
                 range      = "((NUM_TX_LANE*6) - 1, 0)"
                 stick_low  = "NUM_PIX_TOTAL!=4 or AXI4S=='LEGACY' or AXI4S == 'UVSI'"
    />

    <lsccip:port name       = "de_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "de_i"
                 stick_high = "AXI4S == 'LEGACY' or AXI4S == 'UVSI'"
    />

    <lsccip:port name       = "hsync_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "hsync_i"
                 stick_high = "AXI4S == 'LEGACY' or AXI4S == 'UVSI'"
    />

    <lsccip:port name       = "vsync_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "vsync_i"
                 stick_high = "AXI4S == 'LEGACY' or AXI4S == 'UVSI'"
    />

    <!-- AXI4 Stream Rx (Legacy) Interface Ports -->
    <!-- Fix for DNG-18709 (range)-->
    <lsccip:port name       = "axis_tdata_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_tdata_i"
                 range      = "(AXI4_TDATA_WIDTH - 1, 0)"
                 stick_high  = "AXI4S == 'OFF' or AXI4S == 'UVSI'"
                 bus_interface = "AXI4S_S0"
    />
    
    <lsccip:port name       = "axis_tvalid_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_tvalid_i"
                 stick_low  = "AXI4S == 'OFF' or AXI4S == 'UVSI'"
                 bus_interface = "AXI4S_S0"
    />
    
    <lsccip:port name       = "axis_tuser_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_tuser_i"
                 range      = "(2 , 0)"
                 stick_low  = "AXI4S == 'OFF' or AXI4S == 'UVSI'"
                 bus_interface = "AXI4S_S0"
    />

    <lsccip:port name       = "axis_tready_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_tready_o"
                 dangling   = "AXI4S == 'OFF' or AXI4S == 'UVSI'"
                 bus_interface = "AXI4S_S0"
    />
	<!-- AXI4 Stream Rx (Legacy) Interface Ports -->
	
	<!-- Unified Video Streaming Rx Interface Ports -->
	<lsccip:port name       = "axis_vid_tdata_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_vid_tdata_i"
                 range      = "(TD_WD_IN - 1, 0)"
                 stick_high = "AXI4S == 'OFF' or AXI4S == 'LEGACY'"
                 bus_interface = "UVSI_R0"
    />
	
	<lsccip:port name       = "axis_vid_tvalid_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_vid_tvalid_i"
                 stick_low  = "AXI4S == 'OFF' or AXI4S == 'LEGACY'"
                 bus_interface = "UVSI_R0"
    />
    
    <lsccip:port name       = "axis_vid_tuser_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_vid_tuser_i"
                 range      = "(1 , 0)"
                 stick_low  = "AXI4S == 'OFF' or AXI4S == 'LEGACY'"
                 bus_interface = "UVSI_R0"
    />
	
	<lsccip:port name       = "axis_vid_tlast_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_vid_tlast_i"
                 stick_low  = "AXI4S == 'OFF' or AXI4S == 'LEGACY'"
                 bus_interface = "UVSI_R0"
    />

    <lsccip:port name       = "axis_vid_tready_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axis_vid_tready_o"
                 dangling   = "AXI4S == 'OFF' or AXI4S == 'LEGACY'"
                 bus_interface = "UVSI_R0"
    />
	<!-- Unified Video Streaming Rx Interface Ports -->
	
	<!-- AXI4-Lite Interface Ports -->
	<lsccip:port name       = "axil_clk_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axil_clk_i"
				 stick_low  = "AXI4L == 'OFF'"
    />
	
    <lsccip:port name       = "axil_rst_n_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "axil_rst_n_i"
				 stick_low  = "AXI4L == 'OFF'"
    />
	
	<lsccip:port name       = "s_axil_awvalid_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_awvalid_i"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_awaddr_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_awaddr_i"
                 range      = "(31,0)"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_wvalid_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_wvalid_i"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />

	<lsccip:port name       = "s_axil_wdata_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_wdata_i"
                 range      = "(31,0)"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_wstrb_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_wstrb_i"
                 range      = "(3,0)"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />

	<lsccip:port name       = "s_axil_bready_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_bready_i"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_arvalid_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_arvalid_i"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_araddr_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_araddr_i"
                 range      = "(31,0)"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />

	<lsccip:port name       = "s_axil_rready_i"
                 dir        = "in"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_rready_i"
				 stick_low  = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_awready_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_awready_o"
				 dangling   = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_wready_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_wready_o"
				 dangling   = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />

	<lsccip:port name       = "s_axil_bvalid_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_bvalid_o"
				 dangling   = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_bresp_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_bresp_o"
                 range      = "(1,0)"
				 dangling   = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_arready_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_arready_o"
				 dangling   = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_rvalid_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_rvalid_o"
				 dangling   = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_rdata_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_rdata_o"
                 range      = "(31,0)"
				 dangling   = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	
	<lsccip:port name       = "s_axil_rresp_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "s_axil_rresp_o"
                 range      = "(1,0)"
				 dangling   = "AXI4L == 'OFF'"
				 bus_interface = "AXI4L_S0"
    />
	<!-- AXI4-Lite Interface Ports -->
	
    <lsccip:port name       = "clk_ch0_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "clk_ch0_p_o"
    />

    <lsccip:port name       = "d0_ch0_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "d0_ch0_p_o"
    />

    <lsccip:port name       = "d1_ch0_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "d1_ch0_p_o"
    />

    <lsccip:port name       = "d2_ch0_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "d2_ch0_p_o"
    />

    <lsccip:port name       = "d3_ch0_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "d3_ch0_p_o"
                 dangling   = "DATA_TYPE == 'RGB666'"
    />

    <lsccip:port name       = "clk_ch1_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "clk_ch1_p_o"
                 dangling   = "NUM_TX_CH == 1"
    />

    <lsccip:port name       = "d0_ch1_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "d0_ch1_p_o"
                 dangling   = "NUM_TX_CH == 1"
    />

    <lsccip:port name       = "d1_ch1_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "d1_ch1_p_o"
                 dangling   = "NUM_TX_CH == 1"
    />

    <lsccip:port name       = "d2_ch1_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "d2_ch1_p_o"
                 dangling   = "NUM_TX_CH == 1"
    />

    <lsccip:port name       = "d3_ch1_p_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "d3_ch1_p_o"
                 dangling   = "NUM_TX_CH == 1 or DATA_TYPE == 'RGB666'"
    />

    <lsccip:port name       = "pix_clk_o"
                 dir        = "out"
                 conn_mod   = "lscc_fpd_link_tx"
                 conn_port  = "pix_clk_o"
    />
  </lsccip:ports>
  
  <lsccip:outFileConfigs>
      <lsccip:fileConfig name="wrapper" file_suffix="sv" file_description="top_level_system_verilog"></lsccip:fileConfig>
  </lsccip:outFileConfigs>
  
  <xi:include href="bus_interface.xml" parse="xml" />   
  
  <lsccip:componentGenerators>
       <lsccip:componentGenerator>
           <lsccip:name>fpdlink_params</lsccip:name>
           <lsccip:generatorExe>testbench/create_defines.py</lsccip:generatorExe>
       </lsccip:componentGenerator>
       <lsccip:componentGenerator>
           <lsccip:name>ip_constraint_setup</lsccip:name>
           <lsccip:generatorExe>eval/ip_eval_setup.py</lsccip:generatorExe>
       </lsccip:componentGenerator>
  </lsccip:componentGenerators>
</lsccip:ip>
