public Path(ISlimMuxAdapter <Tn, Tp, Tf> a, Pipe[] segments) { Debug.Assert(segments.Skip(1).All(s => s.GetDelay(a) >= 1)); _a = a; Segments = segments; }
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); }
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); }
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); }
public abstract Tp Realize(ISlimMuxAdapter <Tn, Tp, Tf> a);
private SlimMux(ISlimMuxAdapter <Tn, Tp, Tf> a, IEnumerable <Tf> flows) { _a = a; _flows = flows; PreferredMuxFanIn = 4; }
public override Hop GetSink(ISlimMuxAdapter <Tn, Tp, Tf> a) { return(Sink); }
public override Hop GetSource(ISlimMuxAdapter <Tn, Tp, Tf> a) { return(Source); }
public static void ConstructInterconnect(ISlimMuxAdapter <Tn, Tp, Tf> a, IEnumerable <Tf> flows) { var slimmux = new SlimMux <Tn, Tp, Tf>(a, flows); slimmux.Run(); }
public abstract Hop GetSink(ISlimMuxAdapter <Tn, Tp, Tf> a);
public override Tp Realize(ISlimMuxAdapter <Tn, Tp, Tf> a) { Sink.Realize(a); return(_inst); }
public override Hop GetSink(ISlimMuxAdapter <Tn, Tp, Tf> a) { return((RealHop)a.Sink[_pipe]); }
public override long GetDelay(ISlimMuxAdapter <Tn, Tp, Tf> a) { return(a.Delay[_pipe]); }
public override Tp Realize(ISlimMuxAdapter <Tn, Tp, Tf> a) { return(Inst); }
public abstract long GetDelay(ISlimMuxAdapter <Tn, Tp, Tf> a);
public abstract Hop GetSource(ISlimMuxAdapter <Tn, Tp, Tf> a);
public override long GetDelay(ISlimMuxAdapter <Tn, Tp, Tf> a) { return(Delay); }
public string ToString(ISlimMuxAdapter <Tn, Tp, Tf> a) { return(GetSource(a) + "-{" + GetDelay(a) + "}-" + GetSink(a)); }
public override Tn Realize(ISlimMuxAdapter <Tn, Tp, Tf> a) { return(Node); }