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/lib/perl
- from Rev 44 to Rev 45
- ↔ Reverse comparison
Rev 44 → Rev 45
/compile.pl
678,7 → 678,7
$jtag="JTAG_INTFC=\"\$PRONOC_WORK/toolchain/bin/jtag_quartus_stp -a \$HARDWARE_NAME -b \$DEVICE_NAME\""; |
|
} |
print $file "#!/bin/sh |
print $file "#!/bin/bash |
|
PRODUCT_ID=\"0x$pid\" |
HARDWARE_NAME=\'$hw *\' |
694,10 → 694,10
open $file, ">", "$path/program_device.sh" or return "Error: Could not create $path/program_device.sh file in write mode!"; |
|
|
print $file "#!/bin/sh |
print $file "#!/bin/bash |
|
#usage: |
# sh program_device.sh programming_file.sof |
# bash program_device.sh programming_file.sof |
|
#programming file |
#given as an argument: \$1 |
1014,10 → 1014,10
my $Quartus_bin= $self->object_get_attribute('compile','quartus_bin');; |
add_info(\$tview, "Start Quartus compilation.....\n"); |
my @compilation_command =( |
"cd \"$target_dir/\" \n xterm -e sh -c '$Quartus_bin/quartus_map --64bit $name --read_settings_files=on; echo \$? > status' ", |
"cd \"$target_dir/\" \n xterm -e sh -c '$Quartus_bin/quartus_fit --64bit $name --read_settings_files=on; echo \$? > status' ", |
"cd \"$target_dir/\" \n xterm -e sh -c '$Quartus_bin/quartus_asm --64bit $name --read_settings_files=on; echo \$? > status' ", |
"cd \"$target_dir/\" \n xterm -e sh -c '$Quartus_bin/quartus_sta --64bit $name;echo \$? > status' "); |
"cd \"$target_dir/\" \n xterm -e bash -c '$Quartus_bin/quartus_map --64bit $name --read_settings_files=on; echo \$? > status' ", |
"cd \"$target_dir/\" \n xterm -e bash -c '$Quartus_bin/quartus_fit --64bit $name --read_settings_files=on; echo \$? > status' ", |
"cd \"$target_dir/\" \n xterm -e bash -c '$Quartus_bin/quartus_asm --64bit $name --read_settings_files=on; echo \$? > status' ", |
"cd \"$target_dir/\" \n xterm -e bash -c '$Quartus_bin/quartus_sta --64bit $name;echo \$? > status' "); |
|
foreach my $cmd (@compilation_command){ |
add_info(\$tview,"$cmd\n"); |
1065,7 → 1065,7
$error=1; |
} |
return if($error); |
my $command = "sh $bash_file $sof_file"; |
my $command = "bash $bash_file $sof_file"; |
add_info(\$tview,"$command\n"); |
my ($stdout,$exit,$stderr)=run_cmd_in_back_ground_get_stdout($command); |
if(length $stderr>1){ |
1252,7 → 1252,7
|
|
#run verilator |
#my $cmd= "cd \"$verilator/processed_rtl\" \n xterm -e sh -c ' verilator --cc $name.v --profile-cfuncs --prefix \"Vtop\" -O3 -CFLAGS -O3'"; |
#my $cmd= "cd \"$verilator/processed_rtl\" \n xterm -e bash -c ' verilator --cc $name.v --profile-cfuncs --prefix \"Vtop\" -O3 -CFLAGS -O3'"; |
foreach my $top (sort keys %tops) { |
add_colored_info(\$outtext,"Generate $top Verilator model from $tops{$top} file\n",'green'); |
my $cmd= "cd \"$verilator/processed_rtl\" \n verilator --cc $tops{$top} --prefix \"$top\" -O3 -CFLAGS -O3"; |
2191,7 → 2191,7
$run -> signal_connect("clicked" => sub{ |
my $bin="$verilator/processed_rtl/obj_dir/testbench"; |
if (-f $bin){ |
my $cmd= "cd \"$verilator/processed_rtl/obj_dir/\" \n xterm -e sh -c $bin"; |
my $cmd= "cd \"$verilator/processed_rtl/obj_dir/\" \n xterm -e bash -c $bin"; |
add_info(\$tview,"$cmd\n"); |
my ($stdout,$exit,$stderr)=run_cmd_in_back_ground_get_stdout($cmd); |
if(length $stderr>1){ |
/emulate_ram_gen.pl
41,7 → 41,7
sub reset_cmd { |
my ($ctrl_reset, $noc_reset,$jtag_intfc)=@_; |
my $reset_vector= (($ctrl_reset & 0x1) << 1) + ($noc_reset & 0x1); |
my $cmd = "sh $jtag_intfc \" -n ".JTAG_DONE_RESET_INDEX." -d I:1,D:2:$reset_vector,I:0 \" "; |
my $cmd = "bash $jtag_intfc \" -n ".JTAG_DONE_RESET_INDEX." -d I:1,D:2:$reset_vector,I:0 \" "; |
#print "$cmd\n"; |
return $cmd; |
} |
49,7 → 49,7
sub set_time_limit_cmd { |
my ($time_limit,$jtag_intfc)=@_; |
my $hex = sprintf("0x%X", $time_limit); |
my $cmd = "sh $jtag_intfc \" -n ".JTAG_COUNTER_INDEX." -d I:1,D:".CLK_CNTw.":$hex,I:0 \" "; |
my $cmd = "bash $jtag_intfc \" -n ".JTAG_COUNTER_INDEX." -d I:1,D:".CLK_CNTw.":$hex,I:0 \" "; |
#print "$cmd\n"; |
return $cmd; |
} |
291,7 → 291,7
|
|
#programe packet generators rams |
my $cmd= "sh $jtag_intfc \"-n ".JTAG_RAM_INDEX." -w 8 -i $ENV{'PRONOC_WORK'}/emulate/emulate_ram.bin -c\" "; |
my $cmd= "bash $jtag_intfc \"-n ".JTAG_RAM_INDEX." -w 8 -i $ENV{'PRONOC_WORK'}/emulate/emulate_ram.bin -c\" "; |
#my ($result,$exit) = run_cmd_in_back_ground_get_stdout($cmd); |
|
return 0 if(run_cmd_update_info ($cmd,$info)); |
309,7 → 309,7
|
sub read_jtag_memory{ |
my ($addr,$jtag_intfc,$info)=@_; |
my $cmd= "sh $jtag_intfc \" -n ".JTAG_STATIC_INDEX." -w 8 -d I:".UPDATE_WB_ADDR.",D:64:$addr,I:5,R:64:$addr,I:0\""; |
my $cmd= "bash $jtag_intfc \" -n ".JTAG_STATIC_INDEX." -w 8 -d I:".UPDATE_WB_ADDR.",D:64:$addr,I:5,R:64:$addr,I:0\""; |
#print "$cmd\n"; |
my ($result,$exit,$stderr) = run_cmd_in_back_ground_get_stdout($cmd); |
if($exit){ |
373,7 → 373,7
#read static memory |
my $end= STATISTIC_NUM * 8 *$NE; |
$end=sprintf ("%X",$end); |
my $cmd= "sh $jtag_intfc \"-n ".JTAG_STATIC_INDEX." -w 8 -r -s 0 -e $end\""; |
my $cmd= "bash $jtag_intfc \"-n ".JTAG_STATIC_INDEX." -w 8 -r -s 0 -e $end\""; |
#print "$cmd\n"; |
my ($result,$exit,$stderr) = run_cmd_in_back_ground_get_stdout($cmd); |
if($exit){ |
434,7 → 434,7
while ($done ==0){ |
usleep(300000); |
#my ($result,$exit) = run_cmd_in_back_ground_get_stdout("quartus_stp -t ./lib/tcl/read.tcl done"); |
my ($result,$exit) = run_cmd_in_back_ground_get_stdout("sh $jtag_intfc".READ_DONE_CMD); |
my ($result,$exit) = run_cmd_in_back_ground_get_stdout("bash $jtag_intfc".READ_DONE_CMD); |
if($exit != 0 ){ |
add_colored_info($info,$result,'red'); |
return undef; |
483,7 → 483,7
#print "total active router=$total_router\n"; |
#read clock counter |
my $clk_counter; |
my ($result,$exit) = run_cmd_in_back_ground_get_stdout("sh $jtag_intfc".READ_COUNTER_CMD); |
my ($result,$exit) = run_cmd_in_back_ground_get_stdout("bash $jtag_intfc".READ_COUNTER_CMD); |
if($exit != 0 ){ |
add_colored_info($info,$result,'red'); |
|
/emulator.pl
719,7 → 719,7
set_gui_status($emulate,"ref",2); |
last; |
} |
my $cmd = "sh $programer $sof.sof"; |
my $cmd = "bash $programer $sof.sof"; |
|
|
#my $Quartus_bin= $ENV{QUARTUS_BIN}; |
/mpsoc_gen.pl
1278,6 → 1278,14
|
my @ff= ("$target_dir/src_verilog/$name.v","$target_dir/src_verilog/${name}_top.v"); |
add_to_project_file_list(\@ff,"$hw_dir/lib/",$hw_dir); |
|
|
#write perl_object_file |
mkpath("$target_dir/perl_lib/",1,01777); |
open(FILE, ">$target_dir/perl_lib/$name.SOC") || die "Can not open: $!"; |
print FILE perl_file_header("$name.MPSOC"); |
print FILE Data::Dumper->Dump([\%$mpsoc],['mpsoc']); |
|
|
message_dialog("MPSoC \"$name\" has been created successfully at $target_dir/ " ) if($show_sucess_msg); |
|
1303,8 → 1311,7
|
|
sub mpsoc_mem_prog { |
my $string=' |
#!/bin/sh |
my $string='#!/bin/bash |
|
|
#JTAG_INTFC="$PRONOC_WORK/toolchain/bin/JTAG_INTFC" |
1332,7 → 1339,7
for i in $(ls -d */); do |
echo "Enter ${i%%/}" |
cd ${i%%/} |
sh write_memory.sh |
bash write_memory.sh |
cd .. |
done |
|
1582,7 → 1589,7
} |
|
return if($error); |
my $command = "cd $sw; sh program.sh"; |
my $command = "cd $sw; bash program.sh"; |
add_info(\$tview,"$command\n"); |
my ($stdout,$exit,$stderr)=run_cmd_in_back_ground_get_stdout($command); |
if(length $stderr>1){ |
/readme_gen.pl
1,16 → 1,15
#! /usr/bin/perl -w |
|
use Time::Piece; |
|
|
sub get_license_header { |
my $file_name=shift; |
my $t = Time::Piece->new(); |
my $year=$t->year; |
|
my $head=" |
/********************************************************************** |
** File: $file_name |
** |
** Copyright (C) 2014-$year Alireza Monemi |
** Copyright (C) 2014-$ProNOC::END_YEAR Alireza Monemi |
** |
** This file is part of ProNoC $ProNOC::VERSION |
** |
54,7 → 53,7
my $head="####################################################################### |
## File: $file_name |
## |
## Copyright (C) 2014-2016 Alireza Monemi |
## Copyright (C) 2014-$ProNOC::END_YEAR Alireza Monemi |
## |
## This file is part of ProNoC $ProNOC::VERSION |
## |
/soc_gen.pl
2,6 → 2,8
use Glib qw/TRUE FALSE/; |
use strict; |
use warnings; |
use FindBin; |
use lib $FindBin::Bin; |
use soc; |
use ip; |
use interface; |
1076,10 → 1078,7
|
|
# Write system.h and Software gen files |
generate_header_file($soc,$project_dir,$sw_path,$hw_path,$dir); |
|
|
|
generate_header_file($soc,$project_dir,$sw_path,$hw_path,$dir); |
|
|
# Write main.c file if not exist |
1092,10 → 1091,12
|
} |
|
#write perl_object_file |
mkpath("$target_dir/perl_lib/",1,01777); |
open(FILE, ">$target_dir/perl_lib/$name.SOC") || die "Can not open: $!"; |
print FILE perl_file_header("$name.SOC"); |
print FILE Data::Dumper->Dump([\%$soc],['soc']); |
|
|
|
|
|
} |
|
1509,14 → 1510,6
|
|
|
|
|
|
|
|
|
|
|
sub check_entered_address{ |
my ($base_ref,$end_ref,$connect_ref,$number)=@_; |
my @bases=@{$base_ref}; |
1745,7 → 1738,7
} |
|
return if($error); |
my $command = "cd $target_dir/sw; sh program.sh"; |
my $command = "cd $target_dir/sw; bash program.sh"; |
add_info(\$tview,"$command\n"); |
my ($stdout,$exit,$stderr)=run_cmd_in_back_ground_get_stdout($command); |
if(length $stderr>1){ |
1769,8 → 1762,7
|
|
sub soc_mem_prog { |
my $string=' |
#!/bin/sh |
my $string='#!/bin/bash |
|
|
#JTAG_INTFC="$PRONOC_WORK/toolchain/bin/JTAG_INTFC" |
1795,7 → 1787,7
|
#programe the memory |
|
sh write_memory.sh |
bash write_memory.sh |
|
|
#Enable the cpu |
1934,7 → 1926,7
|
unlink "$hw_dir/file_list"; |
generate_soc($soc,$info,$target_dir,$hw_dir,$sw_path,1,1); |
#message_dialog("SoC \"$name\" has been created successfully at $target_dir/ " ); |
|
my $has_ni= check_for_ni($soc); |
if($has_ni){ |
my $dialog = Gtk2::MessageDialog->new (my $window, |
/verilog_gen.pl
786,7 → 786,7
}#foreach my $instance_id |
|
#Generate memory programming command |
my $prog='#!/bin/sh |
my $prog='#!/bin/bash |
|
#JTAG_INTFC="$PRONOC_WORK/toolchain/bin/JTAG_INTFC" |
source ./jtag_intfc.sh |
872,7 → 872,7
|
If the memory core and jtag_wb are connected to the same wishbone bus, you can program the memory using |
|
sh program.sh |
bash program.sh |
|
|
|