OpenCores
URL https://opencores.org/ocsvn/alu_with_selectable_inputs_and_outputs/alu_with_selectable_inputs_and_outputs/trunk

Subversion Repositories alu_with_selectable_inputs_and_outputs

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /alu_with_selectable_inputs_and_outputs/trunk/verif_env/monitors
    from Rev 2 to Rev 4
    Reverse comparison

Rev 2 → Rev 4

/parity_monitor.v
0,0 → 1,75
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//PARITY MONITOR
 
module PARITY_MONITOR(m_clk, m_res, m_parity_0, m_parity_1);
input m_clk, m_res;
input m_parity_0, m_parity_1;
 
reg res_was_active;
 
integer fh0, fh1;
 
always @ (posedge m_clk)
if(m_res)
res_was_active = 1;
else
if(res_was_active)
begin
if(fh0 === 32'bx)
fh0 = $fopen("parity_0_monitor.out");
if(fh1 === 32'bx)
fh1 = $fopen("parity_1_monitor.out");
if ((m_parity_0 === 1'bx) || (m_parity_0 === 1'bz))
$fdisplay(fh0, "%0d ERROR: PARITY_0 doesn't have a valid value (%b)", $time, m_parity_0);
if ((m_parity_1 === 1'bx) || (m_parity_1 === 1'bz))
$fdisplay(fh1, " ERROR: PARITY_1 doesn't have a valid value (%b)", $time, m_parity_1);
//$fclose(fh0);
//$fclose(fh1);
end
 
endmodule
/stb_monitor.v
0,0 → 1,64
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//STB MONITOR
 
module STB_MONITOR(m_clk, m_stb);
input m_clk;
input m_stb;
 
integer fh;
 
always @ (posedge m_clk)
begin
if(fh === 32'bx)
fh = $fopen("stb_monitor.out");
if ((m_stb === 1'bx) || (m_stb === 1'bz))
$fdisplay(fh, "%0d ERROR: STB doesn't have a valid value (%b)", $time, m_stb);
 
//$fclose(fh);
end
 
endmodule
/clk_monitor.v
0,0 → 1,64
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//CLK MONITOR
 
module CLK_MONITOR(m_clk);
input m_clk;
 
integer fh;
 
always
begin
#5
if(fh === 32'bx)
fh = $fopen("clk_monitor.out");
 
if ((m_clk === 1'bx) || (m_clk === 1'bz))
$fdisplay(fh, "%0d ERROR: CLK doesn't have a valid value (%b)", $time, m_clk);
//$fclose(fh);
end
 
endmodule
/res_monitor.v
0,0 → 1,64
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//RES MONITOR
 
module RES_MONITOR(m_res);
input m_res;
 
integer fh;
 
always
begin
#5
if(fh === 32'bx)
fh = $fopen("res_monitor.out");
if ((m_res === 1'bx) || (m_res === 1'bz))
$fdisplay(fh, "%0d ERROR: RES doesn't have a valid value (%b)", $time, m_res);
 
//$fclose(fh);
end
 
endmodule
/data_valid_in_monitor.v
0,0 → 1,65
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//DATA_VALID_IN MONITOR
 
module DATA_VALID_IN_MONITOR(m_clk, m_stb, m_data_valid_in);
input m_clk, m_stb;
input m_data_valid_in;
 
integer fh;
 
always @ (posedge m_clk)
if(m_stb)
begin
if(fh === 32'bx)
fh = $fopen("data_valid_in_monitor.out");
if ((m_data_valid_in === 1'bx) || (m_data_valid_in === 1'bz))
$fdisplay(fh, "%0d ERROR: DATA_VALID_IN doesn't have a valid value (%b)", $time, m_data_valid_in);
//$fclose(fh);
end
 
endmodule
/data_in_monitor.v
0,0 → 1,74
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//DATA_IN MONITOR
 
module DATA_IN_MONITOR(m_clk, m_stb, m_data_in_0, m_data_in_1, m_data_in_2);
input m_clk, m_stb;
input [7:0] m_data_in_0, m_data_in_1, m_data_in_2;
 
integer i;
 
integer fh;
 
always @ (posedge m_clk)
if(m_stb)
begin
if(fh === 32'bx)
fh = $fopen("data_in_monitor.out");
 
for (i = 0; i < 8; i = i + 1)
begin
if ((m_data_in_0[i] === 1'bx) || (m_data_in_0[i] === 1'bz))
$fdisplay(fh, "%0d ERROR: DATA_IN_0[%0d] doesn't have a valid value (%b)", $time, i, m_data_in_0[i]);
if ((m_data_in_1[i] === 1'bx) || (m_data_in_1[i] === 1'bz))
$fdisplay(fh, "%0d ERROR: DATA_IN_1[%0d] doesn't have a valid value (%b)", $time, i, m_data_in_1[i]);
if ((m_data_in_2[i] === 1'bx) || (m_data_in_2[i] === 1'bz))
$fdisplay(fh, "%0d ERROR: DATA_IN_2[%0d] doesn't have a valid value (%b)", $time, i, m_data_in_2[i]);
end
 
//$fclose(fh);
end
 
endmodule
/valid_monitor.v
0,0 → 1,72
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//VALID MONITOR
 
module VALID_MONITOR(m_clk, m_res, m_valid_0, m_valid_1);
input m_clk, m_res;
input m_valid_0, m_valid_1;
 
reg res_was_active;
 
integer fh;
 
always @ (posedge m_clk)
if(m_res)
res_was_active = 1;
else
if(res_was_active)
begin
if(fh === 32'bx)
fh = $fopen("valid_monitor.out");
if ((m_valid_0 === 1'bx) || (m_valid_0 === 1'bz))
$fdisplay(fh, "%0d ERROR: VALID_0 doesn't have a valid value (%b)", $time, m_valid_0);
if ((m_valid_1 === 1'bx) || (m_valid_1 === 1'bz))
$fdisplay(fh, "%0d ERROR: VALID_1 doesn't have a valid value (%b)", $time, m_valid_1);
//$fclose(fh);
end
 
endmodule
/data_out_monitor.v
0,0 → 1,76
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//DATA_OUT MONITOR
 
module DATA_OUT_MONITOR(m_clk, m_res, m_out_0, m_out_1);
input m_clk, m_res;
input [15:0] m_out_0, m_out_1;
 
reg res_was_active;
integer i;
 
integer fh;
 
always @ (posedge m_clk)
if(m_res)
res_was_active = 1;
else
if(res_was_active)
begin
if(fh === 32'bx)
fh = $fopen("data_out_monitor.out");
for (i = 0; i < 16; i = i + 1)
begin
if ((m_out_0[i] === 1'bx) || (m_out_0[i] === 1'bz))
$fdisplay(fh, "%0d ERROR: OUT_0[%0d] doesn't have a valid value (%b)", $time, i, m_out_0[i]);
if ((m_out_1[i] === 1'bx) || (m_out_1[i] === 1'bz))
$fdisplay(fh, "%0d ERROR: OUT_1[%0d] doesn't have a valid value (%b)", $time, i, m_out_1[i]);
end
//$fclose(fh);
end
 
endmodule
/sel_monitor.v
0,0 → 1,70
/////////////////////////////////////////////////////////////////////
//// ////
//// This project has been provided to you on behalf of: ////
//// ////
//// S.C. ASICArt S.R.L. ////
//// www.asicart.com ////
//// eli_f@asicart.com ////
//// ////
//// Author: Dragos Constantin Doncean ////
//// Email: doncean@asicart.com ////
//// Mobile: +40-740-936997 ////
//// ////
//// Downloaded from: http://www.opencores.org/ ////
//// ////
/////////////////////////////////////////////////////////////////////
//// ////
//// Copyright (C) 2007 Dragos Constantin Doncean ////
//// www.asicart.com ////
//// doncean@asicart.com ////
//// ////
//// This source file may be used and distributed without ////
//// restriction provided that this copyright statement is not ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// ////
//// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY ////
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ////
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ////
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR ////
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, ////
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ////
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE ////
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ////
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ////
//// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ////
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ////
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ////
//// POSSIBILITY OF SUCH DAMAGE. ////
//// ////
/////////////////////////////////////////////////////////////////////
 
 
//----------------Monitors----------------
 
//SEL MONITOR
 
module SEL_MONITOR(m_clk, m_stb, m_sel);
input m_clk, m_stb;
input [1:0] m_sel;
 
integer i;
 
integer fh;
 
always @ (posedge m_clk)
if(m_stb)
begin
if(fh === 32'bx)
fh = $fopen("sel_monitor.out");
if(m_sel === 2'b11)
$fdisplay(fh, "%0d ERROR: SEL = reserved value (%b)", $time, m_sel);
for (i = 0; i < 2; i = i + 1)
if ((m_sel[i] === 1'bx) || (m_sel[i] === 1'bz))
$fdisplay(fh, "%0d ERROR: SEL[%0d] doesn't have a valid value (%b)", $time, i, m_sel[i]);
//$fclose(fh);
end
 
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.