# -*- python -*-

Module('caba:dspin_router_tsar',
	classname = 'soclib::caba::DspinRouterTsar',
	tmpl_parameters = [ parameter.Int('flit_width'), ],
	header_files = ['../source/include/dspin_router_tsar.h',],
	implementation_files = ['../source/src/dspin_router_tsar.cpp',],
	ports = [
		Port('caba:bit_in', 'p_resetn', auto = 'resetn'),
		Port('caba:clock_in', 'p_clk', auto = 'clock'),
	    Port('caba:dspin_output', 'p_out', 5, dspin_data_size = parameter.Reference('flit_width')),
	    Port('caba:dspin_input', 'p_in', 5, dspin_data_size = parameter.Reference('flit_width')),
	],
	instance_parameters = [
	    parameter.Int('x'),
	    parameter.Int('y'),
	    parameter.Int('x_width'),
	    parameter.Int('y_width'),
	    parameter.Int('in_fifo_depth'),
	    parameter.Int('out_fifo_depth'),
	    parameter.Int('cluster_iob0'),
	    parameter.Int('cluster_iob1'),
	    parameter.Int('l_width'),
	    parameter.Int('iob_local_id'),
	],
	uses = [
	    Uses('caba:base_module'),
	    Uses('caba:generic_fifo'),
	],
)
