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

Show entire file | Details | Blame | View Log

Rev 54 Rev 56
Line 132... Line 132...
 
 
 
 
 
 
         print $fd "
         print $fd "
module   ${name}_noc
module   ${name}_noc
        import pronoc_pkg::*;
#(
 
        parameter NOC_ID=0
 
)
        (
        (
   $ports
   $ports
);
);
 
 
         function integer log2;
        `NOC_CONF
      input integer number; begin
 
         log2=(number <=1) ? 1: 0;
 
         while(2**log2<number) begin
 
            log2=log2+1;
 
         end
 
      end
 
    endfunction // log2
 
 
 
        localparam
 
                NE = $NE,
 
                NR = $NR,
 
                RAw=log2(NR);
 
 
 
 
 
 
 
 
 
    input reset,clk;
    input reset,clk;
 
 
    $wires
    $wires
 
 
Line 207... Line 194...
        my $router_v="
        my $router_v="
        /*******************
        /*******************
        *               $instance
        *               $instance
        *******************/
        *******************/
        router_top #(
        router_top #(
 
                .NOC_ID(NOC_ID),
                .P($Pnum)
                .P($Pnum)
        )
        )
        $instance
        $instance
        (
        (
                .clk(${instance}_clk),
                .clk(${instance}_clk),
Line 465... Line 453...
\tfor( i=0; i<$n; i=i+1) begin : router_${i}_port_lp
\tfor( i=0; i<$n; i=i+1) begin : router_${i}_port_lp
        localparam RID = $router_pos;
        localparam RID = $router_pos;
        assign current_r_addr [RID] = RID[RAw-1: 0];
        assign current_r_addr [RID] = RID[RAw-1: 0];
 
 
        router_top #(
        router_top #(
 
                .NOC_ID(NOC_ID),
                .P($i)
                .P($i)
        )
        )
        router_${i}_port
        router_${i}_port
        (
        (
                .clk(clk),
                .clk(clk),
Line 510... Line 499...
 
 
 
 
 
 
         print $fd "
         print $fd "
module   ${name}_noc_genvar
module   ${name}_noc_genvar
   import pronoc_pkg::*;
#(
        (
        parameter NOC_ID=0
 
)(
 
 
    reset,
    reset,
    clk,
    clk,
    chan_in_all,
    chan_in_all,
    chan_out_all,
    chan_out_all,
    router_event
    router_event
);
);
 
 
         function integer log2;
`NOC_CONF
      input integer number; begin
 
         log2=(number <=1) ? 1: 0;
 
         while(2**log2<number) begin
 
            log2=log2+1;
 
         end
 
      end
 
    endfunction // log2
 
 
 
        localparam
 
                NE = $NE,
 
                NR = $NR,
 
                RAw=log2(NR),
 
                MAX_P=$MAX_P;
 
 
 
 
 
$ports_def
$ports_def
 
 
$router_wires
$router_wires
 
 
Line 626... Line 602...
 
 
 
 
        my $router_v="
        my $router_v="
 
 
        router_top #(
        router_top #(
 
                .NOC_ID(NOC_ID),
                .P($Pnum)
                .P($Pnum)
        )
        )
        router_${Pnum}_port
        router_${Pnum}_port
        (
        (
                .clk(clk),
                .clk(clk),
Line 1444... Line 1421...
 
 
 
 
 
 
                 print $fd "
                 print $fd "
module  ${name}_connection
module  ${name}_connection
        import pronoc_pkg::*;
#(
(
        parameter NOC_ID=0
 
)(
    $ports
    $ports
);
);
 
 
         function integer log2;
        `NOC_CONF
      input integer number; begin
 
         log2=(number <=1) ? 1: 0;
 
         while(2**log2<number) begin
 
            log2=log2+1;
 
         end
 
      end
 
    endfunction // log2
 
 
 
        localparam
 
                NE = $NE,
 
                NR = $NR,
 
                RAw=log2(NR),
 
                MAX_P=$MAX_P;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
        localparam
        localparam
                P= MAX_P,
                P= MAX_P,
        PV = V * P,
        PV = V * P,
        PFw = P * Fw,
        PFw = P * Fw,
        CONG_ALw = CONGw * P,
        CONG_ALw = CONGw * P,
        PRAw = P * RAw;
        PRAw = P * RAw;
 
 
 
 
 
 
 
 
 
 
 
 
$ports_def
$ports_def
 
 
$router_wires
$router_wires
 
 
$endps_wires
$endps_wires
Line 1677... Line 1630...
 
 
        my $str="
        my $str="
        //do not modify this line ===${name}===
        //do not modify this line ===${name}===
    if(TOPOLOGY == \"$name\" ) begin : T$name
    if(TOPOLOGY == \"$name\" ) begin : T$name
 
 
        ${name}_connection  connection
        ${name}_connection  #(
        (
                        .NOC_ID(NOC_ID)
 
                ) connection (
$ports
$ports
        );
        );
 
 
    end
    end
 
 
Line 1725... Line 1679...
 
 
        $ports="\t\t.reset(reset),
        $ports="\t\t.reset(reset),
\t\t.clk(clk)";
\t\t.clk(clk)";
 
 
 
 
 
 
 
 
        $str="
        $str="
        //do not modify this line ===${name}===
        //do not modify this line ===${name}===
    if(TOPOLOGY == \"$name\" ) begin : T$name
    if(TOPOLOGY == \"$name\" ) begin : T$name
 
 
                ${name}_noc_genvar the_noc
                ${name}_noc_genvar #(
                (
                        .NOC_ID(NOC_ID)
 
                ) the_noc (
                    .reset(reset),
                    .reset(reset),
                    .clk(clk),
                    .clk(clk),
                    .chan_in_all(chan_in_all),
                    .chan_in_all(chan_in_all),
                    .chan_out_all(chan_out_all),
                    .chan_out_all(chan_out_all),
                    .router_event(router_event)
                    .router_event(router_event)

powered by: WebSVN 2.1.0

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