📄 eexywave.tfw
字号:
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 1995-2003 Xilinx, Inc.
// All Right Reserved.
////////////////////////////////////////////////////////////////////////////////
// ____ ____
// / /\/ /
// /___/ \ / Vendor: Xilinx
// \ \ \/ Version : 7.1.03i
// \ \ Application : ISE Foundation
// / / Filename : eexywave.tfw
// /___/ /\ Timestamp : Sat Jun 02 12:32:44 2007
// \ \ / \
// \___\/\___\
//
//Command:
//Design Name: eexywave
//Device: Xilinx
//
`timescale 1ns/1ps
module eexywave;
reg [15:0] eer = 16'b0000000000000000;
reg [15:0] eei = 16'b0000000000000000;
reg [15:0] yx0r = 16'b0000000000000000;
reg [15:0] yx0i = 16'b0000000000000000;
reg [15:0] yx1r = 16'b0000000000000000;
reg [15:0] yx1i = 16'b0000000000000000;
reg [15:0] yx2r = 16'b0000000000000000;
reg [15:0] yx2i = 16'b0000000000000000;
reg [15:0] yx3r = 16'b0000000000000000;
reg [15:0] yx3i = 16'b0000000000000000;
reg [15:0] yx4r = 16'b0000000000000000;
reg [15:0] yx4i = 16'b0000000000000000;
reg [15:0] yx5r = 16'b0000000000000000;
reg [15:0] yx5i = 16'b0000000000000000;
reg [15:0] yx6r = 16'b0000000000000000;
reg [15:0] yx6i = 16'b0000000000000000;
reg [15:0] yx7r = 16'b0000000000000000;
reg [15:0] yx7i = 16'b0000000000000000;
wire [15:0] tey0r;
wire [15:0] tey0i;
wire [15:0] tey1r;
wire [15:0] tey1i;
wire [15:0] tey2r;
wire [15:0] tey2i;
wire [15:0] tey3r;
wire [15:0] tey3i;
wire [15:0] tey4r;
wire [15:0] tey4i;
wire [15:0] tey5r;
wire [15:0] tey5i;
wire [15:0] tey6r;
wire [15:0] tey6i;
wire [15:0] tey7r;
wire [15:0] tey7i;
reg clk = 1'b0;
reg start = 1'b0;
wire rdy;
parameter PERIOD = 200;
parameter real DUTY_CYCLE = 0.5;
parameter OFFSET = 0;
initial // Clock process for clk
begin
#OFFSET;
forever
begin
clk = 1'b0;
#(PERIOD-(PERIOD*DUTY_CYCLE)) clk = 1'b1;
#(PERIOD*DUTY_CYCLE);
end
end
eexy UUT (
.eer(eer),
.eei(eei),
.yx0r(yx0r),
.yx0i(yx0i),
.yx1r(yx1r),
.yx1i(yx1i),
.yx2r(yx2r),
.yx2i(yx2i),
.yx3r(yx3r),
.yx3i(yx3i),
.yx4r(yx4r),
.yx4i(yx4i),
.yx5r(yx5r),
.yx5i(yx5i),
.yx6r(yx6r),
.yx6i(yx6i),
.yx7r(yx7r),
.yx7i(yx7i),
.tey0r(tey0r),
.tey0i(tey0i),
.tey1r(tey1r),
.tey1i(tey1i),
.tey2r(tey2r),
.tey2i(tey2i),
.tey3r(tey3r),
.tey3i(tey3i),
.tey4r(tey4r),
.tey4i(tey4i),
.tey5r(tey5r),
.tey5i(tey5i),
.tey6r(tey6r),
.tey6i(tey6i),
.tey7r(tey7r),
.tey7i(tey7i),
.clk(clk),
.start(start),
.rdy(rdy));
integer TX_FILE = 0;
integer TX_ERROR = 0;
initial begin // Open the results file...
TX_FILE = $fopen("results.txt");
#10200 // Final time: 10200 ns
if (TX_ERROR == 0) begin
$display("No errors or warnings.");
$fdisplay(TX_FILE, "No errors or warnings.");
end else begin
$display("%d errors found in simulation.", TX_ERROR);
$fdisplay(TX_FILE, "%d errors found in simulation.", TX_ERROR);
end
$fclose(TX_FILE);
$stop;
end
initial begin
// ------------- Current Time: 85ns
#85;
eei = 16'b0000000000000101;
yx0i = 16'b0000000001000001;
yx3r = 16'b0000000000001000;
yx6i = 16'b0000000000000110;
// -------------------------------------
// ------------- Current Time: 285ns
#200;
eer = 16'b0000000000111110;
eei = 16'b0011101010011000;
yx0r = 16'b0000000000001000;
yx1r = 16'b0000000000001001;
yx1i = 16'b0000000000111100;
yx2r = 16'b0010011100010000;
yx2i = 16'b0000000000000101;
yx3i = 16'b0000000000000100;
yx4r = 16'b0000000000001000;
yx4i = 16'b0000000000000010;
yx5r = 16'b0000000000000001;
yx5i = 16'b0001011101110000;
yx6r = 16'b0111010100110000;
yx6i = 16'b0000011111010000;
yx7r = 16'b0000000000000111;
yx7i = 16'b0000000000001001;
// -------------------------------------
// ------------- Current Time: 485ns
#200;
start = 1'b1;
eer = 16'b0010001100101000;
// -------------------------------------
end
task CHECK_tey0r;
input [15:0] NEXT_tey0r;
#0 begin
if (NEXT_tey0r !== tey0r) begin
$display("Error at time=%dns tey0r=%b, expected=%b", $time, tey0r, NEXT_tey0r);
$fdisplay(TX_FILE, "Error at time=%dns tey0r=%b, expected=%b", $time, tey0r, NEXT_tey0r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey0i;
input [15:0] NEXT_tey0i;
#0 begin
if (NEXT_tey0i !== tey0i) begin
$display("Error at time=%dns tey0i=%b, expected=%b", $time, tey0i, NEXT_tey0i);
$fdisplay(TX_FILE, "Error at time=%dns tey0i=%b, expected=%b", $time, tey0i, NEXT_tey0i);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey1r;
input [15:0] NEXT_tey1r;
#0 begin
if (NEXT_tey1r !== tey1r) begin
$display("Error at time=%dns tey1r=%b, expected=%b", $time, tey1r, NEXT_tey1r);
$fdisplay(TX_FILE, "Error at time=%dns tey1r=%b, expected=%b", $time, tey1r, NEXT_tey1r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey1i;
input [15:0] NEXT_tey1i;
#0 begin
if (NEXT_tey1i !== tey1i) begin
$display("Error at time=%dns tey1i=%b, expected=%b", $time, tey1i, NEXT_tey1i);
$fdisplay(TX_FILE, "Error at time=%dns tey1i=%b, expected=%b", $time, tey1i, NEXT_tey1i);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey2r;
input [15:0] NEXT_tey2r;
#0 begin
if (NEXT_tey2r !== tey2r) begin
$display("Error at time=%dns tey2r=%b, expected=%b", $time, tey2r, NEXT_tey2r);
$fdisplay(TX_FILE, "Error at time=%dns tey2r=%b, expected=%b", $time, tey2r, NEXT_tey2r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey2i;
input [15:0] NEXT_tey2i;
#0 begin
if (NEXT_tey2i !== tey2i) begin
$display("Error at time=%dns tey2i=%b, expected=%b", $time, tey2i, NEXT_tey2i);
$fdisplay(TX_FILE, "Error at time=%dns tey2i=%b, expected=%b", $time, tey2i, NEXT_tey2i);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey3r;
input [15:0] NEXT_tey3r;
#0 begin
if (NEXT_tey3r !== tey3r) begin
$display("Error at time=%dns tey3r=%b, expected=%b", $time, tey3r, NEXT_tey3r);
$fdisplay(TX_FILE, "Error at time=%dns tey3r=%b, expected=%b", $time, tey3r, NEXT_tey3r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey3i;
input [15:0] NEXT_tey3i;
#0 begin
if (NEXT_tey3i !== tey3i) begin
$display("Error at time=%dns tey3i=%b, expected=%b", $time, tey3i, NEXT_tey3i);
$fdisplay(TX_FILE, "Error at time=%dns tey3i=%b, expected=%b", $time, tey3i, NEXT_tey3i);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey4r;
input [15:0] NEXT_tey4r;
#0 begin
if (NEXT_tey4r !== tey4r) begin
$display("Error at time=%dns tey4r=%b, expected=%b", $time, tey4r, NEXT_tey4r);
$fdisplay(TX_FILE, "Error at time=%dns tey4r=%b, expected=%b", $time, tey4r, NEXT_tey4r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey4i;
input [15:0] NEXT_tey4i;
#0 begin
if (NEXT_tey4i !== tey4i) begin
$display("Error at time=%dns tey4i=%b, expected=%b", $time, tey4i, NEXT_tey4i);
$fdisplay(TX_FILE, "Error at time=%dns tey4i=%b, expected=%b", $time, tey4i, NEXT_tey4i);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey5r;
input [15:0] NEXT_tey5r;
#0 begin
if (NEXT_tey5r !== tey5r) begin
$display("Error at time=%dns tey5r=%b, expected=%b", $time, tey5r, NEXT_tey5r);
$fdisplay(TX_FILE, "Error at time=%dns tey5r=%b, expected=%b", $time, tey5r, NEXT_tey5r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey5i;
input [15:0] NEXT_tey5i;
#0 begin
if (NEXT_tey5i !== tey5i) begin
$display("Error at time=%dns tey5i=%b, expected=%b", $time, tey5i, NEXT_tey5i);
$fdisplay(TX_FILE, "Error at time=%dns tey5i=%b, expected=%b", $time, tey5i, NEXT_tey5i);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey6r;
input [15:0] NEXT_tey6r;
#0 begin
if (NEXT_tey6r !== tey6r) begin
$display("Error at time=%dns tey6r=%b, expected=%b", $time, tey6r, NEXT_tey6r);
$fdisplay(TX_FILE, "Error at time=%dns tey6r=%b, expected=%b", $time, tey6r, NEXT_tey6r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey6i;
input [15:0] NEXT_tey6i;
#0 begin
if (NEXT_tey6i !== tey6i) begin
$display("Error at time=%dns tey6i=%b, expected=%b", $time, tey6i, NEXT_tey6i);
$fdisplay(TX_FILE, "Error at time=%dns tey6i=%b, expected=%b", $time, tey6i, NEXT_tey6i);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey7r;
input [15:0] NEXT_tey7r;
#0 begin
if (NEXT_tey7r !== tey7r) begin
$display("Error at time=%dns tey7r=%b, expected=%b", $time, tey7r, NEXT_tey7r);
$fdisplay(TX_FILE, "Error at time=%dns tey7r=%b, expected=%b", $time, tey7r, NEXT_tey7r);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_tey7i;
input [15:0] NEXT_tey7i;
#0 begin
if (NEXT_tey7i !== tey7i) begin
$display("Error at time=%dns tey7i=%b, expected=%b", $time, tey7i, NEXT_tey7i);
$fdisplay(TX_FILE, "Error at time=%dns tey7i=%b, expected=%b", $time, tey7i, NEXT_tey7i);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
task CHECK_rdy;
input NEXT_rdy;
#0 begin
if (NEXT_rdy !== rdy) begin
$display("Error at time=%dns rdy=%b, expected=%b", $time, rdy, NEXT_rdy);
$fdisplay(TX_FILE, "Error at time=%dns rdy=%b, expected=%b", $time, rdy, NEXT_rdy);
$fflush(TX_FILE);
TX_ERROR = TX_ERROR + 1;
end
end
endtask
endmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -