truss_vout.svh

Go to the documentation of this file.
00001 /*
00002  Trusster Open Source License version 1.0a (TRUST)
00003  copyright (c) 2006 Mike Mintz and Robert Ekendahl.  All rights reserved. 
00004 
00005  Redistribution and use in source and binary forms, with or without modification, 
00006  are permitted provided that the following conditions are met: 
00007  
00008  * Redistributions of source code must retain the above copyright notice, 
00009  this list of conditions and the following disclaimer.
00010  * Redistributions in binary form must reproduce the above copyright notice, 
00011  this list of conditions and the following disclaimer in the documentation 
00012  and/or other materials provided with the distribution.
00013  * Redistributions in any form must be accompanied by information on how to obtain 
00014  complete source code for this software and any accompanying software that uses this software.
00015  The source code must either be included in the distribution or be available in a timely fashion for no more than 
00016  the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable and no more 
00017  restrictive conditions. For an executable file, complete source code means the source code for all modules it 
00018  contains. It does not include source code for modules or files that typically accompany the major components 
00019  of the operating system on which the executable file runs.
00020  
00021 
00022  THIS SOFTWARE IS PROVIDED BY MIKE MINTZ AND ROBERT EKENDAHL ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 
00023  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, 
00024  OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL MIKE MINTZ AND ROBERT EKENDAHL OR ITS CONTRIBUTORS 
00025  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
00026  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
00027  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
00028  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
00029  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00030  */
00031 `ifndef __truss_vout__
00032  `define __truss_vout__
00033 
00034 //typedef class shutdown;
00035 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00036 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
00037 class error_limit_vlog extends teal::vlog;
00038    local int limit_;
00039    local shutdown shutdown_;
00040    local bit triggered_;
00041 
00042    function new (int limit, shutdown s); limit_ = limit; shutdown_ = s; triggered_ = 0; endfunction 
00043 
00044    function void output_message (teal::message_list msg);
00045       super.output_message (msg);
00046    endfunction 
00047 
00048    protected virtual function string local_print_ (string val); 
00049       if ((!triggered_) && (how_many (teal::vout_error) >= limit_)) begin
00050     triggered_ = 1;
00051     shutdown_.shutdown_now ("Error threshold reached."); 
00052       end
00053       return val; 
00054    endfunction
00055 
00056 endclass 
00057 `endif

Intelligent Design Verification
Intelligent Design Verification
Project: Teal&Truss, Revision: 1.62c
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:42 2010
Find a documentation bug? Report bugs to: bugs.intelligentdv.com Project: DoxygenFilterSV