#######################################################################
|
#######################################################################
|
## File: ni_master.IP
|
## File: ni_master.IP
|
##
|
##
|
## Copyright (C) 2014-2016 Alireza Monemi
|
## Copyright (C) 2014-2016 Alireza Monemi
|
##
|
##
|
## This file is part of ProNoC 1.8.0
|
## This file is part of ProNoC 1.8.1
|
##
|
##
|
## WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT
|
## WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT
|
## MAY CAUSE UNEXPECTED BEHAIVOR.
|
## MAY CAUSE UNEXPECTED BEHAIVOR.
|
################################################################################
|
################################################################################
|
|
|
$ipgen = bless( {
|
$ipgen = bless( {
|
'description' => '',
|
'ports' => {
|
'file_name' => '/home/alireza/mywork/mpsoc/src_peripheral/ni/ni_master.v',
|
's_cti_i' => {
|
'plugs' => {
|
'type' => 'input',
|
'wb_master' => {
|
'intfc_port' => 'cti_i',
|
'value' => 2,
|
'range' => 'TAGw-1 : 0',
|
'1' => {
|
'intfc_name' => 'plug:wb_slave[0]'
|
'name' => 'wb_receive'
|
|
},
|
},
|
'wb_master' => {},
|
'm_send_sel_o' => {
|
'0' => {
|
'intfc_port' => 'sel_o',
|
'name' => 'wb_send'
|
'type' => 'output',
|
|
'range' => 'SELw-1 : 0',
|
|
'intfc_name' => 'plug:wb_master[0]'
|
},
|
},
|
'type' => 'num'
|
'm_receive_cyc_o' => {
|
|
'intfc_port' => 'cyc_o',
|
|
'type' => 'output',
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_master[1]'
|
},
|
},
|
'interrupt_peripheral' => {
|
'm_send_ack_i' => {
|
'value' => 1,
|
'intfc_port' => 'ack_i',
|
'interrupt_peripheral' => {},
|
'type' => 'input',
|
'type' => 'num',
|
'intfc_name' => 'plug:wb_master[0]',
|
'0' => {
|
'range' => ''
|
'name' => 'interrupt'
|
|
}
|
|
},
|
},
|
'wb_slave' => {
|
'flit_out_wr' => {
|
'wb_slave' => {},
|
'range' => '',
|
'value' => 1,
|
'intfc_name' => 'socket:ni[0]',
|
'0' => {
|
'intfc_port' => 'flit_out_wr',
|
'name' => 'wb_slave',
|
'type' => 'output'
|
'width' => 10,
|
|
'addr' => '0xb800_0000 0xbfff_ffff custom devices'
|
|
},
|
},
|
'type' => 'num'
|
'm_send_stb_o' => {
|
|
'intfc_port' => 'stb_o',
|
|
'type' => 'output',
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_master[0]'
|
},
|
},
|
'clk' => {
|
'm_receive_addr_o' => {
|
'value' => 1,
|
'range' => 'M_Aw-1 : 0',
|
'0' => {
|
'intfc_name' => 'plug:wb_master[1]',
|
'name' => 'clk'
|
'intfc_port' => 'adr_o',
|
|
'type' => 'output'
|
},
|
},
|
'type' => 'num',
|
'flit_in' => {
|
'clk' => {}
|
'intfc_name' => 'socket:ni[0]',
|
|
'range' => 'Fw-1 : 0',
|
|
'intfc_port' => 'flit_in',
|
|
'type' => 'input'
|
},
|
},
|
'reset' => {
|
'reset' => {
|
'type' => 'num',
|
'intfc_name' => 'plug:reset[0]',
|
'0' => {
|
'range' => '',
|
'name' => 'reset'
|
'intfc_port' => 'reset_i',
|
|
'type' => 'input'
|
},
|
},
|
'reset' => {},
|
's_dat_o' => {
|
'value' => 1
|
'type' => 'output',
|
|
'intfc_port' => 'dat_o',
|
|
'range' => 'Dw-1 : 0',
|
|
'intfc_name' => 'plug:wb_slave[0]'
|
|
},
|
|
's_stb_i' => {
|
|
'intfc_port' => 'stb_i',
|
|
'type' => 'input',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => ''
|
|
},
|
|
'current_x' => {
|
|
'intfc_name' => 'socket:ni[0]',
|
|
'range' => 'Xw-1 : 0',
|
|
'type' => 'input',
|
|
'intfc_port' => 'current_x'
|
|
},
|
|
'm_receive_cti_o' => {
|
|
'type' => 'output',
|
|
'intfc_port' => 'cti_o',
|
|
'range' => 'TAGw-1 : 0',
|
|
'intfc_name' => 'plug:wb_master[1]'
|
|
},
|
|
's_we_i' => {
|
|
'intfc_port' => 'we_i',
|
|
'type' => 'input',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => ''
|
|
},
|
|
'm_receive_we_o' => {
|
|
'type' => 'output',
|
|
'intfc_port' => 'we_o',
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_master[1]'
|
|
},
|
|
'm_send_dat_i' => {
|
|
'type' => 'input',
|
|
'intfc_port' => 'dat_i',
|
|
'range' => 'Dw-1 : 0',
|
|
'intfc_name' => 'plug:wb_master[0]'
|
|
},
|
|
'flit_in_wr' => {
|
|
'type' => 'input',
|
|
'intfc_port' => 'flit_in_wr',
|
|
'range' => '',
|
|
'intfc_name' => 'socket:ni[0]'
|
|
},
|
|
's_sel_i' => {
|
|
'range' => 'SELw-1 : 0',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'type' => 'input',
|
|
'intfc_port' => 'sel_i'
|
|
},
|
|
'm_send_we_o' => {
|
|
'intfc_name' => 'plug:wb_master[0]',
|
|
'range' => '',
|
|
'type' => 'output',
|
|
'intfc_port' => 'we_o'
|
|
},
|
|
'flit_out' => {
|
|
'intfc_port' => 'flit_out',
|
|
'type' => 'output',
|
|
'intfc_name' => 'socket:ni[0]',
|
|
'range' => 'Fw-1 : 0'
|
|
},
|
|
'm_send_cti_o' => {
|
|
'range' => 'TAGw-1 : 0',
|
|
'intfc_name' => 'plug:wb_master[0]',
|
|
'intfc_port' => 'cti_o',
|
|
'type' => 'output'
|
|
},
|
|
'm_receive_stb_o' => {
|
|
'type' => 'output',
|
|
'intfc_port' => 'stb_o',
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_master[1]'
|
|
},
|
|
'm_send_cyc_o' => {
|
|
'type' => 'output',
|
|
'intfc_port' => 'cyc_o',
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_master[0]'
|
|
},
|
|
's_cyc_i' => {
|
|
'intfc_port' => 'cyc_i',
|
|
'type' => 'input',
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_slave[0]'
|
|
},
|
|
'm_send_addr_o' => {
|
|
'range' => 'M_Aw-1 : 0',
|
|
'intfc_name' => 'plug:wb_master[0]',
|
|
'type' => 'output',
|
|
'intfc_port' => 'adr_o'
|
|
},
|
|
'm_receive_dat_o' => {
|
|
'intfc_name' => 'plug:wb_master[1]',
|
|
'range' => 'Dw-1 : 0',
|
|
'type' => 'output',
|
|
'intfc_port' => 'dat_o'
|
|
},
|
|
's_dat_i' => {
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => 'Dw-1 : 0',
|
|
'type' => 'input',
|
|
'intfc_port' => 'dat_i'
|
|
},
|
|
'm_receive_sel_o' => {
|
|
'intfc_port' => 'sel_o',
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_master[1]',
|
|
'range' => 'SELw-1 : 0'
|
|
},
|
|
'clk' => {
|
|
'intfc_port' => 'clk_i',
|
|
'type' => 'input',
|
|
'intfc_name' => 'plug:clk[0]',
|
|
'range' => ''
|
|
},
|
|
'current_y' => {
|
|
'type' => 'input',
|
|
'intfc_port' => 'current_y',
|
|
'range' => 'Yw-1 : 0',
|
|
'intfc_name' => 'socket:ni[0]'
|
|
},
|
|
'm_receive_ack_i' => {
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_master[1]',
|
|
'type' => 'input',
|
|
'intfc_port' => 'ack_i'
|
|
},
|
|
's_addr_i' => {
|
|
'intfc_port' => 'adr_i',
|
|
'type' => 'input',
|
|
'range' => 'S_Aw-1 : 0',
|
|
'intfc_name' => 'plug:wb_slave[0]'
|
|
},
|
|
'credit_out' => {
|
|
'range' => 'V-1 : 0',
|
|
'intfc_name' => 'socket:ni[0]',
|
|
'intfc_port' => 'credit_out',
|
|
'type' => 'output'
|
|
},
|
|
's_ack_o' => {
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => '',
|
|
'type' => 'output',
|
|
'intfc_port' => 'ack_o'
|
|
},
|
|
'irq' => {
|
|
'type' => 'output',
|
|
'intfc_port' => 'int_o',
|
|
'range' => '',
|
|
'intfc_name' => 'plug:interrupt_peripheral[0]'
|
|
},
|
|
'credit_in' => {
|
|
'type' => 'input',
|
|
'intfc_port' => 'credit_in',
|
|
'intfc_name' => 'socket:ni[0]',
|
|
'range' => 'V-1 : 0'
|
}
|
}
|
},
|
},
|
'ports_order' => [
|
'ports_order' => [
|
'reset',
|
'reset',
|
'clk',
|
'clk',
|
'current_x',
|
'current_x',
|
'current_y',
|
'current_y',
|
'flit_out',
|
'flit_out',
|
'flit_out_wr',
|
'flit_out_wr',
|
'credit_in',
|
'credit_in',
|
'flit_in',
|
'flit_in',
|
'flit_in_wr',
|
'flit_in_wr',
|
'credit_out',
|
'credit_out',
|
's_dat_i',
|
's_dat_i',
|
's_sel_i',
|
's_sel_i',
|
's_addr_i',
|
's_addr_i',
|
's_cti_i',
|
's_cti_i',
|
's_stb_i',
|
's_stb_i',
|
's_cyc_i',
|
's_cyc_i',
|
's_we_i',
|
's_we_i',
|
's_dat_o',
|
's_dat_o',
|
's_ack_o',
|
's_ack_o',
|
'm_send_sel_o',
|
'm_send_sel_o',
|
'm_send_addr_o',
|
'm_send_addr_o',
|
'm_send_cti_o',
|
'm_send_cti_o',
|
'm_send_stb_o',
|
'm_send_stb_o',
|
'm_send_cyc_o',
|
'm_send_cyc_o',
|
'm_send_we_o',
|
'm_send_we_o',
|
'm_send_dat_i',
|
'm_send_dat_i',
|
'm_send_ack_i',
|
'm_send_ack_i',
|
'm_receive_sel_o',
|
'm_receive_sel_o',
|
'm_receive_dat_o',
|
'm_receive_dat_o',
|
'm_receive_addr_o',
|
'm_receive_addr_o',
|
'm_receive_cti_o',
|
'm_receive_cti_o',
|
'm_receive_stb_o',
|
'm_receive_stb_o',
|
'm_receive_cyc_o',
|
'm_receive_cyc_o',
|
'm_receive_we_o',
|
'm_receive_we_o',
|
'm_receive_ack_i',
|
'm_receive_ack_i',
|
'irq'
|
'irq'
|
],
|
],
|
|
'sockets' => {
|
|
'ni' => {
|
|
'0' => {
|
|
'name' => 'ni'
|
|
},
|
|
'value' => 1,
|
|
'ni' => {},
|
|
'type' => 'num',
|
|
'connection_num' => 'single connection'
|
|
}
|
|
},
|
|
'module_name' => 'ni_master',
|
'hdl_files' => [
|
'hdl_files' => [
|
'/mpsoc/src_noc/arbiter.v',
|
'/mpsoc/src_noc/arbiter.v',
|
'/mpsoc/src_noc/flit_buffer.v',
|
'/mpsoc/src_noc/flit_buffer.v',
|
'/mpsoc/src_noc/input_ports.v',
|
'/mpsoc/src_noc/input_ports.v',
|
'/mpsoc/src_noc/main_comp.v',
|
'/mpsoc/src_noc/main_comp.v',
|
'/mpsoc/src_noc/route_mesh.v',
|
'/mpsoc/src_noc/route_mesh.v',
|
'/mpsoc/src_noc/route_torus.v',
|
'/mpsoc/src_noc/route_torus.v',
|
'/mpsoc/src_noc/routing.v',
|
'/mpsoc/src_noc/routing.v',
|
'/mpsoc/src_peripheral/ni/ni_vc_dma.v',
|
'/mpsoc/src_peripheral/ni/ni_vc_dma.v',
|
'/mpsoc/src_peripheral/ni/ni_vc_wb_slave_regs.v',
|
'/mpsoc/src_peripheral/ni/ni_vc_wb_slave_regs.v',
|
'/mpsoc/src_peripheral/ni/ni_master.v',
|
'/mpsoc/src_peripheral/ni/ni_master.v',
|
'/mpsoc/src_peripheral/ni/ni_crc32.v'
|
'/mpsoc/src_peripheral/ni/ni_crc32.v'
|
],
|
],
|
|
'unused' => {
|
|
'plug:wb_slave[0]' => [
|
|
'err_o',
|
|
'rty_o',
|
|
'tag_i',
|
|
'bte_i'
|
|
],
|
|
'plug:wb_master[1]' => [
|
|
'tag_o',
|
|
'rty_i',
|
|
'bte_o',
|
|
'err_i',
|
|
'dat_i'
|
|
],
|
|
'plug:wb_master[0]' => [
|
|
'tag_o',
|
|
'rty_i',
|
|
'dat_o',
|
|
'bte_o',
|
|
'err_i'
|
|
]
|
|
},
|
|
'description_pdf' => '/mpsoc/src_peripheral/ni/NI.pdf',
|
'parameters' => {
|
'parameters' => {
|
'TOPOLOGY' => {
|
'C' => {
|
'default' => '"MESH"',
|
'content' => '',
|
'redefine_param' => 1,
|
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
|
'default' => ' 4',
|
'global_param' => 'Parameter',
|
'global_param' => 'Parameter',
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
'content' => ''
|
'redefine_param' => 1
|
},
|
},
|
'MAX_BURST_SIZE' => {
|
'Dw' => {
|
'content' => '2,4,8,16,32,64,128,256,512,1024,2048',
|
'type' => 'Spin-button',
|
'type' => 'Combo-box',
|
|
'info' => 'Maximum burst size in words.
|
|
The NI release wishbone bus each time one burst is completed or when the VC\'s internal FIFO becomes full. The bus will be released for one clock cycle. Then in case, there are other active VCs, another active VC will get access to the bus using round robin arbiter. This process will be continued until all desired data is transferred. ',
|
|
'global_param' => 'Localparam',
|
'global_param' => 'Localparam',
|
'redefine_param' => 1,
|
'default' => '32',
|
'default' => '16'
|
'info' => 'wishbone_bus data width in bits.',
|
|
'content' => '32,256,8',
|
|
'redefine_param' => 1
|
},
|
},
|
'ROUTING_HDR_WIDTH' => {
|
'SRC_ADR_HDR_WIDTH' => {
|
'content' => '',
|
|
'info' => 'Parameter',
|
|
'type' => 'Fixed',
|
|
'global_param' => 'Localparam',
|
'global_param' => 'Localparam',
|
'redefine_param' => 1,
|
|
'default' => '8'
|
|
},
|
|
'CLASS_HDR_WIDTH' => {
|
|
'redefine_param' => 1,
|
|
'default' => '8',
|
|
'content' => '',
|
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
'info' => 'Parameter',
|
|
'global_param' => 'Localparam'
|
|
},
|
|
'S_Aw' => {
|
|
'content' => '',
|
'content' => '',
|
'global_param' => 'Localparam',
|
'default' => '8',
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'type' => 'Fixed',
|
'redefine_param' => 1
|
'redefine_param' => 1,
|
|
'default' => '8'
|
|
},
|
},
|
'ROUTE_TYPE' => {
|
'SELw' => {
|
'redefine_param' => 1,
|
'redefine_param' => 1,
|
'default' => ' ',
|
|
'content' => '',
|
|
'info' => 'Parameter',
|
|
'global_param' => 'Parameter',
|
|
'type' => 'Fixed'
|
|
},
|
|
'DST_ADR_HDR_WIDTH' => {
|
|
'content' => '',
|
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
'info' => 'Parameter',
|
|
'global_param' => 'Localparam',
|
'global_param' => 'Localparam',
|
'redefine_param' => 1,
|
|
'default' => '8'
|
|
},
|
|
'NX' => {
|
|
'default' => ' 4',
|
|
'redefine_param' => 1,
|
|
'type' => 'Fixed',
|
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'global_param' => 'Parameter',
|
'default' => '4',
|
'content' => ''
|
'content' => ''
|
},
|
},
|
'SRC_ADR_HDR_WIDTH' => {
|
'DEBUG_EN' => {
|
'default' => '8',
|
|
'redefine_param' => 1,
|
'redefine_param' => 1,
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
|
'global_param' => 'Parameter',
|
|
'default' => ' 1',
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'global_param' => 'Localparam',
|
|
'content' => ''
|
'content' => ''
|
},
|
},
|
'ROUTE_NAME' => {
|
'NY' => {
|
|
'content' => '',
|
|
'info' => 'Parameter',
|
|
'default' => ' 4',
|
'global_param' => 'Parameter',
|
'global_param' => 'Parameter',
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
'info' => 'Parameter',
|
|
'content' => '',
|
|
'default' => '"XY" ',
|
|
'redefine_param' => 1
|
'redefine_param' => 1
|
},
|
},
|
'Xw' => {
|
'TOPOLOGY' => {
|
'redefine_param' => 0,
|
'default' => '"MESH"',
|
'default' => 'log2(NX)',
|
'info' => 'Parameter',
|
'content' => '',
|
'content' => '',
|
'info' => undef,
|
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
'global_param' => 'Localparam'
|
'global_param' => 'Parameter',
|
|
'redefine_param' => 1
|
},
|
},
|
'TAGw' => {
|
'Fpay' => {
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
|
'global_param' => 'Parameter',
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'global_param' => 'Localparam',
|
'default' => ' 32',
|
'content' => '',
|
'content' => '',
|
'default' => '3',
|
|
'redefine_param' => 1
|
'redefine_param' => 1
|
},
|
},
|
'DEBUG_EN' => {
|
'S_Aw' => {
|
'content' => '',
|
'content' => '',
|
|
'default' => '8',
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'global_param' => 'Parameter',
|
'global_param' => 'Localparam',
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
'redefine_param' => 1,
|
'redefine_param' => 1
|
'default' => ' 1'
|
|
},
|
},
|
'B' => {
|
'CLASS_HDR_WIDTH' => {
|
'redefine_param' => 1,
|
'redefine_param' => 1,
|
'default' => ' 4',
|
'global_param' => 'Localparam',
|
|
'type' => 'Fixed',
|
'content' => '',
|
'content' => '',
|
'info' => 'Parameter',
|
'default' => '8',
|
'global_param' => 'Parameter',
|
'info' => 'Parameter'
|
'type' => 'Fixed'
|
|
},
|
},
|
'Dw' => {
|
'DST_ADR_HDR_WIDTH' => {
|
'redefine_param' => 1,
|
'redefine_param' => 1,
|
'default' => '32',
|
'type' => 'Fixed',
|
'content' => '32,256,8',
|
|
'info' => 'wishbone_bus data width in bits.',
|
|
'global_param' => 'Localparam',
|
'global_param' => 'Localparam',
|
'type' => 'Spin-button'
|
'default' => '8',
|
},
|
|
'Fpay' => {
|
|
'default' => ' 32',
|
|
'redefine_param' => 1,
|
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'type' => 'Fixed',
|
|
'global_param' => 'Parameter',
|
|
'content' => ''
|
'content' => ''
|
},
|
},
|
'NY' => {
|
'NX' => {
|
'redefine_param' => 1,
|
'type' => 'Fixed',
|
'default' => ' 4',
|
|
'content' => '',
|
|
'global_param' => 'Parameter',
|
|
'info' => 'Parameter',
|
|
'type' => 'Fixed'
|
|
},
|
|
'P' => {
|
|
'global_param' => 'Parameter',
|
'global_param' => 'Parameter',
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'type' => 'Fixed',
|
'default' => ' 4',
|
'content' => '',
|
'content' => '',
|
'default' => '5',
|
|
'redefine_param' => 1
|
'redefine_param' => 1
|
},
|
},
|
'SELw' => {
|
'ROUTE_NAME' => {
|
'redefine_param' => 1,
|
'redefine_param' => 1,
|
'default' => '4',
|
|
'content' => '',
|
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'type' => 'Fixed',
|
'default' => '"XY" ',
|
'global_param' => 'Localparam'
|
|
},
|
|
'V' => {
|
|
'redefine_param' => 1,
|
|
'default' => '4',
|
|
'content' => '',
|
'content' => '',
|
'info' => 'Parameter',
|
'type' => 'Fixed',
|
'global_param' => 'Parameter',
|
'global_param' => 'Parameter'
|
'type' => 'Fixed'
|
|
},
|
},
|
'CRC_EN' => {
|
'MAX_BURST_SIZE' => {
|
'type' => 'Combo-box',
|
'type' => 'Combo-box',
|
'global_param' => 'Localparam',
|
'global_param' => 'Localparam',
|
'info' => 'The parameter can be selected as "YES" or "NO".
|
'default' => '16',
|
If CRC is enabled, then two CRC32 generator modules will be added to the NI. One CRC generator for calculating CRC of sending packets and another for receiving packets. The CRC32 value of each packet is send via tail flit and at destination NI, is will be compared with received packet generated CRC32. The matching results can be used for error-detection and can be read via NI slave interface. ',
|
'info' => 'Maximum burst size in words.
|
'content' => '"YES","NO"',
|
The NI releases the wishbone bus each time one burst is completed or when the VC\'s internal FIFO becomes full. The bus will be released for one clock cycle. Then in case, there are other active VCs, another active VC will get access to the bus using round robin arbiter. This process will be continued until all of the desired data is transferred. ',
|
'default' => '"NO"',
|
'content' => '2,4,8,16,32,64,128,256,512,1024,2048',
|
'redefine_param' => 1
|
'redefine_param' => 1
|
},
|
},
|
'Yw' => {
|
|
'default' => 'log2(NY)',
|
|
'redefine_param' => 0,
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Fixed',
|
|
'info' => undef,
|
|
'content' => ''
|
|
},
|
|
'M_Aw' => {
|
'M_Aw' => {
|
'redefine_param' => 1,
|
|
'default' => '32',
|
'default' => '32',
|
'content' => 'Dw',
|
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
|
'content' => 'Dw',
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
'global_param' => 'Localparam'
|
'global_param' => 'Localparam',
|
|
'redefine_param' => 1
|
},
|
},
|
'Fw' => {
|
'Fw' => {
|
'type' => 'Fixed',
|
|
'info' => undef,
|
|
'global_param' => 'Localparam',
|
|
'content' => '',
|
'content' => '',
|
'default' => '2+V+Fpay',
|
'default' => '2+V+Fpay',
|
|
'info' => undef,
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Fixed',
|
'redefine_param' => 0
|
'redefine_param' => 0
|
},
|
},
|
'MAX_TRANSACTION_WIDTH' => {
|
'TAGw' => {
|
'global_param' => 'Localparam',
|
'global_param' => 'Localparam',
|
'type' => 'Spin-button',
|
'type' => 'Fixed',
|
'info' => 'maximum packet size width in words.
|
'content' => '',
|
The maximum data that can be sent via one packet will be 2 power of MAX_DMA_TRANSACTION_WIDTH in words.',
|
'info' => 'Parameter',
|
'content' => '4,32,1',
|
'default' => '3',
|
'default' => '13',
|
|
'redefine_param' => 1
|
'redefine_param' => 1
|
},
|
},
|
'C' => {
|
'ROUTING_HDR_WIDTH' => {
|
'default' => ' 4',
|
|
'redefine_param' => 1,
|
'redefine_param' => 1,
|
|
'default' => '8',
|
'info' => 'Parameter',
|
'info' => 'Parameter',
|
'global_param' => 'Parameter',
|
'content' => '',
|
'type' => 'Fixed',
|
'type' => 'Fixed',
|
'content' => ''
|
'global_param' => 'Localparam'
|
}
|
|
},
|
|
'ports' => {
|
|
's_dat_o' => {
|
|
'intfc_port' => 'dat_o',
|
|
'range' => 'Dw-1 : 0',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'type' => 'output'
|
|
},
|
|
's_stb_i' => {
|
|
'type' => 'input',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => '',
|
|
'intfc_port' => 'stb_i'
|
|
},
|
|
'm_receive_sel_o' => {
|
|
'range' => 'SELw-1 : 0',
|
|
'intfc_name' => 'plug:wb_master[1]',
|
|
'type' => 'output',
|
|
'intfc_port' => 'sel_o'
|
|
},
|
|
'm_receive_ack_i' => {
|
|
'intfc_port' => 'ack_i',
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_master[1]',
|
|
'type' => 'input'
|
|
},
|
|
's_cyc_i' => {
|
|
'intfc_port' => 'cyc_i',
|
|
'type' => 'input',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => ''
|
|
},
|
|
'm_send_addr_o' => {
|
|
'intfc_port' => 'adr_o',
|
|
'range' => 'M_Aw-1 : 0',
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_master[0]'
|
|
},
|
|
'm_send_we_o' => {
|
|
'range' => '',
|
|
'intfc_name' => 'plug:wb_master[0]',
|
|
'type' => 'output',
|
|
'intfc_port' => 'we_o'
|
|
},
|
|
'current_x' => {
|
|
'intfc_port' => 'current_x',
|
|
'range' => 'Xw-1 : 0',
|
|
'intfc_name' => 'socket:ni[0]',
|
|
'type' => 'input'
|
|
},
|
|
'clk' => {
|
|
'type' => 'input',
|
|
'intfc_name' => 'plug:clk[0]',
|
|
'range' => '',
|
|
'intfc_port' => 'clk_i'
|
|
},
|
|
'm_receive_addr_o' => {
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_master[1]',
|
|
'range' => 'M_Aw-1 : 0',
|
|
'intfc_port' => 'adr_o'
|
|
},
|
|
's_dat_i' => {
|
|
'type' => 'input',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => 'Dw-1 : 0',
|
|
'intfc_port' => 'dat_i'
|
|
},
|
|
'm_receive_dat_o' => {
|
|
'intfc_port' => 'dat_o',
|
|
'range' => 'Dw-1 : 0',
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_master[1]'
|
|
},
|
|
's_sel_i' => {
|
|
'intfc_port' => 'sel_i',
|
|
'type' => 'input',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => 'SELw-1 : 0'
|
|
},
|
|
's_ack_o' => {
|
|
'intfc_port' => 'ack_o',
|
|
'range' => '',
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_slave[0]'
|
|
},
|
|
'm_receive_stb_o' => {
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_master[1]',
|
|
'range' => '',
|
|
'intfc_port' => 'stb_o'
|
|
},
|
|
'flit_out_wr' => {
|
|
'intfc_name' => 'socket:ni[0]',
|
|
'type' => 'output',
|
|
'range' => '',
|
|
'intfc_port' => 'flit_out_wr'
|
|
},
|
|
'current_y' => {
|
|
'intfc_port' => 'current_y',
|
|
'intfc_name' => 'socket:ni[0]',
|
|
'type' => 'input',
|
|
'range' => 'Yw-1 : 0'
|
|
},
|
|
'm_send_cti_o' => {
|
|
'range' => 'TAGw-1 : 0',
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_master[0]',
|
|
'intfc_port' => 'cti_o'
|
|
},
|
|
'm_receive_we_o' => {
|
|
'range' => '',
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_master[1]',
|
|
'intfc_port' => 'we_o'
|
|
},
|
},
|
'flit_in' => {
|
'Xw' => {
|
'range' => 'Fw-1 : 0',
|
'type' => 'Fixed',
|
'type' => 'input',
|
'global_param' => 'Localparam',
|
'intfc_name' => 'socket:ni[0]',
|
'info' => undef,
|
'intfc_port' => 'flit_in'
|
'default' => 'log2(NX)',
|
|
'content' => '',
|
|
'redefine_param' => 0
|
},
|
},
|
'flit_out' => {
|
'CRC_EN' => {
|
'range' => 'Fw-1 : 0',
|
'redefine_param' => 1,
|
'type' => 'output',
|
'global_param' => 'Localparam',
|
'intfc_name' => 'socket:ni[0]',
|
'type' => 'Combo-box',
|
'intfc_port' => 'flit_out'
|
'content' => '"YES","NO"',
|
|
'default' => '"NO"',
|
|
'info' => 'The parameter can be selected as "YES" or "NO".
|
|
If CRC is enabled, then two CRC32 generator modules will be added to the NI. One CRC generator for calculating CRC of sending packets and another for receiving packets. The CRC32 value of each packet is send via tail flit and at destination NI, is will be compared with received packet generated CRC32. The matching results can be used for error-detection and can be read via NI slave interface. '
|
},
|
},
|
's_addr_i' => {
|
'Yw' => {
|
'intfc_port' => 'adr_i',
|
'redefine_param' => 0,
|
'range' => 'S_Aw-1 : 0',
|
'content' => '',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'info' => undef,
|
'type' => 'input'
|
'default' => 'log2(NY)',
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Fixed'
|
},
|
},
|
'm_send_stb_o' => {
|
'V' => {
|
'type' => 'output',
|
'content' => '',
|
'intfc_name' => 'plug:wb_master[0]',
|
'default' => '4',
|
'range' => '',
|
'info' => 'Parameter',
|
'intfc_port' => 'stb_o'
|
'global_param' => 'Parameter',
|
|
'type' => 'Fixed',
|
|
'redefine_param' => 1
|
},
|
},
|
's_we_i' => {
|
'B' => {
|
'intfc_port' => 'we_i',
|
'content' => '',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'info' => 'Parameter',
|
'type' => 'input',
|
'default' => ' 4',
|
'range' => ''
|
'global_param' => 'Parameter',
|
|
'type' => 'Fixed',
|
|
'redefine_param' => 1
|
},
|
},
|
'm_receive_cti_o' => {
|
'MAX_TRANSACTION_WIDTH' => {
|
'intfc_port' => 'cti_o',
|
'content' => '4,32,1',
|
'range' => 'TAGw-1 : 0',
|
'default' => '13',
|
'intfc_name' => 'plug:wb_master[1]',
|
'info' => 'maximum packet size width in words.
|
'type' => 'output'
|
The maximum data that can be sent via one packet will be 2 power of MAX_DMA_TRANSACTION_WIDTH in words.',
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Spin-button',
|
|
'redefine_param' => 1
|
|
}
|
},
|
},
|
's_cti_i' => {
|
'modules' => {
|
'intfc_port' => 'cti_i',
|
'vc_wb_slave_registers' => {},
|
'range' => 'TAGw-1 : 0',
|
'ovc_status' => {},
|
'intfc_name' => 'plug:wb_slave[0]',
|
'header_flit_generator' => {},
|
'type' => 'input'
|
'ni_master' => {},
|
|
'ni_vc_dma' => {}
|
},
|
},
|
'm_send_cyc_o' => {
|
'category' => 'NoC',
|
'type' => 'output',
|
'parameters_order' => [
|
'intfc_name' => 'plug:wb_master[0]',
|
'CLASS_HDR_WIDTH',
|
'range' => '',
|
'ROUTING_HDR_WIDTH',
|
'intfc_port' => 'cyc_o'
|
'DST_ADR_HDR_WIDTH',
|
|
'SRC_ADR_HDR_WIDTH',
|
|
'TOPOLOGY',
|
|
'ROUTE_NAME',
|
|
'NX',
|
|
'NY',
|
|
'C',
|
|
'V',
|
|
'B',
|
|
'Fpay',
|
|
'MAX_TRANSACTION_WIDTH',
|
|
'MAX_BURST_SIZE',
|
|
'DEBUG_EN',
|
|
'Dw',
|
|
'S_Aw',
|
|
'M_Aw',
|
|
'TAGw',
|
|
'SELw',
|
|
'Xw',
|
|
'Yw',
|
|
'Fw',
|
|
'CRC_EN'
|
|
],
|
|
'plugs' => {
|
|
'clk' => {
|
|
'0' => {
|
|
'name' => 'clk'
|
},
|
},
|
'm_send_sel_o' => {
|
'clk' => {},
|
'intfc_port' => 'sel_o',
|
'type' => 'num',
|
'range' => 'SELw-1 : 0',
|
'value' => 1
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_master[0]'
|
|
},
|
},
|
'reset' => {
|
'reset' => {
|
'range' => '',
|
'0' => {
|
'type' => 'input',
|
'name' => 'reset'
|
'intfc_name' => 'plug:reset[0]',
|
|
'intfc_port' => 'reset_i'
|
|
},
|
|
'credit_in' => {
|
|
'type' => 'input',
|
|
'intfc_name' => 'socket:ni[0]',
|
|
'range' => 'V-1 : 0',
|
|
'intfc_port' => 'credit_in'
|
|
},
|
},
|
'm_send_dat_i' => {
|
'type' => 'num',
|
'intfc_port' => 'dat_i',
|
'reset' => {},
|
'type' => 'input',
|
'value' => 1
|
'intfc_name' => 'plug:wb_master[0]',
|
|
'range' => 'Dw-1 : 0'
|
|
},
|
},
|
'credit_out' => {
|
'wb_slave' => {
|
'range' => 'V-1 : 0',
|
'wb_slave' => {},
|
'intfc_name' => 'socket:ni[0]',
|
'type' => 'num',
|
'type' => 'output',
|
'value' => 1,
|
'intfc_port' => 'credit_out'
|
'0' => {
|
|
'name' => 'wb_slave',
|
|
'width' => 10,
|
|
'addr' => '0xb800_0000 0xbfff_ffff custom devices'
|
|
}
|
},
|
},
|
'm_receive_cyc_o' => {
|
'interrupt_peripheral' => {
|
'intfc_name' => 'plug:wb_master[1]',
|
'value' => 1,
|
'type' => 'output',
|
'type' => 'num',
|
'range' => '',
|
'0' => {
|
'intfc_port' => 'cyc_o'
|
'name' => 'interrupt'
|
},
|
},
|
'm_send_ack_i' => {
|
'interrupt_peripheral' => {}
|
'intfc_port' => 'ack_i',
|
|
'intfc_name' => 'plug:wb_master[0]',
|
|
'type' => 'input',
|
|
'range' => ''
|
|
},
|
},
|
'irq' => {
|
'wb_master' => {
|
'range' => '',
|
'0' => {
|
'type' => 'output',
|
'name' => 'wb_send'
|
'intfc_name' => 'plug:interrupt_peripheral[0]',
|
|
'intfc_port' => 'int_o'
|
|
},
|
},
|
'flit_in_wr' => {
|
'wb_master' => {},
|
'range' => '',
|
'type' => 'num',
|
'type' => 'input',
|
'value' => 2,
|
'intfc_name' => 'socket:ni[0]',
|
'1' => {
|
'intfc_port' => 'flit_in_wr'
|
'name' => 'wb_receive'
|
|
}
|
}
|
}
|
},
|
},
|
'description_pdf' => '/mpsoc/src_peripheral/ni/NI.pdf',
|
'file_name' => '/home/alireza/mywork/mpsoc/src_peripheral/ni/ni_master.v',
|
'category' => 'NoC',
|
'version' => 40,
|
'gui_status' => {
|
'ip_name' => 'ni_master',
|
'timeout' => 0,
|
|
'status' => 'ideal'
|
|
},
|
|
'system_h' => ' /* NI wb registers addresses
|
'system_h' => ' /* NI wb registers addresses
|
0 : STATUS1_WB_ADDR // status1: {send_enable_binarry,receive_enable_binarry,send_vc_is_busy,receive_vc_is_busy,receive_vc_got_packet}
|
0 : STATUS1_WB_ADDR // status1: {send_vc_is_busy,receive_vc_is_busy,receive_vc_packet_is_saved,receive_vc_got_packet};
|
1 : STATUS2_WB_ADDR // status2:
|
1 : STATUS2_WB_ADDR // status2: {send_enable_binary,receive_enable_binary,vc_got_error,any_error_isr,got_pck_isr, save_done_isr,send_done_isr,any_error_int_en,got_pck_int_en, save_done_int_en,send_done_int_en};
|
2 : BURST_SIZE_WB_ADDR // The busrt size in words
|
2 : BURST_SIZE_WB_ADDR // The busrt size in words
|
|
|
3 : SEND_DATA_SIZE_WB_ADDR, // The size of data to be sent in byte
|
3 : SEND_DATA_SIZE_WB_ADDR, // The size of data to be sent in byte
|
4 : SEND_STRT_WB_ADDR, // The address of data to be sent in byte
|
4 : SEND_STRT_WB_ADDR, // The address of data to be sent in byte
|
5 : SEND_DEST_WB_ADDR // The destination router address
|
5 : SEND_DEST_WB_ADDR // The destination router address
|
6 : SEND_CTRL_WB_ADDR
|
6 : SEND_CTRL_WB_ADDR
|
|
|
7 : RECEIVE_DATA_SIZE_WB_ADDR // The size of recieved data in byte
|
7 : RECEIVE_DATA_SIZE_WB_ADDR // The size of recieved data in byte
|
8 : RECEIVE_STRT_WB_ADDR // The address pointer of reciever memory in byte
|
8 : RECEIVE_STRT_WB_ADDR // The address pointer of reciever memory in byte
|
9 : RECEIVE_SRC_WB_ADDR // The source router (the router which is sent this packet).
|
9 : RECEIVE_SRC_WB_ADDR // The source router (the router which is sent this packet).
|
10 : RECEIVE_CTRL_WB_ADDR // The NI reciever control register
|
10 : RECEIVE_CTRL_WB_ADDR // The NI reciever control register
|
11 : RECEIVE_MAX_BUFF_SIZ // The receiver\'s allocated buffer size in words. If the packet size is bigger tha the buffer size the rest of will be discarred
|
11 : RECEIVE_MAX_BUFF_SIZ // The receiver\'s allocated buffer size in words. If the packet size is bigger tha the buffer size the rest of will be discarred
|
|
12 : ERROR_FLAGS // errors: {crc_miss_match,burst_size_error,send_data_size_error,rcive_buff_ovrflw_err};
|
|
|
*/
|
*/
|
|
#define CORID ${CORE_ID}
|
|
#define MAX_X_ADDR ${NX}
|
|
#define MAX_Y_ADDR ${NY}
|
|
|
|
#define Y_ADDR (CORID / MAX_X_ADDR)
|
|
#define X_ADDR (CORID % MAX_X_ADDR)
|
|
|
|
|
|
|
#define ${IP}_STATUS1_REG (*((volatile unsigned int *) ($BASE))) //0
|
#define ${IP}_STATUS1_REG (*((volatile unsigned int *) ($BASE))) //0
|
#define ${IP}_STATUS2_REG (*((volatile unsigned int *) ($BASE+4))) //1
|
#define ${IP}_STATUS2_REG (*((volatile unsigned int *) ($BASE+4))) //1
|
#define ${IP}_BURST_SIZE_REG (*((volatile unsigned int *) ($BASE+8))) //2
|
#define ${IP}_BURST_SIZE_REG (*((volatile unsigned int *) ($BASE+8))) //2
|
|
|
|
|
#define ${IP}_NUM_VCs ${V}
|
#define ${IP}_NUM_VCs ${V}
|
|
|
#define ${IP}_SEND_DATA_SIZE_REG(v) (*((volatile unsigned int *) ($BASE+12+(v<<6)))) //3
|
#define ${IP}_SEND_DATA_SIZE_REG(v) (*((volatile unsigned int *) ($BASE+12+(v<<6)))) //3
|
#define ${IP}_SEND_START_ADDR_REG(v) (*((volatile unsigned int *) ($BASE+16+(v<<6)))) //4
|
#define ${IP}_SEND_START_ADDR_REG(v) (*((volatile unsigned int *) ($BASE+16+(v<<6)))) //4
|
#define ${IP}_SEND_DEST_REG(v) (*((volatile unsigned int *) ($BASE+20+(v<<6)))) //5
|
#define ${IP}_SEND_DEST_REG(v) (*((volatile unsigned int *) ($BASE+20+(v<<6)))) //5
|
#define ${IP}_SEND_CTRL_REG(v) (*((volatile unsigned int *) ($BASE+24+(v<<6)))) //6
|
#define ${IP}_SEND_CTRL_REG(v) (*((volatile unsigned int *) ($BASE+24+(v<<6)))) //6
|
|
|
#define ${IP}_RECEIVE_DATA_SIZE_REG(v) (*((volatile unsigned int *) ($BASE+28+(v<<6)))) //7
|
#define ${IP}_RECEIVE_DATA_SIZE_REG(v) (*((volatile unsigned int *) ($BASE+28+(v<<6)))) //7
|
#define ${IP}_RECEIVE_STRT_ADDR_REG(v) (*((volatile unsigned int *) ($BASE+32+(v<<6)))) //8
|
#define ${IP}_RECEIVE_STRT_ADDR_REG(v) (*((volatile unsigned int *) ($BASE+32+(v<<6)))) //8
|
#define ${IP}_RECEIVE_CTRL_REG(v) (*((volatile unsigned int *) ($BASE+36+(v<<6)))) //9
|
#define ${IP}_RECEIVE_SRC_REG(v) (*((volatile unsigned int *) ($BASE+36+(v<<6)))) //9
|
#define ${IP}_RECEIVE_MAX_BUFF_SIZ_REG(v) (*((volatile unsigned int *) ($BASE+40+(v<<6)))) //10
|
#define ${IP}_RECEIVE_CTRL_REG(v) (*((volatile unsigned int *) ($BASE+40+(v<<6)))) //10
|
#define ${IP}_RECEIVE_CRC_MATCH_REG(v) (*((volatile unsigned int *) ($BASE+44+(v<<6)))) //11
|
#define ${IP}_RECEIVE_MAX_BUFF_SIZ_REG(v) (*((volatile unsigned int *) ($BASE+44+(v<<6)))) //11
|
|
#define ${IP}_ERROR_FLAGS_REG(v) (*((volatile unsigned int *) ($BASE+48+(v<<6)))) //12
|
|
|
|
|
|
|
// assign status1= {send_vc_is_busy,receive_vc_is_busy,receive_vc_packet_is_saved,receive_vc_got_packet};
|
// assign status1= {send_vc_is_busy,receive_vc_is_busy,receive_vc_packet_is_saved,receive_vc_got_packet};
|
// assign status2= {send_enable_binarry,receive_enable_binarry,crc_miss_match,got_pck_isr, save_done_isr,send_done_isr,got_pck_int_en, save_done_int_en,send_done_int_en};
|
// assign status2= {send_enable_binary,receive_enable_binary,vc_got_error,any_error_isr,got_pck_isr, save_done_isr,send_done_isr,any_error_int_en,got_pck_int_en, save_done_int_en,send_done_int_en};
|
|
|
|
|
#define ${IP}_got_packet(v) ((${IP}_STATUS1_REG >> (v)) & 0x1)
|
#define ${IP}_got_packet(v) ((${IP}_STATUS1_REG >> (v)) & 0x1)
|
#define ${IP}_packet_is_saved(v) ((${IP}_STATUS1_REG >> (${V}+v)) & 0x1)
|
#define ${IP}_packet_is_saved(v) ((${IP}_STATUS1_REG >> (${V}+v)) & 0x1)
|
#define ${IP}_receive_is_busy(v) ((${IP}_STATUS1_REG >> (2*${V}+v)) & 0x1)
|
#define ${IP}_receive_is_busy(v) ((${IP}_STATUS1_REG >> (2*${V}+v)) & 0x1)
|
#define ${IP}_send_is_busy(v) ((${IP}_STATUS1_REG >> (3*${V}+v)) & 0x1)
|
#define ${IP}_send_is_busy(v) ((${IP}_STATUS1_REG >> (3*${V}+v)) & 0x1)
|
|
#define ${IP}_got_any_error(v) ((${IP}_STATUS2_REG >> (8+v)) & 0x1)
|
|
|
|
#define SEND_DONE_INT_EN (1<<0)
|
|
#define SAVE_DONE_INT_EN (1<<1)
|
|
#define GOT_PCK_INT_EN (1<<2)
|
|
#define ERRORS_INT_EN (1<<3)
|
|
#define ALL_INT_EN (SEND_DONE_INT_EN | SAVE_DONE_INT_EN | GOT_PCK_INT_EN | ERRORS_INT_EN)
|
|
|
|
#define SEND_DONE_ISR (1<<4)
|
|
#define SAVE_DONE_ISR (1<<5)
|
|
#define GOT_PCK_ISR (1<<6)
|
|
#define ERRORS_ISR (1<<7)
|
|
|
|
|
|
|
|
//errors = {crc_miss_match,illegal_send_req,burst_size_error,send_data_size_error,rcive_buff_ovrflw_err};
|
|
#define BUFF_OVER_FLOW_ERR (1<<0) // This error happens when the receiver allocated buffer size is smaller than the received packet size
|
|
#define SEND_DATA_SIZE_ERR (1<<1) // This error happens when the send data size is not set
|
|
#define BURST_SIZE_ERR (1<<2) // This error happens when the burst size is not set
|
|
#define ILLEGAL_SEND_REQ (1<<3) // This error happens when a new send request is received while the DMA is still busy sending previous packet
|
|
#define CRC_MISS_MATCH (1<<4) // This error happens when the received packet CRC miss match
|
|
|
|
//ack intrrupts functions
|
|
#define ${IP}_ack_send_done_isr() (${IP}_STATUS2_REG &= (ALL_INT_EN |SEND_DONE_ISR))
|
|
#define ${IP}_ack_save_done_isr() (${IP}_STATUS2_REG &= (ALL_INT_EN | SAVE_DONE_ISR))
|
|
#define ${IP}_ack_got_pck_isr() (${IP}_STATUS2_REG &= (ALL_INT_EN | GOT_PCK_ISR))
|
|
#define ${IP}_ack_errors_isr() (${IP}_STATUS2_REG &= (ALL_INT_EN | ERRORS_ISR))
|
|
|
|
#define ${IP}_ack_all_isr() (${IP}_STATUS2_REG = ${IP}_STATUS2_REG)
|
|
|
|
|
|
struct SRC_INFOS{
|
|
unsigned char r; // reserved
|
|
unsigned char c; // message class
|
|
unsigned char y; //y address
|
|
unsigned char x ; //x address
|
|
} ;
|
|
|
|
inline struct SRC_INFOS get_src_info(unsigned char v){
|
|
struct SRC_INFOS src_info =*(struct SRC_INFOS *) (&ni_RECEIVE_SRC_REG(v));
|
|
return src_info;
|
|
}
|
|
|
|
/*
|
|
The NI initializing function.
|
|
The burst_size must be <= $MAX_BURST_SIZE
|
|
send_int_en :1: enable the intrrupt when a packet is sent 0 : This intrrupt is disabled
|
|
save_int_en : 1: enable the intrrupt when a recived packet is saved on internal buffer 0 : This intrrupt is disabled
|
|
got_pck_int_en : 1: enable the intrrupt when a packet is recived in NI. 0 : This intrrupt is disabled
|
|
|
void ${IP}_initial (unsigned int burst_size) {
|
*/
|
|
void ${IP}_initial (unsigned int burst_size, unsigned char errors_int_en, unsigned char send_int_en, unsigned char save_int_en, unsigned char got_pck_int_en) {
|
${IP}_BURST_SIZE_REG = burst_size;
|
${IP}_BURST_SIZE_REG = burst_size;
|
|
if(errors_int_en) ${IP}_STATUS2_REG |= ERRORS_INT_EN;
|
|
if(send_int_en) ${IP}_STATUS2_REG |= SEND_DONE_INT_EN;
|
|
if(save_int_en) ${IP}_STATUS2_REG |= SAVE_DONE_INT_EN;
|
|
if(got_pck_int_en) ${IP}_STATUS2_REG |= GOT_PCK_INT_EN;
|
}
|
}
|
|
|
|
/*
|
|
The NI message sent function:
|
|
v: virtual channel number which this packet should be sent to
|
|
class_num: message class number. Diffrent message classes can be sent via isolated network resources to avoid protocol deadlock
|
|
data_start_addr : The address pointer to the start location of the packet to be sent in the memory
|
|
data_size: the message data size in words
|
|
dest_x: the x address of destination core
|
|
dest_y: the y address of destination core
|
|
|
|
*/
|
|
|
void ${IP}_transfer (unsigned int v, unsigned int class_num, unsigned int data_start_addr, unsigned int data_size, unsigned int dest_x,unsigned int dest_y){
|
void ${IP}_transfer (unsigned int v, unsigned int class_num, unsigned int data_start_addr, unsigned int data_size, unsigned int dest_x,unsigned int dest_y){
|
while (${IP}_send_is_busy(v)); // wait until VC is busy sending previous packet
|
while (${IP}_send_is_busy(v)); // wait until VC is busy sending previous packet
|
|
|
${IP}_SEND_DATA_SIZE_REG(v) = data_size;
|
${IP}_SEND_DATA_SIZE_REG(v) = data_size;
|
${IP}_SEND_START_ADDR_REG(v) = data_start_addr;
|
${IP}_SEND_START_ADDR_REG(v) = data_start_addr;
|
${IP}_SEND_DEST_REG(v) = dest_x | (dest_y<<4)| (class_num<<8) ;
|
${IP}_SEND_DEST_REG(v) = dest_x | (dest_y<<4)| (class_num<<8) ;
|
|
|
}
|
}
|
|
|
|
/*
|
|
The NI message receiver function:
|
|
v: virtual channel number of the received packet
|
|
data_start_addr : The address pointer to the start location of the memory where the newly arrived packet must be stored by NI in.
|
|
max_buffer_size : The allocated receive-memory buffer size in words.
|
|
*/
|
|
|
void ${IP}_receive (unsigned int v, unsigned int data_start_addr, unsigned int max_buffer_size){
|
void ${IP}_receive (unsigned int v, unsigned int data_start_addr, unsigned int max_buffer_size){
|
while (${IP}_receive_is_busy(v)); // wait until VC is busy saving previous packet
|
while (${IP}_receive_is_busy(v)); // wait until VC is busy saving previous packet
|
|
|
${IP}_RECEIVE_STRT_ADDR_REG(v) = data_start_addr;
|
${IP}_RECEIVE_STRT_ADDR_REG(v) = data_start_addr;
|
${IP}_RECEIVE_MAX_BUFF_SIZ_REG(v) = max_buffer_size;
|
${IP}_RECEIVE_MAX_BUFF_SIZ_REG(v) = max_buffer_size;
|
${IP}_RECEIVE_CTRL_REG(v) = 1;
|
${IP}_RECEIVE_CTRL_REG(v) = 1;
|
|
|
|
|
}',
|
}',
|
'modules' => {
|
'description' => '',
|
'header_flit_generator' => {},
|
'gui_status' => {
|
'vc_wb_slave_registers' => {},
|
'timeout' => 0,
|
'ni_vc_dma' => {},
|
'status' => 'ideal'
|
'ovc_status' => {},
|
|
'ni_master' => {}
|
|
},
|
|
'version' => 38,
|
|
'parameters_order' => [
|
|
'CLASS_HDR_WIDTH',
|
|
'ROUTING_HDR_WIDTH',
|
|
'DST_ADR_HDR_WIDTH',
|
|
'SRC_ADR_HDR_WIDTH',
|
|
'TOPOLOGY',
|
|
'ROUTE_NAME',
|
|
'NX',
|
|
'NY',
|
|
'C',
|
|
'V',
|
|
'B',
|
|
'Fpay',
|
|
'MAX_TRANSACTION_WIDTH',
|
|
'MAX_BURST_SIZE',
|
|
'DEBUG_EN',
|
|
'Dw',
|
|
'S_Aw',
|
|
'M_Aw',
|
|
'TAGw',
|
|
'SELw',
|
|
'Xw',
|
|
'Yw',
|
|
'Fw',
|
|
'CRC_EN'
|
|
],
|
|
'unused' => {
|
|
'plug:wb_master[0]' => [
|
|
'dat_o',
|
|
'err_i',
|
|
'bte_o',
|
|
'rty_i',
|
|
'tag_o'
|
|
],
|
|
'plug:wb_slave[0]' => [
|
|
'rty_o',
|
|
'bte_i',
|
|
'err_o',
|
|
'tag_i'
|
|
],
|
|
'plug:wb_master[1]' => [
|
|
'err_i',
|
|
'bte_o',
|
|
'rty_i',
|
|
'dat_i',
|
|
'tag_o'
|
|
]
|
|
},
|
|
'sockets' => {
|
|
'ni' => {
|
|
'value' => 1,
|
|
'ni' => {},
|
|
'type' => 'num',
|
|
'connection_num' => 'single connection',
|
|
'0' => {
|
|
'name' => 'ni'
|
|
}
|
|
}
|
}
|
},
|
|
'module_name' => 'ni_master',
|
|
'ip_name' => 'ni_master'
|
|
}, 'ip_gen' );
|
}, 'ip_gen' );
|
|
|