<?xml version="1.0"?>
<lsccip:ip version="1.0"  
    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>module</lsccip:library> 
        <lsccip:name>ahb_lite_feedthrough</lsccip:name>
        <lsccip:display_name>AHB-Lite Feedthrough</lsccip:display_name>
        <lsccip:version>1.4.0</lsccip:version>
        <lsccip:category>Processors_Controllers_and_Peripherals</lsccip:category>
        <lsccip:keywords>BusType_AHB-Lite</lsccip:keywords>
        <lsccip:min_radiant_version>2.1</lsccip:min_radiant_version> 
        
        <lsccip:supported_products> 
            <lsccip:supported_family name="*"/>
        </lsccip:supported_products> 
        
        <lsccip:supported_platforms>
            <lsccip:supported_platform name="esi"/>
            <lsccip:supported_platform name="radiant"/>
        </lsccip:supported_platforms>
    </lsccip:general>
    
    <lsccip:settings>
        <!-- General Settings -->
        <lsccip:setting conn_mod           = "lscc_ahb_lite_feedthrough"
                        id                 = "M_ADDR_WIDTH"
                        type               = "param"
                        value_type         = "int"
                        default            = "32"
                        options            = "range(10,33)"
                        title              = "Address Width (bits)"
        />
        
        <lsccip:setting conn_mod           = "lscc_ahb_lite_feedthrough"
                        id                 = "DATA_WIDTH"
                        type               = "param"
                        value_type         = "int"
                        default            = "32"
                        options            = "[8,16,24,32]"
                        title              = "Data Bus Width (bits)"
        />
        
        <lsccip:setting conn_mod           = "lscc_ahb_lite_feedthrough"
                        id                 = "INTERFACE_TYPE"
                        type               = "input"
                        value_type         = "string"
                        default            = "Manager"
                        options            = "['Manager', 'Subordinate']"
                        title              = "Export Interface as"
        />    
        
        <lsccip:setting conn_mod           = "lscc_ahb_lite_feedthrough"
                        id                 = "ADDR_SPACE"
                        type               = "input"
                        value_type         = "int"
                        editable           = "False"
                        hidden             = "True"
                        value_expr         = "int(2**M_ADDR_WIDTH)"
        />
        
        <lsccip:setting conn_mod           = "lscc_ahb_lite_feedthrough"
                        id                 = "ADDR_SPACE_STR"
                        type               = "input"
                        value_type         = "string"
                        editable           = "False"
                        value_expr         = "hex(ADDR_SPACE)"
                        hidden             = "INTERFACE_TYPE == 'Subordinate'"
                        title              = "Address Space Range (0x)"
        />
        
        <lsccip:setting conn_mod           = "lscc_ahb_lite_feedthrough"
                        id                 = "MEM_MAP_STR"
                        type               = "input"
                        value_type         = "string"
                        editable           = "False"
                        value_expr         = "hex(ADDR_SPACE)"
                        hidden             = "INTERFACE_TYPE == 'Manager'"
                        title              = "Memory Map Range (0x)"
        />
    </lsccip:settings>
    
    <lsccip:ports>
        <!-- Subordinate Interface-->  
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hsel_slv_i"
                     name          = "ahbl_hsel_slv_i"
                     dir           = "in"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_haddr_slv_i"
                     name          = "ahbl_haddr_slv_i"
                     dir           = "in"
                     range         = "(M_ADDR_WIDTH-1,0)"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hburst_slv_i"
                     name          = "ahbl_hburst_slv_i"
                     dir           = "in"
                     range         = "(2,0)"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hsize_slv_i"
                     name          = "ahbl_hsize_slv_i"
                     dir           = "in"
                     range         = "(2,0)"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hmastlock_slv_i"
                     name          = "ahbl_hmastlock_slv_i"
                     dir           = "in"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hprot_slv_i"
                     name          = "ahbl_hprot_slv_i"
                     dir           = "in"
                     range         = "(3,0)"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_htrans_slv_i"
                     name          = "ahbl_htrans_slv_i"
                     dir           = "in"
                     range         = "(1,0)"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hwdata_slv_i"
                     name          = "ahbl_hwdata_slv_i"
                     dir           = "in"
                     range         = "(DATA_WIDTH-1,0)"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hwrite_slv_i"
                     name          = "ahbl_hwrite_slv_i"
                     dir           = "in"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hready_slv_i"
                     name          = "ahbl_hready_slv_i"
                     dir           = "in"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hreadyout_slv_o"
                     name          = "ahbl_hreadyout_slv_o"
                     dir           = "out"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hresp_slv_o"
                     name          = "ahbl_hresp_slv_o"
                     dir           = "out"
                     bus_interface = "AHBL_S0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hrdata_slv_o"
                     name          = "ahbl_hrdata_slv_o"
                     dir           = "out"
                     range         = "(DATA_WIDTH-1,0)"
                     bus_interface = "AHBL_S0"
        />
        
        <!-- Manager Interface-->
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hsel_mstr_o"
                     name          = "ahbl_hsel_mstr_o"
                     dir           = "out"
                     dangling      = "INTERFACE_TYPE=='Manager'"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_haddr_mstr_o"
                     name          = "ahbl_haddr_mstr_o"
                     dir           = "out"
                     range         = "(M_ADDR_WIDTH-1,0)"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hburst_mstr_o"
                     name          = "ahbl_hburst_mstr_o"
                     dir           = "out"
                     range         = "(2,0)"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hsize_mstr_o"
                     name          = "ahbl_hsize_mstr_o"
                     dir           = "out"
                     range         = "(2,0)"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hmastlock_mstr_o"
                     name          = "ahbl_hmastlock_mstr_o"
                     dir           = "out"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hprot_mstr_o"
                     name          = "ahbl_hprot_mstr_o"
                     dir           = "out"
                     range         = "(3,0)"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_htrans_mstr_o"
                     name          = "ahbl_htrans_mstr_o"
                     dir           = "out"
                     range         = "(1,0)"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hwdata_mstr_o"
                     name          = "ahbl_hwdata_mstr_o"
                     dir           = "out"
                     range         = "(DATA_WIDTH-1,0)"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hwrite_mstr_o"
                     name          = "ahbl_hwrite_mstr_o"
                     dir           = "out"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hready_mstr_o"
                     name          = "ahbl_hready_mstr_o"
                     dir           = "out"
                     dangling      = "INTERFACE_TYPE=='Manager'"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hready_mstr_i"
                     name          = "ahbl_hready_mstr_i"
                     dir           = "in"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hresp_mstr_i"
                     name          = "ahbl_hresp_mstr_i"
                     dir           = "in"
                     bus_interface = "AHBL_M0"
        />
        
        <lsccip:port conn_mod      = "lscc_ahb_lite_feedthrough"
                     conn_port     = "ahbl_hrdata_mstr_i"
                     name          = "ahbl_hrdata_mstr_i"
                     dir           = "in"
                     range         = "(DATA_WIDTH-1,0)"
                     bus_interface = "AHBL_M0"
        />
    </lsccip:ports>
    
    <xi:include href="bus_interface.xml" parse="xml" />
    <xi:include href="address_space.xml" parse="xml" />
    <xi:include href="memory_map.xml" parse="xml" /> 
</lsccip:ip>
