Beispiel #1
0
        private void CreateTestBenchDiagramFunction(object o)
        {
            string[] arguments         = o as string[];
            string   vcdFile           = arguments[0];
            string   testBenchFilename = arguments[1];
            string   TBentity          = arguments[2];
            string   Tbarchitecture    = arguments[3];
            string   vhdlFile          = arguments[4];
            string   entity            = arguments[5];
            string   architecture      = arguments[6];

            PrepareCompilator();
            compiler.Messages.Clear();
            bool res = compiler.CreateTestBenchDiagram(
                testBenchFilename: testBenchFilename,
                outFile: vcdFile,
                testBenchEntity: TBentity,
                testBenchArchitecture: Tbarchitecture,
                file: vhdlFile,
                entity: entity,
                architecture: architecture);

            if (System.IO.File.Exists(vcdFile) == false)
            {
                return;
            }

            project.UpdateSimulationFolderContent();
            core.SaveSolution();
            core.UpdateExplorerPanel();
            Schematix.Windows.Waveform.Waveform waveformWindow = core.OpenNewWindow(vcdFile, true) as Schematix.Windows.Waveform.Waveform;
            //waveformWindow.Save();
        }
Beispiel #2
0
        private void CreateDiagramFunction(object o)
        {
            string[] arguments        = o as string[];
            string   vhdFile          = arguments[0];
            string   EntityName       = arguments[1];
            string   ArchitectureName = arguments[2];
            string   vcdFile          = arguments[3];

            PrepareCompilator();
            compiler.Messages.Clear();
            bool res = compiler.CreateDiagram(vhdFile, EntityName, ArchitectureName, vcdFile);

            project.UpdateSimulationFolderContent();
            bool isContainsFile = false;

            foreach (Schematix.ProjectExplorer.Waveform_File w in project.GetProjectElements <Schematix.ProjectExplorer.Waveform_File>())
            {
                if (w.Path == vcdFile)
                {
                    isContainsFile = true;
                    break;
                }
            }
            if (isContainsFile == false)
            {
                Schematix.ProjectExplorer.ProjectElementBase vhdl   = core.SearchItemInSolution(vhdFile);
                Schematix.ProjectExplorer.ProjectFolder      folder = vhdl.Parent as Schematix.ProjectExplorer.ProjectFolder;
                Schematix.ProjectExplorer.ProjectElement     vcd    = Schematix.ProjectExplorer.ProjectElement.CreateProjectElementByPath(vcdFile, folder);
                folder.AddElement(vcd);
            }
            if (System.IO.File.Exists(vcdFile) == true)
            {
                core.SaveSolution();
                core.UpdateExplorerPanel();
                Schematix.Windows.Waveform.Waveform waveformWindow = core.OpenNewWindow(vcdFile, true) as Schematix.Windows.Waveform.Waveform;
                waveformWindow.SetParameters(vhdFile, EntityName, ArchitectureName);
                waveformWindow.Save();
            }
        }