private void OnProgress(IHLSState state, EHLSProgress progress) { switch (progress) { case EHLSProgress.Compiled: Report(state, "hls.0.xil-s-input", state.XILSInput.ToString()); Report(state, "hls.1.xil-s-transformed", state.XILSTransformed.ToString()); Report(state, "hls.2.xil-3-input", state.XIL3Input.ToString()); Report(state, "hls.3.xil-3-transformed", state.XIL3Transformed.ToString()); break; case EHLSProgress.Scheduled: Report(state, "hls.4.schedule.", state.SchedulingAdapter.GetScheduleReport()); break; case EHLSProgress.InterconnectCreated: Report(state, "hls.5.0.timedflows.", state.RawFlows.GetFlowReport()); Report(state, "hls.5.2.interconnectflows.", state.RealFlows.GetFlowReport()); Report(state, "hls.5.3.allocation.", state.SchedulingAdapter.Allocator.CreateAllocationStatistics(state.RawFlows.NumCSteps).ToString()); Report(state, "hls.5.4.binding.", state.SchedulingAdapter.GetBindingReport()); break; case EHLSProgress.ControlpathCreated: Report(state, "hls.6.profilers.", GetProfilerReport(state.Constraints)); break; default: break; } }
private void Report(IHLSState state, string name, string text) { state.Host.Descriptor.GetDocumentation().Documents.Add(new Document( name + state.Proc.Name + ".txt", text)); }
private DocumentingHLSObserver(IHLSState state) { state.OnProgress += OnProgress; }
static void OnNewHLS(IHLSState state) { new DocumentingHLSObserver(state); }