summaryrefslogtreecommitdiffstats
path: root/src/usr/pore/poreve/porevesrc/dbg.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/pore/poreve/porevesrc/dbg.H')
-rw-r--r--src/usr/pore/poreve/porevesrc/dbg.H115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/usr/pore/poreve/porevesrc/dbg.H b/src/usr/pore/poreve/porevesrc/dbg.H
new file mode 100644
index 000000000..cb085d729
--- /dev/null
+++ b/src/usr/pore/poreve/porevesrc/dbg.H
@@ -0,0 +1,115 @@
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/pore/poreve/porevesrc/dbg.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2012
+ *
+ * p1
+ *
+ * Object Code Only (OCO) source materials
+ * Licensed Internal Code Source Materials
+ * IBM HostBoot Licensed Internal Code
+ *
+ * The source code for this program is not published or other-
+ * wise divested of its trade secrets, irrespective of what has
+ * been deposited with the U.S. Copyright Office.
+ *
+ * Origin: 30
+ *
+ * IBM_PROLOG_END_TAG
+ */
+#ifndef __VSBE_POREVEDBG_H
+#define __VSBE_POREVEDBG_H
+
+// $Id: dbg.H,v 1.2 2011/06/03 19:50:19 jeshua Exp $
+
+/// \file dbg.H
+/// \brief The PORE Virtual Environment - Debugged
+
+#include "poreve.H"
+
+namespace vsbe {
+ class PoreVeDbg;
+};
+
+
+////////////////////////////////////////////////////////////////////////////
+// PoreVeDbg
+////////////////////////////////////////////////////////////////////////////
+
+/// The PoreVe Debug configuration
+///
+/// This derivation from PoreVe supports the Tcl debug environment for
+/// PoreVe. The constructor takes an extra argument which is a character
+/// string containing the name of a script (file) to run when the debugger
+/// starts.
+
+class
+vsbe::PoreVeDbg : public vsbe::PoreVe {
+
+public:
+
+ ////////////////////////////// Creators //////////////////////////////
+
+ /// Construct the PoreVeDbg
+ ///
+ /// \param[in] i_id The PORE IBUF_ID (engine type) of the Pore component.
+ /// This will be PORE_SBE for host boot/SBE applications, and PORE_SLW for
+ /// testing Sleep/Winkle applications.
+ ///
+ /// \param[in] i_masterTarget The fapi::Target associated with the master
+ /// chip in an HBI master/slave configuration. This target is also
+ /// installed into \a iv_slaveTarget by the constructor.
+ ///
+ /// \param[in] i_arg A private argument for the created model. In the
+ /// case of this debugged model this is a character string naming a script
+ /// to be run when the debugger starts.
+ PoreVeDbg(const PoreIbufId i_id,
+ const fapi::Target i_masterTarget,
+ const void* i_arg);
+
+ virtual ~PoreVeDbg();
+
+
+ //////////////////// Simulation Interface /////////////////////////
+
+ /// See PoreModel::run()
+ ///
+ /// This API is provided as a convenience. Currently the only model in
+ /// the system that is 'clocked' is the PoreModel.
+ virtual int
+ run(const uint64_t i_instructions, uint64_t& o_ran);
+
+
+ //////////////////// Public Implementation ////////////////////////////
+
+ /// PoreVeDbg is a singleton class, and this is the singleton instance.
+ static PoreVeDbg* cv_instance;
+
+
+ //////////////////// Protected Implementation //////////////////////////
+
+protected:
+
+ /// The argument passed at creation
+ char* iv_arg;
+
+ /// Used by the run() method.
+ ///
+ /// The first time run() is called on the debug model the debugging
+ /// environment is initialized and any script specified at creation is
+ /// executed.
+ bool iv_initialized;
+
+
+ ///////////////////////////// Safety //////////////////////////////////
+
+private:
+ PoreVeDbg(const PoreVeDbg& i_rhs);
+ PoreVeDbg& operator=(const PoreVeDbg& i_rhs);
+};
+
+#endif // __VSBE_POREVEDBG_H
OpenPOWER on IntegriCloud