Line 62... |
Line 62... |
foreach my $p (@chunks){
|
foreach my $p (@chunks){
|
if($p !~ /^[0-9.:,]+$/){ message_dialog ("$p has invalid character(S)" ); return undef; }
|
if($p !~ /^[0-9.:,]+$/){ message_dialog ("$p has invalid character(S)" ); return undef; }
|
my @range=split(':',$p);
|
my @range=split(':',$p);
|
my $size= scalar @range;
|
my $size= scalar @range;
|
if($size==1){ # its a number
|
if($size==1){ # its a number
|
if ( $range[0] <= 0 || $range[0] >100 ) { message_dialog ("$range[0] is out of boundery (1:100)" ); return undef; }
|
if ( $range[0] <= 0 || $range[0] >100 ) { message_dialog ("Injection ratio $range[0] is out of bounds: 1<=ratio=<100" ); return undef; }
|
push(@ratios,$range[0]);
|
push(@ratios,$range[0]);
|
}elsif($size ==3){# its a range
|
}elsif($size ==3){# its a range
|
my($min,$max,$step)=@range;
|
my($min,$max,$step)=@range;
|
if ( $min <= 0 || $min >100 ) { message_dialog ("$min in $p is out of boundery (1:100)" ); return undef; }
|
if ( $min <= 0 || $min >100 ) { message_dialog ("Injection ratio $min in $p is out of bounds: 1<=ratio=<100" ); return undef; }
|
if ( $max <= 0 || $max >100 ) { message_dialog ("$max in $p is out of boundery (1:100)" ); return undef; }
|
if ( $max <= 0 || $max >100 ) { message_dialog ("Injection ratio $max in $p is out of bounds: 1<=ratio=<100" ); return undef; }
|
for (my $i=$min; $i<=$max; $i=$i+$step){
|
for (my $i=$min; $i<=$max; $i=$i+$step){
|
push(@ratios,$i);
|
push(@ratios,$i);
|
}
|
}
|
|
|
}else{
|
}else{
|
message_dialog ("$p has invalid format. The correct format for range is \$min:\$max:\$step" );
|
message_dialog ("Injection ratio $p has an invalid format. The correct format for range is \[min\]:\[max\]:\[step\]" );
|
|
return undef;
|
}
|
}
|
|
|
}#foreach
|
}#foreach
|
my @r=uniq(sort {$a<=>$b} @ratios);
|
my @r=uniq(sort {$a<=>$b} @ratios);
|
return \@r;
|
return \@r;
|
Line 247... |
Line 247... |
"Defne the tile number which is hotspt. All other nodes will send [Hot Spot traffic percentage] of their traffic to this node ", $table,$row,undef,1,$sample);
|
"Defne the tile number which is hotspt. All other nodes will send [Hot Spot traffic percentage] of their traffic to this node ", $table,$row,undef,1,$sample);
|
|
|
}
|
}
|
|
|
}
|
}
|
my $l= "Define injection ratios. You can define individual ratios seprating by comma (\',\') or define a range of injection ratios with \$min:\$max:\$step format.
|
my $l= "Injection ratios in flits/clk/Endpoint (%).
|
As an example defining 2,3,4:10:2 will result in (2,3,4,6,8,10) injection ratios." ;
|
E.g. Injection ratio 10% means each endpoint inject one flit every 10 cycles.
|
|
You can define individual ratios seprating by comma (\',\') or define a range of injection ratios with \$min:\$max:\$step format.
|
|
As an example defining 2,3,4:10:2 will result in (2,3,4,6,8,10) injection ratios.
|
|
" ;
|
my $u=get_injection_ratios ($emulate,$sample,"ratios");
|
my $u=get_injection_ratios ($emulate,$sample,"ratios");
|
|
|
attach_widget_to_table ($table,$row,gen_label_in_left("Injection ratios:"),gen_button_message ($l,"icons/help.png") , $u); $row++;
|
attach_widget_to_table ($table,$row,gen_label_in_left("Injection ratios:"),gen_button_message ($l,"icons/help.png") , $u); $row++;
|
|
|
my $scrolled_win = add_widget_to_scrolled_win($table);
|
my $scrolled_win = add_widget_to_scrolled_win($table);
|
Line 368... |
Line 371... |
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=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{
|
|
|
|
__PACKAGE__->mk_accessors(qw{noc_param});
|
|
my $temp = __PACKAGE__->new();
|
|
|
|
|
|
|
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);
|
$emulate->object_add_attribute('noc_param','T1',$T1);
|
my $ref=$emulate->object_get_attribute($sample,"noc_info");
|
$emulate->object_add_attribute('noc_param','T2',$T2);
|
if (defined $ref){
|
$emulate->object_add_attribute('noc_param','T3',$T3);
|
my %noc_info= %$ref;
|
$emulate->object_add_attribute('noc_param','TOPOLOGY',$topology);
|
foreach my $p (sort keys %noc_info){
|
show_topology_diagram ($emulate);
|
$temp->object_add_attribute('noc_param',$p,$noc_info{$p});
|
|
}
|
|
}
|
|
|
|
show_topology_diagram ($temp);
|
});
|
});
|
|
|
my $traffic = def_button("Pattern");
|
my $traffic = def_button("Pattern");
|
$traffic-> signal_connect("clicked" => sub{
|
$traffic-> 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);
|
Line 871... |
Line 884... |
'/mpsoc/rtl/src_emulate/rtl/',
|
'/mpsoc/rtl/src_emulate/rtl/',
|
'/mpsoc/rtl/src_peripheral/jtag/jtag_wb/',
|
'/mpsoc/rtl/src_peripheral/jtag/jtag_wb/',
|
'/mpsoc/rtl/src_peripheral/ram/',
|
'/mpsoc/rtl/src_peripheral/ram/',
|
'/mpsoc/rtl/main_comp.v',
|
'/mpsoc/rtl/main_comp.v',
|
'/mpsoc/rtl/arbiter.v',
|
'/mpsoc/rtl/arbiter.v',
|
|
'/mpsoc/rtl/pronoc_def.v',
|
'/mpsoc/rtl/src_topolgy/',
|
'/mpsoc/rtl/src_topolgy/',
|
'/mpsoc/rtl/src_noc/');
|
'/mpsoc/rtl/src_noc/');
|
|
|
my $dir = Cwd::getcwd();
|
my $dir = Cwd::getcwd();
|
my $project_dir = abs_path("$dir/../../");
|
my $project_dir = abs_path("$dir/../../");
|