示例#1
0
        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;
            }
        }
示例#2
0
        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;
            }
        }
示例#3
0
 private void Report(IHLSState state, string name, string text)
 {
     state.Host.Descriptor.GetDocumentation().Documents.Add(new Document(
         name + state.Proc.Name + ".txt", text));
 }
示例#4
0
 private DocumentingHLSObserver(IHLSState state)
 {
     state.OnProgress += OnProgress;
 }
示例#5
0
 static void OnNewHLS(IHLSState state)
 {
     new DocumentingHLSObserver(state);
 }
示例#6
0
 private void Report(IHLSState state, string name, string text)
 {
     state.Host.Descriptor.GetDocumentation().Documents.Add(new Document(
                                                                name + state.Proc.Name + ".txt", text));
 }
示例#7
0
 private DocumentingHLSObserver(IHLSState state)
 {
     state.OnProgress += OnProgress;
 }
示例#8
0
 static void OnNewHLS(IHLSState state)
 {
     new DocumentingHLSObserver(state);
 }