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/] [ProNoC.pl] - Blame information for rev 45

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

Line No. Rev Author Line
1 16 alirezamon
#!/usr/bin/perl -w
2
 
3 25 alirezamon
package ProNOC;
4
 
5
 
6 43 alirezamon
#add home dir in perl 5.6
7
use FindBin;
8
use lib $FindBin::Bin;
9 25 alirezamon
 
10 43 alirezamon
 
11 16 alirezamon
use Glib qw/TRUE FALSE/;
12
 
13
 
14
use Gtk2;
15
use strict;
16
use warnings;
17
 
18 43 alirezamon
use Getopt::Long;
19 25 alirezamon
 
20
 
21 16 alirezamon
use lib 'lib/perl';
22
require "widget.pl";
23
require "interface_gen.pl";
24
require "ip_gen.pl";
25
require "soc_gen.pl";
26
require "mpsoc_gen.pl";
27 25 alirezamon
require "emulator.pl";
28 32 alirezamon
require "simulator.pl";
29 38 alirezamon
require "trace_gen.pl";
30 43 alirezamon
#require "network_maker.pl";
31 16 alirezamon
 
32 38 alirezamon
use File::Basename;
33 16 alirezamon
 
34
 
35 45 alirezamon
our $VERSION = '1.9.1';
36
our $END_YEAR= "2019";
37 16 alirezamon
 
38 43 alirezamon
 
39 25 alirezamon
sub main{
40 41 alirezamon
        # check if envirement variables are defined
41
        my $project_dir   = get_project_dir(); #mpsoc dir addr
42
        my $paths_file= "$project_dir/mpsoc/perl_gui/lib/Paths";
43 16 alirezamon
 
44 41 alirezamon
        if (-f  $paths_file){#} && defined $ENV{PRONOC_WORK} ) {
45
                my $paths= do $paths_file;
46
                main_window();
47
 
48
        }
49
        else{
50
                setting(1);
51
        }
52
 
53
}
54 16 alirezamon
 
55 41 alirezamon
sub set_path_env{
56
        my $project_dir   = get_project_dir(); #mpsoc dir addr
57
        my $paths_file= "$project_dir/mpsoc/perl_gui/lib/Paths";
58
        my $paths= do $paths_file;
59 16 alirezamon
 
60 41 alirezamon
        my $pronoc_work = $paths->object_get_attribute("PATH","PRONOC_WORK");
61
        my $quartus = $paths->object_get_attribute("PATH","QUARTUS_BIN");
62
        my $modelsim = $paths->object_get_attribute("PATH","MODELSIM_BIN");
63 16 alirezamon
 
64 41 alirezamon
        $ENV{'PRONOC_WORK'}= $pronoc_work if( defined $pronoc_work);
65
        $ENV{'QUARTUS_BIN'}= $quartus if( defined $quartus);
66
        $ENV{'MODELSIM_BIN'}= $modelsim if( defined $modelsim);
67 43 alirezamon
 
68
        if( defined $pronoc_work){if(-d $pronoc_work ){
69
                        mkpath("$pronoc_work/emulate",1,01777) unless -d "$pronoc_work/emulate";
70
                        mkpath("$pronoc_work/simulate",1,01777) unless -d "$pronoc_work/simulate";
71
                        mkpath("$pronoc_work/tmp",1,01777) unless -d "$pronoc_work/tmp";
72
        }}
73
 
74
 
75
 
76
        #add quartus_bin to PATH linux envirement if it does not exist in PATH
77
        if( defined $quartus){
78
                my @q =split  (/:/,$ENV{'PATH'});
79
                my $p=get_scolar_pos ($quartus,@q);
80
                $ENV{'PATH'}= $ENV{'PATH'}.":$quartus" unless ( defined $p);
81
                print "$quartus has been added to linux PATH envirement.\n";
82
        }
83 41 alirezamon
}
84 16 alirezamon
 
85 25 alirezamon
 
86 41 alirezamon
 
87
sub main_window{
88
 
89
        set_path_env();
90
 
91
        my($width,$hight)=max_win_size();
92
        set_defualt_font_size();
93 43 alirezamon
 
94
        if ( !defined $ENV{PRONOC_WORK} ) {
95 28 alirezamon
        my $message;
96
        if ( !defined $ENV{PRONOC_WORK}) {
97
                my $dir = Cwd::getcwd();
98
                my $project_dir   = abs_path("$dir/../../mpsoc_work");
99
                $ENV{'PRONOC_WORK'}= $project_dir;
100
                $message= "\n\nWarning: PRONOC_WORK envirement varibale has not been set. The PRONOC_WORK is autumatically set to $ENV{'PRONOC_WORK'}.\n";
101
 
102
        }
103
 
104
 
105
 
106 41 alirezamon
        #$message= $message."Warning: QUARTUS_BIN environment variable has not been set. It is required only for working with NoC emulator." if(!defined $ENV{QUARTUS_BIN});
107 28 alirezamon
 
108 41 alirezamon
        #$message= $message."\n\nPlease add aformentioned variables to ~\.bashrc file e.g: export PRONOC_WORK=[path_to]/mpsoc_work.";
109 25 alirezamon
        message_dialog("$message");
110
 
111 16 alirezamon
}
112
 
113 43 alirezamon
        my $table = def_table(1,3,FALSE);
114
 
115 16 alirezamon
 
116 38 alirezamon
        #________
117
        #radio btn "Generator"  
118
        my $rbtn_generator = Gtk2::RadioToolButton->new (undef);
119 16 alirezamon
 
120 38 alirezamon
        my ($notebook,$noteref) = generate_main_notebook('Generator');
121
        my $window = def_win_size($width-100,$hight-100,"ProNoC");
122
        my $navIco = Gtk2::Gdk::Pixbuf->new_from_file("./icons/ProNoC.png");         # advance1.png");  
123
        $window->set_default_icon($navIco);
124 16 alirezamon
 
125
 
126 38 alirezamon
 my @menu_items = (
127 25 alirezamon
  [ "/_File",            undef,        undef,          0, "<Branch>" ],
128 41 alirezamon
  [ "/File/_Setting",       "<control>O", sub { setting(0); },  0,  undef ],
129 25 alirezamon
  [ "/File/_Quit",       "<control>Q", sub { Gtk2->main_quit },  0, "<StockItem>", 'gtk-quit' ],
130
  [ "/_View",                  undef, undef,         0, "<Branch>" ],
131 43 alirezamon
  [ "/_View/_ProNoC System Generator",  "<control>1",   sub{ open_page($notebook,$noteref,$table,'Generator'); } ,      0,       undef ],
132
  [ "/_View/_ProNoC Simulator",  "<control>2",  sub{ open_page($notebook,$noteref,$table,'Simulator'); } ,      0,       undef ],
133 38 alirezamon
 
134 25 alirezamon
 
135
 
136 38 alirezamon
  [ "/_Help",           undef,          undef,          0,       "<Branch>" ],
137
  [ "/_Help/_About",    "F1",           \&about ,       0,       undef ],
138
  [ "/_Help/_ProNoC System Overview",   "F2",           \&overview ,    0,       undef ],
139
  [ "/_Help/_ProNoC User Manual",  "F3",                \&user_help,    0,       undef ],
140 25 alirezamon
 
141 17 alirezamon
);
142 38 alirezamon
 
143
    my $accel_group = Gtk2::AccelGroup->new;
144 43 alirezamon
    $window->add_accel_group ($accel_group);
145 38 alirezamon
    my $item_factory = Gtk2::ItemFactory->new ("Gtk2::MenuBar", "<main>",$accel_group);
146 25 alirezamon
 
147 38 alirezamon
    # Set up item factory to go away with the window
148
    $window->{'<main>'} = $item_factory;
149 25 alirezamon
 
150 38 alirezamon
    # create menu items
151
    $item_factory->create_items ($window, @menu_items);
152
        $table->attach ($item_factory->get_widget ("<main>"),0, 1, 0,1,,'fill','fill',0,0); #,'expand','shrink',2,2);
153
    my $tt = Gtk2::Tooltips->new();
154 25 alirezamon
 
155
 
156 38 alirezamon
        #====================================
157
        #The handle box helps in creating a detachable toolbar 
158
        my $hb = Gtk2::HandleBox->new;
159
        #create a toolbar, and do some initial settings
160
        my $toolbar = Gtk2::Toolbar->new;
161 43 alirezamon
        $toolbar->set_icon_size ('small-toolbar');
162
        $toolbar->set_show_arrow (FALSE);
163 38 alirezamon
        $rbtn_generator->set_label ('Generator');
164
        $rbtn_generator->set_icon_widget (def_icon('icons/hardware.png'));
165
        set_tip($rbtn_generator, "ProNoC System Generator");
166 43 alirezamon
        $toolbar->insert($rbtn_generator,-1);
167 38 alirezamon
        #________
168
        #radio btn "Simulator"
169
        my $rbtn_simulator = Gtk2::RadioToolButton->new_from_widget($rbtn_generator);
170
        $rbtn_simulator->set_label ('Simulator');
171 43 alirezamon
        $rbtn_simulator->set_icon_widget (def_icon('icons/simulator.png')) ;
172 38 alirezamon
        set_tip($rbtn_simulator, "ProNoC Simulator");
173 43 alirezamon
        $toolbar->insert($rbtn_simulator,-1);
174
        #________
175
        #radio btn "Networkgen"
176
        #my $rbtn_networkgen = Gtk2::RadioToolButton->new_from_widget($rbtn_generator);
177
        #$rbtn_networkgen->set_label ('Network Generator');
178
        #$rbtn_networkgen->set_icon_widget (def_icon('icons/trace.png')) ;      
179
        #set_tip($rbtn_networkgen, "ProNoC Network Generator");
180
        #$toolbar->insert($rbtn_networkgen,-1);                 
181
        #====================================
182 38 alirezamon
        $hb->add($toolbar);
183
        $rbtn_generator->signal_connect('toggled', sub{
184 43 alirezamon
                open_page($notebook,$noteref,$table,'Generator');
185 38 alirezamon
        });
186
 
187
        $rbtn_simulator->signal_connect('toggled', sub{
188 43 alirezamon
                open_page($notebook,$noteref,$table,'Simulator');
189 38 alirezamon
        });
190 43 alirezamon
 
191
        #$rbtn_networkgen->signal_connect('toggled', sub{
192
        #       open_page($notebook,$noteref,$table,'Networkgen');              
193
        #});    
194 38 alirezamon
 
195 43 alirezamon
   $table->attach ($hb,1, 2, 0,1,'fill','fill',0,0);
196 38 alirezamon
   $table->attach_defaults( $notebook, 0, 2, 1,2);
197 25 alirezamon
 
198 43 alirezamon
        $window->add($table);
199
        $window->set_resizable (1);
200
        $window->show_all();
201 38 alirezamon
}
202 16 alirezamon
 
203
 
204 38 alirezamon
sub open_page{
205
        my ( $notebook,$noteref,$table,$page_name)=@_;
206
        $notebook->destroy;
207
        ($notebook,$noteref) = generate_main_notebook($page_name);
208
        $table->attach_defaults( $notebook, 0, 2, 1,2);
209
        $table->show_all;
210 16 alirezamon
 
211 38 alirezamon
}
212 16 alirezamon
 
213
 
214 17 alirezamon
sub about {
215
    my $about = Gtk2::AboutDialog->new;
216
    $about->set_authors("Alireza Monemi\n Email: alirezamonemi\@opencores.org");
217 25 alirezamon
    $about->set_version( $VERSION );
218 17 alirezamon
    $about->set_website('http://opencores.org/project,an-fpga-implementation-of-low-latency-noc-based-mpsoc');
219
    $about->set_comments('NoC based MPSoC generator.');
220 25 alirezamon
    $about->set_program_name('ProNoC');
221
 
222 17 alirezamon
    $about->set_license(
223
                 "This program is free software; you can redistribute it\n"
224
                . "and/or modify it under the terms of the GNU General \n"
225
                . "Public License as published by the Free Software \n"
226
                . "Foundation; either version 1, or (at your option)\n"
227
                . "any later version.\n\n"
228
 
229
        );
230 25 alirezamon
        # Add the Hide action to the 'Close' button in the AboutDialog():
231
    $about->signal_connect('response' => sub { $about->hide; });
232
 
233
 
234 17 alirezamon
    $about->run;
235
    $about->destroy;
236
    return;
237
}
238 16 alirezamon
 
239 38 alirezamon
 
240
 
241
sub user_help{
242 17 alirezamon
    my $dir = Cwd::getcwd();
243 38 alirezamon
    my $help="$dir/../../doc/ProNoC_User_manual.pdf";
244 17 alirezamon
    system qq (xdg-open $help);
245
    return;
246
}
247
 
248 38 alirezamon
sub overview{
249 17 alirezamon
    my $dir = Cwd::getcwd();
250 38 alirezamon
    my $help="$dir/../../doc/ProNoC_System_Overview.pdf";
251 17 alirezamon
    system qq (xdg-open $help);
252
    return;
253
}
254
 
255 41 alirezamon
sub setting{
256
        my $reset=shift;
257
        my $project_dir   = get_project_dir(); #mpsoc dir addr
258
        my $paths_file= "$project_dir/mpsoc/perl_gui/lib/Paths";
259 32 alirezamon
 
260 41 alirezamon
        __PACKAGE__->mk_accessors(qw{
261
        PRONOC_WORK
262
        });
263
        my $self;
264
        if (-f  $paths_file ){
265
                $self= do $paths_file;
266
        }else{
267
                $self = __PACKAGE__->new();
268
 
269
        }
270
 
271
 
272
        my $table=def_table(10,10,FALSE);
273
        my $set_win=def_popwin_size(40,80,"Configuration setting",'percent');
274
        my $scrolled_win = new Gtk2::ScrolledWindow (undef, undef);
275
        $scrolled_win->set_policy( "automatic", "automatic" );
276
        $scrolled_win->add_with_viewport($table);
277
        my $row=0; my $col=0;
278
 
279
        #title          
280
        my $title=gen_label_in_center("setting");
281
        $table->attach ($title , 0, 10,  $row, $row+1,'expand','shrink',2,2); $row++;
282
        my $separator = Gtk2::HSeparator->new;
283
        $table->attach ($separator , 0, 10 , $row, $row+1,'fill','fill',2,2);    $row++;
284 32 alirezamon
 
285 41 alirezamon
        my @paths = (
286
        { label=>"PRONOC_WORK", param_name=>"PRONOC_WORK", type=>"DIR_path", default_val=>"$project_dir/mpsoc_work", content=>undef, info=>"Define the working directory where the projects' files will be created", param_parent=>'PATH',ref_delay=>undef },
287
        { label=>"QUARTUS_BIN", param_name=>"QUARTUS_BIN", type=>"DIR_path", default_val=>undef, content=>undef, info=>"Define the path to QuartusII compiler bin directory.  Setting of this variable is optional and is needed if you are going to use Altera FPGAs for implementation or emulation", param_parent=>'PATH',ref_delay=>undef },
288
        { label=>"MODELSIM_BIN", param_name=>"MODELSIM_BIN", type=>"DIR_path", default_val=>undef, content=>undef, info=>"Define the path to Modelsim simulator bin directory.  Setting of this variable is optional and is needed if you have installed Modelsim simulator and you want ProNoC to auto-generate the
289
simulation models using Modelsim software", param_parent=>'PATH',ref_delay=>undef },
290
                );
291
 
292
 
293
        foreach my $d (@paths) {
294
                #$mpsoc,$name,$param, $default,$type,$content,$info, $table,$row,$column,$show,$attribut1,$ref_delay,$new_status,$loc
295
                ($row,$col)=add_param_widget ($self, $d->{label}, $d->{param_name}, $d->{default_val}, $d->{type}, $d->{content}, $d->{info}, $table,$row,$col,1, $d->{param_parent}, $d->{ref_delay},undef,"vertical");
296
        }
297
 
298
 
299 43 alirezamon
 
300
        #title          
301
        my $title2=gen_label_in_center("Toolchain");
302
        $table->attach ($title2 , 0, 10,  $row, $row+1,'expand','shrink',2,2); $row++;
303
        my $separator2 = Gtk2::HSeparator->new;
304
        $table->attach ($separator2 , 0, 10 , $row, $row+1,'fill','fill',2,2);   $row++;
305
 
306
        #check which toolchain is available in the system
307
        $table->attach (check_toolchains($self) , 0, 10 , $row, $row+1,'fill','fill',2,2);       $row++;
308
 
309
 
310
 
311
 
312
 
313
 
314
 
315 41 alirezamon
        my $ok = def_image_button('icons/select.png','OK');
316
        my $mtable = def_table(10, 1, TRUE);
317
 
318
        $mtable->attach_defaults($scrolled_win,0,1,0,9);
319
        $mtable-> attach ($ok , 0, 1,  9, 10,'expand','shrink',2,2);
320
 
321
        $set_win->add ($mtable);
322
        $set_win->show_all();
323
 
324
        my $old_pronoc_work = $self->object_get_attribute("PATH","PRONOC_WORK");
325
        my $old_quartus = $self->object_get_attribute("PATH","QUARTUS_BIN");
326
        my $old_modelsim = $self->object_get_attribute("PATH","MODELSIM_BIN");
327
 
328
        $ok->signal_connect("clicked"=> sub{
329
                #save setting
330
                open(FILE,  ">$paths_file") || die "Can not open: $!";
331
                print FILE perl_file_header("Paths");
332
                print FILE Data::Dumper->Dump([\%$self],['setting']);
333
                close(FILE) || die "Error closing file: $!";
334
                my $pronoc_work = $self->object_get_attribute("PATH","PRONOC_WORK");
335
                my $quartus = $self->object_get_attribute("PATH","QUARTUS_BIN");
336
                my $modelsim = $self->object_get_attribute("PATH","MODELSIM_BIN");
337
                make_undef_as_string(\$old_pronoc_work,\$old_quartus,\$old_modelsim,\$pronoc_work,\$quartus,\$modelsim);
338
 
339 43 alirezamon
                if(($old_pronoc_work ne $pronoc_work) || !defined $ENV{PRONOC_WORK}){
340
                        append_text_to_file ("$ENV{HOME}/.bashrc", "\nexport PRONOC_WORK=$pronoc_work\n");
341
                        mkpath("$pronoc_work/emulate",1,01777) unless -d "$pronoc_work/emulate";
342
                        mkpath("$pronoc_work/simulate",1,01777) unless -d "$pronoc_work/simulate";
343
                        mkpath("$pronoc_work/tmp",1,01777) unless -d "$pronoc_work/tmp";
344
                }
345
 
346 41 alirezamon
                append_text_to_file ("$ENV{HOME}/.bashrc", "export QUARTUS_BIN=$quartus\n") if($old_quartus ne $quartus) ;
347
                append_text_to_file ("$ENV{HOME}/.bashrc", "export MODELSIM_BIN=$modelsim\n") if($old_modelsim ne $modelsim) ;
348
                set_path_env();
349
                if(($old_pronoc_work ne $pronoc_work) || $old_quartus ne $quartus ||$old_modelsim ne $modelsim){
350
 
351
 
352
 
353
        }
354
 
355
        my  ($file_path,$text)=@_;
356
                $set_win->destroy;
357
                main_window() if($reset);
358
 
359
        });
360
 
361
}
362
 
363 43 alirezamon
sub check_toolchains{
364
        my $self=shift;
365
        my $table = def_table(10, 1, TRUE);
366
 
367
        my @f1=("/bin/mb-g++","/bin/mb-objcopy");
368
        my @f2=("/bin/lm32-elf-gcc","/bin/lm32-elf-ld","/bin/lm32-elf-objcopy","/bin/lm32-elf-objdump","/lm32-elf/lib","/lib/gcc/lm32-elf/4.5.3");
369
        my @f3=("/bin/or1k-elf-gcc","/bin/or1k-elf-ld","/bin/or1k-elf-objcopy","/bin/or1k-elf-objdump","/lib/gcc/or1k-elf/5.2.0");
370
 
371
        my @tool = (
372
        { label=>"aeMB", tooldir=>"aemb", files=>\@f1 },
373
        { label=>"lm32", tooldir=>"lm32", files=>\@f2 },
374
        { label=>"or1k-elf", tooldir=>"or1k-elf", files=>\@f3 },
375
        );
376
 
377
        my $row =0;
378
        foreach my $d (@tool) {
379
 
380
                my $exist=1;
381
                my $miss="";
382
                my $pronoc_work = $self->object_get_attribute("PATH","PRONOC_WORK");
383
                my $tooldir=$d->{tooldir};
384
                my @files=@{$d->{files}};
385
                my $tool_path="$pronoc_work/toolchain/$tooldir";
386
                unless (-d $tool_path){
387
                        $exist=0;
388
                        $miss=$miss." $tool_path is missing\n";
389
                }else{
390
                        foreach my $f (@files){
391
 
392
                                my $file_path= "$tool_path/$f";
393
                                unless ( -f $file_path || -d $file_path){
394
                                        $exist=0;
395
                                        $miss=$miss." $file_path file is missing\n";
396
                                }
397
                        }
398
                }
399
                if ($exist==0){
400
                        my $w=def_image_button("icons/warning.png",$d->{label});
401
                        $w->signal_connect("clicked" => sub {message_dialog($miss);});
402
                        $table->attach ($w , 0, 1,  $row, $row+1,'shrink','shrink',2,2); $row++;
403
                }else{
404
                        my $w=def_image_label("icons/button_ok.png",$d->{label});
405
                        $table->attach ($w , 0, 1,  $row, $row+1,'shrink','shrink',2,2); $row++;
406
                }
407
 
408
        }
409
        return $table;
410
}
411
 
412
 
413 38 alirezamon
sub generate_main_notebook {
414
        my $mode =shift;
415
 
416
        my $notebook = Gtk2::Notebook->new;
417
        $notebook->show_all;
418
        if($mode eq 'Generator'){
419
                my $intfc_gen=  intfc_main();
420
                my $lable1=def_image_label("icons/intfc.png"," Interface generator ");
421
                $notebook->append_page ($intfc_gen,$lable1);#Gtk2::Label->new_with_mnemonic ("  _Interface generator  "));
422
                $lable1->show_all;
423 32 alirezamon
 
424 38 alirezamon
                my $ipgen=ipgen_main();
425
                my $lable2=def_image_label("icons/ip.png"," IP generator ");
426
                $notebook->append_page ($ipgen,$lable2);#Gtk2::Label->new_with_mnemonic ("  _IP generator  "));
427
                $lable2->show_all;
428 17 alirezamon
 
429 38 alirezamon
                my $socgen=socgen_main();
430
                my $lable3=def_image_label("icons/tile.png"," Processing tile generator ");
431
                $notebook->append_page ($socgen,$lable3 );#,Gtk2::Label->new_with_mnemonic ("  _Processing tile generator  "));
432
                $lable3->show_all;
433 17 alirezamon
 
434 38 alirezamon
                my $mpsocgen =mpsocgen_main();
435
                my $lable4=def_image_label("icons/noc.png"," NoC based MPSoC generator ");
436
                $notebook->append_page ($mpsocgen,$lable4);#Gtk2::Label->new_with_mnemonic ("  _NoC based MPSoC generator  ")); 
437
                $lable4->show_all;
438
 
439 43 alirezamon
 
440 38 alirezamon
 
441 43 alirezamon
        } elsif($mode eq 'Networkgen'){
442
 
443
                my $networkgen = network_maker_main();
444
                my $lable5=def_image_label("icons/trace.png"," Network Maker ");
445
                $notebook->append_page ($networkgen,$lable5);#Gtk2::Label->new_with_mnemonic ("  _NoC based MPSoC generator  "));       
446
                $lable5->show_all;
447
 
448
 
449
        }else{
450 38 alirezamon
 
451
 
452 43 alirezamon
 
453 38 alirezamon
                my $trace_gen= trace_gen_main();
454 43 alirezamon
                my $lable1=def_image_label("icons/trace.png"," _Trace generator ",1);
455 38 alirezamon
                #my $lb=Gtk2::Label->new_with_mnemonic (" _Trace generator   ");
456
                set_tip($lable1, "Generate trace file from application task graph");
457
 
458
                $notebook->append_page ($trace_gen,$lable1);
459
                $lable1->show_all;
460
                $trace_gen->show_all;
461
 
462
                my $simulator =simulator_main();
463 43 alirezamon
                my $lable2=def_image_label("icons/sim.png"," _NoC simulator ",1);
464 38 alirezamon
 
465 43 alirezamon
 
466 38 alirezamon
                $notebook->append_page ($simulator,$lable2);#Gtk2::Label->new_with_mnemonic (" _NoC simulator   "));            
467
                $lable2->show_all;
468
                $simulator->show_all;
469 17 alirezamon
 
470 38 alirezamon
                my $emulator =emulator_main();
471 43 alirezamon
                my $lable3=def_image_label("icons/emul.png"," _NoC emulator ",1);
472 38 alirezamon
                $notebook->append_page ($emulator,$lable3);#Gtk2::Label->new_with_mnemonic (" _NoC emulator"));                         
473
                $lable3->show_all;
474
                $emulator->show_all;
475
 
476
 
477
 
478
        }
479
 
480
                my $scrolled_win = new Gtk2::ScrolledWindow (undef, undef);
481
                $scrolled_win->set_policy( "automatic", "automatic" );
482
                $scrolled_win->add_with_viewport($notebook);
483 43 alirezamon
                $scrolled_win->show_all;
484 38 alirezamon
 
485 43 alirezamon
                return ($scrolled_win,$notebook);
486 25 alirezamon
}
487
 
488
 
489
 
490 38 alirezamon
 
491
 
492
 
493 16 alirezamon
Gtk2->init;
494
main;
495
Gtk2->main();

powered by: WebSVN 2.1.0

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