<?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">


<lsccip:general>
  <lsccip:vendor>latticesemi.com</lsccip:vendor>
  <lsccip:library>ip</lsccip:library>
  <lsccip:name>divider</lsccip:name>
  <lsccip:display_name>Divider</lsccip:display_name>
  <lsccip:version>1.6.2</lsccip:version>
  <lsccip:category>DSP</lsccip:category>
  <lsccip:min_radiant_version>3.2</lsccip:min_radiant_version>
  
  <lsccip:supported_products>
    <lsccip:supported_family name="LIFCL"></lsccip:supported_family>
    <lsccip:supported_family name="LFD2NX"></lsccip:supported_family>
    <lsccip:supported_family name="LFCPNX"></lsccip:supported_family>
    <lsccip:supported_family name="LFMXO5"></lsccip:supported_family>
    <lsccip:supported_family name="UT24C"></lsccip:supported_family>
    <lsccip:supported_family name="UT24CP"></lsccip:supported_family>
    <lsccip:supported_family name="LAV-AT"></lsccip:supported_family>
    <lsccip:supported_family name="LKH-MH"></lsccip:supported_family>  
    <lsccip:supported_family name="LKH-CT"></lsccip:supported_family>
	<lsccip:supported_family name="LN2-MH"></lsccip:supported_family>  
    <lsccip:supported_family name="LN2-CT"></lsccip:supported_family>
  </lsccip:supported_products>
  
  <lsccip:supported_platforms>
    <lsccip:supported_platform name="radiant"/>
    <lsccip:supported_platform name="esi"/>
  </lsccip:supported_platforms>

</lsccip:general>


<lsccip:settings>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "DTYPE" 
                type               = "param"
                default            = "UNSIGNED"
                value_type         = "string"
                title              = "Numerator data type"
                editable           = "True"
                hidden             = "False"
                options            = "get_int_type()"
                group2             = "Implementation"
                group1             = "Structure"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "STYPE" 
                type               = "param"
                default            = "UNSIGNED"
                value_type         = "string"
                title              = "Denominator data type"
                editable           = "True"
                hidden             = "False"
                options            = "get_int_type()"
                group2             = "Implementation"
                group1             = "Structure"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "DWIDTH" 
                type               = "param"
                default            = "20"
                value_type         = "int"
                title              = "Numerator data width"
                value_range        = "(4,64)"
                editable           = "True"
                hidden             = "False"
                group2             = "Implementation"
                group1             = "Structure"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "SWIDTH" 
                type               = "param"
                default            = "10"
                value_type         = "int"
                title              = "Denominator data width"
                value_range        = "(4,64)"
                editable           = "True"
                hidden             = "False"
                group2             = "Implementation"
                group1             = "Structure"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "LATENCY" 
                type               = "param"
                default            = "20"
                value_type         = "int"
                title              = "Output Latency"
                value_range        = "(1,QWIDTH)"
                editable           = "True"
                hidden             = "False"
                group2             = "Implementation"
                group1             = "Structure"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "POS_RMD" 
                type               = "param"
                default            = "FALSE"
                value_type         = "bool"
                title              = "Always positive remainder"
                editable           = "DTYPE != 'UNSIGNED'"
                hidden             = "False"
                bool_value_mapping = "['TRUE','FALSE']"
                group2             = "Implementation"
                group1             = "Structure"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "CLOCK_ENABLE"
                type               = "input"
                value_type         = "bool"
                default            = "TRUE"
                title              = "Clock enable port"    
                bool_value_mapping = "['TRUE','FALSE']"
                group2             = "Implementation"
                group1             = "Structure"
                editable           = "True"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "DATA_VALID"
                type               = "input"
                value_type         = "bool"
                default            = "TRUE"
                title              = "Data valid ports"    
                bool_value_mapping = "['TRUE','FALSE']"
                group2             = "Implementation"
                group1             = "Structure"
                editable           = "True"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "QWIDTH" 
                type               = "param"
                default            = "10"
                value_type         = "int"
                value_expr         = "get_qwidth_value(DTYPE,STYPE,DWIDTH)"
                title              = "Quotient data width"
                value_range        = "(4,64)"
                editable           = "True"
                hidden             = "True"
                group2             = "General"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "RWIDTH" 
                type               = "param"
                default            = "20"
                value_type         = "int"
                value_expr         = "get_rwidth_value(DTYPE,STYPE,SWIDTH)"
                title              = "Remainder data width"
                editable           = "True"
                hidden             = "True"
                group2             = "General"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "FAMILY" 
                type               = "param"
                default            = "iCE40UP"
                value_type         = "string"
                title              = "Device Architecture"
                value_expr         = "get_device_name(1)"
                editable           = "False"
                hidden             = "True"
                group2             = "General"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "PORTCE_EN" 
                type               = "param"
                default            = "0"
                value_type         = "int"
                value_expr         = "get_ce_port_value(CLOCK_ENABLE)"
                title              = "Port CE"
                editable           = "True"
                hidden             = "True"
                group2             = "Implementation"
/>
<lsccip:setting conn_mod           = "divider_core"
                id                 = "VLDPORT_EN" 
                type               = "param"
                default            = "0"
                value_type         = "int"
                value_expr         = "get_valid_port_value(DATA_VALID)"
                title              = "Port Dvalid"
                editable           = "True"
                hidden             = "True"
                group2             = "Implementation"
/>
</lsccip:settings>


<lsccip:ports>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "denominator"
             name      = "denominator_i"
             dir       = "in"
             stick_low = "0"
             range     = "(SWIDTH-1, 0)"
/>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "remainder"
             name      = "remainder_o"
             dir       = "out"
             range     = "(RWIDTH-1,0)"
             stick_low = "0"
/>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "quotient"
             name      = "quotient_o"
             dir       = "out"
             range     = "(QWIDTH-1, 0)"
             stick_low = "0"
/>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "numerator"
             name      = "numerator_i"
             dir       = "in"
             range     = "(DWIDTH-1, 0)"
             stick_low = "0"
/>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "ce"
             name      = "ce_i"
             dir       = "in"
             stick_low = "0"
             dangling  = "not CLOCK_ENABLE"
/>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "dvalid_in"
             name      = "dvalid_in_i"
             dir       = "in"
             stick_low = "0"
             dangling  = "not DATA_VALID"
/>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "clk"
             name      = "clk_i"
             dir       = "in"
             stick_low = "0"
/>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "dvalid_out"
             name      = "dvalid_out_o"
             dir       = "out"
             stick_low = "0"
             dangling  = "not DATA_VALID"
/>
<lsccip:port conn_mod  = "divider_core"
             conn_port = "rstn"
             name      = "rstn_i"
             dir       = "in"
             stick_low = "0"
/>
</lsccip:ports>

<lsccip:componentGenerators>
  <lsccip:componentGenerator>
    <lsccip:name>create_constraint_file</lsccip:name>
    <lsccip:generatorExe>eval/create_constraint.py</lsccip:generatorExe>
  </lsccip:componentGenerator>
</lsccip:componentGenerators>

</lsccip:ip>
