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

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [branches/] [clos_opt/] [vc/] [src/] [router.v] - Diff between revs 47 and 57

Only display areas with differences | Details | Blame | View Log

Rev 47 Rev 57
/*
/*
 Asynchronous SDM NoC
 Asynchronous SDM NoC
 (C)2011 Wei Song
 (C)2011 Wei Song
 Advanced Processor Technologies Group
 Advanced Processor Technologies Group
 Computer Science, the Univ. of Manchester, UK
 Computer Science, the Univ. of Manchester, UK
 
 
 Authors:
 Authors:
 Wei Song     wsong83@gmail.com
 Wei Song     wsong83@gmail.com
 
 
 License: LGPL 3.0 or later
 License: LGPL 3.0 or later
 
 
 Asynchronous VC router.
 Asynchronous VC router.
 
 
 History:
 History:
 05/04/2010  Initial version. <wsong83@gmail.com>
 05/04/2010  Initial version. <wsong83@gmail.com>
 02/06/2011  Clean up for opensource. <wsong83@gmail.com>
 02/06/2011  Clean up for opensource. <wsong83@gmail.com>
 
 
*/
*/
 
 
module router (/*AUTOARG*/
module router (/*AUTOARG*/
   // Outputs
   // Outputs
   sia, wia, nia, eia, lia, sic, wic, nic, eic, lic, so0, so1, so2,
   sia, wia, nia, eia, lia, sic, wic, nic, eic, lic, so0, so1, so2,
   so3, wo0, wo1, wo2, wo3, no0, no1, no2, no3, eo0, eo1, eo2, eo3,
   so3, wo0, wo1, wo2, wo3, no0, no1, no2, no3, eo0, eo1, eo2, eo3,
   lo0, lo1, lo2, lo3, soft, woft, noft, eoft, loft, sovc, wovc, novc,
   lo0, lo1, lo2, lo3, soft, woft, noft, eoft, loft, sovc, wovc, novc,
   eovc, lovc, soca, woca, noca, eoca, loca,
   eovc, lovc, soca, woca, noca, eoca, loca,
   // Inputs
   // Inputs
   si0, si1, si2, si3, wi0, wi1, wi2, wi3, ni0, ni1, ni2, ni3, ei0,
   si0, si1, si2, si3, wi0, wi1, wi2, wi3, ni0, ni1, ni2, ni3, ei0,
   ei1, ei2, ei3, li0, li1, li2, li3, sift, wift, nift, eift, lift,
   ei1, ei2, ei3, li0, li1, li2, li3, sift, wift, nift, eift, lift,
   sivc, wivc, nivc, eivc, livc, sica, wica, nica, eica, lica, soa,
   sivc, wivc, nivc, eivc, livc, sica, wica, nica, eica, lica, soa,
   woa, noa, eoa, loa, soc, woc, noc, eoc, loc, addrx, addry, rst_n
   woa, noa, eoa, loa, soc, woc, noc, eoc, loc, addrx, addry, rst_n
   );
   );
 
 
   parameter VCN = 2;           // number of VCs per direction
   parameter VCN = 2;           // number of VCs per direction
   parameter DW = 32;           // data width of an input port
   parameter DW = 32;           // data width of an input port
   parameter PD = 1;            // the depth of a input VC buffer
   parameter PD = 1;            // the depth of a input VC buffer
   parameter FT = 3;            // the number of flit types, currently 3 (HD, DATA, TAIL)
   parameter FT = 3;            // the number of flit types, currently 3 (HD, DATA, TAIL)
 
 
   parameter FCPD = PD;
   parameter FCPD = PD;
   parameter SCN = DW/2;
   parameter SCN = DW/2;
 
 
   // input ports
   // input ports
   input [SCN-1:0]    si0, si1, si2, si3;
   input [SCN-1:0]    si0, si1, si2, si3;
   input [SCN-1:0]    wi0, wi1, wi2, wi3;
   input [SCN-1:0]    wi0, wi1, wi2, wi3;
   input [SCN-1:0]    ni0, ni1, ni2, ni3;
   input [SCN-1:0]    ni0, ni1, ni2, ni3;
   input [SCN-1:0]    ei0, ei1, ei2, ei3;
   input [SCN-1:0]    ei0, ei1, ei2, ei3;
   input [SCN-1:0]    li0, li1, li2, li3;
   input [SCN-1:0]    li0, li1, li2, li3;
   input [FT-1:0]     sift, wift, nift, eift, lift;
   input [FT-1:0]     sift, wift, nift, eift, lift;
   input [VCN-1:0]    sivc, wivc, nivc, eivc, livc;
   input [VCN-1:0]    sivc, wivc, nivc, eivc, livc;
   output             sia, wia, nia, eia, lia;
   output             sia, wia, nia, eia, lia;
   output [VCN-1:0]   sic, wic, nic, eic, lic;
   output [VCN-1:0]   sic, wic, nic, eic, lic;
   input [VCN-1:0]    sica, wica, nica, eica, lica;
   input [VCN-1:0]    sica, wica, nica, eica, lica;
 
 
   // output ports
   // output ports
   output [SCN-1:0]   so0, so1, so2, so3;
   output [SCN-1:0]   so0, so1, so2, so3;
   output [SCN-1:0]   wo0, wo1, wo2, wo3;
   output [SCN-1:0]   wo0, wo1, wo2, wo3;
   output [SCN-1:0]   no0, no1, no2, no3;
   output [SCN-1:0]   no0, no1, no2, no3;
   output [SCN-1:0]   eo0, eo1, eo2, eo3;
   output [SCN-1:0]   eo0, eo1, eo2, eo3;
   output [SCN-1:0]   lo0, lo1, lo2, lo3;
   output [SCN-1:0]   lo0, lo1, lo2, lo3;
   output [FT-1:0]    soft, woft, noft, eoft, loft;
   output [FT-1:0]    soft, woft, noft, eoft, loft;
   output [VCN-1:0]   sovc, wovc, novc, eovc, lovc;
   output [VCN-1:0]   sovc, wovc, novc, eovc, lovc;
   input              soa, woa, noa, eoa, loa;
   input              soa, woa, noa, eoa, loa;
   input [VCN-1:0]    soc, woc, noc, eoc, loc;
   input [VCN-1:0]    soc, woc, noc, eoc, loc;
   output [VCN-1:0]   soca, woca, noca, eoca, loca;
   output [VCN-1:0]   soca, woca, noca, eoca, loca;
 
 
   // local address, in 1-of-4 format
   // local address, in 1-of-4 format
   input [7:0]         addrx, addry;
   input [7:0]         addrx, addry;
   // active-low reset
   // active-low reset
   input              rst_n;
   input              rst_n;
 
 
   //----------------------------------
   //----------------------------------
   // input to crossbar
   // input to crossbar
   wire [VCN-1:0][SCN-1:0]     s2cb0, s2cb1, s2cb2, s2cb3;
   wire [VCN-1:0][SCN-1:0]     s2cb0, s2cb1, s2cb2, s2cb3;
   wire [VCN-1:0][SCN-1:0]     w2cb0, w2cb1, w2cb2, w2cb3;
   wire [VCN-1:0][SCN-1:0]     w2cb0, w2cb1, w2cb2, w2cb3;
   wire [VCN-1:0][SCN-1:0]     n2cb0, n2cb1, n2cb2, n2cb3;
   wire [VCN-1:0][SCN-1:0]     n2cb0, n2cb1, n2cb2, n2cb3;
   wire [VCN-1:0][SCN-1:0]     e2cb0, e2cb1, e2cb2, e2cb3;
   wire [VCN-1:0][SCN-1:0]     e2cb0, e2cb1, e2cb2, e2cb3;
   wire [VCN-1:0][SCN-1:0]     l2cb0, l2cb1, l2cb2, l2cb3;
   wire [VCN-1:0][SCN-1:0]     l2cb0, l2cb1, l2cb2, l2cb3;
   wire [VCN-1:0][FT-1:0]      s2cbt, w2cbt, n2cbt, e2cbt, l2cbt;
   wire [VCN-1:0][FT-1:0]      s2cbt, w2cbt, n2cbt, e2cbt, l2cbt;
   wire [VCN-1:0][3:0]           s2cbrtg, n2cbrtg, l2cbrtg;
   wire [VCN-1:0][3:0]           s2cbrtg, n2cbrtg, l2cbrtg;
   wire [VCN-1:0][1:0]           w2cbrtg, e2cbrtg;
   wire [VCN-1:0][1:0]           w2cbrtg, e2cbrtg;
   wire [VCN-1:0]               s2cba, w2cba, n2cba, e2cba, l2cba;
   wire [VCN-1:0]               s2cba, w2cba, n2cba, e2cba, l2cba;
 
 
   // VC requests
   // VC requests
   wire [VCN-1:0][3:0] svcr, nvcr, lvcr;
   wire [VCN-1:0][3:0] svcr, nvcr, lvcr;
   wire [VCN-1:0]      svcra, nvcra, lvcra;
   wire [VCN-1:0]      svcra, nvcra, lvcra;
   wire [VCN-1:0][1:0] wvcr, evcr;
   wire [VCN-1:0][1:0] wvcr, evcr;
   wire [VCN-1:0]      wvcra, evcra;
   wire [VCN-1:0]      wvcra, evcra;
 
 
   // SW requests
   // SW requests
   wire [VCN-1:0][1:0] siswr, wiswr, niswr, eiswr, liswr;
   wire [VCN-1:0][1:0] siswr, wiswr, niswr, eiswr, liswr;
   wire [VCN-1:0][3:0] siswrt, niswrt, liswrt;
   wire [VCN-1:0][3:0] siswrt, niswrt, liswrt;
   wire [VCN-1:0][1:0] wiswrt, eiswrt;
   wire [VCN-1:0][1:0] wiswrt, eiswrt;
 
 
   // crossbar to output
   // crossbar to output
   wire [SCN-1:0]      cb2s0, cb2s1, cb2s2, cb2s3;
   wire [SCN-1:0]      cb2s0, cb2s1, cb2s2, cb2s3;
   wire [SCN-1:0]      cb2w0, cb2w1, cb2w2, cb2w3;
   wire [SCN-1:0]      cb2w0, cb2w1, cb2w2, cb2w3;
   wire [SCN-1:0]      cb2n0, cb2n1, cb2n2, cb2n3;
   wire [SCN-1:0]      cb2n0, cb2n1, cb2n2, cb2n3;
   wire [SCN-1:0]      cb2e0, cb2e1, cb2e2, cb2e3;
   wire [SCN-1:0]      cb2e0, cb2e1, cb2e2, cb2e3;
   wire [SCN-1:0]      cb2l0, cb2l1, cb2l2, cb2l3;
   wire [SCN-1:0]      cb2l0, cb2l1, cb2l2, cb2l3;
   wire [FT-1:0]       cb2st, cb2wt, cb2nt, cb2et, cb2lt;
   wire [FT-1:0]       cb2st, cb2wt, cb2nt, cb2et, cb2lt;
   wire                cb2sa, cb2wa, cb2na, cb2ea, cb2la;
   wire                cb2sa, cb2wa, cb2na, cb2ea, cb2la;
 
 
   // SW requests to VC arbiters in output buffers
   // SW requests to VC arbiters in output buffers
   wire [VCN-1:0]      soswr, woswr, noswr, eoswr, loswr;
   wire [VCN-1:0]      soswr, woswr, noswr, eoswr, loswr;
   wire [VCN-1:0]      soswa, woswa, noswa, eoswa, loswa;
   wire [VCN-1:0]      soswa, woswa, noswa, eoswa, loswa;
 
 
   //-------------------------------------
   //-------------------------------------
   // south input buffer
   // south input buffer
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(0), .SN(4), .PD(PD), .FT(FT))
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(0), .SN(4), .PD(PD), .FT(FT))
   SIB (
   SIB (
        .dia   ( sia     ),
        .dia   ( sia     ),
        .cor   ( sic     ),
        .cor   ( sic     ),
        .do0   ( s2cb0   ),
        .do0   ( s2cb0   ),
        .do1   ( s2cb1   ),
        .do1   ( s2cb1   ),
        .do2   ( s2cb2   ),
        .do2   ( s2cb2   ),
        .do3   ( s2cb3   ),
        .do3   ( s2cb3   ),
        .dot   ( s2cbt   ),
        .dot   ( s2cbt   ),
        .dortg ( s2cbrtg ),
        .dortg ( s2cbrtg ),
        .vcr   ( svcr    ),
        .vcr   ( svcr    ),
        .swr   ( siswr   ),
        .swr   ( siswr   ),
        .di0   ( si0     ),
        .di0   ( si0     ),
        .di1   ( si1     ),
        .di1   ( si1     ),
        .di2   ( si2     ),
        .di2   ( si2     ),
        .di3   ( si3     ),
        .di3   ( si3     ),
        .dit   ( sift    ),
        .dit   ( sift    ),
        .divc  ( sivc    ),
        .divc  ( sivc    ),
        .coa   ( sica    ),
        .coa   ( sica    ),
        .doa   ( s2cba   ),
        .doa   ( s2cba   ),
        .vcra  ( svcra   ),
        .vcra  ( svcra   ),
        .swrt  ( siswrt  ),
        .swrt  ( siswrt  ),
        .addrx ( addrx   ),
        .addrx ( addrx   ),
        .addry ( addry   ),
        .addry ( addry   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // west input buffer
   // west input buffer
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(1), .SN(2), .PD(PD), .FT(FT))
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(1), .SN(2), .PD(PD), .FT(FT))
   WIB (
   WIB (
        .dia   ( wia     ),
        .dia   ( wia     ),
        .cor   ( wic     ),
        .cor   ( wic     ),
        .do0   ( w2cb0   ),
        .do0   ( w2cb0   ),
        .do1   ( w2cb1   ),
        .do1   ( w2cb1   ),
        .do2   ( w2cb2   ),
        .do2   ( w2cb2   ),
        .do3   ( w2cb3   ),
        .do3   ( w2cb3   ),
        .dot   ( w2cbt   ),
        .dot   ( w2cbt   ),
        .dortg ( w2cbrtg ),
        .dortg ( w2cbrtg ),
        .vcr   ( wvcr    ),
        .vcr   ( wvcr    ),
        .swr   ( wiswr   ),
        .swr   ( wiswr   ),
        .di0   ( wi0     ),
        .di0   ( wi0     ),
        .di1   ( wi1     ),
        .di1   ( wi1     ),
        .di2   ( wi2     ),
        .di2   ( wi2     ),
        .di3   ( wi3     ),
        .di3   ( wi3     ),
        .dit   ( wift    ),
        .dit   ( wift    ),
        .divc  ( wivc    ),
        .divc  ( wivc    ),
        .coa   ( wica    ),
        .coa   ( wica    ),
        .doa   ( w2cba   ),
        .doa   ( w2cba   ),
        .vcra  ( wvcra   ),
        .vcra  ( wvcra   ),
        .swrt  ( wiswrt  ),
        .swrt  ( wiswrt  ),
        .addrx ( addrx   ),
        .addrx ( addrx   ),
        .addry ( addry   ),
        .addry ( addry   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // north input buffer
   // north input buffer
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(2), .SN(4), .PD(PD), .FT(FT))
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(2), .SN(4), .PD(PD), .FT(FT))
   NIB (
   NIB (
        .dia   ( nia     ),
        .dia   ( nia     ),
        .cor   ( nic     ),
        .cor   ( nic     ),
        .do0   ( n2cb0   ),
        .do0   ( n2cb0   ),
        .do1   ( n2cb1   ),
        .do1   ( n2cb1   ),
        .do2   ( n2cb2   ),
        .do2   ( n2cb2   ),
        .do3   ( n2cb3   ),
        .do3   ( n2cb3   ),
        .dot   ( n2cbt   ),
        .dot   ( n2cbt   ),
        .dortg ( n2cbrtg ),
        .dortg ( n2cbrtg ),
        .vcr   ( nvcr    ),
        .vcr   ( nvcr    ),
        .swr   ( niswr   ),
        .swr   ( niswr   ),
        .di0   ( ni0     ),
        .di0   ( ni0     ),
        .di1   ( ni1     ),
        .di1   ( ni1     ),
        .di2   ( ni2     ),
        .di2   ( ni2     ),
        .di3   ( ni3     ),
        .di3   ( ni3     ),
        .dit   ( nift    ),
        .dit   ( nift    ),
        .divc  ( nivc    ),
        .divc  ( nivc    ),
        .coa   ( nica    ),
        .coa   ( nica    ),
        .doa   ( n2cba   ),
        .doa   ( n2cba   ),
        .vcra  ( nvcra   ),
        .vcra  ( nvcra   ),
        .swrt  ( niswrt  ),
        .swrt  ( niswrt  ),
        .addrx ( addrx   ),
        .addrx ( addrx   ),
        .addry ( addry   ),
        .addry ( addry   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // east input buffer
   // east input buffer
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(3), .SN(2), .PD(PD), .FT(FT))
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(3), .SN(2), .PD(PD), .FT(FT))
   EIB (
   EIB (
        .dia   ( eia     ),
        .dia   ( eia     ),
        .cor   ( eic     ),
        .cor   ( eic     ),
        .do0   ( e2cb0   ),
        .do0   ( e2cb0   ),
        .do1   ( e2cb1   ),
        .do1   ( e2cb1   ),
        .do2   ( e2cb2   ),
        .do2   ( e2cb2   ),
        .do3   ( e2cb3   ),
        .do3   ( e2cb3   ),
        .dot   ( e2cbt   ),
        .dot   ( e2cbt   ),
        .dortg ( e2cbrtg ),
        .dortg ( e2cbrtg ),
        .vcr   ( evcr    ),
        .vcr   ( evcr    ),
        .swr   ( eiswr   ),
        .swr   ( eiswr   ),
        .di0   ( ei0     ),
        .di0   ( ei0     ),
        .di1   ( ei1     ),
        .di1   ( ei1     ),
        .di2   ( ei2     ),
        .di2   ( ei2     ),
        .di3   ( ei3     ),
        .di3   ( ei3     ),
        .dit   ( eift    ),
        .dit   ( eift    ),
        .divc  ( eivc    ),
        .divc  ( eivc    ),
        .coa   ( eica    ),
        .coa   ( eica    ),
        .doa   ( e2cba   ),
        .doa   ( e2cba   ),
        .vcra  ( evcra   ),
        .vcra  ( evcra   ),
        .swrt  ( eiswrt  ),
        .swrt  ( eiswrt  ),
        .addrx ( addrx   ),
        .addrx ( addrx   ),
        .addry ( addry   ),
        .addry ( addry   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // local input buffer
   // local input buffer
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(4), .SN(4), .PD(PD), .FT(FT))
   inpbuf #(.DW(DW), .VCN(VCN), .DIR(4), .SN(4), .PD(PD), .FT(FT))
   LIB (
   LIB (
        .dia   ( lia     ),
        .dia   ( lia     ),
        .cor   ( lic     ),
        .cor   ( lic     ),
        .do0   ( l2cb0   ),
        .do0   ( l2cb0   ),
        .do1   ( l2cb1   ),
        .do1   ( l2cb1   ),
        .do2   ( l2cb2   ),
        .do2   ( l2cb2   ),
        .do3   ( l2cb3   ),
        .do3   ( l2cb3   ),
        .dot   ( l2cbt   ),
        .dot   ( l2cbt   ),
        .dortg ( l2cbrtg ),
        .dortg ( l2cbrtg ),
        .vcr   ( lvcr    ),
        .vcr   ( lvcr    ),
        .swr   ( liswr   ),
        .swr   ( liswr   ),
        .di0   ( li0     ),
        .di0   ( li0     ),
        .di1   ( li1     ),
        .di1   ( li1     ),
        .di2   ( li2     ),
        .di2   ( li2     ),
        .di3   ( li3     ),
        .di3   ( li3     ),
        .dit   ( lift    ),
        .dit   ( lift    ),
        .divc  ( livc    ),
        .divc  ( livc    ),
        .coa   ( lica    ),
        .coa   ( lica    ),
        .doa   ( l2cba   ),
        .doa   ( l2cba   ),
        .vcra  ( lvcra   ),
        .vcra  ( lvcra   ),
        .swrt  ( liswrt  ),
        .swrt  ( liswrt  ),
        .addrx ( addrx   ),
        .addrx ( addrx   ),
        .addry ( addry   ),
        .addry ( addry   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // south output buffer
   // south output buffer
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   SOB (
   SOB (
        .dia   ( cb2sa   ),
        .dia   ( cb2sa   ),
        .do0   ( so0     ),
        .do0   ( so0     ),
        .do1   ( so1     ),
        .do1   ( so1     ),
        .do2   ( so2     ),
        .do2   ( so2     ),
        .do3   ( so3     ),
        .do3   ( so3     ),
        .dot   ( soft    ),
        .dot   ( soft    ),
        .dovc  ( sovc    ),
        .dovc  ( sovc    ),
        .afc   ( soca    ),
        .afc   ( soca    ),
        .vca   ( soswa   ),
        .vca   ( soswa   ),
        .di0   ( cb2s0   ),
        .di0   ( cb2s0   ),
        .di1   ( cb2s1   ),
        .di1   ( cb2s1   ),
        .di2   ( cb2s2   ),
        .di2   ( cb2s2   ),
        .di3   ( cb2s3   ),
        .di3   ( cb2s3   ),
        .dit   ( cb2st   ),
        .dit   ( cb2st   ),
        .doa   ( soa     ),
        .doa   ( soa     ),
        .credit( soc     ),
        .credit( soc     ),
        .vcr   ( soswr   ),
        .vcr   ( soswr   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // west output buffer
   // west output buffer
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   WOB (
   WOB (
        .dia   ( cb2wa   ),
        .dia   ( cb2wa   ),
        .do0   ( wo0     ),
        .do0   ( wo0     ),
        .do1   ( wo1     ),
        .do1   ( wo1     ),
        .do2   ( wo2     ),
        .do2   ( wo2     ),
        .do3   ( wo3     ),
        .do3   ( wo3     ),
        .dot   ( woft    ),
        .dot   ( woft    ),
        .dovc  ( wovc    ),
        .dovc  ( wovc    ),
        .afc   ( woca    ),
        .afc   ( woca    ),
        .vca   ( woswa   ),
        .vca   ( woswa   ),
        .di0   ( cb2w0   ),
        .di0   ( cb2w0   ),
        .di1   ( cb2w1   ),
        .di1   ( cb2w1   ),
        .di2   ( cb2w2   ),
        .di2   ( cb2w2   ),
        .di3   ( cb2w3   ),
        .di3   ( cb2w3   ),
        .dit   ( cb2wt   ),
        .dit   ( cb2wt   ),
        .doa   ( woa     ),
        .doa   ( woa     ),
        .credit( woc     ),
        .credit( woc     ),
        .vcr   ( woswr   ),
        .vcr   ( woswr   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // north output buffer
   // north output buffer
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   NOB (
   NOB (
        .dia   ( cb2na   ),
        .dia   ( cb2na   ),
        .do0   ( no0     ),
        .do0   ( no0     ),
        .do1   ( no1     ),
        .do1   ( no1     ),
        .do2   ( no2     ),
        .do2   ( no2     ),
        .do3   ( no3     ),
        .do3   ( no3     ),
        .dot   ( noft    ),
        .dot   ( noft    ),
        .dovc  ( novc    ),
        .dovc  ( novc    ),
        .afc   ( noca    ),
        .afc   ( noca    ),
        .vca   ( noswa   ),
        .vca   ( noswa   ),
        .di0   ( cb2n0   ),
        .di0   ( cb2n0   ),
        .di1   ( cb2n1   ),
        .di1   ( cb2n1   ),
        .di2   ( cb2n2   ),
        .di2   ( cb2n2   ),
        .di3   ( cb2n3   ),
        .di3   ( cb2n3   ),
        .dit   ( cb2nt   ),
        .dit   ( cb2nt   ),
        .doa   ( noa     ),
        .doa   ( noa     ),
        .credit( noc     ),
        .credit( noc     ),
        .vcr   ( noswr   ),
        .vcr   ( noswr   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // east output buffer
   // east output buffer
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   EOB (
   EOB (
        .dia   ( cb2ea   ),
        .dia   ( cb2ea   ),
        .do0   ( eo0     ),
        .do0   ( eo0     ),
        .do1   ( eo1     ),
        .do1   ( eo1     ),
        .do2   ( eo2     ),
        .do2   ( eo2     ),
        .do3   ( eo3     ),
        .do3   ( eo3     ),
        .dot   ( eoft    ),
        .dot   ( eoft    ),
        .dovc  ( eovc    ),
        .dovc  ( eovc    ),
        .afc   ( eoca    ),
        .afc   ( eoca    ),
        .vca   ( eoswa   ),
        .vca   ( eoswa   ),
        .di0   ( cb2e0   ),
        .di0   ( cb2e0   ),
        .di1   ( cb2e1   ),
        .di1   ( cb2e1   ),
        .di2   ( cb2e2   ),
        .di2   ( cb2e2   ),
        .di3   ( cb2e3   ),
        .di3   ( cb2e3   ),
        .dit   ( cb2et   ),
        .dit   ( cb2et   ),
        .doa   ( eoa     ),
        .doa   ( eoa     ),
        .credit( eoc     ),
        .credit( eoc     ),
        .vcr   ( eoswr   ),
        .vcr   ( eoswr   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // east output buffer
   // east output buffer
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   outpbuf #(.DW(DW), .VCN(VCN), .FT(FT), .FCPD(FCPD))
   LOB (
   LOB (
        .dia   ( cb2la   ),
        .dia   ( cb2la   ),
        .do0   ( lo0     ),
        .do0   ( lo0     ),
        .do1   ( lo1     ),
        .do1   ( lo1     ),
        .do2   ( lo2     ),
        .do2   ( lo2     ),
        .do3   ( lo3     ),
        .do3   ( lo3     ),
        .dot   ( loft    ),
        .dot   ( loft    ),
        .dovc  ( lovc    ),
        .dovc  ( lovc    ),
        .afc   ( loca    ),
        .afc   ( loca    ),
        .vca   ( loswa   ),
        .vca   ( loswa   ),
        .di0   ( cb2l0   ),
        .di0   ( cb2l0   ),
        .di1   ( cb2l1   ),
        .di1   ( cb2l1   ),
        .di2   ( cb2l2   ),
        .di2   ( cb2l2   ),
        .di3   ( cb2l3   ),
        .di3   ( cb2l3   ),
        .dit   ( cb2lt   ),
        .dit   ( cb2lt   ),
        .doa   ( loa     ),
        .doa   ( loa     ),
        .credit( loc     ),
        .credit( loc     ),
        .vcr   ( loswr   ),
        .vcr   ( loswr   ),
        .rst_n ( rst_n   )
        .rst_n ( rst_n   )
        );
        );
 
 
   // VC allocator
   // VC allocator
   vcalloc #(.VCN(VCN))
   vcalloc #(.VCN(VCN))
   ALLOC (
   ALLOC (
          .svcra   ( svcra   ),
          .svcra   ( svcra   ),
          .wvcra   ( wvcra   ),
          .wvcra   ( wvcra   ),
          .nvcra   ( nvcra   ),
          .nvcra   ( nvcra   ),
          .evcra   ( evcra   ),
          .evcra   ( evcra   ),
          .lvcra   ( lvcra   ),
          .lvcra   ( lvcra   ),
          .sswa    ( siswrt  ),
          .sswa    ( siswrt  ),
          .wswa    ( wiswrt  ),
          .wswa    ( wiswrt  ),
          .nswa    ( niswrt  ),
          .nswa    ( niswrt  ),
          .eswa    ( eiswrt  ),
          .eswa    ( eiswrt  ),
          .lswa    ( liswrt  ),
          .lswa    ( liswrt  ),
          .sosr    ( soswr   ),
          .sosr    ( soswr   ),
          .wosr    ( woswr   ),
          .wosr    ( woswr   ),
          .nosr    ( noswr   ),
          .nosr    ( noswr   ),
          .eosr    ( eoswr   ),
          .eosr    ( eoswr   ),
          .losr    ( loswr   ),
          .losr    ( loswr   ),
          .svcr    ( svcr    ),
          .svcr    ( svcr    ),
          .nvcr    ( nvcr    ),
          .nvcr    ( nvcr    ),
          .lvcr    ( lvcr    ),
          .lvcr    ( lvcr    ),
          .wvcr    ( wvcr    ),
          .wvcr    ( wvcr    ),
          .evcr    ( evcr    ),
          .evcr    ( evcr    ),
          .sswr    ( siswr   ),
          .sswr    ( siswr   ),
          .wswr    ( wiswr   ),
          .wswr    ( wiswr   ),
          .nswr    ( niswr   ),
          .nswr    ( niswr   ),
          .eswr    ( eiswr   ),
          .eswr    ( eiswr   ),
          .lswr    ( liswr   ),
          .lswr    ( liswr   ),
          .sosa    ( soswa   ),
          .sosa    ( soswa   ),
          .wosa    ( woswa   ),
          .wosa    ( woswa   ),
          .nosa    ( noswa   ),
          .nosa    ( noswa   ),
          .eosa    ( eoswa   ),
          .eosa    ( eoswa   ),
          .losa    ( loswa   ),
          .losa    ( loswa   ),
          .rst_n   ( rst_n   )
          .rst_n   ( rst_n   )
          );
          );
 
 
   // crossbar
   // crossbar
   dcb_vc #(.DW(DW), .FT(FT), .VCN(VCN))
   dcb_vc #(.DW(DW), .FT(FT), .VCN(VCN))
   CB (
   CB (
       .dia   ( {l2cba, e2cba, n2cba, w2cba, s2cba} ),
       .dia   ( {l2cba, e2cba, n2cba, w2cba, s2cba} ),
       .do0   ( {cb2l0, cb2e0, cb2n0, cb2w0, cb2s0} ),
       .do0   ( {cb2l0, cb2e0, cb2n0, cb2w0, cb2s0} ),
       .do1   ( {cb2l1, cb2e1, cb2n1, cb2w1, cb2s1} ),
       .do1   ( {cb2l1, cb2e1, cb2n1, cb2w1, cb2s1} ),
       .do2   ( {cb2l2, cb2e2, cb2n2, cb2w2, cb2s2} ),
       .do2   ( {cb2l2, cb2e2, cb2n2, cb2w2, cb2s2} ),
       .do3   ( {cb2l3, cb2e3, cb2n3, cb2w3, cb2s3} ),
       .do3   ( {cb2l3, cb2e3, cb2n3, cb2w3, cb2s3} ),
       .dot   ( {cb2lt, cb2et, cb2nt, cb2wt, cb2st} ),
       .dot   ( {cb2lt, cb2et, cb2nt, cb2wt, cb2st} ),
       .di0   ( {l2cb0, e2cb0, n2cb0, w2cb0, s2cb0} ),
       .di0   ( {l2cb0, e2cb0, n2cb0, w2cb0, s2cb0} ),
       .di1   ( {l2cb1, e2cb1, n2cb1, w2cb1, s2cb1} ),
       .di1   ( {l2cb1, e2cb1, n2cb1, w2cb1, s2cb1} ),
       .di2   ( {l2cb2, e2cb2, n2cb2, w2cb2, s2cb2} ),
       .di2   ( {l2cb2, e2cb2, n2cb2, w2cb2, s2cb2} ),
       .di3   ( {l2cb3, e2cb3, n2cb3, w2cb3, s2cb3} ),
       .di3   ( {l2cb3, e2cb3, n2cb3, w2cb3, s2cb3} ),
       .dit   ( {l2cbt, e2cbt, n2cbt, w2cbt, s2cbt} ),
       .dit   ( {l2cbt, e2cbt, n2cbt, w2cbt, s2cbt} ),
       .srtg  ( s2cbrtg                             ),
       .srtg  ( s2cbrtg                             ),
       .nrtg  ( n2cbrtg                             ),
       .nrtg  ( n2cbrtg                             ),
       .lrtg  ( l2cbrtg                             ),
       .lrtg  ( l2cbrtg                             ),
       .wrtg  ( w2cbrtg                             ),
       .wrtg  ( w2cbrtg                             ),
       .ertg  ( e2cbrtg                             ),
       .ertg  ( e2cbrtg                             ),
       .doa   ( {cb2la, cb2ea, cb2na, cb2wa, cb2sa} )
       .doa   ( {cb2la, cb2ea, cb2na, cb2wa, cb2sa} )
       );
       );
 
 
endmodule // router
endmodule // router
 
 
 
 
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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