OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [perl_gui/] [lib/] [perl/] [mpsoc_gen.pl] - Diff between revs 18 and 22

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 18 Rev 22
Line 26... Line 26...
require "widget.pl";
require "widget.pl";
require "mpsoc_verilog_gen.pl";
require "mpsoc_verilog_gen.pl";
require "hdr_file_gen.pl";
require "hdr_file_gen.pl";
 
 
 
 
 
sub get_pos{
 
                my ($item,@list)=@_;
 
                my $pos=0;
 
                foreach my $p (@list){
 
                                #print "$p eq $item\n";
 
                                if ($p eq $item){return $pos;}
 
                                $pos++;
 
                }
 
                return undef;
 
 
 
}
 
 
 
 
sub noc_param_widget{
sub noc_param_widget{
         my ($mpsoc,$name,$param, $default,$type,$content,$info, $state,$table,$row,$show)=@_;
         my ($mpsoc,$name,$param, $default,$type,$content,$info, $state,$table,$row,$show)=@_;
         my $label =gen_label_in_left(" $name");
         my $label =gen_label_in_left(" $name");
         my $widget;
         my $widget;
Line 50... Line 62...
 
 
 
 
         }
         }
         elsif ($type eq "Combo-box"){
         elsif ($type eq "Combo-box"){
                 my @combo_list=split(",",$content);
                 my @combo_list=split(",",$content);
                 my $pos=get_item_pos($value, @combo_list);
                 my $pos=get_pos($value, @combo_list);
 
                 if(!defined $pos){
 
                        $mpsoc->mpsoc_add_param($param,$default);
 
                        $pos=get_item_pos($default, @combo_list);
 
 
 
                 }
                #print " my $pos=get_item_pos($value, @combo_list);\n";
                #print " my $pos=get_item_pos($value, @combo_list);\n";
                 $widget=gen_combo(\@combo_list, $pos);
                 $widget=gen_combo(\@combo_list, $pos);
                 $widget-> signal_connect("changed" => sub{
                 $widget-> signal_connect("changed" => sub{
                 my $new_param_value=$widget->get_active_text();
                 my $new_param_value=$widget->get_active_text();
                 $mpsoc->mpsoc_add_param($param,$new_param_value);
                 $mpsoc->mpsoc_add_param($param,$new_param_value);
Line 729... Line 746...
                $label=gen_label_in_center(' ');
                $label=gen_label_in_center(' ');
                $table->attach_defaults ( $label , 2, 10, $row,$row+1);
                $table->attach_defaults ( $label , 2, 10, $row,$row+1);
                $table->attach_defaults ( $b1 , 0, 4, $row,$row+1);$row++;
                $table->attach_defaults ( $b1 , 0, 4, $row,$row+1);$row++;
        }
        }
 
 
 
 
 
        #Router type
 
        $label='Router Type';
 
        $param='ROUTER_TYPE';
 
        $default='"VC_BASED"';
 
        $content='"INPUT_QUEUED","VC_BASED"';
 
        $type='Combo-box';
 
    $info="    Input-queued: simple router with low performance and does not support fully adaptive routing.
 
    VC-based routers offer higher performance, fully adaptive routing  and traffic isolation for different packet classes.";
 
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
 
        my $router_type=$mpsoc->mpsoc_get_param("ROUTER_TYPE");
 
 
 
 
        #P port number 
        #P port number 
        $label= 'Port Number';
        $label= 'Port Number';
        $param= 'P';
        $param= 'P';
    $default=' 5';
    $default=' 5';
        $content='3,12,1';
        $content='3,12,1';
    $info= 'Number of NoC router port';
    $info= 'Number of NoC router port';
    $type= 'Spin-button';
    $type= 'Spin-button';
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,0);
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,0);
 
 
 
 
 
 
        #Routers per row
        #Routers per row
        $label= 'Routers per row';
        $label= 'Routers per row';
        $param= 'NX';
        $param= 'NX';
    $default=' 2';
    $default=' 2';
        $content='2,16,1';
        $content='2,16,1';
Line 759... Line 790...
        $content='2,16,1';
        $content='2,16,1';
    $info= 'Number of NoC routers in column (Y dimention)';
    $info= 'Number of NoC routers in column (Y dimention)';
    $type= 'Spin-button';
    $type= 'Spin-button';
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
 
 
 
        if($router_type eq '"VC_BASED"'){
        #VC number per port
        #VC number per port
 
                my $v=$mpsoc->mpsoc_get_param('V');
 
                $mpsoc->mpsoc_add_param('V',2) if($v eq 1);
        $label='VC number per port';
        $label='VC number per port';
        $param='V';
        $param='V';
        $default='2';
        $default='2';
        $type='Spin-button';
        $type='Spin-button';
        $content='2,16,1';
        $content='2,16,1';
        $info='Number of Virtual Channel per each router port';
        $info='Number of Virtual Channel per each router port';
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
 
        } else {
 
                $mpsoc->mpsoc_add_param('V',1);
 
                $mpsoc->mpsoc_add_param('C',0);
 
 
 
 
 
        }
 
 
        #buffer width per VC
        #buffer width per VC
        $label='Buffer flits per VC';
        $label=($router_type eq '"VC_BASED"')? 'Buffer flits per VC': "Buffer flits";
        $param='B';
        $param='B';
    $default='4';
    $default='4';
    $content='2,256,1';
    $content='2,256,1';
    $type='Spin-button';
    $type='Spin-button';
        $info='Buffer queue per VC in flits';
        $info=($router_type eq '"VC_BASED"')?  'Buffer queue size per VC in flits' : 'Buffer queue size in flits';
    $row= noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
    $row= noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
 
 
        #packet payload width
        #packet payload width
        $label='payload width';
        $label='payload width';
        $param='Fpay';
        $param='Fpay';
Line 801... Line 840...
        #routing algorithm
        #routing algorithm
        my $topology=$mpsoc->mpsoc_get_param('TOPOLOGY');
        my $topology=$mpsoc->mpsoc_get_param('TOPOLOGY');
        $label='Routing Algorithm';
        $label='Routing Algorithm';
        $param="ROUTE_NAME";
        $param="ROUTE_NAME";
        $type="Combo-box";
        $type="Combo-box";
 
        if($router_type eq '"VC_BASED"'){
        $content=($topology eq '"MESH"')?  '"XY","WEST_FIRST","NORTH_LAST","NEGETIVE_FIRST","DUATO"' :
        $content=($topology eq '"MESH"')?  '"XY","WEST_FIRST","NORTH_LAST","NEGETIVE_FIRST","DUATO"' :
                                            '"TRANC_XY","TRANC_WEST_FIRST","TRANC_NORTH_LAST","TRANC_NEGETIVE_FIRST","TRANC_DUATO"';
                                            '"TRANC_XY","TRANC_WEST_FIRST","TRANC_NORTH_LAST","TRANC_NEGETIVE_FIRST","TRANC_DUATO"';
 
 
 
        }else{
 
                $content=($topology eq '"MESH"')?  '"XY","WEST_FIRST","NORTH_LAST","NEGETIVE_FIRST"' :
 
                                                    '"TRANC_XY","TRANC_WEST_FIRST","TRANC_NORTH_LAST","TRANC_NEGETIVE_FIRST"';
 
 
 
 
 
        }
        $default=($topology eq '"MESH"')?  '"XY"':'"TRANC_XY"';
        $default=($topology eq '"MESH"')?  '"XY"':'"TRANC_XY"';
        $info="Select the routing algorithm: XY(DoR) , partially adaptive (Turn models). Fully adaptive (Duato) ";
        $info="Select the routing algorithm: XY(DoR) , partially adaptive (Turn models). Fully adaptive (Duato) ";
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$show_noc);
 
 
 
 
Line 838... Line 885...
                        $label="Congestion index";
                        $label="Congestion index";
                        $param="CONGESTION_INDEX";
                        $param="CONGESTION_INDEX";
                        $type="Spin-button";
                        $type="Spin-button";
                        $content="0,12,1";
                        $content="0,12,1";
                        $info="Congestion index determines how congestion information is collected from neighboring routers. Please refer to the usere manual for more information";
                        $info="Congestion index determines how congestion information is collected from neighboring routers. Please refer to the usere manual for more information";
                    $default=7;
                    $default=3;
                        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
                        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
 
 
                }
                }
 
                #Fully adaptive routing setting
 
                if( $route eq '"TRANC_DUATO"' or $route eq '"DUATO"'  ){
 
                         my $v=$mpsoc->mpsoc_get_param("V");
 
                         $label="Select Escap VC";
 
                         $param="ESCAP_VC_MASK";
 
                         $type="Check-box";
 
                         $content=$v;
 
                         $default="$v\'b";
 
                         for (my $i=1; $i<=$v-1; $i++){$default=  "${default}0";}
 
                         $default=  "${default}1";
 
 
 
 
 
                         $info="Select the escap VC for fully adaptive routing.";
 
                         $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set,$adv_set);
 
 
 
                 }
 
 
        # VC reallocation type
        # VC reallocation type
                $label='VC reallocation type';
                $label=($router_type eq '"VC_BASED"')? 'VC reallocation type': 'Queue reallocation type';
                $param='VC_REALLOCATION_TYPE';
                $param='VC_REALLOCATION_TYPE';
                $info="VC reallocation type: Atomic: A VC can be allocated when it is empty. Nonatomic a VC is allocated when the tail flit is injected in.";
                $info="VC reallocation type: If set as atomic only empty VCs can be allocated for new packets. Whereas, in non-atomic a non-empty VC which has received the last packet tail flit can accept a new  packet";
                $default='"NONATOMIC"';
                $default='"NONATOMIC"';
                $content='"ATOMIC","NONATOMIC"';
                $content='"ATOMIC","NONATOMIC"';
                $type='Combo-box';
                $type='Combo-box';
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
 
 
 
 
 
 
 
 
 
        if ($router_type eq '"VC_BASED"'){
        #vc/sw allocator type
        #vc/sw allocator type
                $label = 'VC/SW combination type';
                $label = 'VC/SW combination type';
                $param='COMBINATION_TYPE';
                $param='COMBINATION_TYPE';
                $default='"COMB_SPEC1"';
                $default='"COMB_NONSPEC"';
                $content='"BASELINE","COMB_SPEC1","COMB_SPEC2","COMB_NONSPEC"';
                $content='"BASELINE","COMB_SPEC1","COMB_SPEC2","COMB_NONSPEC"';
                $type='Combo-box';
                $type='Combo-box';
                $info="The joint VC/ switch allocator type. using canonical combination is not recommanded";
                $info="The joint VC/ switch allocator type. using canonical combination is not recommanded";
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
 
 
 
        }
 
 
        # Crossbar mux type 
        # Crossbar mux type 
                $label='Crossbar mux type';
                $label='Crossbar mux type';
                $param='MUX_TYPE';
                $param='MUX_TYPE';
                $default='"BINARY"';
                $default='"BINARY"';
                $content='"ONE_HOT","BINARY"';
                $content='"ONE_HOT","BINARY"';
                $type='Combo-box';
                $type='Combo-box';
                $info="Crossbar multiplexer type";
                $info="Crossbar multiplexer type";
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
 
 
 
        if($router_type eq '"VC_BASED"'){
        #class
        #class
                $label='class number';
                $label='class number';
                $param='C';
                $param='C';
                $default= 0;
                $default= 0;
                $info='Number of message classes. Each specific class can use different set of VC';
                $info='Number of message classes. Each specific class can use different set of VC';
Line 906... Line 970...
 
 
 
 
                }
                }
 
 
 
 
        #Fully adaptive routing setting
 
                if( $route eq '"TRANC_DUATO"' or $route eq '"DUATO"'  ){
 
                         my $v=$mpsoc->mpsoc_get_param("V");
 
                         $label="Select Escap VC";
 
                         $param="ESCAP_VC_MASK";
 
                         $type="Check-box";
 
                         $content=$v;
 
                         $default="$v\'b";
 
                         for (my $i=1; $i<=$v-1; $i++){$default=  "${default}0";}
 
                         $default=  "${default}1";
 
 
 
 
 
                         $info="Select the escap VC for fully adaptive routing.";
        }#($router_type eq '"VC_BASED"')
                         $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set,$adv_set);
 
 
 
                 }
 
 
 
         # non determinstic      
 
                if( $route ne '"TRANC_XY"' or $route eq '"XY"'  ){
 
                 #CONGESTION_INDEX
 
                $label='congestion index';
 
                $param='CONGESTION_INDEX';
 
                $default= 3;
 
                $info='Congestion index determins how congestion information must be extracted from the router.';
 
                $content='0,12,1';
 
                $type="Spin-button";
 
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set);
 
 
 
                }
 
 
 
         #simulation debuge enable     
         #simulation debuge enable     
                $label='Debug enable';
                $label='Debug enable';
                $param='DEBUG_EN';
                $param='DEBUG_EN';
                $info= "Add extra verilog code for debuging NoC for simulation";
                $info= "Add extra verilog code for debuging NoC for simulation";
Line 955... Line 994...
        $param="ADD_PIPREG_AFTER_CROSSBAR";
        $param="ADD_PIPREG_AFTER_CROSSBAR";
        $type="Check-box";
        $type="Check-box";
        $content=1;
        $content=1;
        $default="1\'b0";
        $default="1\'b0";
        $info="If ebabled it adds a pipline register at the output port of the router.";
        $info="If ebabled it adds a pipline register at the output port of the router.";
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set,$adv_set);
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,0);
 
 
 
 
        $label="Add pipeline reg befor crossbar";
        $label="Add pipeline reg befor crossbar";
        $param="ADD_PIPREG_BEFORE_CROSSBAR";
        $param="ADD_PIPREG_BEFORE_CROSSBAR";
        $type="Check-box";
        $type="Check-box";
        $content=1;
        $content=1;
        $default="1\'b0";
        $default="1\'b0";
        $info="If ebabled it adds a pipline register after the input memory sd ram.";
        $info="If ebabled it adds a pipline register after the input memory sd ram.";
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,$adv_set,$adv_set);
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $state,$table,$row,0);
 
 
 
 
 
 
        if($adv_set == 1){
        if($adv_set == 1){
                $advc= def_image_button("icons/up.png","Advance Parameters");
                $advc= def_image_button("icons/up.png","Advance Parameters");

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.