예제 #1
0
        }//Init

        /// <summary>
        /// The onLoad is called after all plugins have had their init called and are all loaded.
        /// </summary>
        public void onLoad(object sender, EventArgs e)
        {
            //subscribe to the restart event so we can re-init the register when the simulation is restarted
            mHost.Restart += onRestart;

            //subscribe to the Start and Stop events so we can track when the simulation is running
            mHost.StartSimulation += onStart;
            mHost.StopSimulation  += onStop;

            //request a panel from ARMSim user interface, create the register64 control and add it to the panel
            Panel panel = mHost.RequestPanel(this.PluginName);

            mRegister64Control = new ARMSim.Plugins.UIControls.Register64TextBox();
            panel.Controls.Add(mRegister64Control);

            //request the opcodes from the undefined opcode range of the ARM processor. Specify the execute method
            //that will be called when this opcode is encountered by the simulation engine.
            mHost.RequestOpcodeRange(0x0ef000f0, 0x0ffff0f0, this.onExecute);

            //Here we will insert the mnemonics of the new instructions into the parsing tables. The method specified
            //is called when the instruction is parsed. It allows us to form the final opcode with the operands
            //encoded into the opcode.
            mHost.RequestMnemonic("LOAD64", 0x0ef000f0, "R", this.onFormInstruction64);
            mHost.RequestMnemonic("STORE64", 0x0ef001f0, "R", this.onFormInstruction64);
            mHost.RequestMnemonic("ADDS64", 0x0ef002f0, "R", this.onFormInstruction64);
            mHost.RequestMnemonic("ADD64", 0x0ef003f0, "R", this.onFormInstruction64);
            mHost.RequestMnemonic("MULS64", 0x0ef004f0, "R", this.onFormInstruction64);
            mHost.RequestMnemonic("MUL64", 0x0ef005f0, "R", this.onFormInstruction64);
            mHost.RequestMnemonic("MULAS64", 0x0ef006f0, "R", this.onFormInstruction64);
            mHost.RequestMnemonic("MULA64", 0x0ef007f0, "R", this.onFormInstruction64);

            //set the current internal 64 bit value(0) into the UI control
            //since the simulation is not running it will update
            UpdateRegister64();
        }//onLoad
예제 #2
0
        }//Init

        /// <summary>
        /// The onLoad is called after all plugins have had their init called and are all loaded.
        /// </summary>
        private void onLoad(object sender, EventArgs e)
        {
            mMatrixStackDisplay      = new MatrixStackDisplay();
            mMatrixStackDisplay.Dock = DockStyle.Fill;

            //request a panel from ARMSim user interface, create the register64 control and add it to the panel
            Panel panel = mHost.RequestPanel(this.PluginName);

            panel.Controls.Add(mMatrixStackDisplay);
            panel.Resize += new EventHandler(this.panel1_Resize);

            //subscribe to the restart event so we can re-init the register when the simulation is restarted
            mHost.Restart += onRestart;

            //subscribe to the Start and Stop events so we can track when the simulation is running
            mHost.StartSimulation += mHost_Start;
            mHost.StopSimulation  += mHost_StopSimulation;

            //request the opcodes from the undefined opcode range of the ARM processor. Specify the execute method
            //that will be called when this opcode is encountered by the simulation engine.
            mHost.RequestOpcodeRange(0x0ef000f0, 0x0ff000f0, this.onExecute);

            //Here we will insert the mnemonics of the new instructions into the parsing tables. The method specified
            //is called whwn the instruction is parsed. It allows us to form the final opcode with the operands
            //encoded into the opcode.
            mHost.RequestMnemonic("MLOADI", 0x0ef000f0, "RRR", this.onFormInstruction3);
            mHost.RequestMnemonic("MLOADF", 0x0ef001f0, "RRR", this.onFormInstruction3);
            mHost.RequestMnemonic("MLOADD", 0x0ef002f0, "RRR", this.onFormInstruction3);
            mHost.RequestMnemonic("MPOP", 0x0ef008f0, "RRR", this.onFormInstruction3);

            mHost.RequestMnemonic("MIDENT", 0x0ef003f0, "R", this.onFormInstruction1);
            mHost.RequestMnemonic("MADD", 0x0ef004f0, "", this.onFormInstruction1);
            mHost.RequestMnemonic("MSUB", 0x0ef005f0, "", this.onFormInstruction1);
            mHost.RequestMnemonic("MMUL", 0x0ef006f0, "", this.onFormInstruction1);
            mHost.RequestMnemonic("MDOT", 0x0ef007f0, "", this.onFormInstruction1);
        }//onLoad