Files
iverilog/ivtest/ivltests/cmpi.v
T
Stephen Williams cea237b407 Add ivtest to the iverilog source tree
By adding ivtest to the iverilog source tree, it is easier to keep
the regression test synchronized with the source that is being tested.
This should be especially helpful for PRs that add a new feature, and
have a matching ivtest PR with the regression test for that feature.
2022-01-15 10:18:50 -08:00

69 lines
1021 B
Verilog

module main;
reg [7:0] val;
initial begin
val = 120;
if (8'd5 < val) begin
$display("OK");
end else begin
$display("FAILED");
$finish;
end
if (8'd5 <= val) begin
$display("OK");
end else begin
$display("FAILED");
$finish;
end
if (8'd121 > val) begin
$display("OK");
end else begin
$display("FAILED");
$finish;
end
if (8'd121 >= val) begin
$display("OK");
end else begin
$display("FAILED");
$finish;
end
if (val > 8'd5) begin
$display("OK");
end else begin
$display("FAILED");
$finish;
end
if (val >= 8'd5) begin
$display("OK");
end else begin
$display("FAILED");
$finish;
end
if (val < 8'd121) begin
$display("OK");
end else begin
$display("FAILED");
$finish;
end
if (val <= 8'd121) begin
$display("OK");
end else begin
$display("FAILED");
$finish;
end
$display("PASSED");
end
endmodule // main