Line 439... |
Line 439... |
my $box=def_pack_hbox(FALSE,0,$instance_entry );
|
my $box=def_pack_hbox(FALSE,0,$instance_entry );
|
$table->attach ($box,1,2,$offset+1,$offset+2,'expand','shrink',2,2);
|
$table->attach ($box,1,2,$offset+1,$offset+2,'expand','shrink',2,2);
|
|
|
my ($old_v,$new_v)= get_old_new_ip_version ($soc,$ip,$instance_id);
|
my ($old_v,$new_v)= get_old_new_ip_version ($soc,$ip,$instance_id);
|
if($old_v != $new_v){
|
if($old_v != $new_v){
|
my $warn=def_image_button("icons/warnning.png");
|
my $warn=def_image_button("icons/warning.png");
|
$table->attach ($warn,1,2,$offset+2,$offset+3,'expand','shrink',2,2); #$box2->pack_start($warn, FALSE, FALSE, 3);
|
$table->attach ($warn,1,2,$offset+2,$offset+3,'expand','shrink',2,2); #$box2->pack_start($warn, FALSE, FALSE, 3);
|
$warn->signal_connect (clicked => sub{
|
$warn->signal_connect (clicked => sub{
|
message_dialog("Warning: ${module}'s version (V.$old_v) missmatches with the one exsiting in librray (V.$new_v). The generated system may not work correctly. Please remove and then add $module again to update it with current version")
|
message_dialog("Warning: ${module}'s version (V.$old_v) missmatches with the one exsiting in librray (V.$new_v). The generated system may not work correctly. Please remove and then add $module again to update it with current version")
|
|
|
});
|
});
|
Line 947... |
Line 947... |
my @new_file_ref;
|
my @new_file_ref;
|
foreach my $f(@{$files_ref}){
|
foreach my $f(@{$files_ref}){
|
my ($name,$path,$suffix) = fileparse("$f",qr"\..[^.]*$");
|
my ($name,$path,$suffix) = fileparse("$f",qr"\..[^.]*$");
|
push(@new_file_ref,"$files_path/$name$suffix");
|
push(@new_file_ref,"$files_path/$name$suffix");
|
}
|
}
|
my $old_file_ref= eval { do "$list_path/file_list" };
|
my ($old_file_ref,$r,$err) = regen_object("$list_path/file_list" );
|
|
|
if (defined $old_file_ref){
|
if (defined $old_file_ref){
|
foreach my $f(@{$old_file_ref}){
|
foreach my $f(@{$old_file_ref}){
|
unless ( grep( /^$f$/, @new_file_ref ) ){
|
unless ( grep( /^$f$/, @new_file_ref ) ){
|
push(@new_file_ref,$f);
|
push(@new_file_ref,$f);
|
}
|
}
|
Line 968... |
Line 969... |
################
|
################
|
# generate_soc
|
# generate_soc
|
#################
|
#################
|
|
|
sub generate_soc{
|
sub generate_soc{
|
my ($soc,$info,$target_dir,$hw_path,$sw_path,$gen_top,$gen_hw_lib)=@_;
|
my ($soc,$info,$target_dir,$hw_path,$sw_path,$gen_top,$gen_hw_lib,$oldfiles)=@_;
|
my $name=$soc->object_get_attribute('soc_name');
|
my $name=$soc->object_get_attribute('soc_name');
|
|
$oldfiles = "remove" if(!defined $oldfiles);
|
|
|
my ($file_v,$top_v,$readme,$prog)=soc_generate_verilog($soc,$sw_path);
|
my ($file_v,$top_v,$readme,$prog)=soc_generate_verilog($soc,$sw_path);
|
|
|
# Write object file
|
# Write object file
|
open(FILE, ">lib/soc/$name.SOC") || die "Can not open: $!";
|
open(FILE, ">lib/soc/$name.SOC") || die "Can not open: $!";
|
Line 1021... |
Line 1022... |
#make target dir
|
#make target dir
|
my $hw_lib="$hw_path/lib";
|
my $hw_lib="$hw_path/lib";
|
mkpath("$hw_lib/",1,01777);
|
mkpath("$hw_lib/",1,01777);
|
mkpath("$sw_path/",1,01777);
|
mkpath("$sw_path/",1,01777);
|
|
|
|
if ($oldfiles eq "remove"){
|
#remove old rtl files that were copied by ProNoC
|
#remove old rtl files that were copied by ProNoC
|
my $old_file_ref= eval { do "$hw_path/file_list" };
|
my ($old_file_ref,$r,$err) = regen_object("$hw_path/file_list");
|
if (defined $old_file_ref){
|
if (defined $old_file_ref){
|
remove_file_and_folders($old_file_ref,$target_dir);
|
remove_file_and_folders($old_file_ref,$target_dir);
|
}
|
}
|
|
}
|
#copy hdl codes in src_verilog
|
#copy hdl codes in src_verilog
|
my ($file_ref,$warnings)= get_all_files_list($soc,"hdl_files");
|
my ($file_ref,$warnings)= get_all_files_list($soc,"hdl_files");
|
copy_file_and_folders($file_ref,$project_dir,$hw_lib);
|
copy_file_and_folders($file_ref,$project_dir,$hw_lib);
|
show_info(\$info,$warnings) if(defined $warnings);
|
show_info(\$info,$warnings) if(defined $warnings);
|
add_to_project_file_list($file_ref,$hw_lib,$hw_path);
|
add_to_project_file_list($file_ref,$hw_lib,$hw_path);
|
Line 1048... |
Line 1050... |
move ("$dir/lib/verilog/write_memory.sh" ,"$sw_path/");
|
move ("$dir/lib/verilog/write_memory.sh" ,"$sw_path/");
|
move ("$dir/lib/verilog/program.sh" ,"$sw_path/");
|
move ("$dir/lib/verilog/program.sh" ,"$sw_path/");
|
}
|
}
|
|
|
#remove old software files that were copied by ProNoC
|
#remove old software files that were copied by ProNoC
|
my $old_file_ref= eval { do "$sw_path/file_list" };
|
|
|
my ($old_file_ref,$r,$err) = regen_object("$sw_path/file_list" );
|
if (defined $old_file_ref){
|
if (defined $old_file_ref){
|
remove_file_and_folders($old_file_ref,$project_dir);
|
remove_file_and_folders($old_file_ref,$project_dir);
|
}
|
}
|
|
|
# Copy Software files
|
# Copy Software files
|
Line 1454... |
Line 1457... |
$info="Invalid hex value!";
|
$info="Invalid hex value!";
|
$valid=0;
|
$valid=0;
|
}
|
}
|
|
|
|
|
my $status=(defined $info)? gen_button_message ($info,'icons/warnning.png'):
|
my $status=(defined $info)? gen_button_message ($info,'icons/warning.png'):
|
gen_button_message (undef,'icons/select.png');
|
gen_button_message (undef,'icons/select.png');
|
|
|
$box->pack_start($label,FALSE,FALSE,3);
|
$box->pack_start($label,FALSE,FALSE,3);
|
$box->pack_start($status,FALSE,FALSE,3);
|
$box->pack_start($status,FALSE,FALSE,3);
|
return ($box,$valid);
|
return ($box,$valid);
|
Line 1574... |
Line 1577... |
|
|
if ( "ok" eq $dialog->run ) {
|
if ( "ok" eq $dialog->run ) {
|
$file = $dialog->get_filename;
|
$file = $dialog->get_filename;
|
my ($name,$path,$suffix) = fileparse("$file",qr"\..[^.]*$");
|
my ($name,$path,$suffix) = fileparse("$file",qr"\..[^.]*$");
|
if($suffix eq '.SOC'){
|
if($suffix eq '.SOC'){
|
my $pp= eval { do $file };
|
my ($pp,$r,$err) = regen_object($file);
|
if ($@ || !defined $pp){
|
if ($r || !defined $pp){
|
show_info(\$info,"**Error reading $file file: $@\n");
|
show_info(\$info,"**Error reading $file file: $err\n");
|
$dialog->destroy;
|
$dialog->destroy;
|
return;
|
return;
|
}
|
}
|
clone_obj($soc,$pp);
|
clone_obj($soc,$pp);
|
check_instances_version($soc,$ip);
|
check_instances_version($soc,$ip);
|
Line 1714... |
Line 1717... |
|
|
});
|
});
|
|
|
$make -> signal_connect("clicked" => sub{
|
$make -> signal_connect("clicked" => sub{
|
$app->do_save();
|
$app->do_save();
|
|
my $load= show_gif("icons/load.gif");
|
|
$table->attach ($load,7, 8, 1,2,'shrink','shrink',0,0);
|
|
$load->show_all;
|
run_make_file($sw,$tview);
|
run_make_file($sw,$tview);
|
|
$load->destroy;
|
});
|
});
|
|
|
#Programe the board
|
#Programe the board
|
$prog-> signal_connect("clicked" => sub{
|
$prog-> signal_connect("clicked" => sub{
|
my $error = 0;
|
my $error = 0;
|