Line 1... |
Line 1... |
#######################################################################
|
#######################################################################
|
## File: gcd.IP
|
## File: gcd.IP
|
##
|
##
|
## Copyright (C) 2014-2016 Alireza Monemi
|
## Copyright (C) 2014-2019 Alireza Monemi
|
##
|
##
|
## This file is part of ProNoC 1.8.0
|
## This file is part of ProNoC 1.9.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 BEHAVIOR.
|
################################################################################
|
################################################################################
|
|
|
$ipgen = bless( {
|
$ipgen = bless( {
|
'parameters' => {
|
'system_h' => '#define ${IP}_DONE_ADDR (*((volatile unsigned int *) ($BASE)))
|
'SELw' => {
|
#define ${IP}_IN_1_ADDR (*((volatile unsigned int *) ($BASE+4)))
|
'type' => 'Fixed',
|
#define ${IP}_IN_2_ADDR (*((volatile unsigned int *) ($BASE+8)))
|
'default' => '4',
|
#define ${IP}_GCD_ADDR (*((volatile unsigned int *) ($BASE+12)))
|
'content' => '',
|
|
'global_param' => 'Localparam',
|
|
'info' => 'Parameter',
|
#define ${IP}_IN1_WRITE(value) ${IP}_IN_1_ADDR=value
|
'redefine_param' => 1
|
#define ${IP}_IN2_WRITE(value) ${IP}_IN_2_ADDR=value
|
},
|
#define ${IP}_DONE_READ() ${IP}_DONE_ADDR
|
'GCDw' => {
|
#define ${IP}_READ() ${IP}_GCD_ADDR
|
'global_param' => 'Parameter',
|
|
'default' => '32',
|
unsigned int gcd_hardware ( unsigned int p, unsigned int q );',
|
'type' => 'Combo-box',
|
'system_c' => 'unsigned int gcd_hardware ( unsigned int p, unsigned int q ){
|
'content' => '8,16,32',
|
${IP}_IN1_WRITE(p);
|
'info' => 'GCD\'s Input/output width in bits',
|
${IP}_IN2_WRITE(q);
|
'redefine_param' => 1
|
while (${IP}_DONE_READ()!=1);
|
},
|
return ${IP}_READ();
|
'TAGw' => {
|
}',
|
'info' => 'Parameter',
|
|
'redefine_param' => 1,
|
|
'global_param' => 'Localparam',
|
|
'content' => '',
|
|
'type' => 'Fixed',
|
|
'default' => '3'
|
|
},
|
|
'Dw' => {
|
|
'default' => 'GCDw',
|
|
'type' => 'Fixed',
|
|
'content' => '',
|
|
'global_param' => 'Localparam',
|
|
'redefine_param' => 1,
|
|
'info' => 'Parameter'
|
|
},
|
|
'Aw' => {
|
|
'redefine_param' => 1,
|
|
'info' => 'Parameter',
|
|
'default' => '5',
|
|
'type' => 'Fixed',
|
|
'content' => '',
|
|
'global_param' => 'Localparam'
|
|
}
|
|
},
|
|
'ports' => {
|
'ports' => {
|
's_tag_i' => {
|
's_cyc_i' => {
|
'intfc_port' => 'tag_i',
|
|
'type' => 'input',
|
|
'range' => 'TAGw-1 : 0',
|
|
'intfc_name' => 'plug:wb_slave[0]'
|
|
},
|
|
's_stb_i' => {
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'range' => '',
|
'intfc_port' => 'cyc_i',
|
'type' => 'input',
|
'type' => 'input',
|
'intfc_port' => 'stb_i'
|
'range' => ''
|
},
|
},
|
's_dat_i' => {
|
's_dat_o' => {
|
'intfc_port' => 'dat_i',
|
'range' => 'Dw-1 : 0',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'type' => 'input',
|
'intfc_port' => 'dat_o',
|
'range' => 'Dw-1 : 0'
|
'type' => 'output'
|
},
|
},
|
's_cyc_i' => {
|
's_stb_i' => {
|
'intfc_port' => 'cyc_i',
|
'intfc_port' => 'stb_i',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'type' => 'input',
|
'type' => 'input',
|
'range' => ''
|
'range' => ''
|
},
|
},
|
's_sel_i' => {
|
's_dat_i' => {
|
'intfc_port' => 'sel_i',
|
'range' => 'Dw-1 : 0',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'range' => 'SELw-1 : 0',
|
'intfc_port' => 'dat_i',
|
'type' => 'input'
|
'type' => 'input'
|
},
|
},
|
's_rty_o' => {
|
's_rty_o' => {
|
'intfc_port' => 'rty_o',
|
|
'range' => '',
|
'range' => '',
|
'type' => 'output',
|
'intfc_port' => 'rty_o',
|
'intfc_name' => 'plug:wb_slave[0]'
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'type' => 'output'
|
},
|
},
|
'reset' => {
|
'clk' => {
|
'type' => 'input',
|
|
'range' => '',
|
'range' => '',
|
'intfc_name' => 'plug:reset[0]',
|
|
'intfc_port' => 'reset_i'
|
|
},
|
|
's_addr_i' => {
|
|
'intfc_port' => 'adr_i',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'type' => 'input',
|
'type' => 'input',
|
'range' => 'Aw-1 : 0'
|
'intfc_name' => 'plug:clk[0]',
|
|
'intfc_port' => 'clk_i'
|
},
|
},
|
's_err_o' => {
|
's_sel_i' => {
|
'range' => '',
|
'type' => 'input',
|
'type' => 'output',
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_port' => 'err_o'
|
'intfc_port' => 'sel_i',
|
|
'range' => 'SELw-1 : 0'
|
},
|
},
|
's_ack_o' => {
|
's_ack_o' => {
|
'intfc_port' => 'ack_o',
|
|
'type' => 'output',
|
|
'range' => '',
|
'range' => '',
|
|
'type' => 'output',
|
|
'intfc_port' => 'ack_o',
|
'intfc_name' => 'plug:wb_slave[0]'
|
'intfc_name' => 'plug:wb_slave[0]'
|
},
|
},
|
's_we_i' => {
|
's_we_i' => {
|
'type' => 'input',
|
|
'range' => '',
|
'range' => '',
|
|
'intfc_port' => 'we_i',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_port' => 'we_i'
|
'type' => 'input'
|
},
|
},
|
'clk' => {
|
'reset' => {
|
'intfc_port' => 'clk_i',
|
|
'intfc_name' => 'plug:clk[0]',
|
|
'range' => '',
|
'range' => '',
|
'type' => 'input'
|
'type' => 'input',
|
|
'intfc_name' => 'plug:reset[0]',
|
|
'intfc_port' => 'reset_i'
|
},
|
},
|
's_dat_o' => {
|
's_tag_i' => {
|
'intfc_port' => 'dat_o',
|
'intfc_port' => 'tag_i',
|
'intfc_name' => 'plug:wb_slave[0]',
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'type' => 'input',
|
|
'range' => 'TAGw-1 : 0'
|
|
},
|
|
's_addr_i' => {
|
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'intfc_port' => 'adr_i',
|
|
'type' => 'input',
|
|
'range' => 'Aw-1 : 0'
|
|
},
|
|
's_err_o' => {
|
'type' => 'output',
|
'type' => 'output',
|
'range' => 'Dw-1 : 0'
|
'intfc_name' => 'plug:wb_slave[0]',
|
|
'intfc_port' => 'err_o',
|
|
'range' => ''
|
}
|
}
|
},
|
},
|
'ip_name' => 'gcd',
|
'ip_name' => 'gcd',
|
'modules' => {
|
'unused' => {
|
'gcd_ip' => {}
|
'plug:wb_slave[0]' => [
|
|
'cti_i',
|
|
'bte_i'
|
|
]
|
},
|
},
|
'file_name' => '/home/alireza/mywork/workshop/files/gcd_ip.v',
|
'version' => 4,
|
'category' => 'Other',
|
'module_name' => 'gcd_ip',
|
'version' => 3,
|
|
'parameters_order' => [
|
|
'GCDw',
|
|
'Dw',
|
|
'Aw',
|
|
'TAGw',
|
|
'SELw'
|
|
],
|
|
'plugs' => {
|
'plugs' => {
|
'clk' => {
|
'clk' => {
|
'type' => 'num',
|
'value' => 1,
|
'0' => {
|
'0' => {
|
'name' => 'clk'
|
'name' => 'clk'
|
},
|
},
|
'value' => 1
|
'type' => 'num'
|
},
|
},
|
'wb_slave' => {
|
'wb_slave' => {
|
'type' => 'num',
|
|
'value' => 1,
|
'value' => 1,
|
|
'type' => 'num',
|
'0' => {
|
'0' => {
|
|
'name' => 'wb_slave',
|
'width' => 5,
|
'width' => 5,
|
'addr' => '0xb800_0000 0xbfff_ffff custom devices',
|
'addr' => '0xb800_0000 0xbfff_ffff custom devices'
|
'name' => 'wb_slave'
|
|
}
|
}
|
},
|
},
|
'reset' => {
|
'reset' => {
|
'type' => 'num',
|
'type' => 'num',
|
'value' => 1,
|
|
'0' => {
|
'0' => {
|
'name' => 'reset'
|
'name' => 'reset'
|
}
|
|
}
|
|
},
|
},
|
'system_h' => '#define ${IP}_DONE_ADDR (*((volatile unsigned int *) ($BASE)))
|
'value' => 1
|
#define ${IP}_IN_1_ADDR (*((volatile unsigned int *) ($BASE+4)))
|
}
|
#define ${IP}_IN_2_ADDR (*((volatile unsigned int *) ($BASE+8)))
|
|
#define ${IP}_GCD_ADDR (*((volatile unsigned int *) ($BASE+12)))
|
|
|
|
|
|
#define ${IP}_IN1_WRITE(value) ${IP}_IN_1_ADDR=value
|
|
#define ${IP}_IN2_WRITE(value) ${IP}_IN_2_ADDR=value
|
|
#define ${IP}_DONE_READ() ${IP}_DONE_ADDR
|
|
#define ${IP}_READ() ${IP}_GCD_ADDR
|
|
|
|
unsigned int gcd_hardware ( unsigned int p, unsigned int q ){
|
|
${IP}_IN1_WRITE(p);
|
|
${IP}_IN2_WRITE(q);
|
|
while (${IP}_DONE_READ()!=1);
|
|
return ${IP}_READ();
|
|
}',
|
|
'gui_status' => {
|
|
'status' => 'ideal',
|
|
'timeout' => 0
|
|
},
|
},
|
'description' => 'gcd module',
|
'file_name' => '/home/alireza/mywork/workshop/files/gcd_ip.v',
|
'module_name' => 'gcd_ip',
|
|
'ports_order' => [
|
'ports_order' => [
|
'clk',
|
'clk',
|
'reset',
|
'reset',
|
's_dat_i',
|
's_dat_i',
|
's_sel_i',
|
's_sel_i',
|
Line 207... |
Line 156... |
's_dat_o',
|
's_dat_o',
|
's_ack_o',
|
's_ack_o',
|
's_err_o',
|
's_err_o',
|
's_rty_o'
|
's_rty_o'
|
],
|
],
|
|
'parameters_order' => [
|
|
'GCDw',
|
|
'Dw',
|
|
'Aw',
|
|
'TAGw',
|
|
'SELw'
|
|
],
|
|
'hdl_files_ticked' => [],
|
|
'parameters' => {
|
|
'Aw' => {
|
|
'global_param' => 'Localparam',
|
|
'default' => '5',
|
|
'content' => '',
|
|
'redefine_param' => 1,
|
|
'type' => 'Fixed',
|
|
'info' => 'Parameter'
|
|
},
|
|
'Dw' => {
|
|
'info' => 'Parameter',
|
|
'content' => '',
|
|
'redefine_param' => 1,
|
|
'type' => 'Fixed',
|
|
'global_param' => 'Localparam',
|
|
'default' => 'GCDw'
|
|
},
|
|
'GCDw' => {
|
|
'info' => 'GCD\'s Input/output width in bits',
|
|
'global_param' => 'Parameter',
|
|
'default' => '32',
|
|
'content' => '8,16,32',
|
|
'redefine_param' => 1,
|
|
'type' => 'Combo-box'
|
|
},
|
|
'SELw' => {
|
|
'info' => 'Parameter',
|
|
'global_param' => 'Localparam',
|
|
'default' => '4',
|
|
'redefine_param' => 1,
|
|
'content' => '',
|
|
'type' => 'Fixed'
|
|
},
|
|
'TAGw' => {
|
|
'info' => 'Parameter',
|
|
'type' => 'Fixed',
|
|
'content' => '',
|
|
'redefine_param' => 1,
|
|
'default' => '3',
|
|
'global_param' => 'Localparam'
|
|
}
|
|
},
|
|
'category' => 'Other',
|
|
'description' => 'gcd module',
|
'hdl_files' => [
|
'hdl_files' => [
|
'/workshop/files/gcd.v',
|
'/mpsoc/rtl/src_peripheral/Other/gcd_ip.v',
|
'/workshop/files/gcd_ip.v'
|
'/mpsoc/rtl/src_peripheral/Other/gcd.v'
|
],
|
],
|
'unused' => {
|
'modules' => {
|
'plug:wb_slave[0]' => [
|
'gcd_ip' => {}
|
'bte_i',
|
},
|
'cti_i'
|
'gui_status' => {
|
]
|
'status' => 'ideal',
|
|
'timeout' => 0
|
}
|
}
|
}, 'ip_gen' );
|
}, 'ip_gen' );
|