private void CreateStagedInterconnect(FlowMatrix flowSpec, FlowMatrix detailedFlow) { flowSpec.Transitize(); detailedFlow.AddNeutral(flowSpec.NeutralFlow); var tflows = flowSpec.GetTimedFlows(); var grouped = tflows.GroupBy(tf => tf.Target); foreach (var group in grouped) { var net = ConstructNetwork(group.Key, group); foreach (var tflow in net) { var tsf = tflow as TimedSignalFlow; var tvf = tflow as TimedValueFlow; if (tsf != null) { detailedFlow.Add((int)tflow.Time, new SignalFlow(tsf.Source, tsf.Target)); } else { detailedFlow.Add((int)tflow.Time, new ValueFlow(tvf.Value, tvf.Target)); } } } for (int i = 0; i < _stageInSignals.Count; i++) { detailedFlow.AddNeutral(new SignalFlow( _stageOutSignals[i].ToSignalRef(SignalRef.EReferencedProperty.Cur), _stageInSignals[i].ToSignalRef(SignalRef.EReferencedProperty.Next))); } }
public void CreateInterconnect(FlowMatrix flowSpec, FlowMatrix detailedFlow) { _flowSpec = flowSpec; _realFlow = detailedFlow; _flowSpec.Transitize(); InstantiateControlLogic(); AssembleFlowMatrix(); }
public void CreateInterconnect(FlowMatrix flowSpec, FlowMatrix detailedFlow) { _flowSpec = flowSpec; _detailedFlow = detailedFlow; _flowSpec.Transitize(); Init(); ComputeLifetimes(); DoClustering(); DoMemoryClustering(); InstantiateControlLogic(); AssembleFlowMatrix(); VerifyResult(); }
public void CreateInterconnect(FlowMatrix flowSpec, FlowMatrix detailedFlow) { flowSpec.Transitize(); var tflows = flowSpec.GetTimedFlows(); var sflows = tflows .Select(tf => tf as TimedSignalFlow) .Where(tf => tf != null); SlimMux <int, int, TimedSignalFlow> .ConstructInterconnect(_smih, sflows); var pipeen = _smih.ComputePipeEnMatrix(flowSpec.NumCSteps); var pipes = _smih.InstantiatePipes(); int idx = 0; foreach (RegPipe rp in pipes) { string id = "icpipe" + idx; _host.Descriptor.AddChild(rp.Descriptor, id); ++idx; } var pflows = _smih.ToFlow(flowSpec.NumCSteps, flowSpec.NeutralFlow, pipeen); var vflows = tflows .Select(tf => tf as TimedValueFlow) .Where(tf => tf != null); detailedFlow.AddNeutral(flowSpec.NeutralFlow); foreach (var vf in vflows) { detailedFlow.Add((int)vf.Time, new ValueFlow(vf.Value, vf.Target)); } int cstep = 0; foreach (var pf in pflows) { detailedFlow.Add(cstep, pf); cstep++; } _host.Descriptor.GetDocumentation().Documents.Add( new Document("SlimMuxInterconnectGraph.dotty", _smih.GetInterconnectGraphForDotty())); }
public void CreateInterconnect(FlowMatrix flowSpec, FlowMatrix detailedFlow) { flowSpec.Transitize(); var tflows = flowSpec.GetTimedFlows(); var sflows = tflows .Select(tf => tf as TimedSignalFlow) .Where(tf => tf != null); SlimMux<int, int, TimedSignalFlow>.ConstructInterconnect(_smih, sflows); var pipeen = _smih.ComputePipeEnMatrix(flowSpec.NumCSteps); var pipes = _smih.InstantiatePipes(); int idx = 0; foreach (RegPipe rp in pipes) { string id = "icpipe" + idx; _host.Descriptor.AddChild(rp.Descriptor, id); ++idx; } var pflows = _smih.ToFlow(flowSpec.NumCSteps, flowSpec.NeutralFlow, pipeen); var vflows = tflows .Select(tf => tf as TimedValueFlow) .Where(tf => tf != null); detailedFlow.AddNeutral(flowSpec.NeutralFlow); foreach (var vf in vflows) { detailedFlow.Add((int)vf.Time, new ValueFlow(vf.Value, vf.Target)); } int cstep = 0; foreach (var pf in pflows) { detailedFlow.Add(cstep, pf); cstep++; } _host.Descriptor.GetDocumentation().Documents.Add( new Document("SlimMuxInterconnectGraph.dotty", _smih.GetInterconnectGraphForDotty())); }
private void CreateStagedInterconnect(FlowMatrix flowSpec, FlowMatrix detailedFlow) { flowSpec.Transitize(); detailedFlow.AddNeutral(flowSpec.NeutralFlow); var tflows = flowSpec.GetTimedFlows(); var grouped = tflows.GroupBy(tf => tf.Target); foreach (var group in grouped) { var net = ConstructNetwork(group.Key, group); foreach (var tflow in net) { var tsf = tflow as TimedSignalFlow; var tvf = tflow as TimedValueFlow; if (tsf != null) detailedFlow.Add((int)tflow.Time, new SignalFlow(tsf.Source, tsf.Target)); else detailedFlow.Add((int)tflow.Time, new ValueFlow(tvf.Value, tvf.Target)); } } for (int i = 0; i < _stageInSignals.Count; i++) { detailedFlow.AddNeutral(new SignalFlow( _stageOutSignals[i].ToSignalRef(SignalRef.EReferencedProperty.Cur), _stageInSignals[i].ToSignalRef(SignalRef.EReferencedProperty.Next))); } }