HDLToolkit.Xilinx.Simulation.ISimProcess.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
        public override void Start()
        {
            // Setup the Arguments
            Arguments.Clear();
            if (RunGraphicalUserInterface)
            {
                Arguments.Add("-gui");
            }

            Logger.Instance.WriteDebug("ISim Process starting...");

            // Setup Redirection
            this.RedirectInput = true;
            this.RedirectOutput = true;

            // Start the Process
            base.Start();

            // Inject the "echo" default to sync the start-up prompt
            commandLog = new StringBuilder();
            log = new StringBuilder();
            InjectCommandNoWait(DefaultSyncCommand);
            InjectCommand(DefaultSyncCommand);
        }

Usage Example

Ejemplo n.º 1
0
        public void Start()
        {
            if (running)
            {
                throw new Exception("Stop the instance before starting");
            }

            // System is now running
            running = true;

            BuildSimulation();

            // Execute the ISim Process
            Logger.Instance.WriteVerbose("Starting ISim Process at '{0}'", currentResult.ExecutableFile);
            isimProcess = new ISimProcess(currentWorkingDirectory, currentResult.ExecutableFile);
            isimProcess.RunGraphicalUserInterface = UseGraphicalUserInterface;
            isimProcess.Start();

            // Current example process
            while (isimProcess.Running)
            {
                // If using gui, dont run console prompt mode
                if (!UseGraphicalUserInterface)
                {
                    isimProcess.WaitForPrompt();

                    Console.Write("$ ");
                    string command = Console.ReadLine();
                    Console.WriteLine(isimProcess.InjectCommand(command));
                }
                else
                {
                    Thread.Sleep(1000);
                }
            }

            Logger.Instance.WriteVerbose("ISim terminated");
        }
All Usage Examples Of HDLToolkit.Xilinx.Simulation.ISimProcess::Start