예제 #1
0
            public Path(ISlimMuxAdapter <Tn, Tp, Tf> a, Pipe[] segments)
            {
                Debug.Assert(segments.Skip(1).All(s => s.GetDelay(a) >= 1));

                _a       = a;
                Segments = segments;
            }
예제 #2
0
 public override Tp Realize(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     if (!IsRealized)
     {
         RealPipe   = a.AddPipe(Source.Realize(a), Sink.Realize(a), Delay);
         IsRealized = true;
     }
     return(RealPipe);
 }
예제 #3
0
            public InsertionHop(ISlimMuxAdapter <Tn, Tp, Tf> a, Pipe orgPipe, long predDelay, long succDelay)
            {
                Debug.Assert(orgPipe.GetDelay(a) == predDelay + succDelay);

                OrgPipe    = orgPipe;
                PredDelay  = predDelay;
                SuccDelay  = succDelay;
                _leftPipe  = new LPipe(orgPipe.GetSource(a), this, predDelay);
                _rightPipe = new LPipe(this, orgPipe.GetSink(a), succDelay);
            }
예제 #4
0
 public override Tn Realize(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     if (!IsRealized)
     {
         Tn mid;
         Tp orgPipe = OrgPipe.Realize(a);
         Tp left, right;
         a.SplitPipe(orgPipe, PredDelay, SuccDelay, out mid, out left, out right);
         RealNode = mid;
         _leftPipe.SetInst(left);
         _rightPipe.SetInst(right);
         IsRealized = true;
     }
     return(RealNode);
 }
예제 #5
0
 public abstract Tp Realize(ISlimMuxAdapter <Tn, Tp, Tf> a);
예제 #6
0
 private SlimMux(ISlimMuxAdapter <Tn, Tp, Tf> a, IEnumerable <Tf> flows)
 {
     _a                = a;
     _flows            = flows;
     PreferredMuxFanIn = 4;
 }
예제 #7
0
 public override Hop GetSink(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     return(Sink);
 }
예제 #8
0
 public override Hop GetSource(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     return(Source);
 }
예제 #9
0
        public static void ConstructInterconnect(ISlimMuxAdapter <Tn, Tp, Tf> a, IEnumerable <Tf> flows)
        {
            var slimmux = new SlimMux <Tn, Tp, Tf>(a, flows);

            slimmux.Run();
        }
예제 #10
0
 public abstract Hop GetSink(ISlimMuxAdapter <Tn, Tp, Tf> a);
예제 #11
0
 public override Tp Realize(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     Sink.Realize(a);
     return(_inst);
 }
예제 #12
0
 public override Hop GetSink(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     return((RealHop)a.Sink[_pipe]);
 }
예제 #13
0
 public override long GetDelay(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     return(a.Delay[_pipe]);
 }
예제 #14
0
 public override Tp Realize(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     return(Inst);
 }
예제 #15
0
 public abstract long GetDelay(ISlimMuxAdapter <Tn, Tp, Tf> a);
예제 #16
0
 public abstract Hop GetSource(ISlimMuxAdapter <Tn, Tp, Tf> a);
예제 #17
0
 public override long GetDelay(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     return(Delay);
 }
예제 #18
0
 public string ToString(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     return(GetSource(a) + "-{" + GetDelay(a) + "}-" + GetSink(a));
 }
예제 #19
0
 public override Tn Realize(ISlimMuxAdapter <Tn, Tp, Tf> a)
 {
     return(Node);
 }