
# -*- python -*-

Module('caba:vci_cc_vcache_wrapper',
	    classname = 'soclib::caba::VciCcVCacheWrapper',

	    tmpl_parameters = [
            parameter.Module('vci_param', default = 'caba:vci_param'),
            parameter.Int('dspin_in_width'),
            parameter.Int('dspin_out_width'),
	        parameter.Module('iss_t')
        ],

	    header_files = [ '../source/include/vci_cc_vcache_wrapper.h' ],

	    implementation_files = [ '../source/src/vci_cc_vcache_wrapper.cpp' ],

	    uses = [
            Uses('caba:base_module'),
            Uses('common:mapping_table'),
	        Uses('common:iss2'),
	        Uses('caba:multi_write_buffer'),
	        Uses('caba:generic_fifo'),
	        Uses('caba:generic_cache_tsar',
                addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
                parameter.Reference('addr_size'))),
            Uses('caba:generic_tlb', 
                addr_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
                parameter.Reference('addr_size'))),
            Uses('common:address_masking_table', 
                data_t = parameter.StringExt('sc_dt::sc_uint<%d> ', 
                parameter.Reference('addr_size'))
            ),
			Uses('caba:dspin_dhccp_param'),
        ],

	    ports = [
            Port('caba:vci_initiator', 'p_vci'),
            Port('caba:dspin_input', 'p_dspin_m2p', 
                  dspin_data_size = parameter.Reference('dspin_in_width')),
            Port('caba:dspin_output', 'p_dspin_p2m', 
                  dspin_data_size = parameter.Reference('dspin_out_width')),
            Port('caba:dspin_input', 'p_dspin_clack', 
                  dspin_data_size = parameter.Reference('dspin_in_width')),
	        Port('caba:bit_in','p_irq', parameter.Constant('n_irq')),
	        Port('caba:bit_in', 'p_resetn', auto = 'resetn'),
	        Port('caba:clock_in', 'p_clk', auto = 'clock')
        ],

	    instance_parameters = [
            parameter.Int('proc_id'),
	        parameter.Module('mt', 'common:mapping_table'),
	        parameter.Module('mc', 'common:mapping_table'),
	        parameter.IntTab('initiator_rw_index'),
	        parameter.IntTab('initiator_c_index'),
	        parameter.IntTab('target_index'),
    	    parameter.Int('itlb_ways'),
    	    parameter.Int('itlb_sets'),
    	    parameter.Int('dtlb_ways'),
    	    parameter.Int('dtlb_sets'),
    	    parameter.Int('icache_ways'),
    	    parameter.Int('icache_sets'),
    	    parameter.Int('icache_words'),
    	    parameter.Int('dcache_ways'),
    	    parameter.Int('dcache_sets'),
    	    parameter.Int('dcache_words'),
    	    parameter.Int('wbuf_nlines'),
    	    parameter.Int('wbuf_nwords'),
    	    parameter.Int('max_frozen_cycles')
        ],
)


