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/] [simulator.pl] - Diff between revs 54 and 55

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

Rev 54 Rev 55
Line 1415... Line 1415...
 
 
        my %st3 = extract_st_by_name("Routers' statistics:",$stdout);
        my %st3 = extract_st_by_name("Routers' statistics:",$stdout);
        foreach my $p (sort keys %st3){
        foreach my $p (sort keys %st3){
                update_result($simulate,$sample,"flit_per_router_result",$ratio_in,$p,$st3{$p}{'flit_in'});
                update_result($simulate,$sample,"flit_per_router_result",$ratio_in,$p,$st3{$p}{'flit_in'});
                update_result($simulate,$sample,"packet_per_router_result",$ratio_in,$p,$st3{$p}{'pck_in'});
                update_result($simulate,$sample,"packet_per_router_result",$ratio_in,$p,$st3{$p}{'pck_in'});
                my $tmp= ($st3{$p}{'flit_in_buffered'}*100) / $st3{$p}{'flit_in'};
                my $tmp= ($st3{$p}{'flit_in'}==0)? 0 : ($st3{$p}{'flit_in_buffered'}*100) / $st3{$p}{'flit_in'};
                #print " $tmp= ($st3{$p}{'flit_in_buffered'}*100) / $st3{$p}{'flit_in'};\n";
                #print " $tmp= ($st3{$p}{'flit_in_buffered'}*100) / $st3{$p}{'flit_in'};\n";
                update_result($simulate,$sample,"flit_buffered_router_ratio",$ratio_in,$p,$tmp);
                update_result($simulate,$sample,"flit_buffered_router_ratio",$ratio_in,$p,$tmp);
                $tmp= ($st3{$p}{'flit_in_bypassed'}*100) / $st3{$p}{'flit_in'};
                $tmp= ($st3{$p}{'flit_in'}==0)? 0 : ($st3{$p}{'flit_in_bypassed'}*100) / $st3{$p}{'flit_in'};
                update_result($simulate,$sample,"flit_bypass_router_ratio",$ratio_in,$p,$tmp);
                update_result($simulate,$sample,"flit_bypass_router_ratio",$ratio_in,$p,$tmp);
 
 
        }
        }
 
 
        #my $p= $simulate->object_get_attribute ($sample,"noc_info");    
        #my $p= $simulate->object_get_attribute ($sample,"noc_info");    
Line 1756... Line 1756...
                $simulate->object_add_attribute ("graph_save","save_all_result",1);
                $simulate->object_add_attribute ("graph_save","save_all_result",1);
 
 
        });
        });
 
 
 
 
        return $table;
        return add_widget_to_scrolled_win($table,gen_scr_win_with_adjst($simulate,"ctrl_sc_win"));
 
 
}
}
 
 
 
 
############
############
Line 1858... Line 1858...
 
 
 
 
        $main_table->attach_defaults ($h1  , 0, 12, 0,24);
        $main_table->attach_defaults ($h1  , 0, 12, 0,24);
        $main_table->attach ($ctrl, 0,12, 24,25,'fill','fill',2,2);
        $main_table->attach ($ctrl, 0,12, 24,25,'fill','fill',2,2);
 
 
 
        my $sc_win=add_widget_to_scrolled_win($main_table);
 
 
 
 
        #check soc status every 0.5 second. refresh device table if there is any changes 
        #check soc status every 0.5 second. refresh device table if there is any changes 
        Glib::Timeout->add (100, sub{
        Glib::Timeout->add (100, sub{
 
 
Line 1881... Line 1881...
 
 
 
 
 
 
                #refresh GUI
                #refresh GUI
 
 
 
 
                $ctrl->destroy();
                $ctrl->destroy();
                $conf_box->destroy();
                $conf_box->destroy();
                $chart->destroy();
                $chart->destroy();
                $image->destroy();
                $image->destroy();
                $image = get_status_gif($simulate);
                $image = get_status_gif($simulate);
Line 1901... Line 1902...
 
 
                $conf_box->show_all();
                $conf_box->show_all();
                $main_table->show_all();
                $main_table->show_all();
                set_gui_status($simulate,"ideal",0);
                set_gui_status($simulate,"ideal",0);
 
 
 
 
                return TRUE;
                return TRUE;
 
 
        } );
        } );
 
 
 
 
 
 
 
 
 
 
 
 
        return add_widget_to_scrolled_win($main_table);
        return $sc_win;
 
 
 
 
 
 
}
}
 
 
Line 1990... Line 1992...
 
 
$window ->add($scrolled_win);
$window ->add($scrolled_win);
$window->show_all;
$window->show_all;
 
 
}
}
 No newline at end of file
 No newline at end of file
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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