public ListViewDragDropManager(WaveformCore core, TreeListView list)
        {
            this.core = core;
            this.list = list;

            list.AllowDrop = true;

            dragEventHandler = new DragEventHandler(ListView_Drop);
            list.Drop       += dragEventHandler;
        }
Пример #2
0
        public CursorViewer(WaveformUserControl wuc, WaveformCore core)
        {
            this.wuc     = wuc;
            this.core    = core;
            GridMain     = wuc.GridMain;
            line         = wuc.LineCursor;
            scaleManager = core.ScaleManager;

            mouseHandler = new MouseEventHandler(GridMain_PreviewMouseMove);
            GridMain.PreviewMouseMove += mouseHandler;
        }
 public WaveformConfiguration(WaveformCore core)
 {
     entity                 = core.Entity;
     entityName             = core.EntityName;
     architectureName       = core.ArchitectureName;
     fileName               = core.FileName;
     bookMarks              = core.BookMarks;
     variablesConfiguration = new List <My_VariableConfiguration>();
     visibleStartTime       = core.ScaleManager.VisibleStartTime;
     visibleTimeDiapasone   = core.ScaleManager.VisibleTimeDiapasone;
     foreach (My_Variable variable in core.CurrentDump)
     {
         variablesConfiguration.Add(new My_VariableConfiguration(variable));
     }
 }
        public VHDLTestBenchGenerator(WaveformCore core, Stream stream, string entityName, string architectureName)
            : base(core, stream)
        {
            this.entityName       = entityName;
            this.architectureName = architectureName;

            writer    = new StreamWriter(stream);
            variables = new List <My_Variable>();
            foreach (IValueProvider v in core.Dump.GetVariablesEnumerator())
            {
                if (v is Signal)
                {
                    InterfaceMode mode = GetPortInterfaceMode(v.Name, core.Entity);
                    if ((mode == InterfaceMode._in) || (mode == InterfaceMode._inout) || (mode == InterfaceMode._buffer))
                    {
                        variables.Add(new My_Variable(v as Signal));
                    }
                }
            }
        }
        /// <summary>
        /// Сохранение файла с конфигурацией
        /// </summary>
        /// <param name="core"></param>
        /// <param name="FileName"></param>
        public static void SaveConfiguration(WaveformCore core, string FileName)
        {
            WaveformConfiguration conf       = new WaveformConfiguration(core);
            BinaryFormatter       bformatter = new BinaryFormatter();
            FileStream            file       = null;

            try
            {
                file = new FileStream(FileName, FileMode.OpenOrCreate);
                bformatter.Serialize(file, conf);
            }
            catch (Exception ex)
            { }
            finally
            {
                if (file != null)
                {
                    file.Close();
                }
            }
        }
Пример #6
0
        public override bool CreateTestBenchDiagram(string file, string entity, string architecture, string outFile, WaveformCore core)
        {
            core.SaveVCDFile(outFile);
            string testEntity = entity + "_testbench";
            string testArch   = "testbench_architecture";

            string TestBenchFile = Path.GetDirectoryName(file) + "\\" + Path.GetFileNameWithoutExtension(file) + "_test_bench.vhd";

            core.GenerateTestBench(TestBenchFile);

            bool res = CreateTestBenchDiagram(testEntity, testArch, TestBenchFile, file, entity, architecture, outFile);

            if (res == false)
            {
                return(false);
            }

            core.LoadVCDFile(outFile);
            return(true);
        }
Пример #7
0
 public TimeIterator(WaveformCore core, UInt64 startTime, UInt64 endTime)
 {
     this.core      = core;
     this.startTime = startTime;
     this.endTime   = endTime;
 }
Пример #8
0
 public TestBenchGenerator(WaveformCore core, Stream stream)
 {
     this.core   = core;
     this.stream = stream;
 }
Пример #9
0
 public SimpleIterator(WaveformCore core)
 {
     this.core = core;
     iterators = new List <IValueIterator>();
     PrepareIterators();
 }
Пример #10
0
 public ScaleManager(WaveformCore core, TimeScaleViewer timeScaleViewer)
 {
     this.core            = core;
     this.timeScaleViewer = timeScaleViewer;
     visibleTimeDiapasone = 10;
 }
Пример #11
0
 /// <summary>
 /// Создание волновой диаграммы для test bench
 /// </summary>
 /// <param name="file"></param>
 /// <param name="entity"></param>
 /// <param name="architecture"></param>
 /// <param name="outFile"></param>
 /// <param name="Scope"></param>
 public abstract bool CreateTestBenchDiagram(string file, string entity, string architecture, string outFile, WaveformCore core);
Пример #12
0
        public override bool CreateTestBenchDiagram(string vhdFile, string EntityName, string ArchitectureName, string vcdFile, WaveformCore core)
        {
            VhdlFile file = null;

            foreach (CodeFile f in Files)
            {
                if (f is VHDL_CodeFile)
                {
                    if ((f as VHDL_CodeFile).FilePath.Equals(vhdFile))
                    {
                        file = (f as VHDL_CodeFile).File;
                        break;
                    }
                }
            }
            if (file == null)
            {
                return(false);
            }

            Architecture arch = null;

            foreach (LibraryUnit unit in file.Elements)
            {
                if (unit is Architecture)
                {
                    if ((unit as Architecture).Identifier.EqualsIdentifier(ArchitectureName))
                    {
                        arch = (unit as Architecture);
                        break;
                    }
                }
            }
            if (arch == null)
            {
                return(false);
            }

            if (arch.Entity.Identifier.EqualsIdentifier(EntityName) == false)
            {
                return(false);
            }

            /*
             * VHDLModelingSystem.ModelingSystemCore model = new VHDLModelingSystem.ModelingSystemCore(arch, currentLibrary, rootScope, core.Dump);
             * model.Start();
             * model.SaveToVCD(vcdFile);
             */
            return(true);
        }