Line 323... |
Line 323... |
$table->attach ($title , 0, 10, $row, $row+1,'expand','shrink',2,2); $row++;
|
$table->attach ($title , 0, 10, $row, $row+1,'expand','shrink',2,2); $row++;
|
my $separator = Gtk2::HSeparator->new;
|
my $separator = Gtk2::HSeparator->new;
|
$table->attach ($separator , 0, 10 , $row, $row+1,'fill','fill',2,2); $row++;
|
$table->attach ($separator , 0, 10 , $row, $row+1,'fill','fill',2,2); $row++;
|
|
|
|
|
my @positions=(0,1,2,3,4,5,6);
|
my @positions=(0,1,2,3,4,5,6,7);
|
my $col=0;
|
my $col=0;
|
|
|
my @title=("Name", " Add/Remove "," Setting ", "Line\'s color", "Clear","Run");
|
my @title=("Name","Traffic", " Add/Remove "," Setting ", "Line\'s color", "Clear","Run");
|
foreach my $t (@title){
|
foreach my $t (@title){
|
|
|
$table->attach (gen_label_in_center($title[$col]), $positions[$col], $positions[$col+1], $row, $row+1,'expand','shrink',2,2);$col++;
|
$table->attach (gen_label_in_center($title[$col]), $positions[$col], $positions[$col+1], $row, $row+1,'expand','shrink',2,2);$col++;
|
}
|
}
|
|
|
my $traffics="Random,Transposed 1,Transposed 2,Tornado";
|
my $traffics="Random,Transposed 1,Transposed 2,Tornado";
|
|
|
$col=0;
|
$col=0;
|
$row++;
|
$row++;
|
@positions=(0,1,2,3,4,5,6,7);
|
@positions=(0,2,3,4,5,6,7,8);
|
|
|
|
|
#my $i=0;
|
#my $i=0;
|
my $active=$emulate->object_get_attribute("active_setting",undef);
|
my $active=$emulate->object_get_attribute("active_setting",undef);
|
my @samples;
|
my @samples;
|
Line 357... |
Line 356... |
my $l;
|
my $l;
|
my $s=($mode eq "simulate" ) ? 1 : get_sof_file_full_addr($emulate,$sample);
|
my $s=($mode eq "simulate" ) ? 1 : get_sof_file_full_addr($emulate,$sample);
|
#check if injection ratios are valid
|
#check if injection ratios are valid
|
my $r=$emulate->object_get_attribute($sample,"ratios");
|
my $r=$emulate->object_get_attribute($sample,"ratios");
|
if(defined $s && defined $name){
|
if(defined $s && defined $name){
|
$l=gen_label_in_center($name);
|
|
$l=def_image_button('icons/diagram.png',$name);
|
$l=def_image_button('icons/diagram.png',$name);
|
$l-> signal_connect("clicked" => sub{
|
$l-> signal_connect("clicked" => sub{
|
my $st = ($mode eq "simulate" )? check_sim_sample($emulate,$sample,$info) : check_sample($emulate,$sample,$info);
|
my $st = ($mode eq "simulate" )? check_sim_sample($emulate,$sample,$info) : check_sample($emulate,$sample,$info);
|
return if $st==0;
|
return if $st==0;
|
my ($topology, $T1, $T2, $T3, $V, $Fpay) = get_sample_emulation_param($emulate,$sample);
|
my ($topology, $T1, $T2, $T3, $V, $Fpay) = get_sample_emulation_param($emulate,$sample);
|
Line 370... |
Line 369... |
$emulate->object_add_attribute('noc_param','T3',$T3);
|
$emulate->object_add_attribute('noc_param','T3',$T3);
|
$emulate->object_add_attribute('noc_param','TOPOLOGY',$topology);
|
$emulate->object_add_attribute('noc_param','TOPOLOGY',$topology);
|
show_topology_diagram ($emulate);
|
show_topology_diagram ($emulate);
|
});
|
});
|
|
|
|
my $traffic = def_button("Pattern");
|
|
$traffic-> signal_connect("clicked" => sub{
|
|
my $st = ($mode eq "simulate" )? check_sim_sample($emulate,$sample,$info) : check_sample($emulate,$sample,$info);
|
|
return if $st==0;
|
|
my ($topology, $T1, $T2, $T3, $V, $Fpay) = get_sample_emulation_param($emulate,$sample);
|
|
$emulate->object_add_attribute('noc_param','T1',$T1);
|
|
$emulate->object_add_attribute('noc_param','T2',$T2);
|
|
$emulate->object_add_attribute('noc_param','T3',$T3);
|
|
$emulate->object_add_attribute('noc_param','TOPOLOGY',$topology);
|
|
my $pattern=get_synthetic_traffic_pattern($emulate, $sample);
|
|
my $window = def_popwin_size(40,40,"Traffic pattern",'percent');
|
|
my ($outbox,$tview)= create_text();
|
|
show_info(\$tview,"$pattern");
|
|
$window->add ($outbox);
|
|
$window->show_all();
|
|
|
|
});
|
|
|
|
|
|
$table->attach ($l, $positions[$col], $positions[$col]+1, $row, $row+1,'expand','shrink',2,2);
|
|
$table->attach ($traffic, $positions[$col]+1, $positions[$col+1], $row, $row+1,'expand','shrink',2,2);
|
|
$col++;
|
|
|
} else {
|
} else {
|
$l=gen_label_in_left("Define NoC configuration");
|
$l=gen_label_in_left("Define NoC configuration");
|
$l->set_markup("<span foreground= 'red' ><b>Define NoC configuration</b></span>");
|
$l->set_markup("<span foreground= 'red' ><b>Define NoC configuration</b></span>");
|
|
$table->attach ($l, $positions[$col], $positions[$col+1], $row, $row+1,'expand','shrink',2,2);$col++;
|
}
|
}
|
#my $box=def_pack_hbox(FALSE,0,(gen_label_in_left("$i- "),$l,$set));
|
#my $box=def_pack_hbox(FALSE,0,(gen_label_in_left("$i- "),$l,$set));
|
$table->attach ($l, $positions[$col], $positions[$col+1], $row, $row+1,'expand','shrink',2,2);$col++;
|
|
|
|
#remove
|
#remove
|
my $remove=def_image_button("icons/cancel.png");
|
my $remove=def_image_button("icons/cancel.png");
|
$table->attach ($remove, $positions[$col], $positions[$col+1], $row, $row+1,'expand','shrink',2,2);$col++;
|
$table->attach ($remove, $positions[$col], $positions[$col+1], $row, $row+1,'expand','shrink',2,2);$col++;
|
$remove->signal_connect("clicked"=> sub{
|
$remove->signal_connect("clicked"=> sub{
|