OpenCores
URL https://opencores.org/ocsvn/async_sdm_noc/async_sdm_noc/trunk

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [branches/] [clos_opt/] [common/] [src/] [dcb.v] - Diff between revs 57 and 62

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

Rev 57 Rev 62
Line 13... Line 13...
 *** SystemVerilog is used ***
 *** SystemVerilog is used ***
 
 
 History:
 History:
 17/07/2010  Initial version. <wsong83@gmail.com>
 17/07/2010  Initial version. <wsong83@gmail.com>
 23/05/2011  Clean up for opensource. <wsong83@gmail.com>
 23/05/2011  Clean up for opensource. <wsong83@gmail.com>
 
 21/06/2011  Prepare to support buffered Clos. <wsong83@gmail.com>
 
 
*/
*/
 
 
// the router structure definitions
// the router structure definitions
`include "define.v"
`include "define.v"
 
 
module dcb (/*AUTOARG*/
module dcb (
   // Outputs
   // Outputs
   o0, o1, o2, o3, ia, o4,
   o0, o1, o2, o3, ia, o4,
   // Inputs
   // Inputs
   i0, i1, i2, i3, oa, i4, cfg
   i0, i1, i2, i3, oa, i4, cfg
 
`ifdef ENABLE_BUFFERED_CLOS
 
   , o4a
 
`endif
   );
   );
 
 
   parameter NN = 2;            // number of input ports
   parameter NN = 2;            // number of input ports
   parameter MN = 3;            // number of output ports
   parameter MN = 3;            // number of output ports
   parameter DW = 8;            // data-width of a port
   parameter DW = 8;            // data-width of a port
Line 37... Line 41...
   output [MN-1:0][SCN-1:0]        o0, o1, o2, o3; // output ports
   output [MN-1:0][SCN-1:0]        o0, o1, o2, o3; // output ports
 
 
`ifdef ENABLE_CHANNEL_SLICING
`ifdef ENABLE_CHANNEL_SLICING
   output [NN-1:0][SCN-1:0]        ia, o4; // eof and ack
   output [NN-1:0][SCN-1:0]        ia, o4; // eof and ack
   input [MN-1:0][SCN-1:0]         oa, i4;
   input [MN-1:0][SCN-1:0]         oa, i4;
 
 `ifdef ENABLE_BUFFERED_CLOS
 
   input [MN-1:0][SCN-1:0]         oa4; // the eof ack from output buffer
 
 `endif
`else
`else
   output [NN-1:0]                ia, o4; // eof and ack
   output [NN-1:0]                ia, o4; // eof and ack
   input [MN-1:0]                 oa, i4;
   input [MN-1:0]                 oa, i4;
`endif
`endif
 
 
Line 48... Line 55...
 
 
   wire [MN-1:0][SCN-1:0][NN-1:0] dm0, dm1, dm2, dm3;
   wire [MN-1:0][SCN-1:0][NN-1:0] dm0, dm1, dm2, dm3;
 
 
`ifdef ENABLE_CHANNEL_SLICING
`ifdef ENABLE_CHANNEL_SLICING
   wire [NN-1:0][SCN-1:0][MN-1:0] am, dm4;
   wire [NN-1:0][SCN-1:0][MN-1:0] am, dm4;
 
 `ifdef ENABLE_BUFFERED_CLOS
 
   wire [NN-1:0][SCN-1:0][MN-1:0] amd, am4;
 
 `endif
`else
`else
   wire [NN-1:0][MN-1:0]    am, dm4;
   wire [NN-1:0][MN-1:0]    am, dm4;
 
 `ifdef ENABLE_BUFFERED_CLOS
 
   wire [NN-1:0][MN-1:0]    amd, am4;
 
 `endif
`endif
`endif
 
 
   genvar                        i, j, k;
   genvar                        i, j, k;
 
 
   generate
   generate
Line 64... Line 77...
               and A1 (dm1[i][k][j], i1[j][k], cfg[i][j]);
               and A1 (dm1[i][k][j], i1[j][k], cfg[i][j]);
               and A2 (dm2[i][k][j], i2[j][k], cfg[i][j]);
               and A2 (dm2[i][k][j], i2[j][k], cfg[i][j]);
               and A3 (dm3[i][k][j], i3[j][k], cfg[i][j]);
               and A3 (dm3[i][k][j], i3[j][k], cfg[i][j]);
`ifdef ENABLE_CHANNEL_SLICING
`ifdef ENABLE_CHANNEL_SLICING
               and A4 (dm4[i][k][j], i4[j][k], cfg[i][j]);
               and A4 (dm4[i][k][j], i4[j][k], cfg[i][j]);
 
 `ifdef ENABLE_BUFFERED_CLOS
 
               and Aad (amd[j][k][i], oa[i][k], cfg[i][j]);
 
               c2  Aa4 (.q(am4[j][k][i]), .a0(oa4[i][k]), .a1(cfg[i][j]));
 
               assign am[j][k][i] = amd[j][k][i] | am4[j][k][i];
 
 `else
               and Aa (am[j][k][i], oa[i][k], cfg[i][j]);
               and Aa (am[j][k][i], oa[i][k], cfg[i][j]);
`endif
`endif
 
`endif
            end
            end
 
 
`ifndef ENABLE_CHANNEL_SLICING
`ifndef ENABLE_CHANNEL_SLICING
            and A4 (dm4[i][j], i4[j], cfg[i][j]);
            and A4 (dm4[i][j], i4[j], cfg[i][j]);
 
 `ifdef ENABLE_BUFFERED_CLOS
 
            and Aa (amd[j][i], oa[i], cfg[i][j]);
 
            c2  Aa4 (.q(am4[j][i]), .a0(oa4[i]), .a1(cfg[i][j]));
 
            assign am[j][i] = amd[j][i] | am4[j][i];
 
 `else
            and Aa (am[j][i], oa[i], cfg[i][j]);
            and Aa (am[j][i], oa[i], cfg[i][j]);
`endif
`endif
 
`endif
         end // block: IP
         end // block: IP
      end // block: EN
      end // block: EN
   endgenerate
   endgenerate
 
 
   generate
   generate

powered by: WebSVN 2.1.0

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