Esempio n. 1
0
 public Router_Flit(Coord myCoord)
     : base(myCoord)
 {
     m_injectSlot  = null;
     m_injectSlot2 = null;
     rBuf = new ResubBuffer();
 }
Esempio n. 2
0
 public Router_Flit(Coord myCoord)
     : base(myCoord)
 {
     m_injectSlot  = null;
     m_injectSlot2 = null;
     rBuf          = new ResubBuffer();
 }
Esempio n. 3
0
 public Connector(RingCoord rc, bool isNode)
     : base(rc, isNode)
 {
     routerName          = "Ring Connector";
     ringCoord           = rc;
     connectionDirection = Simulator.DIR_NONE;
     injectPlaceholder   = 0;
     rBuf = new ResubBuffer(3);
 }
Esempio n. 4
0
        public SortNet_CALF_FBFLY(SortNode.Rank r, Router router)
        {
            // 4x4 sorting network
            nodes = new SortNode[12];

            // Domain 1 (x-axis) goes 0. Domain 2 (y-axis) goes 1.
            SortNode.Steer crossDomain = delegate(Flit f)
            {
                if (f == null)
                {
                    return(0);
                }
                return((f.prefDir <= Simulator.DIR_X_3)?0:1);
            };

            // within first half domain, goes 0; otherwise goes 1.
            SortNode.Steer intraDomain = delegate(Flit f)
            {
                if (f == null)
                {
                    return(0);
                }
                return((f.prefDir % 4 < 2)?0:1);
            };

            // even channel number (e.g. DIR_X_0) goes 0; otherwise goes 1.
            SortNode.Steer evenSteer = delegate(Flit f)
            {
                if (f == null)
                {
                    return(0);
                }
                return((f.prefDir % 2 == 0)?0:1);
            };

            for (int i = 0; i < 4; i++)
            {
                nodes[i]     = new SortNode(crossDomain, r);
                nodes[i + 4] = new SortNode(intraDomain, r);
                nodes[i + 8] = new SortNode(evenSteer, r);
            }

            LOCAL_INDEX           = Router.LOCAL_INDEX;
            TOTAL_DIR             = Router.TOTAL_DIR;
            coord                 = router.coord;
            loopBackX             = null;
            loopBackY             = null;
            rbuf                  = new ResubBuffer();
            rb_inject_block_count = 0;
        }
Esempio n. 5
0
        public SortNet_CALF(SortNode.Rank r)
        {
            nodes = new SortNode[4];

            SortNode.Steer stage1_steer = delegate(Flit f)
            {
                if (f == null)
                {
                    return(0);
                }

                return((f.prefDir == Simulator.DIR_UP || f.prefDir == Simulator.DIR_DOWN) ?
                       0 : // NS switch
                       1); // EW switch
            };

            // node 0: {N,E} -> {NS, EW}
            nodes[0] = new SortNode(stage1_steer, r);
            // node 1: {S,W} -> {NS, EW}
            nodes[1] = new SortNode(stage1_steer, r);

            // node 2: {in_top,in_bottom} -> {N,S}
            nodes[2] = new SortNode(delegate(Flit f)
            {
                if (f == null)
                {
                    return(0);
                }
                return((f.prefDir == Simulator.DIR_UP) ? 0 : 1);
            }, r);
            // node 3: {in_top,in_bottm} -> {E,W}
            nodes[3] = new SortNode(delegate(Flit f)
            {
                if (f == null)
                {
                    return(0);
                }
                return((f.prefDir == Simulator.DIR_RIGHT) ? 0 : 1);
            }, r);

            rbuf                  = new ResubBuffer();
            TOTAL_DIR             = 4;
            rb_inject_block_count = 0;
        }
Esempio n. 6
0
        public SortNet_CALF_FBFLY(SortNode.Rank r, Router router)
        {
            // 4x4 sorting network
            nodes = new SortNode[12];

            // Domain 1 (x-axis) goes 0. Domain 2 (y-axis) goes 1.
            SortNode.Steer crossDomain = delegate(Flit f)
            {
                if (f == null)
                    return 0;
                return (f.prefDir <= Simulator.DIR_X_3)?0:1;
            };

            // within first half domain, goes 0; otherwise goes 1.
            SortNode.Steer intraDomain = delegate(Flit f)
            {
                if (f == null)
                    return 0;
                return (f.prefDir%4 < 2)?0:1;
            };

            // even channel number (e.g. DIR_X_0) goes 0; otherwise goes 1.
            SortNode.Steer evenSteer = delegate(Flit f)
            {
                if (f == null)
                    return 0;
                return (f.prefDir%2 == 0)?0:1;
            };
           
            for (int i = 0; i < 4; i++)
            {
                nodes[i]   = new SortNode(crossDomain, r);
                nodes[i+4] = new SortNode(intraDomain, r);
                nodes[i+8] = new SortNode(evenSteer, r);
            }

            LOCAL_INDEX = Router.LOCAL_INDEX;
            TOTAL_DIR   = Router.TOTAL_DIR;
            coord       = router.coord;
            loopBackX   = null;
            loopBackY   = null;
            rbuf        = new ResubBuffer();
            rb_inject_block_count = 0;
        }
Esempio n. 7
0
        public SortNet_CALF(SortNode.Rank r)
        {
            nodes = new SortNode[4];

            SortNode.Steer stage1_steer = delegate(Flit f)
            {
                if (f == null)
                    return 0;

                return (f.prefDir == Simulator.DIR_UP || f.prefDir == Simulator.DIR_DOWN) ?
                    0 : // NS switch
                    1;  // EW switch
            };
           
            // node 0: {N,E} -> {NS, EW}
            nodes[0] = new SortNode(stage1_steer, r);
            // node 1: {S,W} -> {NS, EW}
            nodes[1] = new SortNode(stage1_steer, r);

            // node 2: {in_top,in_bottom} -> {N,S}
            nodes[2] = new SortNode(delegate(Flit f)
                    {
                        if (f == null) return 0;
                        return (f.prefDir == Simulator.DIR_UP) ? 0 : 1;
                    }, r);
            // node 3: {in_top,in_bottm} -> {E,W}
            nodes[3] = new SortNode(delegate(Flit f)
                    {
                        if (f == null) return 0;
                        return (f.prefDir == Simulator.DIR_RIGHT) ? 0 : 1;
                    }, r);

            rbuf = new ResubBuffer();
            TOTAL_DIR = 4;
            rb_inject_block_count = 0;
        }