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

Subversion Repositories async_sdm_noc

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

Show entire file | Details | Blame | View Log

Rev 57 Rev 62
Line 23... Line 23...
 History:
 History:
 05/05/2009  Initial version. <wsong83@gmail.com>
 05/05/2009  Initial version. <wsong83@gmail.com>
 20/09/2010  Supporting channel slicing and SDM using macro difinitions. <wsong83@gmail.com>
 20/09/2010  Supporting channel slicing and SDM using macro difinitions. <wsong83@gmail.com>
 24/05/2011  Clean up for opensource. <wsong83@gmail.com>
 24/05/2011  Clean up for opensource. <wsong83@gmail.com>
 01/06/2011  Use the comp4 common comparator rather than the chain_comparator defined in this module. <wsong83@gmail.com>
 01/06/2011  Use the comp4 common comparator rather than the chain_comparator defined in this module. <wsong83@gmail.com>
 
 21/06/2011  Move the eof logic in every pipeline stage outside the pipe4 module. <wsong83@gmail.com>
*/
*/
 
 
// the router structure definitions
// the router structure definitions
`include "define.v"
`include "define.v"
 
 
Line 71... Line 71...
   wire                   rt_err;              // route decoder error
   wire                   rt_err;              // route decoder error
   wire                   rt_ack;              // route build ack
   wire                   rt_ack;              // route build ack
 
 
`ifdef ENABLE_CHANNEL_SLICING
`ifdef ENABLE_CHANNEL_SLICING
   wire [SCN-1:0]          rtrst;               // rt decoder reset for each sub-channel
   wire [SCN-1:0]          rtrst;               // rt decoder reset for each sub-channel
   wire [PD:0][SCN-1:0]   pd4, pda, pdan;      // data wires for the internal pipeline stages
   wire [PD:0][SCN-1:0]   pd4, pda, pdan, pd4an; // data wires for the internal pipeline stages
 
 
`else
`else
   wire                   rtrst;               // rt decode reset
   wire                   rtrst;               // rt decode reset
   wire [PD:0]             pd4, pda, pdan;      // data wires for the internal pipeline satges
   wire [PD:0]             pd4, pda, pdan, pd4an; // data wires for the internal pipeline satges
`endif // !`ifdef ENABLE_CHANNEL_SLICING
`endif // !`ifdef ENABLE_CHANNEL_SLICING
 
 
   genvar                 i, j;
   genvar                 i, j;
 
 
   //------------------------- pipelines ------------------------------------- //
   //------------------------- pipelines ------------------------------------- //
Line 90... Line 90...
         P (
         P (
            .o0  ( pd0[i][j]   ),
            .o0  ( pd0[i][j]   ),
            .o1  ( pd1[i][j]   ),
            .o1  ( pd1[i][j]   ),
            .o2  ( pd2[i][j]   ),
            .o2  ( pd2[i][j]   ),
            .o3  ( pd3[i][j]   ),
            .o3  ( pd3[i][j]   ),
            .o4  ( pd4[i][j]   ),
            //.o4  ( pd4[i][j]   ),
            .ia  ( pda[i+1][j] ),
            .ia  ( pda[i+1][j] ),
            .i0  ( pd0[i+1][j] ),
            .i0  ( pd0[i+1][j] ),
            .i1  ( pd1[i+1][j] ),
            .i1  ( pd1[i+1][j] ),
            .i2  ( pd2[i+1][j] ),
            .i2  ( pd2[i+1][j] ),
            .i3  ( pd3[i+1][j] ),
            .i3  ( pd3[i+1][j] ),
            .i4  ( pd4[i+1][j] ),
            //.i4  ( pd4[i+1][j] ),
            .oa  ( pdan[i][j]  )
            .oa  ( pdan[i][j]  )
            );
            );
 
 
 
         pipen #(.DW(1))
 
         PEoF (
 
               .d_in_a  (             ),
 
               .d_out   ( pd4[i][j]   ),
 
               .d_in    ( pd4[i+1][j] ),
 
               .d_out_a ( pd4an[i][j] )
 
               );
 
 
      end // block: SC
      end // block: SC
 
 
 
 
`else // !`ifdef ENABLE_CHANNEL_SLICING
`else // !`ifdef ENABLE_CHANNEL_SLICING
      pipe4 #(.DW(DW))
      pipe4 #(.DW(DW))
      P (
      P (
         .o0  ( pd0[i]   ),
         .o0  ( pd0[i]   ),
         .o1  ( pd1[i]   ),
         .o1  ( pd1[i]   ),
         .o2  ( pd2[i]   ),
         .o2  ( pd2[i]   ),
         .o3  ( pd3[i]   ),
         .o3  ( pd3[i]   ),
         .o4  ( pd4[i]   ),
         //.o4  ( pd4[i]   ),
         .ia  ( pda[i+1] ),
         .ia  ( pda[i+1] ),
         .i0  ( pd0[i+1] ),
         .i0  ( pd0[i+1] ),
         .i1  ( pd1[i+1] ),
         .i1  ( pd1[i+1] ),
         .i2  ( pd2[i+1] ),
         .i2  ( pd2[i+1] ),
         .i3  ( pd3[i+1] ),
         .i3  ( pd3[i+1] ),
         .i4  ( pd4[i+1] ),
         //.i4  ( pd4[i+1] ),
         .oa  ( pdan[i]  )
         .oa  ( pdan[i]  )
         );
         );
 
 
 
      pipen #(.DW(1))
 
      PEoF (
 
            .d_in_a  (          ),
 
            .d_out   ( pd4[i]   ),
 
            .d_in    ( pd4[i+1] ),
 
            .d_out_a ( pd4an[i] )
 
            );
 
 
`endif // !`ifdef ENABLE_CHANNEL_SLICING
`endif // !`ifdef ENABLE_CHANNEL_SLICING
   end // block: DP
   end // block: DP
   endgenerate
   endgenerate
 
 
   generate for(i=1; i<PD; i++) begin: DPA
   generate for(i=1; i<PD; i++) begin: DPA
      assign pdan[i] = rst_n ? ~(pda[i]|pd4[i-1]) : 0;
      assign pdan[i] = rst_n ? ~(pda[i]|pd4[i-1]) : 0;
 
      assign pd4an[i] = pdan[i];
   end
   end
   endgenerate
   endgenerate
 
 
   assign ia = pda[PD]|pd4[PD-1];
   assign ia = pda[PD]|pd4[PD-1];
   assign pd0[PD] = i0;
   assign pd0[PD] = i0;
Line 208... Line 228...
                      .eof      ( pd4[0][j]   ),
                      .eof      ( pd4[0][j]   ),
                      .rt_ra    ( rt_ack      ),
                      .rt_ra    ( rt_ack      ),
                      .rt_err   ( rt_err      ),
                      .rt_err   ( rt_err      ),
                      .rst_n    ( rst_n       )
                      .rst_n    ( rst_n       )
                      );
                      );
 
      assign pd4an[0][j] = pdan[0][j];
   end // block: SC
   end // block: SC
`else // !`ifdef ENABLE_CHANNEL_SLICING
`else // !`ifdef ENABLE_CHANNEL_SLICING
   subc_ctl SCH_C (
   subc_ctl SCH_C (
                   .nack     ( pdan[0]  ),
                   .nack     ( pdan[0]  ),
                   .rt_rst   ( rtrst    ),
                   .rt_rst   ( rtrst    ),
Line 220... Line 241...
                   .eof      ( pd4[0]   ),
                   .eof      ( pd4[0]   ),
                   .rt_ra    ( rt_ack   ),
                   .rt_ra    ( rt_ack   ),
                   .rt_err   ( rt_err   ),
                   .rt_err   ( rt_err   ),
                   .rst_n    ( rst_n    )
                   .rst_n    ( rst_n    )
                   );
                   );
 
   assign pd4an[0] = pdan[0];
`endif // !`ifdef ENABLE_CHANNEL_SLICING
`endif // !`ifdef ENABLE_CHANNEL_SLICING
 
 
   // the router controller part
   // the router controller part
   assign rten = ~rt_ack;
   assign rten = ~rt_ack;
   assign frame_end = &rtrst;
   assign frame_end = &rtrst;

powered by: WebSVN 2.1.0

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