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

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
    from Rev 43 to Rev 44
    Reverse comparison

Rev 43 → Rev 44

/mpsoc/perl_gui/lib/perl/emulate_ram_gen.pl
83,9 → 83,21
}
return \@o;
}
 
sub random_dest_gen_no_shuffle {
my $n=shift;
my @c=(0..$n-1);
my @o;
for (my $i=0; $i<$n; $i++){
my @l= @c;
@l=remove_scolar_from_array(\@l,$i);
$o[$i]=\@l;
}
return \@o;
}
 
 
sub run_cmd_update_info {
my ($cmd,$info)=@_;
my ($stdout,$exit,$stderr)=run_cmd_in_back_ground_get_stdout($cmd);
155,7 → 167,30
return ($vs,$vl);
}
 
sub get_synthetic_traffic_pattern{
my ($self, $sample)=@_;
my ($topology, $T1, $T2, $T3, $V, $Fpay) = get_sample_emulation_param($self,$sample);
my ($NE, $NR, $RAw, $EAw, $Fw) = get_topology_info_sub ($topology, $T1, $T2, $T3, $V, $Fpay);
my $rnd=random_dest_gen_no_shuffle($NE);
my $traffic=$self->object_get_attribute($sample,"traffic");
my @traffics=("tornado", "transposed 1", "transposed 2", "bit reverse", "bit complement","random", "hot spot", "shuffle", "neighbor", "bit rotation" );
#generate each node ram data
my $pattern="source->\t destination\n";
$traffic=($traffic eq "hot spot") ? "random" : $traffic;
my $dest_num = ($traffic eq "hot spot" || $traffic eq "random" ) ? $NE-1 : 1;
for (my $endp=0; $endp<$NE; $endp++){
$pattern = $pattern."$endp->\n";
for (my $num= 0; $num<$dest_num; $num++ ) {
my $dest_e_addr=synthetic_destination($self,$sample,$traffic,$endp,$num,$rnd);
my $des_id=endp_addr_decoder($self,$dest_e_addr);
$pattern = ($des_id == $endp)?$pattern."\t$des_id (Off)\n" : $pattern."\t$des_id\n";
}}
return $pattern;
}
 
 
 
sub generate_synthetic_traffic_ram{
my ($emulate,$endp,$sample,$ratio , $file,$rnd)=@_;
/mpsoc/perl_gui/lib/perl/emulator.pl
325,12 → 325,11
$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 @title=("Name", " Add/Remove "," Setting ", "Line\'s color", "Clear","Run");
foreach my $t (@title){
my @title=("Name","Traffic", " Add/Remove "," Setting ", "Line\'s color", "Clear","Run");
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++;
}
338,7 → 337,7
 
$col=0;
$row++;
@positions=(0,1,2,3,4,5,6,7);
@positions=(0,2,3,4,5,6,7,8);
 
#my $i=0;
359,7 → 358,7
#check if injection ratios are valid
my $r=$emulate->object_get_attribute($sample,"ratios");
if(defined $s && defined $name){
$l=gen_label_in_center($name);
$l=def_image_button('icons/diagram.png',$name);
$l-> signal_connect("clicked" => sub{
my $st = ($mode eq "simulate" )? check_sim_sample($emulate,$sample,$info) : check_sample($emulate,$sample,$info);
371,13 → 370,37
$emulate->object_add_attribute('noc_param','TOPOLOGY',$topology);
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 {
$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));
$table->attach ($l, $positions[$col], $positions[$col+1], $row, $row+1,'expand','shrink',2,2);$col++;
 
#remove
my $remove=def_image_button("icons/cancel.png");
/mpsoc/perl_gui/lib/perl/topology.pl
187,6 → 187,7
}
else{
my ($x, $y, $l) = mesh_tori_addr_sep($code,$T1, $T2,$T3);
#print "my ($x, $y, $l) = mesh_tori_addr_sep($code,$T1, $T2,$T3);\n";
return (($y*$T1)+$x)*$T3+$l;
}
}
214,6 → 215,7
$y = $code & mask_gen($NY);
$code>>=$NYw;
$l = $code;
return ($x, $y, $l);
}
 
sub mesh_tori_addrencode{
/mpsoc/perl_gui/lib/perl/widget.pl
369,18 → 369,24
$label = Gtk2::Label->new(" $label_text") unless (defined $mnemonic);
$label = Gtk2::Label->new_with_mnemonic (" $label_text") if (defined $mnemonic);
$box->pack_start($label, FALSE, FALSE, 0);
}
}
my $button = Gtk2::Button->new();
$button->add($box);
$button->set_border_width(0);
$button->show_all;
return $button;
 
}
 
sub def_button{
my ($label_text)=@_;
my $label = Gtk2::Label->new("$label_text");
my $button= Gtk2::Button->new();
$button->add($label);
return $button;
}
 
 
sub def_image_label{
my ($image_file, $label_text,$mnemonic)=@_;
# create box for image and label
744,6 → 750,9
}
 
 
 
 
 
#################
# table
################

powered by: WebSVN 2.1.0

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