idv_watchdog_sim_vmm.sv

Go to the documentation of this file.
00001 // $Id: idv_watchdog_sim_vmm.sv 3 2009-03-24 03:33:58Z seanoboyle $
00002 //----------------------------------------------------------------------------
00003 //    This program is free software: you can redistribute it and/or modify
00004 //    it under the terms of the GNU General Public License as published by
00005 //    the Free Software Foundation, either version 3 of the License, or
00006 //    (at your option) any later version.
00007 //
00008 //    This program is distributed in the hope that it will be useful,
00009 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 //    GNU General Public License for more details.
00012 //
00013 //    You should have received a copy of the GNU General Public License
00014 //    along with this program.  If not, see <http://www.gnu.org/licenses/>.
00015 //
00016 //----------------------------------------------------------------------------
00017 
00018 /**
00019  * Simulation Watchdog Timer for VMM.
00020  * This file contains a simulation watchdog timer with VMM Logging.<br>
00021  * <br>
00022  * @par Download the most recent version here:
00023  * http://intelligentdv.com/downloads/
00024  * <br>
00025  * @par File Bugs Here:
00026  * http://bugs.intelligentdv.com/ <br>
00027  * Project:  Timers
00028  *
00029  * @file idv_watchdog_sim_vmm.sv
00030  * @author Sean O'Boyle
00031  * @par Contact:
00032  * http://intelligentdv.com/contact/
00033  * @par Company:
00034  * <a href="http://intelligentdv.com">Intelligent Design Verification</a>
00035  *
00036  * $LastChangedRevision: 3 $
00037  * $LastChangedDate: 2009-03-23 20:33:58 -0700 (Mon, 23 Mar 2009) $
00038  * $LastChangedBy: seanoboyle $
00039  *
00040  */
00041 
00042 `ifndef IDV_WATCHDOG_SIM_VMM__SV
00043 `define IDV_WATCHDOG_SIM_VMM__SV
00044 
00045 `include "vmm.sv"
00046 `include "idv_watchdog_sim.sv"
00047 
00048 /**
00049  *  Simulation Watchdog Timer for VMM.
00050  *  Extends the base IDV watchdog timer to add VMM logging.
00051  *
00052  *  @class idv_watchdog_sim_vmm
00053  *
00054  */
00055 class idv_watchdog_sim_vmm extends idv_watchdog_sim;
00056 
00057    vmm_log m_log; ///< Console Log Handle
00058 
00059    /**
00060     *  Constructor.
00061     *  Class Constructor
00062     *
00063     *  @param countdown_time time - Time to countdown from
00064     *  @param watched_event event - Event that this watchdog is watching
00065     *  @param name string - Name of the VMM Logfile Instance
00066     *  @param autostart bit - Start timer on construction (defaults to off)
00067     */
00068    function new(time countdown_time, event watched_event, string name = "IDV Watchdog VMM", bit autostart = 0);
00069       super.new(countdown_time, watched_event, name, autostart);
00070       m_log = new("IDV Watchdog", name);
00071    endfunction: new
00072 
00073    /**
00074     *  Alarm.
00075     *  Defines what happens when the countdown time expires.<br>
00076     *
00077     *  @return void
00078     */
00079    virtual function void alarm();
00080       `VMM_FATAL(m_log, $psdisplay("WOOF! Time expired at time %0t", $time));
00081    endfunction: alarm
00082 
00083    /**
00084     *  Fatal Error.
00085     *  Defines what happens when a fatal error occurs in the base class (this class).<br>
00086     *
00087     *  @return void
00088     */
00089    virtual function void fatal_error(string msg = "");
00090       `VMM_FATAL(m_log, $psdisplay("Fatal Timer Error: At time %0t; %s", $time, msg));
00091    endfunction: fatal_error
00092 
00093 endclass:idv_watchdog_sim_vmm
00094 
00095 `endif

Intelligent Design Verification
Intelligent Design Verification
Project: Timers, Revision: 1.2.0
Copyright (c) 2008-2010 Intelligent Design Verification.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included here:
http://www.intelligentdv.com/licenses/fdl.txt
doxygen
Doxygen Version: 1.6.3
IDV SV Filter Version: 2.6.3
Sat Jun 19 12:13:58 2010
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV