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/] [mpsoc_verilog_gen.pl] - Diff between revs 48 and 54

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

Rev 48 Rev 54
Line 320... Line 320...
        my ($mpsoc,$sample)=@_;
        my ($mpsoc,$sample)=@_;
        my $param_v="\n\n//NoC parameters\n";
        my $param_v="\n\n//NoC parameters\n";
        my $pass_param="";
        my $pass_param="";
        my @params=$mpsoc->object_get_attribute_order('noc_param');
        my @params=$mpsoc->object_get_attribute_order('noc_param');
        my $custom_topology = $mpsoc->object_get_attribute('noc_param','CUSTOM_TOPOLOGY_NAME');
        my $custom_topology = $mpsoc->object_get_attribute('noc_param','CUSTOM_TOPOLOGY_NAME');
 
        my ($NE, $NR, $RAw, $EAw, $Fw) = get_topology_info($mpsoc);
        my %noc_info;
        my %noc_info;
        if(defined $sample ){
        if(defined $sample ){
                my $ref=$mpsoc->object_get_attribute($sample,"noc_info");
                my $ref=$mpsoc->object_get_attribute($sample,"noc_info");
                %noc_info= %$ref;
                %noc_info= %$ref;
 
                ($NE, $NR, $RAw, $EAw, $Fw) = get_topology_info_from_parameters($ref);
        }
        }
 
 
        foreach my $p (@params){
        foreach my $p (@params){
 
 
                my $val= (defined $sample) ? $noc_info{$p} :$mpsoc->object_get_attribute('noc_param',$p);
                my $val= (defined $sample) ? $noc_info{$p} :$mpsoc->object_get_attribute('noc_param',$p);
                next if($p eq "CUSTOM_TOPOLOGY_NAME");
                next if($p eq "CUSTOM_TOPOLOGY_NAME");
                $val=$custom_topology if($p eq "TOPOLOGY" && $val eq "\"CUSTOM\"");
                $val=$custom_topology if($p eq "TOPOLOGY" && $val eq "\"CUSTOM\"");
 
                if($p eq 'MCAST_ENDP_LIST'){
 
 
 
                        $val="$NE".$val;
 
                }
                $param_v= $param_v."\tlocalparam $p=$val;\n";
                $param_v= $param_v."\tlocalparam $p=$val;\n";
                $pass_param=$pass_param."\t\t.$p($p),\n";
                $pass_param=$pass_param."\t\t.$p($p),\n";
                #print "$p:$val\n";
                #print "$p:$val\n";
 
 
        }
        }
Line 374... Line 380...
 
 
        my $topology = $mpsoc->object_get_attribute('noc_param','TOPOLOGY');
        my $topology = $mpsoc->object_get_attribute('noc_param','TOPOLOGY');
        $topology =~ s/"//g;
        $topology =~ s/"//g;
        $param_h.="\t#define  IS_${topology}\n";
        $param_h.="\t#define  IS_${topology}\n";
 
 
 
        my ($NE, $NR, $RAw, $EAw, $Fw) = get_topology_info($mpsoc);
 
 
 
 
 
 
 
 
        my @params=$mpsoc->object_get_attribute_order('noc_param');
        my @params=$mpsoc->object_get_attribute_order('noc_param');
        my $custom_topology = $mpsoc->object_get_attribute('noc_param','CUSTOM_TOPOLOGY_NAME');
        my $custom_topology = $mpsoc->object_get_attribute('noc_param','CUSTOM_TOPOLOGY_NAME');
        foreach my $p (@params){
        foreach my $p (@params){
                my $val=$mpsoc->object_get_attribute('noc_param',$p);
                my $val=$mpsoc->object_get_attribute('noc_param',$p);
                next if($p eq "CUSTOM_TOPOLOGY_NAME");
                next if($p eq "CUSTOM_TOPOLOGY_NAME");
                $val=$custom_topology if($p eq "TOPOLOGY" && $val eq "\"CUSTOM\"");
                $val=$custom_topology if($p eq "TOPOLOGY" && $val eq "\"CUSTOM\"");
 
                if($p eq "MCAST_ENDP_LIST" || $p eq "ESCAP_VC_MASK"){
 
                        $val="$NE".$val if($p eq 'MCAST_ENDP_LIST');
 
                        $val =~ s/\'/\\\'/g;
 
                        $val="\"$val\"";
 
                }
 
 
                $param_h=$param_h."\t#define $p\t$val\n";
                $param_h=$param_h."\t#define $p\t$val\n";
 
 
                #print "$p:$val\n";
                #print "$p:$val\n";
 
 
        }
        }
Line 413... Line 429...
        }
        }
        #add_text_to_string (\$param_h," \tlocalparam  CVw=(C==0)? V : C * V;\n");
        #add_text_to_string (\$param_h," \tlocalparam  CVw=(C==0)? V : C * V;\n");
        #add_text_to_string (\$pass_param,".CVw(CVw)\n");
        #add_text_to_string (\$pass_param,".CVw(CVw)\n");
 
 
 
 
 
        #remove 'b and 'h
 
        #$param_h =~ s/\d\'b/ /g;
 
        #$param_h =~ s/\'h/ /g;
 
 
        return  $param_h;
        return  $param_h;
}
}
 
 
 
 
Line 446... Line 464...
        noc_top the_noc
        noc_top the_noc
        (
        (
                .reset(noc_reset_in),
                .reset(noc_reset_in),
                .clk(noc_clk_in),
                .clk(noc_clk_in),
                .chan_in_all(ni_chan_out),
                .chan_in_all(ni_chan_out),
                .chan_out_all(ni_chan_in)
                .chan_out_all(ni_chan_in),
 
                .router_event( )
        );
        );
 
 
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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