Tests: Convert t_loop into test_regress format
This commit is contained in:
parent
b92f57eacb
commit
584cfa4d4a
|
|
@ -87,7 +87,7 @@ module Test (/*AUTOARG*/
|
||||||
// merge the output values into the result vector.
|
// merge the output values into the result vector.
|
||||||
|
|
||||||
input clk;
|
input clk;
|
||||||
input [31:0] in;
|
input [31:0] in;
|
||||||
output reg [31:0] out;
|
output reg [31:0] out;
|
||||||
|
|
||||||
always @(posedge clk) begin
|
always @(posedge clk) begin
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||||
|
# redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
|
||||||
|
compile (
|
||||||
|
);
|
||||||
|
|
||||||
|
execute (
|
||||||
|
check_finished=>1,
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
||||||
|
|
@ -3,15 +3,12 @@
|
||||||
// This file ONLY is placed into the Public Domain, for any use,
|
// This file ONLY is placed into the Public Domain, for any use,
|
||||||
// without warranty, 2003 by Wilson Snyder.
|
// without warranty, 2003 by Wilson Snyder.
|
||||||
|
|
||||||
module t_loop (/*AUTOARG*/
|
module t (/*AUTOARG*/
|
||||||
// Outputs
|
|
||||||
passed,
|
|
||||||
// Inputs
|
// Inputs
|
||||||
clk
|
clk
|
||||||
);
|
);
|
||||||
|
|
||||||
input clk;
|
input clk;
|
||||||
output passed; reg passed; initial passed = 0;
|
|
||||||
reg [7:0] cyc; initial cyc=0;
|
reg [7:0] cyc; initial cyc=0;
|
||||||
|
|
||||||
reg [31:0] loops;
|
reg [31:0] loops;
|
||||||
|
|
@ -53,8 +50,8 @@ module t_loop (/*AUTOARG*/
|
||||||
end
|
end
|
||||||
if (loops !== 100000) $stop;
|
if (loops !== 100000) $stop;
|
||||||
//
|
//
|
||||||
$write("[%0t] t_loop: Passed\n",$time);
|
$write("*-* All Finished *-*\n");
|
||||||
passed <= 1'b1;
|
$finish;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -80,11 +80,7 @@ module t (/*AUTOARG*/
|
||||||
// Inputs
|
// Inputs
|
||||||
.clk (clk),
|
.clk (clk),
|
||||||
.fastclk (fastclk));
|
.fastclk (fastclk));
|
||||||
t_loop tloop
|
assign passedv[15] = 1'b1;
|
||||||
(.passed (passedv[15]),
|
|
||||||
/*AUTOINST*/
|
|
||||||
// Inputs
|
|
||||||
.clk (clk));
|
|
||||||
assign passedv[16] = 1'b1;
|
assign passedv[16] = 1'b1;
|
||||||
assign passedv[17] = 1'b1;
|
assign passedv[17] = 1'b1;
|
||||||
assign passedv[18] = 1'b1;
|
assign passedv[18] = 1'b1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue