
# -*- python -*-

Module('caba:tsar_cluster_v1',
  classname = 'soclib::caba::TsarClusterV1',
  
  tmpl_parameters = [
    parameter.Module('vci_param', default = 'caba:vci_param'),
    parameter.Int('cmd_width'),
    parameter.Int('rsp_width'),
  ],

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

  implementation_files = [
    '../source/src/tsar_cluster_v1.cpp'
  ],
 
  uses = [
    Uses('caba:base_module'),
    Uses('common:loader'),
    Uses('common:elf_file_loader'),
    Uses('common:mapping_table'),
    Uses(
      'caba:vci_cc_xcache_wrapper_v1',
      iss_t = 'common:gdb_iss',
      gdb_iss_t = 'common:mips32el'
    ),
    Uses('caba:vci_mem_cache_v1'),
    Uses('caba:vci_multi_tty'),
    Uses('caba:vci_xicu'),
    Uses(
      'caba:vci_simple_ring_fast',
      ring_cmd_data_size = parameter.Reference('cmd_width'),
      ring_rsp_data_size = parameter.Reference('rsp_width')
    )
  ],

  instance_parameters = [
    parameter.Int('cluster_idx'),
    parameter.Int('infifo_depth'),
    parameter.Int('outfifo_depth'),
    parameter.Int('x_local'),
    parameter.Int('y_local'),
    parameter.Int('x_width'),
    parameter.Int('y_width'),
    parameter.Module('md', 'common:mapping_table'),
    parameter.Module('mc', 'common:mapping_table'),
    parameter.Module('mx', 'common:mapping_table'),
    parameter.Int('nprocs'),
    parameter.Int('max_nprocs'),
    parameter.Int('iwords'),
    parameter.Int('iways'),
    parameter.Int('isets'),
    parameter.Int('dwords'),
    parameter.Int('dways'),
    parameter.Int('dsets'),
    parameter.Int('mcwords'),
    parameter.Int('mcways'),
    parameter.Int('mcsets'),
    parameter.Int('is_io'),
  ], 

  ports = [
    Port('caba:clock_in'    , 'p_clk'           , auto = 'clock'  ),
    Port('caba:bit_in'      , 'p_resetn'        , auto = 'resetn' ),

    Port('caba:vci_initiator', 'p_vci_ixr')
  ]
)

# vim: filetype=python : tabstop=2 : shiftwidth=2 : expandtab
