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/] [hdr_file_gen.pl] - Diff between revs 25 and 28

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

Rev 25 Rev 28
Line 20... Line 20...
        my $category    =$soc->soc_get_category($id);
        my $category    =$soc->soc_get_category($id);
        my $inst        =$soc->soc_get_instance_name($id);
        my $inst        =$soc->soc_get_instance_name($id);
        my @plugs= $soc->soc_get_all_plugs_of_an_instance($id);
        my @plugs= $soc->soc_get_all_plugs_of_an_instance($id);
        my %params= $soc->soc_get_module_param($id);
        my %params= $soc->soc_get_module_param($id);
        #add two extra variable the instance name and base addresses
        #add two extra variable the instance name and base addresses
        my $core_id= $soc->object_add_attribute('global_param','CORE_ID');
        my $core_id= $soc->object_get_attribute('global_param','CORE_ID');
        $params{CORE_ID}=(defined $core_id)? $core_id: 0;
        $params{CORE_ID}=(defined $core_id)? $core_id: 0;
        $params{IP}=$inst;
        $params{IP}=$inst;
        $params{CORE}=$id;
        $params{CORE}=$id;
        foreach my $plug (@plugs){
        foreach my $plug (@plugs){
                my @nums=$soc->soc_list_plug_nums($id,$plug);
                my @nums=$soc->soc_list_plug_nums($id,$plug);
Line 62... Line 62...
}
}
 
 
 
 
 
 
sub generate_header_file{
sub generate_header_file{
        my ($soc,$project_dir,$target_dir,$dir)= @_;
        my ($soc,$project_dir,$sw_path,$dir)= @_;
        my $soc_name=$soc->object_get_attribute('soc_name');
        my $soc_name=$soc->object_get_attribute('soc_name');
        $soc_name = uc($soc_name);
        $soc_name = uc($soc_name);
        if(!defined $soc_name){$soc_name='soc'};
        if(!defined $soc_name){$soc_name='soc'};
 
 
        my @instances=$soc->soc_get_all_instances();
        my @instances=$soc->soc_get_all_instances();
Line 131... Line 131...
                                if(defined $rename){
                                if(defined $rename){
 
 
                                        open(FILE,  ">lib/verilog/tmp") || die "Can not open: $!";
                                        open(FILE,  ">lib/verilog/tmp") || die "Can not open: $!";
                                        print FILE $content;
                                        print FILE $content;
                                        close(FILE) || die "Error closing file: $!";
                                        close(FILE) || die "Error closing file: $!";
                                        move ("$dir/lib/verilog/tmp","$target_dir/sw/$rename");
                                        move ("$dir/lib/verilog/tmp","$sw_path/$rename");
 
 
 
 
                                }
                                }
                        }
                        }
                }
                }
Line 146... Line 146...
        add_text_to_string(\$system_h,"#endif\n");
        add_text_to_string(\$system_h,"#endif\n");
        my $name=$soc->object_get_attribute('soc_name');
        my $name=$soc->object_get_attribute('soc_name');
        open(FILE,  ">lib/verilog/$name.h") || die "Can not open: $!";
        open(FILE,  ">lib/verilog/$name.h") || die "Can not open: $!";
                        print FILE $system_h;
                        print FILE $system_h;
                        close(FILE) || die "Error closing file: $!";
                        close(FILE) || die "Error closing file: $!";
                        move ("$dir/lib/verilog/$name.h","$target_dir/sw/");
                        move ("$dir/lib/verilog/$name.h","$sw_path/");
 
 
 
 
 
 
 
 
}
}

powered by: WebSVN 2.1.0

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