#######################################################################
|
#######################################################################
|
## File: sim_uart.IP
|
## File: sim_uart.IP
|
##
|
##
|
## Copyright (C) 2014-2016 Alireza Monemi
|
## Copyright (C) 2014-2016 Alireza Monemi
|
##
|
##
|
## This file is part of ProNoC 1.7.0
|
## This file is part of ProNoC 1.7.0
|
##
|
##
|
## 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.
|
################################################################################
|
################################################################################
|
|
|
$simulator_UART = bless( {
|
$simulator_UART = bless( {
|
|
'module_name' => 'simulator_UART',
|
|
'system_h' => '#define ${IP}_DATA_REG (*((volatile unsigned int *) ($BASE)))
|
|
|
|
void ${IP}_putchar(char ch){ //print one char from jtag_uart
|
|
${IP}_DATA_REG=ch;
|
|
}
|
|
|
|
|
|
void ${IP}_putstring (char * buffer, char sz){
|
|
while (sz){
|
|
${IP}_putchar(*buffer);
|
|
buffer++;
|
|
sz--;
|
|
}
|
|
}
|
|
',
|
|
'description' => 'A simple uart that display input characters on simulator terminal using $write command.
|
|
',
|
|
'ports_order' => [
|
|
'reset',
|
|
'clk',
|
|
's_dat_i',
|
|
's_sel_i',
|
|
's_addr_i',
|
|
's_cti_i',
|
|
's_stb_i',
|
|
's_cyc_i',
|
|
's_we_i',
|
|
's_dat_o',
|
|
's_ack_o'
|
|
],
|
'file_name' => '/home/alireza/mywork/mpsoc/src_peripheral/Other/simulator_UART.v',
|
'file_name' => '/home/alireza/mywork/mpsoc/src_peripheral/Other/simulator_UART.v',
|
'gui_status' => {
|
'version' => 7,
|
'status' => 'ideal',
|
'unused' => {
|
'timeout' => 0
|
'plug:wb_slave[0]' => [
|
|
'bte_i',
|
|
'rty_o',
|
|
'tag_i',
|
|
'err_o'
|
|
]
|
},
|
},
|
'version' => 6,
|
|
'modules' => {
|
'modules' => {
|
'simulator_UART' => {}
|
'simulator_UART' => {}
|
},
|
},
|
|
'parameters' => {
|
|
'S_Aw' => {
|
|
'content' => '',
|
|
'type' => 'Fixed',
|
|
'info' => 'Parameter',
|
|
'global_param' => 'Localparam',
|
|
'redefine_param' => 1,
|
|
'default' => ' 7'
|
|
},
|
|
'M_Aw' => {
|
|
'redefine_param' => 1,
|
|
'info' => 'Parameter',
|
|
'global_param' => 'Localparam',
|
|
'default' => ' 32',
|
|
'type' => 'Fixed',
|
|
'content' => ''
|
|
},
|
|
'BUFFER_SIZE' => {
|
|
'default' => '100',
|
|
'info' => 'Internal buffer size ',
|
|
'global_param' => 'Localparam',
|
|
'redefine_param' => 1,
|
|
'content' => '2,1000,1',
|
|
'type' => 'Spin-button'
|
|
},
|
|
'Dw' => {
|
|
'default' => ' 32',
|
|
'redefine_param' => 1,
|
|
'info' => 'Parameter',
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Fixed',
|
|
'content' => ''
|
|
},
|
|
'WAIT_COUNT' => {
|
|
'type' => 'Spin-button',
|
|
'content' => '2,100000,1',
|
|
'redefine_param' => 1,
|
|
'info' => 'If internal buffer has a data, the internal module timer starts counting up in each clock cycle. If Timer reach the WAIT_COUNT value, it writes the buffer vakue on simulator terminal.',
|
|
'global_param' => 'Localparam',
|
|
'default' => '1000'
|
|
},
|
|
'TAGw' => {
|
|
'type' => 'Fixed',
|
|
'content' => '',
|
|
'redefine_param' => 1,
|
|
'global_param' => 'Localparam',
|
|
'info' => 'Parameter',
|
|
'default' => ' 3'
|
|
},
|
|
'SELw' => {
|
|
'type' => 'Fixed',
|
|
'content' => '',
|
|
'default' => ' 4',
|
|
'redefine_param' => 1,
|
|
'global_param' => 'Localparam',
|
|
'info' => 'Parameter'
|
|
}
|
|
},
|
|
'category' => 'Other',
|
'ports' => {
|
'ports' => {
|
's_stb_i' => {
|
's_cti_i' => {
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_port' => 'stb_i',
|
|
'range' => '',
|
|
'type' => 'input'
|
|
},
|
|
's_cyc_i' => {
|
|
'type' => 'input',
|
'type' => 'input',
|
'range' => '',
|
'intfc_port' => 'cti_i',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'range' => 'TAGw-1 : 0'
|
'intfc_port' => 'cyc_i'
|
|
},
|
},
|
's_sel_i' => {
|
's_sel_i' => {
|
'intfc_port' => 'sel_i',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'range' => 'SELw-1 : 0',
|
|
'intfc_port' => 'sel_i',
|
|
'type' => 'input'
|
|
},
|
|
's_addr_i' => {
|
|
'range' => 'S_Aw-1 : 0',
|
'type' => 'input',
|
'type' => 'input',
|
'range' => 'SELw-1 : 0'
|
'intfc_port' => 'adr_i',
|
|
'intfc_name' => 'plug:wb_slave[0]'
|
},
|
},
|
'reset' => {
|
's_dat_o' => {
|
'range' => '',
|
'range' => 'Dw-1 : 0',
|
|
'intfc_port' => 'dat_o',
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_slave[0]'
|
|
},
|
|
'clk' => {
|
'type' => 'input',
|
'type' => 'input',
|
'intfc_name' => 'plug:reset[0]',
|
'intfc_port' => 'clk_i',
|
'intfc_port' => 'reset_i'
|
'range' => '',
|
|
'intfc_name' => 'plug:clk[0]'
|
},
|
},
|
's_cti_i' => {
|
's_we_i' => {
|
'intfc_port' => 'cti_i',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'intfc_port' => 'we_i',
|
'type' => 'input',
|
'type' => 'input',
|
'range' => 'TAGw-1 : 0'
|
'range' => ''
|
},
|
},
|
's_dat_i' => {
|
's_dat_i' => {
|
'intfc_port' => 'dat_i',
|
'intfc_port' => 'dat_i',
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'type' => 'input',
|
'type' => 'input',
|
'range' => 'Dw-1 : 0'
|
'range' => 'Dw-1 : 0',
|
|
'intfc_name' => 'plug:wb_slave[0]'
|
},
|
},
|
's_ack_o' => {
|
'reset' => {
|
'intfc_port' => 'ack_o',
|
'type' => 'input',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_port' => 'reset_i',
|
'range' => '',
|
'range' => '',
|
'type' => 'output'
|
'intfc_name' => 'plug:reset[0]'
|
},
|
},
|
's_addr_i' => {
|
's_stb_i' => {
|
'intfc_port' => 'adr_i',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'type' => 'input',
|
'type' => 'input',
|
'range' => 'S_Aw-1 : 0'
|
'intfc_port' => 'stb_i',
|
},
|
'range' => '',
|
's_dat_o' => {
|
'intfc_name' => 'plug:wb_slave[0]'
|
'range' => 'Dw-1 : 0',
|
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'intfc_port' => 'dat_o'
|
|
},
|
},
|
's_we_i' => {
|
's_cyc_i' => {
|
'intfc_port' => 'we_i',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'range' => '',
|
'range' => '',
|
|
'intfc_port' => 'cyc_i',
|
'type' => 'input'
|
'type' => 'input'
|
},
|
},
|
'clk' => {
|
's_ack_o' => {
|
'intfc_port' => 'clk_i',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:clk[0]',
|
'intfc_port' => 'ack_o',
|
'range' => '',
|
'type' => 'output',
|
'type' => 'input'
|
'range' => ''
|
}
|
}
|
},
|
},
|
'unused' => {
|
|
'plug:wb_slave[0]' => [
|
|
'tag_i',
|
|
'bte_i',
|
|
'rty_o',
|
|
'err_o'
|
|
]
|
|
},
|
|
'description' => 'A simple uart that display input characters on simulator terminal using $write command.
|
|
',
|
|
'parameters_order' => [
|
'parameters_order' => [
|
'Dw',
|
'Dw',
|
'S_Aw',
|
'S_Aw',
|
'M_Aw',
|
'M_Aw',
|
'TAGw',
|
'TAGw',
|
'SELw',
|
'SELw',
|
'BUFFER_SIZE',
|
'BUFFER_SIZE',
|
'WAIT_COUNT'
|
'WAIT_COUNT'
|
],
|
],
|
'plugs' => {
|
'gui_status' => {
|
'reset' => {
|
'timeout' => 0,
|
'value' => 1,
|
'status' => 'ideal'
|
'reset' => {},
|
|
'0' => {
|
|
'name' => 'reset'
|
|
},
|
|
'type' => 'num'
|
|
},
|
},
|
|
'ip_name' => 'sim_uart',
|
|
'hdl_files' => [
|
|
'/mpsoc/src_peripheral/Other/simulator_UART.v'
|
|
],
|
|
'plugs' => {
|
'clk' => {
|
'clk' => {
|
'type' => 'num',
|
|
'clk' => {},
|
'clk' => {},
|
'0' => {
|
'0' => {
|
'name' => 'clk'
|
'name' => 'clk'
|
},
|
},
|
'value' => 1
|
'value' => 1,
|
|
'type' => 'num'
|
},
|
},
|
'wb_slave' => {
|
'wb_slave' => {
|
'wb_slave' => {},
|
|
'type' => 'num',
|
'type' => 'num',
|
|
'value' => 1,
|
'0' => {
|
'0' => {
|
|
'addr' => '0xa500_0000 0xa5ff_ffff Debug',
|
'width' => 1,
|
'width' => 1,
|
'name' => 'wb_slave',
|
'name' => 'wb_slave'
|
'addr' => '0xa500_0000 0xa5ff_ffff Debug'
|
|
},
|
},
|
'value' => 1
|
'wb_slave' => {}
|
}
|
|
},
|
},
|
'ip_name' => 'sim_uart',
|
'reset' => {
|
'ports_order' => [
|
'type' => 'num',
|
'reset',
|
'0' => {
|
'clk',
|
'name' => 'reset'
|
's_dat_i',
|
|
's_sel_i',
|
|
's_addr_i',
|
|
's_cti_i',
|
|
's_stb_i',
|
|
's_cyc_i',
|
|
's_we_i',
|
|
's_dat_o',
|
|
's_ack_o'
|
|
],
|
|
'hdl_files' => [
|
|
'/mpsoc/src_peripheral/Other/simulator_UART.v'
|
|
],
|
|
'system_h' => '#define ${IP}_DATA_REG (*((volatile unsigned int *) ($BASE)))
|
|
|
|
void ${IP}_putchar(char ch){ //print one char from jtag_uart
|
|
${IP}_DATA_REG=ch;
|
|
}
|
|
|
|
|
|
void ${IP}_putstring (char * buffer, char sz){
|
|
while (sz){
|
|
${IP}_putchar(*buffer);
|
|
*buffer++;
|
|
sz--;
|
|
}
|
|
}
|
|
',
|
|
'category' => 'Other',
|
|
'parameters' => {
|
|
'SELw' => {
|
|
'content' => '',
|
|
'type' => 'Fixed',
|
|
'global_param' => 'Localparam',
|
|
'info' => 'Parameter',
|
|
'redefine_param' => 1,
|
|
'deafult' => ' 4'
|
|
},
|
|
'S_Aw' => {
|
|
'deafult' => ' 7',
|
|
'redefine_param' => 1,
|
|
'info' => 'Parameter',
|
|
'content' => '',
|
|
'type' => 'Fixed',
|
|
'global_param' => 'Localparam'
|
|
},
|
|
'M_Aw' => {
|
|
'redefine_param' => 1,
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Fixed',
|
|
'content' => '',
|
|
'info' => 'Parameter',
|
|
'deafult' => ' 32'
|
|
},
|
|
'WAIT_COUNT' => {
|
|
'deafult' => '1000',
|
|
'info' => 'If internal buffer has a data, the internal module timer starts counting up in each clock cycle. If Timer reach the WAIT_COUNT value, it writes the buffer vakue on simulator terminal.',
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Spin-button',
|
|
'content' => '2,100000,1',
|
|
'redefine_param' => 1
|
|
},
|
|
'Dw' => {
|
|
'redefine_param' => 1,
|
|
'content' => '',
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Fixed',
|
|
'info' => 'Parameter',
|
|
'deafult' => ' 32'
|
|
},
|
|
'BUFFER_SIZE' => {
|
|
'info' => 'Internal buffer size ',
|
|
'content' => '2,1000,1',
|
|
'global_param' => 'Localparam',
|
|
'type' => 'Spin-button',
|
|
'redefine_param' => 1,
|
|
'deafult' => '100'
|
|
},
|
},
|
'TAGw' => {
|
'value' => 1,
|
'deafult' => ' 3',
|
'reset' => {}
|
'redefine_param' => 1,
|
}
|
'content' => '',
|
|
'type' => 'Fixed',
|
|
'global_param' => 'Localparam',
|
|
'info' => 'Parameter'
|
|
}
|
}
|
},
|
|
'module_name' => 'simulator_UART'
|
|
}, 'ip_gen' );
|
}, 'ip_gen' );
|
|
|