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/] [widget.pl] - Diff between revs 38 and 41

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 38 Rev 41
Line 951... Line 951...
 
 
 
 
 
 
sub append_text_to_file {
sub append_text_to_file {
        my  ($file_path,$text)=@_;
        my  ($file_path,$text)=@_;
        open(my $fd, ">>$file_path");
        open(my $fd, ">>$file_path") or die "could not open $file_path: $!";
        print $fd $text;
        print $fd $text;
        close $fd;
        close $fd;
}
}
 
 
 
 
Line 1262... Line 1262...
 
 
        return $browse;
        return $browse;
 
 
}
}
 
 
 
sub get_project_dir{ #mpsoc directory address
 
        my $dir = Cwd::getcwd();
 
        my $project_dir   = abs_path("$dir/../../");
 
        return $project_dir;
 
}
 
 
 
 
sub remove_project_dir_from_addr{
sub remove_project_dir_from_addr{
        my $file=shift;
        my $file=shift;
        my $dir = Cwd::getcwd();
        my $project_dir   = get_project_dir();
        my $project_dir   = abs_path("$dir/../../"); #mpsoc directory address
 
        $file =~ s/$project_dir//;
        $file =~ s/$project_dir//;
        return $file;
        return $file;
}
}
 
 
sub add_project_dir_to_addr{
sub add_project_dir_to_addr{
        my $file=shift;
        my $file=shift;
        my $dir = Cwd::getcwd();
        my $project_dir   = get_project_dir();
        my $project_dir   = abs_path("$dir/../../"); #mpsoc directory address
 
        return $file if(-f $file );
        return $file if(-f $file );
        return "$project_dir/$file";
        return "$project_dir/$file";
 
 
}
}
 
 
Line 1912... Line 1917...
        my @d = split (/$end/,$q[1]);
        my @d = split (/$end/,$q[1]);
        return $d[0];
        return $d[0];
}
}
 
 
 
 
 
sub make_undef_as_string {
 
        foreach my $p  (@_){
 
                $$p= 'undef' if (! defined $$p);
 
 
 
        }
 
}
 
 
 
 
1
1
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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