|
module fft256(' Q. v/ I* W7 m$ {! q, @- S
input clk,( n2 @( c5 h/ Z' o
input reset_n,6 O- y) I" r. ?; _" J- W
input[7:0] sink_real,
E# X) O# R. k: P output wire[1:0] soure_error,
) j0 R/ K8 X( U3 c output wire source_sop,
# b) M/ H0 N& ?& s- y1 P output wire source_eop,
, L2 g, b+ j {: o* ~8 s* ~ output wire source_valid,3 u9 G4 k6 v# V; t! X% w' o3 C- B
output wire[5:0] source_exp, g, Y- o7 H! H5 e
output wire[7:0] source_real,+ w; e+ A q' `1 }
output wire[7:0] source_imag,
9 X3 ]* ?8 O q8 \ \7 J. ^ output wire sink_valid,
. G5 f+ k6 B8 s1 L! e/ ?8 w P output wire sink_sop,
' c: c6 ^4 |1 k5 ]# b output wire sink_eop,
' ^7 U* W8 x6 j, E3 ?2 t- R3 Z output wire sink_ready
# v' f3 e( q3 t9 F3 } );+ O8 @: E- r- v6 n5 }! G
$ Q" M% q' j3 i; o+ ]wire sink_valid_i;
7 }; h \9 T3 n* qwire sink_eop_i;
* [; [0 X9 [" qwire sink_sop_i;9 E4 V0 d0 u9 a" l
wire sink_ready_i;8 I! q7 T& K4 w( @. \: P& G' C
$ }, u+ t M9 |6 a! h! P. d, massign sink_valid = sink_valid_i;9 b7 m4 C0 H. I! F
assign sink_eop = sink_eop_i;! `. O K* \8 h( ~+ a0 N
assign sink_sop = sink_sop_i;+ Q4 O: l% R6 a
assign sink_ready = sink_ready_i;
1 l- e9 u" X; d0 ~) m
! G8 g3 k# r3 x2 _! Qfft_burst u1(
( C2 Y8 r( H9 E! ] .clk(clk),
8 S0 |$ ]8 s" \ \" P, r3 Y2 h .reset_n(reset_n),
8 h. I$ o3 @' c# k7 H0 {2 s8 E& ] .inverse(1'b0),
h: j* |; R) g L8 Y% D$ N .sink_valid(sink_valid_i),
& h! O7 ?) R' n( U% I+ y .sink_sop(sink_sop_i),4 R& [8 L+ B! c
.sink_eop(sink_eop_i),
. A8 X: r q; R/ @ .sink_real(sink_real), //实部- @ a F4 \# ?: e- f; U9 e
.sink_imag(8'b00000000), //虚部
5 O; l/ H- A6 p. O1 t .sink_error(2'b00),
! c r7 H! E, [5 F& v9 V .source_ready(1'b1),
! b Q+ [( U( h# L8 K5 x 6 w/ y6 B9 _/ \! P& z" `/ D! q
.sink_ready(sink_ready_i),
1 k, Q/ z/ N) g .source_error(source_error),5 Z7 T9 }- ` I6 d! ]2 G
.source_sop(source_sop),
( Z6 O: \' g ^6 X1 y/ f8 b .source_eop(source_eop),* N. Q* t- G- @* o# {5 W
.source_valid(source_valid),
) R) C, g; A7 N3 N .source_exp(source_exp),
2 D4 T, q1 J) o; K% k9 x+ M4 u .source_real(source_real),5 J) |9 G5 ~9 R- x4 f$ v
.source_imag(source_imag)2 w3 H$ L$ I6 U5 z J2 z
);8 J: {" y. o) t% W7 X3 @. K
( B' B5 L/ t' B8 k; I/ O7 i
ctrl_fft u2(
$ i7 t$ \* \. d: t5 J .clk(clk),* y2 a o0 q. m' d
.reset_n(reset_n),
% i7 k. }8 _: D7 M) \* A ~ .sink_ready(sink_ready_i),3 s; C3 _4 v% T* _
.sink_sop(sink_sop_i),& T% w4 P# v! K. p5 r. M' v
.sink_eop(sink_eop_i),
7 y8 v! N% P/ o+ k .sink_valid(sink_valid_i)& `1 } ^! p0 z0 m
); ( r; X; \: r! V
& l, |8 @% Q3 \1 {% U3 I6 L
) ^' [& F1 I. K3 E- e e
# u# R9 s6 ~/ t1 c G$ Xendmodule2 {. t2 ~. {2 D! E& w# p9 [
这个是我的程序!! |
|