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] - Blame information for rev 26

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 alirezamon
#! /usr/bin/perl -w
2
use Glib qw/TRUE FALSE/;
3
use strict;
4
use warnings;
5
 
6
use mpsoc;
7
use soc;
8
use ip;
9
use interface;
10
 
11
use POSIX 'strtol';
12
 
13
use File::Path;
14
use File::Find;
15
use File::Copy;
16
 
17
use Cwd 'abs_path';
18
 
19
 
20
use Gtk2;
21
use Gtk2::Pango;
22
 
23
 
24
 
25
 
26
require "widget.pl";
27
require "mpsoc_verilog_gen.pl";
28 17 alirezamon
require "hdr_file_gen.pl";
29 25 alirezamon
require "readme_gen.pl";
30 16 alirezamon
 
31 22 alirezamon
sub get_pos{
32
                my ($item,@list)=@_;
33
                my $pos=0;
34
                foreach my $p (@list){
35
                                #print "$p eq $item\n";
36
                                if ($p eq $item){return $pos;}
37
                                $pos++;
38
                }
39
                return undef;
40
 
41
}
42 16 alirezamon
 
43 22 alirezamon
 
44 16 alirezamon
sub noc_param_widget{
45 25 alirezamon
         my ($mpsoc,$name,$param, $default,$type,$content,$info, $table,$row,$show,$attribut1,$ref_delay)=@_;
46 16 alirezamon
         my $label =gen_label_in_left(" $name");
47
         my $widget;
48 25 alirezamon
         my $value=$mpsoc->object_get_attribute($attribut1,$param);
49 16 alirezamon
         if(! defined $value) {
50 25 alirezamon
                        $mpsoc->object_add_attribute($attribut1,$param,$default);
51
                        $mpsoc->object_add_attribute_order($attribut1,$param);
52 16 alirezamon
                        $value=$default;
53
         }
54 25 alirezamon
         if( ! defined $ref_delay){
55
                $ref_delay=($type eq "Entry") ? 10 : 1;
56
 
57
         }
58 16 alirezamon
         if ($type eq "Entry"){
59
                $widget=gen_entry($value);
60
                $widget-> signal_connect("changed" => sub{
61
                        my $new_param_value=$widget->get_text();
62 25 alirezamon
                        $mpsoc->object_add_attribute($attribut1,$param,$new_param_value);
63
                        set_gui_status($mpsoc,"ref",$ref_delay);
64
 
65 16 alirezamon
 
66
                });
67
 
68
 
69
         }
70
         elsif ($type eq "Combo-box"){
71
                 my @combo_list=split(",",$content);
72 25 alirezamon
                 my $pos=get_pos($value, @combo_list) if(defined $value);
73 22 alirezamon
                 if(!defined $pos){
74 25 alirezamon
                        $mpsoc->object_add_attribute($attribut1,$param,$default);
75
                        $pos=get_item_pos($default, @combo_list) if (defined $default);
76 22 alirezamon
 
77
                 }
78 16 alirezamon
                #print " my $pos=get_item_pos($value, @combo_list);\n";
79
                 $widget=gen_combo(\@combo_list, $pos);
80
                 $widget-> signal_connect("changed" => sub{
81
                 my $new_param_value=$widget->get_active_text();
82 25 alirezamon
                 $mpsoc->object_add_attribute($attribut1,$param,$new_param_value);
83
                 set_gui_status($mpsoc,"ref",$ref_delay);
84 16 alirezamon
 
85
 
86
                 });
87
 
88
         }
89
         elsif  ($type eq "Spin-button"){
90
                  my ($min,$max,$step)=split(",",$content);
91
                  $value=~ s/\D//g;
92
                  $min=~ s/\D//g;
93
                  $max=~ s/\D//g;
94
                  $step=~ s/\D//g;
95
                  $widget=gen_spin($min,$max,$step);
96
                  $widget->set_value($value);
97 24 alirezamon
                  $widget-> signal_connect("value_changed" => sub{
98 16 alirezamon
                  my $new_param_value=$widget->get_value_as_int();
99 25 alirezamon
                  $mpsoc->object_add_attribute($attribut1,$param,$new_param_value);
100
                  set_gui_status($mpsoc,"ref",$ref_delay);
101 16 alirezamon
 
102
                  });
103
 
104
                 # $box=def_label_spin_help_box ($param,$info, $value,$min,$max,$step, 2);
105
         }
106
 
107
        elsif ( $type eq "Check-box"){
108
                $widget = def_hbox(FALSE,0);
109
                my @check;
110
                for (my $i=0;$i<$content;$i++){
111
                        $check[$i]= Gtk2::CheckButton->new;
112
                }
113
                for (my $i=0;$i<$content;$i++){
114
                        $widget->pack_end(  $check[$i], FALSE, FALSE, 0);
115
 
116
                        my @chars = split("",$value);
117
                        #check if saved value match the size of check box
118
                        if($chars[0] ne $content ) {
119 25 alirezamon
                                $mpsoc->object_add_attribute($attribut1,$param,$default);
120 16 alirezamon
                                $value=$default;
121
                                @chars = split("",$value);
122
                        }
123
                        #set initial value
124
 
125
                        #print "\@chars=@chars\n";
126
                        for (my $i=0;$i<$content;$i++){
127
                                my $loc= (scalar @chars) -($i+1);
128
                                        if( $chars[$loc] eq '1') {$check[$i]->set_active(TRUE);}
129
                                        else {$check[$i]->set_active(FALSE);}
130
                        }
131
 
132
 
133
                        #get new value
134
                        $check[$i]-> signal_connect("toggled" => sub{
135
                                my $new_val="$content\'b";
136
 
137
                                for (my $i=$content-1; $i >= 0; $i--){
138
                                        if($check[$i]->get_active()) {$new_val="${new_val}1" ;}
139
                                        else {$new_val="${new_val}0" ;}
140
                                }
141 25 alirezamon
                                $mpsoc->object_add_attribute($attribut1,$param,$new_val);
142 16 alirezamon
                                #print "\$new_val=$new_val\n";
143 25 alirezamon
                                set_gui_status($mpsoc,"ref",$ref_delay);
144 16 alirezamon
                        });
145
                }
146
 
147
 
148
 
149
 
150
        }
151 25 alirezamon
        elsif ( $type eq "DIR_path"){
152
                        $widget =get_dir_in_object ($mpsoc,$attribut1,$param,$value,'ref',10);
153
        }
154
 
155
 
156
 
157 16 alirezamon
        else {
158
                 $widget =gen_label_in_left("unsuported widget type!");
159
        }
160
 
161
        my $inf_bt= gen_button_message ($info,"icons/help.png");
162
        if($show==1){
163
                my $tmp=gen_label_in_left(" ");
164
                $table->attach_defaults ($label , 0, 4,  $row,$row+1);
165
                $table->attach_defaults ($inf_bt , 4, 5, $row,$row+1);
166
                $table->attach_defaults ($widget , 5, 9, $row,$row+1);
167
                $table->attach_defaults ($tmp , 9, 10, $row,$row+1);
168
                $row++;
169
        }
170
    return $row;
171
}
172
 
173
 
174
sub initial_default_param{
175
        my $mpsoc=shift;
176
        my @socs=$mpsoc->mpsoc_get_soc_list();
177
        foreach my $soc_name (@socs){
178
                my %param_value;
179
                my $top=$mpsoc->mpsoc_get_soc($soc_name);
180
                my @insts=$top->top_get_all_instances();
181
                my @exceptions=('ni0');
182
                @insts=get_diff_array(\@insts,\@exceptions);
183
                foreach my $inst (@insts){
184
                        my @params=$top->top_get_parameter_list($inst);
185
                        foreach my $p (@params){
186
                                my  ($default,$type,$content,$info,$global_param,$redefine)=$top->top_get_parameter($inst,$p);
187
                                $param_value{$p}=$default;
188
                        }
189
                }
190
                $top->top_add_default_soc_param(\%param_value);
191
        }
192
 
193
}
194
 
195
#############
196
#       get_soc_lists
197
############
198
 
199
sub get_soc_list {
200 25 alirezamon
        my ($mpsoc,$info)=@_;
201 16 alirezamon
 
202 25 alirezamon
 
203
        my $path=$mpsoc->object_get_attribute('setting','soc_path');
204
 
205 18 alirezamon
        $path =~ s/ /\\ /g;
206
        my @socs;
207 16 alirezamon
        my @files = glob "$path/*.SOC";
208
        for my $p (@files){
209
 
210
                # Read
211
                my  $soc = eval { do $p };
212 25 alirezamon
                 if ($@ || !defined $soc){
213
                        add_info(\$info,"**Error reading  $p file: $@\n");
214
                         next;
215
                }
216 16 alirezamon
                my $top=$soc->soc_get_top();
217
                if (defined $top){
218
                        my @instance_list=$top->top_get_all_instances();
219
                        #check if the soc has ni port
220
                        foreach my $instanc(@instance_list){
221
                                my $module=$top->top_get_def_of_instance($instanc,'module');
222
                                if($module eq 'ni')
223
                                {
224 25 alirezamon
                                        my $name=$soc->object_get_attribute('soc_name');
225 16 alirezamon
                                        $mpsoc->mpsoc_add_soc($name,$top);
226
                                        #print" $name\n";
227
                                }
228
                        }
229
 
230
                }
231
 
232
 
233
 
234
 
235
 
236
 
237
 
238
 
239
        }#files
240
 
241
        # initial  default soc parameter
242
        initial_default_param($mpsoc);
243
 
244
 
245
 
246
        return $mpsoc->mpsoc_get_soc_list;
247
 
248
 
249
 
250
}
251
####################
252
# get_conflict_decision
253
###########################
254
sub b_box{
255
# create a new button
256
        my @label=@_;
257
        my $button = Gtk2::Button->new_from_stock(@label);
258
        my $box=def_vbox(FALSE,5);
259
        $box->pack_start($button,   FALSE, FALSE,0);
260
 
261
        return ($box,$button);
262
 
263
}
264
 
265
sub get_conflict_decision{
266 25 alirezamon
        my ($mpsoc,$name,$inserted,$conflicts,$msg)=@_;
267 17 alirezamon
        $msg="\tThe inserted tile number(s) have been mapped previously to \n\t\t\"$msg\".\n\tDo you want to remove the conflicted tiles number(s) in newly \n\tinsterd range or remove them from the previous ones? ";
268 16 alirezamon
 
269
        my $wind=def_popwin_size(100,300,"warning");
270
        my $label= gen_label_in_left($msg);
271
        my $table=def_table(2,6,FALSE);
272
        $table->attach_defaults ($label , 0, 6, 0,1);
273
        $wind->add($table);
274
 
275
        my ($box1,$b1)= b_box("Remove Previous");
276
        my ($box2,$b2)= b_box("Remove Current");
277
        my ($box3,$b3)= b_box("Cancel");
278
 
279
        $table->attach_defaults ($box1 , 0, 1, 1,2);
280
        $table->attach_defaults ($box2 , 3, 4, 1,2);
281
        $table->attach_defaults ($box3 , 5, 6, 1,2);
282
 
283
        $wind->show_all();
284
 
285
        $b1->signal_connect( "clicked"=> sub{ #Remove Previous
286
                my @socs=$mpsoc->mpsoc_get_soc_list();
287
                foreach my $p (@socs){
288
                        if($p ne $name){
289
                                my @taken_tiles=$mpsoc->mpsoc_get_soc_tiles_num($p);
290
                                my @diff=get_diff_array(\@taken_tiles,$inserted);
291
                                $mpsoc->mpsoc_add_soc_tiles_num($p,\@diff) if(scalar @diff  );
292
                                $mpsoc->mpsoc_add_soc_tiles_num($p,undef) if(scalar @diff ==0 );
293
                        }
294
                }
295
                $mpsoc->mpsoc_add_soc_tiles_num($name,$inserted) if(defined $inserted  );
296 25 alirezamon
                set_gui_status($mpsoc,"ref",1);
297 16 alirezamon
                $wind->destroy();
298
 
299
        });
300
 
301
        $b2->signal_connect( "clicked"=> sub{#Remove Current
302
                my @new= get_diff_array($inserted,$conflicts);
303
                $mpsoc->mpsoc_add_soc_tiles_num($name,\@new) if(scalar @new  );
304
                $mpsoc->mpsoc_add_soc_tiles_num($name,undef) if(scalar @new ==0 );
305 25 alirezamon
                set_gui_status($mpsoc,"ref",1);
306 16 alirezamon
                $wind->destroy();
307
 
308
        });
309
 
310
        $b3->signal_connect( "clicked"=> sub{
311
                $wind->destroy();
312
 
313
        });
314
 
315
}
316
 
317
 
318
 
319
#############
320
#       check_inserted_ip_nums
321
##########
322
 
323
 
324
sub check_inserted_ip_nums{
325 25 alirezamon
        my  ($mpsoc,$name,$str)=@_;
326 16 alirezamon
        my @all_num=();
327
        $str= remove_all_white_spaces ($str);
328
 
329
        if($str !~ /^[0-9.:,]+$/){ message_dialog ("The Ip numbers contains invalid character" ); return; }
330
        my @chunks=split(',',$str);
331
        foreach my $p (@chunks){
332
                my @range=split(':',$p);
333
                my $size= scalar @range;
334
                if($size==1){ # its a number
335
                        if ( grep( /^$range[0]$/, @all_num ) ) { message_dialog ("Multiple definition for Ip number $range[0]" ); return; }
336
                        push(@all_num,$range[0]);
337
                }elsif($size ==2){# its a range
338
                        my($min,$max)=@range;
339
                        if($min>$max) {message_dialog ("invalid range: [$p]" ); return;}
340
                        for (my $i=$min; $i<=$max; $i++){
341
                                if ( grep( /^$i$/, @all_num ) ) { message_dialog ("Multiple definition for Ip number $i in $p" ); return; }
342
                                push(@all_num,$i);
343
 
344
                        }
345
 
346
                }else{message_dialog ("invalid range: [$p]" ); return; }
347
 
348
        }
349
        #check if range does not exceed the tile numbers
350 25 alirezamon
        my $nx= $mpsoc->object_get_attribute('noc_param',"NX");
351
        my $ny= $mpsoc->object_get_attribute('noc_param',"NY");
352 16 alirezamon
 
353
        my $max_tile_num=$nx*$ny;
354
        my @f=sort { $a <=> $b }  @all_num;
355
        my @l;
356
        foreach my $num (@f){
357
                push(@l,$num) if($num<$max_tile_num);
358
 
359
        }
360
        @all_num=@l;
361
 
362
        #check if any ip number exists in the rest
363
        my $conflicts_msg;
364
        my @conflicts;
365
 
366
 
367
        my @socs=$mpsoc->mpsoc_get_soc_list();
368
        foreach my $p (@socs){
369
                if($p ne $name){
370
                        my @taken_tiles=$mpsoc->mpsoc_get_soc_tiles_num($p);
371
                        my @c=get_common_array(\@all_num,\@taken_tiles);
372
                        if (scalar @c) {
373
                                my $str=join(',', @c);
374 17 alirezamon
                                $conflicts_msg = (defined $conflicts_msg)? "$conflicts_msg\n\t\t $str->$p" : "$str->$p";
375 16 alirezamon
                                @conflicts= (defined $conflicts_msg)? (@conflicts,@c): @c;
376
                        }
377
                }#if
378
        }
379
        if (defined $conflicts_msg) {
380 25 alirezamon
                get_conflict_decision($mpsoc,$name,\@all_num,\@conflicts,$conflicts_msg);
381 16 alirezamon
 
382
        }else {
383
                #save the entered ips
384
                if( scalar @all_num>0){ $mpsoc->mpsoc_add_soc_tiles_num($name,\@all_num);}
385
                else {$mpsoc->mpsoc_add_soc_tiles_num($name,undef);}
386 25 alirezamon
                set_gui_status($mpsoc,"ref",1);
387 16 alirezamon
        }
388
 
389
 
390
 
391
}
392
 
393
 
394
 
395
 
396
#################
397
# get_soc_parameter_setting
398
################
399
 
400
sub get_soc_parameter_setting{
401 25 alirezamon
        my ($mpsoc,$soc_name,$tile)=@_;
402 16 alirezamon
 
403
        my $window = (defined $tile)? def_popwin_size(600,400,"Parameter setting for $soc_name located in tile($tile) "):def_popwin_size(600,400,"Default Parameter setting for $soc_name ");
404
        my $table = def_table(10, 7, TRUE);
405
 
406
        my $scrolled_win = new Gtk2::ScrolledWindow (undef, undef);
407
        $scrolled_win->set_policy( "automatic", "automatic" );
408
        $scrolled_win->add_with_viewport($table);
409
        my $row=0;
410
 
411
        my $top=$mpsoc->mpsoc_get_soc($soc_name);
412
 
413
        #read soc parameters
414
        my %param_value=(defined $tile) ? $top->top_get_custom_soc_param($tile)  : $top->top_get_default_soc_param();
415
 
416
 
417
 
418
        my @insts=$top->top_get_all_instances();
419
        my @exceptions=('ni0');
420
        @insts=get_diff_array(\@insts,\@exceptions);
421
        foreach my $inst (@insts){
422
                my @params=$top->top_get_parameter_list($inst);
423
                foreach my $p (@params){
424
                        my  ($default,$type,$content,$info,$global_param,$redefine)=$top->top_get_parameter($inst,$p);
425
 
426
                        if ($type eq "Entry"){
427
                                my $entry=gen_entry($param_value{$p});
428
                                $table->attach_defaults ($entry, 3, 6, $row, $row+1);
429
                                $entry-> signal_connect("changed" => sub{$param_value{$p}=$entry->get_text();});
430
                        }
431
                        elsif ($type eq "Combo-box"){
432
                                my @combo_list=split(",",$content);
433 25 alirezamon
                                my $pos=get_item_pos($param_value{$p}, @combo_list) if(defined $param_value{$p});
434 16 alirezamon
                                my $combo=gen_combo(\@combo_list, $pos);
435
                                $table->attach_defaults ($combo, 3, 6, $row, $row+1);
436
                                $combo-> signal_connect("changed" => sub{$param_value{$p}=$combo->get_active_text();});
437
 
438
                        }
439
                        elsif   ($type eq "Spin-button"){
440
                                my ($min,$max,$step)=split(",",$content);
441
                                $param_value{$p}=~ s/\D//g;
442
                                $min=~ s/\D//g;
443
                                $max=~ s/\D//g;
444
                                $step=~ s/\D//g;
445
                                my $spin=gen_spin($min,$max,$step);
446
                                $spin->set_value($param_value{$p});
447
                                $table->attach_defaults ($spin, 3, 4, $row, $row+1);
448 24 alirezamon
                                $spin-> signal_connect("value_changed" => sub{$param_value{$p}=$spin->get_value_as_int();});
449 16 alirezamon
 
450
                 # $box=def_label_spin_help_box ($param,$info, $value,$min,$max,$step, 2);
451
                        }
452
                        my $label =gen_label_in_center($p);
453
                        $table->attach_defaults ($label, 0, 3, $row, $row+1);
454
                        if (defined $info){
455
                        my $info_button=def_image_button('icons/help.png');
456
                        $table->attach_defaults ($info_button, 6, 7, $row, $row+1);
457
                        $info_button->signal_connect('clicked'=>sub{
458
                                message_dialog($info);
459
 
460
                        });
461
 
462
                }
463
 
464
                        $row++;
465
 
466
 
467
                }
468
        }
469
 
470
 
471
 
472
 
473
 
474
 
475
 
476
 
477
 
478
 
479
 
480
 
481
 
482
 
483
 
484
 
485
 
486
 
487
 
488
 
489
 
490 25 alirezamon
 
491 16 alirezamon
        my $ok = def_image_button('icons/select.png','OK');
492
        my $okbox=def_hbox(TRUE,0);
493
        $okbox->pack_start($ok, FALSE, FALSE,0);
494
 
495
 
496
        my $mtable = def_table(10, 1, TRUE);
497
 
498
        $mtable->attach_defaults($scrolled_win,0,1,0,9);
499
        $mtable->attach_defaults($okbox,0,1,9,10);
500
 
501
        $window->add ($mtable);
502
        $window->show_all();
503
 
504
        $ok-> signal_connect("clicked" => sub{
505
                $window->destroy;
506
                #save new values 
507
                if(!defined $tile ) {
508
                        $top->top_add_default_soc_param(\%param_value);
509
                }
510
                else {
511
                        $top->top_add_custom_soc_param(\%param_value,$tile);
512
 
513
                }
514 25 alirezamon
                #set_gui_status($mpsoc,"refresh_soc",1);
515 16 alirezamon
                #$$refresh_soc->clicked;
516
 
517
                });
518
 
519
 
520
 
521
}
522
 
523
 
524
 
525
 
526
 
527
 
528
 
529
################
530
#       tile_set_widget
531
################
532
 
533
sub tile_set_widget{
534 25 alirezamon
        my ($mpsoc,$soc_name,$num,$table,$show,$row)=@_;
535 16 alirezamon
        #my $lable=gen_label_in_left($soc);
536
        my @all_num= $mpsoc->mpsoc_get_soc_tiles_num($soc_name);
537
        my $init=compress_nums(@all_num);
538
        my $entry;
539
        if (defined $init){$entry=gen_entry($init) ;}
540
        else                      {$entry=gen_entry();}
541
        my $set= def_image_button('icons/right.png');
542
        my $remove= def_image_button('icons/cancel.png');
543
        #my $setting= def_image_button('icons/setting.png','setting');
544
 
545
 
546
        my $button = def_colored_button($soc_name,$num);
547
        $button->signal_connect("clicked"=> sub{
548 25 alirezamon
                get_soc_parameter_setting($mpsoc,$soc_name,undef);
549 16 alirezamon
 
550
        });
551
 
552
 
553
        $set->signal_connect("clicked"=> sub{
554
                my $data=$entry->get_text();
555 25 alirezamon
                check_inserted_ip_nums($mpsoc,$soc_name,$data);
556 16 alirezamon
 
557
 
558
 
559
        });
560
        $remove->signal_connect("clicked"=> sub{
561
                $mpsoc->mpsoc_remove_soc($soc_name);
562 25 alirezamon
                set_gui_status($mpsoc,"ref",1);
563 16 alirezamon
 
564
        });
565
 
566
 
567
if($show){
568
        $table->attach_defaults ( $button, 0, 4, $row,$row+1);
569
        $table->attach_defaults ( $remove, 4, 5, $row,$row+1);
570
        $table->attach_defaults ( $entry , 5, 9, $row,$row+1);
571
        $table->attach_defaults ( $set, 9, 10, $row,$row+1);
572
 
573
 
574
 
575
        $row++;
576
}
577
 
578
        return $row;
579
 
580
 
581
}
582
 
583
 
584
 
585
 
586
 
587
##################
588
#       defualt_tilles_setting
589
###################
590
 
591
sub defualt_tilles_setting {
592 25 alirezamon
        my ($mpsoc,$table,$show,$row,$info)=@_;
593 16 alirezamon
 
594
        #title  
595
        my $separator1 = Gtk2::HSeparator->new;
596
        my $separator2 = Gtk2::HSeparator->new;
597
        my $title2=gen_label_in_center("Tile Configuration");
598
        my $box1=def_vbox(FALSE, 1);
599
        $box1->pack_start( $separator1, FALSE, FALSE, 3);
600
        $box1->pack_start( $title2, FALSE, FALSE, 3);
601
        $box1->pack_start( $separator2, FALSE, FALSE, 3);
602
        if($show){$table->attach_defaults ($box1 ,0,10, $row,$row+1);$row++;}
603
 
604
 
605
 
606
 
607
        my $label = gen_label_in_left("Tiles path:");
608
        my $entry = Gtk2::Entry->new;
609
        my $browse= def_image_button("icons/browse.png");
610 25 alirezamon
        my $file= $mpsoc->object_get_attribute('setting','soc_path');
611 16 alirezamon
        if(defined $file){$entry->set_text($file);}
612
 
613
 
614
        $browse->signal_connect("clicked"=> sub{
615
                my $entry_ref=$_[1];
616
                my $file;
617
 
618
 
619
 
620
 
621
 
622
        my $dialog = Gtk2::FileChooserDialog->new(
623
                'Select tile directory', undef,
624
                #               'open',
625
                'select-folder',
626
                'gtk-cancel' => 'cancel',
627
                'gtk-ok'     => 'ok',
628
                );
629
 
630
 
631
                if ( "ok" eq $dialog->run ) {
632
                        $file = $dialog->get_filename;
633
                        $$entry_ref->set_text($file);
634 25 alirezamon
                        $mpsoc->object_add_attribute('setting','soc_path',$file);
635 16 alirezamon
                        $mpsoc->mpsoc_remove_all_soc();
636 25 alirezamon
                        set_gui_status($mpsoc,"ref",1);
637
                        #check_input_file($file,$socgen,$info);
638 16 alirezamon
                        #print "file = $file\n";
639
                 }
640
                $dialog->destroy;
641
 
642
 
643
 
644
        } , \$entry);
645
 
646
 
647
 
648
 
649
        $entry->signal_connect("activate"=>sub{
650
                my $file_name=$entry->get_text();
651 25 alirezamon
                $mpsoc->object_add_attribute('setting','soc_path',$file_name);
652 16 alirezamon
                $mpsoc->mpsoc_remove_all_soc();
653 25 alirezamon
                set_gui_status($mpsoc,"ref",1);
654
                #check_input_file($file_name,$socgen,$info);
655 16 alirezamon
        });
656
 
657
 
658
 
659
        if($show){
660
                my $tmp=gen_label_in_left(" ");
661
                $table->attach_defaults ($label, 0, 4 , $row,$row+1);
662
                $table->attach_defaults ($tmp, 4, 5 , $row,$row+1);
663
                $table->attach_defaults ($entry, 5, 9 , $row,$row+1);
664
                $table->attach_defaults ($browse, 9, 10, $row,$row+1);
665
                $row++;
666
        }
667
 
668
 
669
 
670
        my @socs=$mpsoc->mpsoc_get_soc_list();
671
        if( scalar @socs == 0){
672 25 alirezamon
                @socs=get_soc_list($mpsoc,$info);
673 16 alirezamon
 
674
        }
675
        @socs=$mpsoc->mpsoc_get_soc_list();
676
 
677
 
678
 
679
        my $lab1=gen_label_in_center(' Tile name');
680
 
681
        my $lab2=gen_label_help('Define the tile numbers that each IP is mapped to.
682
you can add individual numbers or ranges as follow
683
        eg: 0,2,5:10
684
        ', ' Tile numbers ');
685
        if($show){
686
                $table->attach_defaults ($lab1 ,0,3, $row,$row+1);
687
                $table->attach_defaults ($lab2 ,5,10, $row,$row+1);$row++;
688 25 alirezamon
        }
689 16 alirezamon
 
690
        my $soc_num=0;
691
        foreach my $soc_name (@socs){
692 25 alirezamon
                $row=tile_set_widget ($mpsoc,$soc_name,$soc_num,$table,$show,$row);
693
                $soc_num++;
694 16 alirezamon
 
695 25 alirezamon
        }
696 16 alirezamon
        return $row;
697
 
698
}
699
 
700
 
701
 
702
 
703
#######################
704
#   noc_config
705
######################
706
 
707
sub noc_config{
708 25 alirezamon
        my ($mpsoc,$table)=@_;
709
 
710 16 alirezamon
 
711
 
712
        #title  
713
        my $title=gen_label_in_center("NoC Configuration");
714
        my $box=def_vbox(FALSE, 1);
715
        $box->pack_start( $title, FALSE, FALSE, 3);
716
        my $separator = Gtk2::HSeparator->new;
717
        $box->pack_start( $separator, FALSE, FALSE, 3);
718
        $table->attach_defaults ($box , 0, 10, 0,1);
719
 
720
        my $label;
721
        my $param;
722
        my $default;
723
        my $type;
724
        my $content;
725
        my $info;
726
        my $row=1;
727
 
728
        #parameter start
729
        my $b1;
730 25 alirezamon
        my $show_noc=$mpsoc->object_get_attribute('setting','show_noc_setting');
731
        if(!defined $show_noc){
732
                $show_noc=1;
733
                $mpsoc->object_add_attribute('setting','show_noc_setting',$show_noc);
734
 
735
        }
736 16 alirezamon
        if($show_noc == 0){
737
                $b1= def_image_button("icons/down.png","NoC Parameters");
738
                $label=gen_label_in_center(' ');
739
                $table->attach_defaults ( $label , 2, 10, $row,$row+1);
740
                $table->attach_defaults ( $b1 , 0, 4, $row,$row+1);$row++;
741
        }
742
 
743 22 alirezamon
 
744
        #Router type
745
        $label='Router Type';
746
        $param='ROUTER_TYPE';
747
        $default='"VC_BASED"';
748
        $content='"INPUT_QUEUED","VC_BASED"';
749
        $type='Combo-box';
750
    $info="    Input-queued: simple router with low performance and does not support fully adaptive routing.
751
    VC-based routers offer higher performance, fully adaptive routing  and traffic isolation for different packet classes.";
752 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$show_noc,'noc_type');
753
        my $router_type=$mpsoc->object_get_attribute('noc_type',"ROUTER_TYPE");
754 22 alirezamon
 
755 25 alirezamon
 
756 16 alirezamon
 
757
        #Routers per row
758
        $label= 'Routers per row';
759
        $param= 'NX';
760
    $default=' 2';
761
        $content='2,16,1';
762
    $info= 'Number of NoC routers in row (X dimention)';
763
    $type= 'Spin-button';
764 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$show_noc,'noc_param');
765 16 alirezamon
 
766
 
767
 
768
        #Routers per column
769
        $label= 'Routers per column';
770
        $param= 'NY';
771
    $default=' 2';
772
        $content='2,16,1';
773
    $info= 'Number of NoC routers in column (Y dimention)';
774
    $type= 'Spin-button';
775 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$show_noc,'noc_param');
776 16 alirezamon
 
777 22 alirezamon
        if($router_type eq '"VC_BASED"'){
778
                #VC number per port
779 25 alirezamon
                my $v=$mpsoc->object_get_attribute('noc_param','V');
780
                if(defined $v){ $mpsoc->object_add_attribute('noc_param','V',2) if($v eq 1);}
781 22 alirezamon
                $label='VC number per port';
782
                $param='V';
783
                $default='2';
784
                $type='Spin-button';
785
                $content='2,16,1';
786
                $info='Number of Virtual Channel per each router port';
787 25 alirezamon
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$show_noc,'noc_param');
788 22 alirezamon
        } else {
789 25 alirezamon
                $mpsoc->object_add_attribute('noc_param','V',1);
790
                $mpsoc->object_add_attribute('noc_param','C',0);
791 22 alirezamon
 
792
 
793
        }
794
 
795 16 alirezamon
        #buffer width per VC
796 22 alirezamon
        $label=($router_type eq '"VC_BASED"')? 'Buffer flits per VC': "Buffer flits";
797 16 alirezamon
        $param='B';
798
    $default='4';
799
    $content='2,256,1';
800
    $type='Spin-button';
801 22 alirezamon
        $info=($router_type eq '"VC_BASED"')?  'Buffer queue size per VC in flits' : 'Buffer queue size in flits';
802 25 alirezamon
    $row= noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$show_noc,'noc_param');
803 16 alirezamon
 
804
        #packet payload width
805
        $label='payload width';
806
        $param='Fpay';
807
        $default='32';
808
        $content='32,256,32';
809
        $type='Spin-button';
810
    $info="The packet payload width in bits";
811 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info,$table,$row,$show_noc,'noc_param');
812 16 alirezamon
 
813
        #topology
814
        $label='Topology';
815
        $param='TOPOLOGY';
816
        $default='"MESH"';
817
        $content='"MESH","TORUS"';
818
        $type='Combo-box';
819
    $info="NoC topology";
820 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$show_noc,'noc_param');
821 16 alirezamon
 
822
        #routing algorithm
823 25 alirezamon
        my $topology=$mpsoc->object_get_attribute('noc_param','TOPOLOGY');
824 16 alirezamon
        $label='Routing Algorithm';
825
        $param="ROUTE_NAME";
826
        $type="Combo-box";
827 22 alirezamon
        if($router_type eq '"VC_BASED"'){
828
                $content=($topology eq '"MESH"')?  '"XY","WEST_FIRST","NORTH_LAST","NEGETIVE_FIRST","DUATO"' :
829
                                                    '"TRANC_XY","TRANC_WEST_FIRST","TRANC_NORTH_LAST","TRANC_NEGETIVE_FIRST","TRANC_DUATO"';
830
 
831
        }else{
832
                $content=($topology eq '"MESH"')?  '"XY","WEST_FIRST","NORTH_LAST","NEGETIVE_FIRST"' :
833
                                                    '"TRANC_XY","TRANC_WEST_FIRST","TRANC_NORTH_LAST","TRANC_NEGETIVE_FIRST"';
834
 
835
 
836
        }
837 16 alirezamon
        $default=($topology eq '"MESH"')?  '"XY"':'"TRANC_XY"';
838
        $info="Select the routing algorithm: XY(DoR) , partially adaptive (Turn models). Fully adaptive (Duato) ";
839 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$show_noc,'noc_param');
840 16 alirezamon
 
841
 
842 25 alirezamon
        #SSA
843
        $label='SSA Ebable';
844
        $param='SSA_EN';
845
        $default='"NO"';
846
        $content='"YES","NO"';
847
        $type='Combo-box';
848
    $info="Enable single cycle latency on packets traversing in the same direction using static straight allocator (SSA)";
849
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$show_noc,'noc_param');
850
 
851
 
852
 
853
 
854
 
855 16 alirezamon
        if($show_noc == 1){
856
                $b1= def_image_button("icons/up.png","NoC Parameters");
857
                $table->attach_defaults ( $b1 , 0, 2, $row,$row+1);$row++;
858
        }
859
        $b1->signal_connect("clicked" => sub{
860
                $show_noc=($show_noc==1)?0:1;
861 25 alirezamon
                $mpsoc->object_add_attribute('setting','show_noc_setting',$show_noc);
862
                set_gui_status($mpsoc,"ref",1);
863 16 alirezamon
 
864
        });
865
 
866
        #advance parameter start
867
        my $advc;
868 25 alirezamon
        my $adv_set=$mpsoc->object_get_attribute('setting','show_adv_setting');
869 16 alirezamon
        if($adv_set == 0){
870
                $advc= def_image_button("icons/down.png","Advance Parameters");
871
                $table->attach_defaults ( $advc , 0, 4, $row,$row+1);$row++;
872
 
873
        }
874
 
875
 
876
 
877
        #Fully and partially adaptive routing setting
878 25 alirezamon
                my $route=$mpsoc->object_get_attribute('noc_param',"ROUTE_NAME");
879 16 alirezamon
                if($route ne '"XY"' and $route ne '"TRANC_XY"' ){
880
                        $label="Congestion index";
881
                        $param="CONGESTION_INDEX";
882
                        $type="Spin-button";
883
                        $content="0,12,1";
884
                        $info="Congestion index determines how congestion information is collected from neighboring routers. Please refer to the usere manual for more information";
885 22 alirezamon
                    $default=3;
886 25 alirezamon
                        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,'noc_param');
887 16 alirezamon
 
888
                }
889 22 alirezamon
                #Fully adaptive routing setting
890
                if( $route eq '"TRANC_DUATO"' or $route eq '"DUATO"'  ){
891 25 alirezamon
                         my $v=$mpsoc->object_get_attribute('noc_param',"V");
892 22 alirezamon
                         $label="Select Escap VC";
893
                         $param="ESCAP_VC_MASK";
894
                         $type="Check-box";
895
                         $content=$v;
896
                         $default="$v\'b";
897
                         for (my $i=1; $i<=$v-1; $i++){$default=  "${default}0";}
898
                         $default=  "${default}1";
899
 
900 16 alirezamon
 
901 22 alirezamon
                         $info="Select the escap VC for fully adaptive routing.";
902 25 alirezamon
                         $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,$adv_set,'noc_param');
903 22 alirezamon
 
904
                 }
905
 
906 16 alirezamon
        # VC reallocation type
907 22 alirezamon
                $label=($router_type eq '"VC_BASED"')? 'VC reallocation type': 'Queue reallocation type';
908 16 alirezamon
                $param='VC_REALLOCATION_TYPE';
909 22 alirezamon
                $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";
910 16 alirezamon
                $default='"NONATOMIC"';
911
                $content='"ATOMIC","NONATOMIC"';
912
                $type='Combo-box';
913 25 alirezamon
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,'noc_param');
914 16 alirezamon
 
915
 
916
 
917
 
918 22 alirezamon
        if ($router_type eq '"VC_BASED"'){
919 16 alirezamon
        #vc/sw allocator type
920
                $label = 'VC/SW combination type';
921
                $param='COMBINATION_TYPE';
922 22 alirezamon
                $default='"COMB_NONSPEC"';
923 16 alirezamon
                $content='"BASELINE","COMB_SPEC1","COMB_SPEC2","COMB_NONSPEC"';
924
                $type='Combo-box';
925
                $info="The joint VC/ switch allocator type. using canonical combination is not recommanded";
926 25 alirezamon
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,'noc_param');
927 16 alirezamon
 
928 22 alirezamon
        }
929
 
930 16 alirezamon
        # Crossbar mux type 
931
                $label='Crossbar mux type';
932
                $param='MUX_TYPE';
933
                $default='"BINARY"';
934
                $content='"ONE_HOT","BINARY"';
935
                $type='Combo-box';
936
                $info="Crossbar multiplexer type";
937 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,'noc_param');
938 16 alirezamon
 
939 22 alirezamon
        if($router_type eq '"VC_BASED"'){
940 16 alirezamon
        #class
941
                $label='class number';
942
                $param='C';
943
                $default= 0;
944
                $info='Number of message classes. Each specific class can use different set of VC';
945
                $content='0,16,1';
946
            $type='Spin-button';
947 25 alirezamon
            $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,'noc_param');
948 16 alirezamon
 
949
 
950 25 alirezamon
                my $class=$mpsoc->object_get_attribute('noc_param',"C");
951
                my $v=$mpsoc->object_get_attribute('noc_param',"V");
952 16 alirezamon
                $default= "$v\'b";
953
                for (my $i=1; $i<=$v; $i++){
954
                        $default=  "${default}1";
955
                }
956
                #print "\$default=$default\n";
957
                for (my $i=0; $i<=$class-1; $i++){
958
 
959
                         $label="Class $i Permitted VCs";
960
                         $param="Cn_$i";
961
                         $type="Check-box";
962
                         $content=$v;
963
                         $info="Select the permitted VCs which the message class $i can be sent via them.";
964 25 alirezamon
                         $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,'noc_param');
965 16 alirezamon
 
966
 
967
                }
968
 
969
 
970 22 alirezamon
 
971
        }#($router_type eq '"VC_BASED"')
972 16 alirezamon
 
973 22 alirezamon
 
974 16 alirezamon
 
975
         #simulation debuge enable     
976
                $label='Debug enable';
977
                $param='DEBUG_EN';
978
                $info= "Add extra verilog code for debuging NoC for simulation";
979
                $default='0';
980
                $content='0,1';
981
                $type='Combo-box';
982 25 alirezamon
                $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,'noc_param');
983 16 alirezamon
 
984
 
985
 
986
 
987
 
988
        $label="Add pipeline reg after crossbar";
989
        $param="ADD_PIPREG_AFTER_CROSSBAR";
990
        $type="Check-box";
991
        $content=1;
992
        $default="1\'b0";
993
        $info="If ebabled it adds a pipline register at the output port of the router.";
994 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,$adv_set,'noc_param');
995 16 alirezamon
 
996
 
997 25 alirezamon
 
998 16 alirezamon
 
999
 
1000
 
1001
        if($adv_set == 1){
1002
                $advc= def_image_button("icons/up.png","Advance Parameters");
1003
                $table->attach_defaults ( $advc , 0, 4, $row,$row+1);$row++;
1004
        }
1005
        $advc->signal_connect("clicked" => sub{
1006
                $adv_set=($adv_set==1)?0:1;
1007 25 alirezamon
                $mpsoc->object_add_attribute('setting','show_adv_setting',$adv_set);
1008
                set_gui_status($mpsoc,"ref",1);
1009 16 alirezamon
        });
1010
 
1011
 
1012
        #other fixed parameters       
1013
 
1014
 
1015
        #FIRST_ARBITER_EXT_P_EN
1016
        $label='FIRST_ARBITER_EXT_P_EN';
1017
        $param='FIRST_ARBITER_EXT_P_EN';
1018
        $default= 0;
1019
        $info='FIRST_ARBITER_EXT_P_EN';
1020
        $content='0,1';
1021
        $type="Combo-box";
1022 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info,$table,$row,0,'noc_param');
1023 16 alirezamon
 
1024 25 alirezamon
 
1025 16 alirezamon
 
1026
        # AVC_ATOMIC_EN
1027
        $label='AVC_ATOMIC_EN';
1028
        $param='AVC_ATOMIC_EN';
1029
        $default= 0;
1030
        $info='AVC_ATOMIC_EN';
1031
        $content='0,1';
1032
        $type="Combo-box";
1033 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,0,'noc_param');
1034 16 alirezamon
 
1035
 
1036
        #ROUTE_SUBFUNC
1037
        $label='ROUTE_SUBFUNC';
1038
        $param='ROUTE_SUBFUNC';
1039
        $default= '"XY"';
1040
        $info='ROUTE_SUBFUNC';
1041
        $content='"XY"';
1042
        $type="Combo-box";
1043 25 alirezamon
        $row=noc_param_widget ($mpsoc,$label,$param, $default,$type,$content,$info, $table,$row,0,'noc_param');
1044 16 alirezamon
 
1045 25 alirezamon
        return $row;
1046
}
1047
 
1048
 
1049
 
1050
 
1051
 
1052
 
1053
 
1054
 
1055
 
1056
 
1057
 
1058
 
1059
 
1060
 
1061
 
1062
 
1063
 
1064
 
1065
 
1066
 
1067
#######################
1068
#   get_config
1069
######################
1070
 
1071
sub get_config{
1072
        my ($mpsoc,$info)=@_;
1073
        my $table=def_table(20,10,FALSE);#      my ($row,$col,$homogeneous)=@_;
1074
        my $scrolled_win = new Gtk2::ScrolledWindow (undef, undef);
1075
        $scrolled_win->set_policy( "automatic", "automatic" );
1076
        $scrolled_win->add_with_viewport($table);
1077
 
1078
        #noc_setting
1079
        my $row=noc_config ($mpsoc,$table);
1080
 
1081
 
1082 16 alirezamon
        #tile setting 
1083
        my $tile_set;
1084 25 alirezamon
        my $show=$mpsoc->object_get_attribute('setting','show_tile_setting');
1085
 
1086 16 alirezamon
        if($show == 0){
1087
                $tile_set= def_image_button("icons/down.png","Tiles setting");
1088
                $table->attach_defaults ( $tile_set , 0, 4, $row,$row+1);$row++;
1089
 
1090
        }
1091
 
1092
 
1093
 
1094
 
1095
 
1096 25 alirezamon
        $row=defualt_tilles_setting($mpsoc,$table,$show,$row,$info);
1097 16 alirezamon
 
1098
 
1099
 
1100
 
1101
 
1102
 
1103
 
1104
 
1105
        #end tile setting
1106
        if($show == 1){
1107
                $tile_set= def_image_button("icons/up.png","Tiles setting");
1108
                $table->attach_defaults ( $tile_set , 0, 1, $row,$row+1);$row++;
1109
        }
1110
        $tile_set->signal_connect("clicked" => sub{
1111
                $show=($show==1)?0:1;
1112 25 alirezamon
                $mpsoc->object_add_attribute('setting','show_tile_setting',$show);
1113
                set_gui_status($mpsoc,"ref",1);
1114 16 alirezamon
 
1115
 
1116
        });
1117
 
1118
 
1119
 
1120
 
1121
        for(my $i=$row; $i<25; $i++){
1122
                my $empty_col=gen_label_in_left(' ');
1123
                $table->attach_defaults ($empty_col , 0, 1, $i,$i+1);
1124
 
1125
        }
1126
 
1127
 
1128
 
1129
 
1130
 
1131
 
1132
return  $scrolled_win;
1133
 
1134
}
1135
 
1136
 
1137
#############
1138
#
1139
###########
1140
 
1141
sub gen_socs {
1142
        my ($mpsoc,$info)=@_;
1143 25 alirezamon
        my $path=$mpsoc->object_get_attribute('setting','soc_path');
1144 18 alirezamon
        $path=~ s/ /\\ /g;
1145
        my @socs;
1146 16 alirezamon
        my @files = glob "$path/*.SOC";
1147
        my @soc_list=$mpsoc-> mpsoc_get_soc_list();
1148
        my @used_socs;
1149
        foreach my $soc_name (@soc_list){
1150
                my @n=$mpsoc->mpsoc_get_soc_tiles_num($soc_name);
1151
                if(scalar @n){
1152 24 alirezamon
                        #generate the verilog files of it
1153 16 alirezamon
                        push(@used_socs,$soc_name);
1154
                }
1155
        }
1156
 
1157
        for my $p (@files){
1158
                # Read
1159
                my  $soc = eval { do $p };
1160 25 alirezamon
                if ($@ || !defined $soc){
1161
                        show_info(\$info,"**Error reading  $p file: $@\n");
1162
                       next;
1163
                }
1164
                my  $name=$soc->object_get_attribute('soc_name');
1165 16 alirezamon
                if( grep (/^$name$/,@used_socs)){
1166
                #generate the soc
1167
                generate_soc_files($mpsoc,$soc,$info);
1168
 
1169
 
1170
 
1171
 
1172
                };
1173
 
1174
 
1175
        }
1176
 
1177
 
1178
}
1179
 
1180
################
1181
#       generate_soc
1182
#################
1183
 
1184
sub generate_soc_files{
1185
        my ($mpsoc,$soc,$info)=@_;
1186 25 alirezamon
        my $mpsoc_name=$mpsoc->object_get_attribute('mpsoc_name');
1187
        my $soc_name=$soc->object_get_attribute('soc_name');
1188
        my ($file_v,$tmp)=soc_generate_verilog($soc);
1189 16 alirezamon
 
1190
        # Write object file
1191
        open(FILE,  ">lib/soc/$soc_name.SOC") || die "Can not open: $!";
1192 25 alirezamon
        print FILE perl_file_header("$soc_name.SOC");
1193 16 alirezamon
        print FILE Data::Dumper->Dump([\%$soc],[$soc_name]);
1194
        close(FILE) || die "Error closing file: $!";
1195
 
1196
        # Write verilog file
1197
        open(FILE,  ">lib/verilog/$soc_name.v") || die "Can not open: $!";
1198
        print FILE $file_v;
1199
        close(FILE) || die "Error closing file: $!";
1200
 
1201
 
1202
 
1203
 
1204
        # copy all files in project work directory
1205
        my $dir = Cwd::getcwd();
1206
        #make target dir
1207
        my $project_dir   = abs_path("$dir/../../");
1208
        my $target_dir  = "$project_dir/mpsoc_work/MPSOC/$mpsoc_name";
1209
        mkpath("$target_dir/src_verilog/lib/",1,0755);
1210
        mkpath("$target_dir/src_verilog/tiles/",1,0755);
1211
        mkpath("$target_dir/sw",1,0755);
1212
 
1213
    #copy hdl codes in src_verilog
1214
 
1215 18 alirezamon
    my ($hdl_ref,$warnings)= get_all_files_list($soc,"hdl_files");
1216 16 alirezamon
    foreach my $f(@{$hdl_ref}){
1217 18 alirezamon
 
1218 16 alirezamon
        my $n="$project_dir$f";
1219
         if (-f "$n") {
1220
                        copy ("$n","$target_dir/src_verilog/lib");
1221
         }elsif(-f "$f" ){
1222
                        copy ("$f","$target_dir/src_verilog/lib");
1223
 
1224
         }
1225
 
1226
 
1227
    }
1228
                        show_info(\$info,$warnings)                     if(defined $warnings);
1229
 
1230
 
1231
                #my @pathes=("$dir/../src_peripheral","$dir/../src_noc","$dir/../src_processor");
1232
                #foreach my $p(@pathes){
1233
                #       find(
1234
                #               sub {
1235
                #                       return unless ( -f $_ );
1236
                #                       $_ =~ /\.v$/ && copy( $File::Find::name, "$target_dir/src_verilog/lib/" );
1237
                #               },
1238
                #       $p
1239
                        #       );
1240
                #}
1241
 
1242
 
1243 18 alirezamon
                move ("$dir/lib/verilog/$soc_name.v","$target_dir/src_verilog/tiles/");
1244 16 alirezamon
                copy_noc_files($project_dir,"$target_dir/src_verilog/lib");
1245
 
1246
 
1247
                # Write header file
1248 24 alirezamon
                        generate_header_file($soc,$project_dir,$target_dir,$dir);
1249 16 alirezamon
 
1250
 
1251
 
1252
 
1253 24 alirezamon
 
1254 18 alirezamon
                        #use File::Copy::Recursive qw(dircopy);
1255
                        #dircopy("$dir/../src_processor/aeMB/compiler","$target_dir/sw/") or die("$!\n");
1256 16 alirezamon
 
1257
 
1258
                        my $msg="SoC \"$soc_name\" has been created successfully at $target_dir/ ";
1259
 
1260
 
1261
 
1262
 
1263
return $msg;
1264
}
1265
 
1266
 
1267
################
1268
#       generate_mpsoc
1269
#################
1270
 
1271
sub generate_mpsoc{
1272
        my ($mpsoc,$info)=@_;
1273 25 alirezamon
        my $name=$mpsoc->object_get_attribute('mpsoc_name');
1274 16 alirezamon
                my $size= (defined $name)? length($name) :0;
1275
                if ($size >0){
1276 25 alirezamon
                        gen_socs($mpsoc,$info);
1277
                        my ($file_v,$tmp)=mpsoc_generate_verilog($mpsoc);
1278 16 alirezamon
 
1279
                        # Write object file
1280
                        open(FILE,  ">lib/mpsoc/$name.MPSOC") || die "Can not open: $!";
1281 25 alirezamon
                        print FILE perl_file_header("$name.MPSOC");
1282 16 alirezamon
                        print FILE Data::Dumper->Dump([\%$mpsoc],[$name]);
1283
                        close(FILE) || die "Error closing file: $!";
1284
 
1285
                        # Write verilog file
1286
                        open(FILE,  ">lib/verilog/$name.v") || die "Can not open: $!";
1287
                        print FILE $file_v;
1288
                        close(FILE) || die "Error closing file: $!";
1289
 
1290
 
1291
 
1292
 
1293
                        # copy all files in project work directory
1294
                        my $dir = Cwd::getcwd();
1295
                        #make target dir
1296
                        my $project_dir   = abs_path("$dir/../../");
1297
                        my $target_dir  = "$project_dir/mpsoc_work/MPSOC/$name";
1298
                        mkpath("$target_dir/src_verilog/lib/",1,0755);
1299
                        mkpath("$target_dir/sw",1,0755);
1300
 
1301 25 alirezamon
                #gen_socs($mpsoc,$info);
1302 16 alirezamon
 
1303 18 alirezamon
                move ("$dir/lib/verilog/$name.v","$target_dir/src_verilog/");
1304 16 alirezamon
 
1305
 
1306
 
1307
 
1308
 
1309
 
1310
 
1311
 
1312
                        message_dialog("SoC \"$name\" has been created successfully at $target_dir/ " );
1313
 
1314
                }else {
1315
                        message_dialog("Please define the MPSoC name!");
1316
 
1317
                }
1318
 
1319
return 1;
1320
}
1321
 
1322
 
1323
 
1324
 
1325
sub get_tile_LIST{
1326 25 alirezamon
        my ($mpsoc,$x,$y,$soc_num,$row,$table)=@_;
1327 16 alirezamon
        my $instance_name=$mpsoc->mpsoc_get_instance_info($soc_num);
1328
        if(!defined $instance_name){
1329
                $mpsoc->mpsoc_set_default_ip($soc_num);
1330
                $instance_name=$mpsoc->mpsoc_get_instance_info($soc_num);
1331
 
1332
        }
1333
 
1334
        #ipname
1335
        my $col=0;
1336
        my $label=gen_label_in_left("IP_$soc_num($x,$y)");
1337
        $table->attach_defaults ( $label, $col, $col+1 , $row, $row+1);$col+=2;
1338
        #instance name
1339
        my $entry=gen_entry($instance_name);
1340
        $table->attach_defaults ( $entry, $col, $col+1 , $row, $row+1);$col+=2;
1341
        $entry->signal_connect( 'changed'=> sub{
1342
                my $new_instance=$entry->get_text();
1343
                $mpsoc->mpsoc_set_ip_inst_name($soc_num,$new_instance);
1344 25 alirezamon
                set_gui_status($mpsoc,"ref",20);
1345 16 alirezamon
                print "changed to  $new_instance\n ";
1346
 
1347
        });
1348
 
1349
 
1350
        #combo box
1351
        my @list=('A','B');
1352
        my $combo=gen_combo(\@list,0);
1353
        $table->attach_defaults ( $combo, $col, $col+1 , $row, $row+1);$col+=2;
1354
        #setting
1355
        my $setting= def_image_button("icons/setting.png","Browse");
1356
        $table->attach_defaults ( $setting, $col, $col+1 , $row, $row+1);$col+=2;
1357
 
1358
 
1359
}
1360
 
1361
 
1362
 
1363
 
1364
##########
1365
#
1366
#########
1367
 
1368
sub gen_tiles_LIST{
1369 25 alirezamon
        my ($mpsoc)=@_;
1370 16 alirezamon
 
1371 25 alirezamon
        my $nx= $mpsoc->object_get_attribute('noc_param',"NX");
1372
        my $ny= $mpsoc->object_get_attribute('noc_param',"NY");
1373 16 alirezamon
 
1374
        # print "($nx,$ny);\n";
1375
        my $table=def_table($nx*$ny,4,FALSE);#  my ($row,$col,$homogeneous)=@_;
1376
        my $scrolled_win = new Gtk2::ScrolledWindow (undef, undef);
1377
        $scrolled_win->set_policy( "automatic", "automatic" );
1378
        $scrolled_win->add_with_viewport($table);
1379
 
1380
 
1381
    my @titles=("IP_num(x,y)","Instance name","IP module name","setting");
1382
        my $col=0;
1383
    my $row=0;
1384
        foreach my$p(@titles){
1385
                my $label=gen_label_in_left($p);
1386
            $table->attach_defaults ($label, $col, $col+1 , $row, $row+1);$col++;
1387
                my $sepv = Gtk2::VSeparator->new;
1388
                $table->attach_defaults ($sepv, $col , $col+1 ,0 , 2*($nx*$ny)+2 );$col++;
1389
 
1390
        }$row+=2;
1391
 
1392
 
1393
        $col=0;
1394
        for (my $y=0;$y<$ny;$y++){
1395
 
1396
 
1397
 
1398
                for (my $x=0; $x<$nx;$x++){
1399
                        my $soc_num= $y*$nx+$x;
1400
                        my $seph = Gtk2::HSeparator->new;
1401
                        $table->attach_defaults ($seph, 0, 8 , $row, $row+1);$row++;
1402 25 alirezamon
                        get_tile($mpsoc,$x,$y,$soc_num,$row,$table);$row++;
1403 16 alirezamon
 
1404
 
1405
 
1406
 
1407
        }}
1408
        my $seph = Gtk2::HSeparator->new;
1409
        $table->attach_defaults ($seph, 0, 8 , $row, $row+1);$row++;
1410
 
1411
   while( $row<30){
1412
                my $label=gen_label_in_left(' ');
1413
            $table->attach_defaults ($label, $col, $col+1 , $row, $row+1);$row++;
1414
 
1415
 
1416
 
1417
        }
1418
 
1419
 
1420
        return $scrolled_win;
1421
}
1422
 
1423
 
1424
 
1425
 
1426
 
1427
 
1428
 
1429
 
1430
 
1431
sub get_tile{
1432 25 alirezamon
        my ($mpsoc,$tile,$x,$y)=@_;
1433 16 alirezamon
 
1434
 
1435
        my ($soc_name,$num)= $mpsoc->mpsoc_get_tile_soc_name($tile);
1436
 
1437
        my $button;
1438
        if( defined $soc_name){
1439
                my $setting=$mpsoc->mpsoc_get_tile_param_setting($tile);
1440
                $button=($setting eq 'Custom')? def_colored_button("Tile $tile ($x,$y)*\n$soc_name",$num) :     def_colored_button("Tile $tile ($x,$y)\n$soc_name",$num) ;
1441
        }else {
1442
                $button =def_colored_button("Tile $tile ($x,$y)\n",50) if(! defined $soc_name);
1443
        }
1444
 
1445
        $button->signal_connect("clicked" => sub{
1446
                my $window = def_popwin_size(400,400,"Parameter setting for Tile $tile ");
1447
                my $table = def_table(6, 2, TRUE);
1448
 
1449
                my $scrolled_win = new Gtk2::ScrolledWindow (undef, undef);
1450
                $scrolled_win->set_policy( "automatic", "automatic" );
1451
                $scrolled_win->add_with_viewport($table);
1452
                my $row=0;
1453
                my ($soc_name,$g,$t)=$mpsoc->mpsoc_get_tile_soc_name($tile);
1454
 
1455
 
1456
                my @socs=$mpsoc->mpsoc_get_soc_list();
1457
                my @list=(' ',@socs);
1458
                my $pos=(defined $soc_name)? get_scolar_pos($soc_name,@list): 0;
1459
                my $combo=gen_combo(\@list, $pos);
1460
                my $lable=gen_label_in_left("  SoC name:");
1461
                $table->attach_defaults($lable,0,3,$row,$row+1);
1462
                $table->attach_defaults($combo,3,7,$row,$row+1);$row++;
1463
                my $separator1 = Gtk2::HSeparator->new;
1464
                $table->attach_defaults($separator1,0,7,$row,$row+1);$row++;
1465
 
1466
                my $ok = def_image_button('icons/select.png','OK');
1467
                my $okbox=def_hbox(TRUE,0);
1468
                $okbox->pack_start($ok, FALSE, FALSE,0);
1469
 
1470
 
1471
 
1472
                my $param_setting=$mpsoc->mpsoc_get_tile_param_setting($tile);
1473
                @list=('Default','Custom');
1474
                $pos=(defined $param_setting)? get_scolar_pos($param_setting,@list): 0;
1475
                my $nn=(defined $soc_name)? $soc_name : 'soc';
1476 25 alirezamon
                my ($box2,$combo2)=gen_combo_help("Defualt: the tail will get  defualt parameter setting of $nn.\n Custom: it will allow custom parameter  setting for this tile only." , \@list, $pos);
1477 16 alirezamon
                my $lable2=gen_label_in_left("  Parameter Setting:");
1478
                $table->attach_defaults($lable2,0,3,$row,$row+1);
1479
                $table->attach_defaults($box2,3,7,$row,$row+1);$row++;
1480
                $combo2->signal_connect('changed'=>sub{
1481
                        my $in=$combo2->get_active_text();
1482
                        $mpsoc->mpsoc_set_tile_param_setting($tile,$in);
1483
 
1484
 
1485
                });
1486
 
1487
 
1488
 
1489
 
1490
 
1491
                $combo->signal_connect('changed'=>sub{
1492
                        my $new_soc=$combo->get_active_text();
1493
                        if ($new_soc eq ' '){
1494
                                #unconnect tile
1495
                                $mpsoc->mpsoc_set_tile_free($tile);
1496
                        }else {
1497
                                $mpsoc->mpsoc_set_tile_soc_name($tile,$new_soc);
1498
                        }
1499
 
1500
 
1501
 
1502
                });
1503
 
1504
 
1505
 
1506
 
1507
 
1508
 
1509
                my $mtable = def_table(10, 1, TRUE);
1510
 
1511
                $mtable->attach_defaults($scrolled_win,0,1,0,9);
1512
                $mtable->attach_defaults($okbox,0,1,9,10);
1513
 
1514
                $window->add ($mtable);
1515
                $window->show_all();
1516
 
1517
                $ok-> signal_connect("clicked" => sub{
1518
                        $window->destroy;
1519 25 alirezamon
                        set_gui_status($mpsoc,"refresh_soc",1);
1520 16 alirezamon
                        my $soc_name=$combo->get_active_text();
1521
                        my $setting=$combo2->get_active_text();
1522
                        if ($soc_name ne ' ' && $setting ne 'Default'){
1523 25 alirezamon
                        get_soc_parameter_setting ($mpsoc,$soc_name,$tile);
1524 16 alirezamon
 
1525
                        }
1526
                        #save new values 
1527
                        #$top->top_add_default_soc_param(\%param_value);
1528 25 alirezamon
                        #set_gui_status($mpsoc,"refresh_soc",1);
1529 16 alirezamon
                        #$$refresh_soc->clicked;
1530
 
1531
                        });
1532
 
1533
        });
1534
 
1535
 
1536
        #$button->show_all;
1537
        return $button;
1538
 
1539
 
1540
}
1541
 
1542
 
1543
 
1544
 
1545
 
1546
 
1547
 
1548
 
1549
##########
1550
#
1551
#########
1552
 
1553
sub gen_tiles{
1554 25 alirezamon
        my ($mpsoc)=@_;
1555 16 alirezamon
 
1556 25 alirezamon
        my $nx= $mpsoc->object_get_attribute('noc_param',"NX");
1557
        my $ny= $mpsoc->object_get_attribute('noc_param',"NY");
1558 16 alirezamon
 
1559
        #print "($nx,$ny);\n";
1560
        my $table=def_table($nx,$ny,FALSE);#    my ($row,$col,$homogeneous)=@_;
1561
        my $scrolled_win = new Gtk2::ScrolledWindow (undef, undef);
1562
        $scrolled_win->set_policy( "automatic", "automatic" );
1563
        $scrolled_win->add_with_viewport($table);
1564
 
1565
 
1566
 
1567
 
1568
 
1569
 
1570
        for (my $y=0;$y<$ny;$y++){
1571
                for (my $x=0; $x<$nx;$x++){
1572
                        my $tile_num=($nx*$y)+ $x;
1573 25 alirezamon
                        my $tile=get_tile($mpsoc,$tile_num,$x,$y);
1574 16 alirezamon
                #print "($x,$y);\n";
1575
                $table->attach_defaults ($tile, $x, $x+1 , $y, $y+1);
1576
 
1577
 
1578
        }}
1579
 
1580
 
1581
 
1582
 
1583
 
1584
 
1585
 
1586
 
1587
 
1588
 
1589
 
1590
############
1591
#    main
1592
############
1593
sub mpsocgen_main{
1594
 
1595
        my $infc = interface->interface_new();
1596
        my $soc = ip->lib_new ();
1597
        #my $soc = soc->soc_new();
1598
 
1599
        my $mpsoc= mpsoc->mpsoc_new();
1600
 
1601 25 alirezamon
        set_gui_status($mpsoc,"ideal",0);
1602
 
1603 16 alirezamon
        # main window
1604
        #my $window = def_win_size(1000,800,"Top");
1605
        #  The main table containg the lib tree, selected modules and info section 
1606
        my $main_table = Gtk2::Table->new (25, 12, FALSE);
1607
 
1608
        # The box which holds the info, warning, error ...  mesages
1609
        my ($infobox,$info)= create_text();
1610
 
1611
 
1612
        my $refresh = Gtk2::Button->new_from_stock('ref');
1613
 
1614
 
1615 25 alirezamon
        my $noc_conf_box=get_config ($mpsoc,$info);
1616
        my $noc_tiles=gen_tiles($mpsoc);
1617 16 alirezamon
 
1618
 
1619
 
1620
        $main_table->set_row_spacings (4);
1621
        $main_table->set_col_spacings (1);
1622
 
1623 25 alirezamon
        #my  $device_win=show_active_dev($soc,$soc,$infc,\$refresh,$info);
1624 16 alirezamon
 
1625
 
1626
        my $generate = def_image_button('icons/gen.png','Generate');
1627
 
1628
 
1629
 
1630 25 alirezamon
 
1631 16 alirezamon
        my $open = def_image_button('icons/browse.png','Load MPSoC');
1632
 
1633
 
1634 26 alirezamon
        my $entry=gen_entry_object($mpsoc,'mpsoc_name',undef,undef,undef,undef);
1635 25 alirezamon
        my $entrybox=labele_widget_info(" MPSoC name:",$entry);
1636 16 alirezamon
 
1637
 
1638 25 alirezamon
 
1639 16 alirezamon
        #$table->attach_defaults ($event_box, $col, $col+1, $row, $row+1);
1640 25 alirezamon
        $main_table->attach_defaults ($noc_conf_box , 0, 4, 0, 22);
1641
        $main_table->attach_defaults ($noc_tiles , 4, 12, 0, 22);
1642
        $main_table->attach_defaults ($infobox  , 0, 12, 22,24);
1643
        $main_table->attach ($open,0, 3, 24,25,'expand','shrink',2,2);
1644 16 alirezamon
        $main_table->attach_defaults ($entrybox,3, 7, 24,25);
1645
 
1646 25 alirezamon
        $main_table->attach ($generate, 10, 12, 24,25,'expand','shrink',2,2);
1647 16 alirezamon
 
1648
 
1649
        #referesh the mpsoc generator 
1650
        $refresh-> signal_connect("clicked" => sub{
1651
                $noc_conf_box->destroy();
1652 25 alirezamon
                $noc_conf_box=get_config ($mpsoc,$info);
1653
                $main_table->attach_defaults ($noc_conf_box , 0, 4, 0, 22);
1654 16 alirezamon
                $noc_conf_box->show_all();
1655
 
1656
 
1657
 
1658
                $noc_tiles->destroy();
1659 25 alirezamon
                $noc_tiles=gen_tiles($mpsoc);
1660
                $main_table->attach_defaults ($noc_tiles , 4, 12, 0, 22);
1661 16 alirezamon
 
1662
                $main_table->show_all();
1663
 
1664
 
1665
        });
1666
 
1667
 
1668
 
1669
        #check soc status every 0.5 second. referesh device table if there is any changes 
1670
        Glib::Timeout->add (100, sub{
1671 25 alirezamon
                my ($state,$timeout)= get_gui_status($mpsoc);
1672
 
1673 16 alirezamon
 
1674
                if ($timeout>0){
1675
                        $timeout--;
1676 25 alirezamon
                        set_gui_status($mpsoc,$state,$timeout);
1677 16 alirezamon
                }
1678
                elsif( $state ne "ideal" ){
1679
                        $refresh->clicked;
1680 25 alirezamon
                        my $saved_name=$mpsoc->object_get_attribute('mpsoc_name');
1681 16 alirezamon
                        if(defined $saved_name) {$entry->set_text($saved_name);}
1682 25 alirezamon
                        set_gui_status($mpsoc,"ideal",0);
1683 16 alirezamon
 
1684 25 alirezamon
 
1685 16 alirezamon
                }
1686
                return TRUE;
1687
 
1688
        } );
1689
 
1690
 
1691
        $generate-> signal_connect("clicked" => sub{
1692
                generate_mpsoc($mpsoc,$info);
1693
                $refresh->clicked;
1694
 
1695
        });
1696
 
1697
#       $wb-> signal_connect("clicked" => sub{ 
1698
#               wb_address_setting($mpsoc);
1699
#       
1700
#       });
1701
 
1702
        $open-> signal_connect("clicked" => sub{
1703 25 alirezamon
                set_gui_status($mpsoc,"ref",5);
1704
                load_mpsoc($mpsoc,$info);
1705 16 alirezamon
 
1706
        });
1707
 
1708
 
1709
        my $sc_win = new Gtk2::ScrolledWindow (undef, undef);
1710
                $sc_win->set_policy( "automatic", "automatic" );
1711
                $sc_win->add_with_viewport($main_table);
1712
 
1713
        return $sc_win;
1714
 
1715
 
1716
}
1717
 
1718
 
1719
 
1720
 
1721
        return $scrolled_win;
1722
}
1723
 
1724
 
1725
 
1726
 
1727
#############
1728
#       load_mpsoc
1729
#############
1730
 
1731
sub load_mpsoc{
1732 25 alirezamon
        my ($mpsoc,$info)=@_;
1733 16 alirezamon
        my $file;
1734
        my $dialog = Gtk2::FileChooserDialog->new(
1735
                'Select a File', undef,
1736
                'open',
1737
                'gtk-cancel' => 'cancel',
1738
                'gtk-ok'     => 'ok',
1739
                );
1740
 
1741
        my $filter = Gtk2::FileFilter->new();
1742
        $filter->set_name("MPSoC");
1743
        $filter->add_pattern("*.MPSOC");
1744
        $dialog->add_filter ($filter);
1745
                my $dir = Cwd::getcwd();
1746
        $dialog->set_current_folder ("$dir/lib/mpsoc")  ;
1747
 
1748
 
1749
        if ( "ok" eq $dialog->run ) {
1750
                $file = $dialog->get_filename;
1751
                my ($name,$path,$suffix) = fileparse("$file",qr"\..[^.]*$");
1752
                if($suffix eq '.MPSOC'){
1753
                        my $pp= eval { do $file };
1754 25 alirezamon
                        if ($@ || !defined $pp){
1755
                                show_info(\$info,"**Error reading  $file file: $@\n");
1756
                                 $dialog->destroy;
1757
                                return;
1758
                        }
1759
 
1760
 
1761 16 alirezamon
                        clone_obj($mpsoc,$pp);
1762 25 alirezamon
                        set_gui_status($mpsoc,"load_file",0);
1763
 
1764 16 alirezamon
                }
1765
     }
1766
     $dialog->destroy;
1767
 
1768
 
1769
 
1770
 
1771
 
1772
}
1773
 
1774
##########
1775
 
1776
##########
1777
sub copy_noc_files{
1778
        my ($project_dir,$dest)=@_;
1779
 
1780 25 alirezamon
my @noc_files=(
1781
    '/mpsoc/src_noc/arbiter.v',
1782 16 alirezamon
        '/mpsoc/src_noc/baseline.v',
1783
        '/mpsoc/src_noc/canonical_credit_count.v',
1784
        '/mpsoc/src_noc/class_table.v',
1785
        '/mpsoc/src_noc/combined_vc_sw_alloc.v',
1786
        '/mpsoc/src_noc/comb_nonspec.v',
1787
        '/mpsoc/src_noc/comb_spec2.v',
1788
        '/mpsoc/src_noc/comb-spec1.v',
1789
        '/mpsoc/src_noc/congestion_analyzer.v',
1790
        '/mpsoc/src_noc/credit_count.v',
1791
        '/mpsoc/src_noc/crossbar.v',
1792
        '/mpsoc/src_noc/flit_buffer.v',
1793
        '/mpsoc/src_noc/inout_ports.v',
1794
        '/mpsoc/src_noc/inout_ports.v.classic',
1795
        '/mpsoc/src_noc/input_ports.v',
1796
        '/mpsoc/src_noc/main_comp.v',
1797
        '/mpsoc/src_noc/noc.v',
1798
        '/mpsoc/src_noc/route_mesh.v',
1799
        '/mpsoc/src_noc/router.v',
1800
        '/mpsoc/src_noc/route_torus.v',
1801
        '/mpsoc/src_noc/routing.v',
1802 25 alirezamon
        '/mpsoc/src_noc/vc_alloc_request_gen.v',
1803
        '/mpsoc/src_noc/ss_allocator.v');
1804 16 alirezamon
        foreach my $f (@noc_files){
1805
                copy ("$project_dir$f",$dest);
1806
 
1807
        }
1808
 
1809
 
1810
}

powered by: WebSVN 2.1.0

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