/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// This project has been provided to you on behalf of: ////
|
//// This project has been provided to you on behalf of: ////
|
//// ////
|
//// ////
|
//// S.C. ASICArt S.R.L. ////
|
//// S.C. ASICArt S.R.L. ////
|
//// www.asicart.com ////
|
//// www.asicart.com ////
|
//// eli_f@asicart.com ////
|
//// eli_f@asicart.com ////
|
//// ////
|
//// ////
|
//// Author: Dragos Constantin Doncean ////
|
//// Author: Dragos Constantin Doncean ////
|
//// Email: doncean@asicart.com ////
|
//// Email: doncean@asicart.com ////
|
//// Mobile: +40-740-936997 ////
|
//// Mobile: +40-740-936997 ////
|
//// ////
|
//// ////
|
//// Downloaded from: http://www.opencores.org/ ////
|
//// Downloaded from: http://www.opencores.org/ ////
|
//// ////
|
//// ////
|
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// Copyright (C) 2007 Dragos Constantin Doncean ////
|
//// Copyright (C) 2007 Dragos Constantin Doncean ////
|
//// www.asicart.com ////
|
//// www.asicart.com ////
|
//// doncean@asicart.com ////
|
//// doncean@asicart.com ////
|
//// ////
|
//// ////
|
//// This source file may be used and distributed without ////
|
//// This source file may be used and distributed without ////
|
//// restriction provided that this copyright statement is not ////
|
//// restriction provided that this copyright statement is not ////
|
//// removed from the file and that any derivative work contains ////
|
//// removed from the file and that any derivative work contains ////
|
//// the original copyright notice and the associated disclaimer.////
|
//// the original copyright notice and the associated disclaimer.////
|
//// ////
|
//// ////
|
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
|
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
|
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
|
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
|
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
|
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
|
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
|
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
|
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
|
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
|
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
|
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
|
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
|
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
|
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
|
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
|
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
|
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
|
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
|
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
|
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
|
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
|
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
|
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
|
//// POSSIBILITY OF SUCH DAMAGE. ////
|
//// POSSIBILITY OF SUCH DAMAGE. ////
|
//// ////
|
//// ////
|
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
|
//----------------Monitors----------------
|
//----------------Monitors----------------
|
|
|
//CLK MONITOR
|
//CLK MONITOR
|
|
|
module CLK_MONITOR(m_clk);
|
module CLK_MONITOR(m_clk);
|
input m_clk;
|
input m_clk;
|
|
|
integer fh;
|
integer fh;
|
|
|
always
|
always
|
begin
|
begin
|
#5
|
#5
|
if(fh === 32'bx)
|
if(fh === 32'bx)
|
fh = $fopen("clk_monitor.out");
|
fh = $fopen("clk_monitor.out");
|
|
|
if ((m_clk === 1'bx) || (m_clk === 1'bz))
|
if ((m_clk === 1'bx) || (m_clk === 1'bz))
|
$fdisplay(fh, "%0d ERROR: CLK doesn't have a valid value (%b)", $time, m_clk);
|
$fdisplay(fh, "%0d ERROR: CLK doesn't have a valid value (%b)", $time, m_clk);
|
|
|
//$fclose(fh);
|
//$fclose(fh);
|
end
|
end
|
|
|
endmodule
|
endmodule
|
|
|