`timescale 1ns / 1ps
module fp_fft_core_top_tb;
// Inputs
reg clk;
reg start;
reg [15:0] xn_re;
reg [15:0] xn_im;
reg fwd_inv;
reg fwd_inv_we;
reg [13:0] scale_sch;
reg scale_sch_we;
// Outputs
wire rfd;
wire [13:0] xn_index;
wire busy;
wire edone;
wire done;
wire dv;
wire [13:0] xk_index;
wire [15:0] xk_re;
wire [15:0] xk_im;
// Instantiate the Unit Under Test (UUT)
fp_fft_core_top uut (
.clk(clk),
.start(start),
.xn_re(xn_re),
.xn_im(xn_im),
.fwd_inv(fwd_inv),
.fwd_inv_we(fwd_inv_we),
.scale_sch(scale_sch),
.scale_sch_we(scale_sch_we),
.rfd(rfd),
.xn_index(xn_index),
.busy(busy),
.edone(edone),
.done(done),
.dv(dv),
.xk_index(xk_index),
.xk_re(xk_re),
.xk_im(xk_im)
);
parameter PERIOD = 10;
parameter real DUTY_CYCLE = 0.5;
parameter OFFSET = 0;
initial // Clock process for clk
begin
clk = 1'b0;
#OFFSET;
forever begin
clk = 1'b0;
#(PERIOD-(PERIOD*DUTY_CYCLE)) clk = 1'b1;
#(PERIOD*DUTY_CYCLE);
end
end
initial begin
// Initialize Inputs
start = 0;
fwd_inv = 0;
fwd_inv_we = 0;
scale_sch = 0;
scale_sch_we = 0;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
start = 1;
end
initial begin
xn_re = 0;
#100;
forever begin
xn_re = 0;
#500 xn_re = 16;
#500;
end
end
initial begin // 位相を45度遅らせる
xn_im = 0;
#125;
forever begin
xn_im = 0;
#500 xn_im = 16;
#500;
end
end
endmodule
initial begin // 位相を45度遅らせる
xn_im = 0;
// #125;
#130;
forever begin
xn_im = 0;
#500 xn_im = 16;
#500;
end
end
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | - | - | - | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |