public void CreateControlpath(FlowMatrix flowSpec, string procName) { int ncsteps = flowSpec.NumCSteps; string report = _mcd.ComputeEncoding(flowSpec, _maxSelWidth); _curCW = (SLVSignal)_binder.GetSignal <StdLogicVector>(EPortUsage.Default, "CurCW", null, StdLogicVector._0s(_mcd.CWWidth)); var clkInst = _binder.GetSignal <StdLogic>(EPortUsage.Clock, "Clk", null, '0'); if (_staged) { _mcd.CreateStagedDecoder(_binder, _curCW, (SLSignal)clkInst, _registered); } else { _mcd.CreateDecoder(_binder, _curCW); } CreateROM(ncsteps); for (int cstep = 0; cstep < ncsteps; cstep++) { var cw = _mcd.Encode(cstep, flowSpec.GetFlow(cstep)); _romIf.PreWrite(StdLogicVector.FromUInt((uint)cstep, _pc.Size), cw); } var syncTempl = new SyncTemplate(this); var syncFunc = syncTempl.GetAlgorithm(); _binder.CreateProcess(SystemSharp.Components.Process.EProcessKind.Triggered, syncFunc, clkInst.Descriptor); _host.Descriptor.GetDocumentation().Documents.Add(new Document(procName + "_HMA_report.txt", report)); }