URL
https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc
Compare Revisions
- This comparison shows the changes necessary to convert path
/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk/mpsoc/perl_gui
- from Rev 35 to Rev 36
- ↔ Reverse comparison
Rev 35 → Rev 36
/lib/perl/emulator.pl
945,6 → 945,12
my ($emulate,$i,$info)=@_; |
my $status=1; |
my $sof=$emulate->object_get_attribute ("sample$i","sof_file"); |
|
my $dir = Cwd::getcwd(); |
my $project_dir = abs_path("$dir/../../"); #mpsoc directory address |
$sof= "$project_dir/$sof" if(!(-f $sof)); |
|
|
# ckeck if sample have sof file |
if(!defined $sof){ |
add_info($info, "Error: SoF file has not set for NoC$i!\n"); |
953,7 → 959,7
} else { |
# ckeck if sof file has info file |
my ($name,$path,$suffix) = fileparse("$sof",qr"\..[^.]*$"); |
my $sof_info="$path$name.inf"; |
my $sof_info= "$path$name.inf"; |
if(!(-f $sof_info)){ |
add_info($info, "Could not find $name.inf file in $path. An information file is required for each sof file containig the device name and NoC configuration. Press F4 for more help.\n"); |
$emulate->object_add_attribute ("sample$i","status","failed"); |
1147,7 → 1153,11
my $r= $emulate->object_get_attribute("sample$i","ratios"); |
my @ratios=@{check_inserted_ratios($r)}; |
#$emulate->object_add_attribute ("sample$i","status","run"); |
my $sof=$emulate->object_get_attribute ("sample$i","sof_file"); |
my $sof=$emulate->object_get_attribute ("sample$i","sof_file"); |
my $dir = Cwd::getcwd(); |
my $project_dir = abs_path("$dir/../../"); #mpsoc directory address |
$sof= "$project_dir/$sof" if(!(-f $sof)); |
|
add_info($info, "Programe FPGA device using $sof\n"); |
my $Quartus_bin= $ENV{QUARTUS_BIN}; |
|
1678,6 → 1688,9
my @ratios=@{check_inserted_ratios($r)}; |
#$emulate->object_add_attribute ("sample$i","status","run"); |
my $bin=$simulate->object_get_attribute ("sample$i","sof_file"); |
my $dir = Cwd::getcwd(); |
my $project_dir = abs_path("$dir/../../"); #mpsoc directory address |
$bin= "$project_dir/$bin" if(!(-f $bin)); |
|
#load traffic configuration |
my $patern=$simulate->object_get_attribute ("sample$i",'traffic'); |
1718,6 → 1731,8
my ($stdout,$exit,$stderr)=run_cmd_in_back_ground_get_stdout("$cmd"); |
if($exit){ |
add_info($info, "Error in running simulation: $stderr \n"); |
$simulate->object_add_attribute ("sample$i","status","failed"); |
$simulate->object_add_attribute('status',undef,'ideal'); |
return; |
} |
|
/lib/perl/simulator.pl
54,10 → 54,13
|
|
#verilate the noc |
my $command = "rm -f $script_dir/logfile1.txt $script_dir/logfile2.txt"; |
my ($stdout,$exit)=run_cmd_in_back_ground_get_stdout( $command); |
|
my $start = localtime; |
add_info($info_text, "verilate the NoC and make the library files"); |
my $command = "cd \"$script_dir/\" \n xterm -l -lf logfile1.txt -e sh verilator_compile_hw.sh"; |
my ($stdout,$exit)=run_cmd_in_back_ground_get_stdout( $command); |
$command = "cd \"$script_dir/\" \n xterm -l -lf logfile1.txt -e sh verilator_compile_hw.sh"; |
($stdout,$exit)=run_cmd_in_back_ground_get_stdout( $command); |
if($exit != 0){ |
print "Verilator compilation failed !\n"; |
add_info($info_text, "Verilator compilation failed !\n$command\n $stdout\n"); |
170,7 → 173,7
} |
|
############# |
# load_emulation |
# load_simulation |
############ |
|
sub load_simulation { |