verilator/test_regress/t/t_func_bad.v
Wilson Snyder ce10dbd11c Version bump
git-svn-id: file://localhost/svn/verilator/trunk/verilator@753 77ca24e4-aefa-0310-84f0-b9a241c72d87
2006-08-26 11:35:28 +00:00

34 lines
677 B
Verilog

// $Id:$
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed into the Public Domain, for any use,
// without warranty, 2003 by Wilson Snyder.
module t;
initial begin
if (add(3'd1) != 0) $stop; // Too few args
if (add(3'd1, 3'd2, 3'd3) != 0) $stop; // Too many args
x; // Too few args
if (hasout(3'd1) != 0) $stop; // outputs
end
function [2:0] add;
input [2:0] from1;
input [2:0] from2;
begin
add = from1 + from2;
end
endfunction
task x;
output y;
begin end
endtask
function hasout;
output [2:0] illegal_output;
hasout = 0;
endfunction
endmodule