2015-06-28 06:20:23 -04:00
|
|
|
// This is free and unencumbered software released into the public domain.
|
2015-07-02 04:49:35 -04:00
|
|
|
//
|
2015-06-28 06:20:23 -04:00
|
|
|
// Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
|
|
// distribute this software, either in source code form or as a compiled
|
|
|
|
// binary, for any purpose, commercial or non-commercial, and by any
|
|
|
|
// means.
|
|
|
|
|
2015-06-06 08:01:37 -04:00
|
|
|
`timescale 1 ns / 1 ps
|
|
|
|
// `define VERBOSE
|
|
|
|
|
2016-02-18 15:26:18 -05:00
|
|
|
module testbench #(
|
|
|
|
parameter AXI_TEST = 0,
|
|
|
|
parameter VERBOSE = 0
|
|
|
|
);
|
2015-06-06 08:01:37 -04:00
|
|
|
|
|
|
|
reg clk = 1;
|
|
|
|
reg resetn = 0;
|
2015-06-26 04:03:37 -04:00
|
|
|
|
2015-06-06 08:01:37 -04:00
|
|
|
always #5 clk = ~clk;
|
|
|
|
|
|
|
|
initial begin
|
|
|
|
repeat (100) @(posedge clk);
|
|
|
|
resetn <= 1;
|
|
|
|
end
|
|
|
|
|
|
|
|
initial begin
|
2015-07-02 04:45:35 -04:00
|
|
|
if ($test$plusargs("vcd")) begin
|
|
|
|
$dumpfile("testbench.vcd");
|
|
|
|
$dumpvars(0, testbench);
|
|
|
|
end
|
2015-06-06 08:01:37 -04:00
|
|
|
repeat (1000000) @(posedge clk);
|
|
|
|
$display("TIMEOUT");
|
|
|
|
$finish;
|
|
|
|
end
|
|
|
|
|
2016-02-18 16:42:01 -05:00
|
|
|
picorv32_wrapper #(
|
|
|
|
.AXI_TEST (AXI_TEST),
|
|
|
|
.VERBOSE (VERBOSE)
|
|
|
|
) top (
|
|
|
|
.clk (clk ),
|
|
|
|
.resetn (resetn)
|
|
|
|
);
|
2015-06-06 08:01:37 -04:00
|
|
|
endmodule
|