Loesung des Praktikums Systementwurf - Bjarne Hoesch - Bernhard Schoeffel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FFT1024_32B.v 2.9KB

1 year ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. //----------------------------------------------------------------------
  2. // FFT: 1024-Point FFT Using Radix-2^2 Single-Path Delay Feedback
  3. //----------------------------------------------------------------------
  4. module FFTMAIN #(
  5. parameter WIDTH = 32
  6. )(
  7. input clock, // Master Clock
  8. input reset, // Active High Asynchronous Reset
  9. input di_en, // Input Data Enable
  10. input [WIDTH-1:0] di_re, // Input Data (Real)
  11. input [WIDTH-1:0] di_im, // Input Data (Imag)
  12. output do_en, // Output Data Enable
  13. output [WIDTH-1:0] do_re, // Output Data (Real)
  14. output [WIDTH-1:0] do_im // Output Data (Imag)
  15. );
  16. //----------------------------------------------------------------------
  17. // Data must be input consecutively in natural order.
  18. // The result is scaled to 1/N and output in bit-reversed order.
  19. //----------------------------------------------------------------------
  20. wire su1_do_en;
  21. wire[WIDTH-1:0] su1_do_re;
  22. wire[WIDTH-1:0] su1_do_im;
  23. wire su2_do_en;
  24. wire[WIDTH-1:0] su2_do_re;
  25. wire[WIDTH-1:0] su2_do_im;
  26. wire su3_do_en;
  27. wire[WIDTH-1:0] su3_do_re;
  28. wire[WIDTH-1:0] su3_do_im;
  29. wire su4_do_en;
  30. wire[WIDTH-1:0] su4_do_re;
  31. wire[WIDTH-1:0] su4_do_im;
  32. SdfUnit #(.N(1024),.M(1024),.WIDTH(WIDTH)) SU1 (
  33. .clock (clock ), // i
  34. .reset (reset ), // i
  35. .di_en (di_en ), // i
  36. .di_re (di_re ), // i
  37. .di_im (di_im ), // i
  38. .do_en (su1_do_en ), // o
  39. .do_re (su1_do_re ), // o
  40. .do_im (su1_do_im ) // o
  41. );
  42. SdfUnit #(.N(1024),.M(256),.WIDTH(WIDTH)) SU2 (
  43. .clock (clock ), // i
  44. .reset (reset ), // i
  45. .di_en (su1_do_en ), // i
  46. .di_re (su1_do_re ), // i
  47. .di_im (su1_do_im ), // i
  48. .do_en (su2_do_en ), // o
  49. .do_re (su2_do_re ), // o
  50. .do_im (su2_do_im ) // o
  51. );
  52. SdfUnit #(.N(1024),.M(64),.WIDTH(WIDTH)) SU3 (
  53. .clock (clock ), // i
  54. .reset (reset ), // i
  55. .di_en (su2_do_en ), // i
  56. .di_re (su2_do_re ), // i
  57. .di_im (su2_do_im ), // i
  58. .do_en (su3_do_en ), // o
  59. .do_re (su3_do_re ), // o
  60. .do_im (su3_do_im ) // o
  61. );
  62. SdfUnit #(.N(1024),.M(16),.WIDTH(WIDTH)) SU4 (
  63. .clock (clock ), // i
  64. .reset (reset ), // i
  65. .di_en (su3_do_en ), // i
  66. .di_re (su3_do_re ), // i
  67. .di_im (su3_do_im ), // i
  68. .do_en (su4_do_en ), // o
  69. .do_re (su4_do_re ), // o
  70. .do_im (su4_do_im ) // o
  71. );
  72. SdfUnit #(.N(1024),.M(4),.WIDTH(WIDTH)) SU5 (
  73. .clock (clock ), // i
  74. .reset (reset ), // i
  75. .di_en (su4_do_en ), // i
  76. .di_re (su4_do_re ), // i
  77. .di_im (su4_do_im ), // i
  78. .do_en (do_en ), // o
  79. .do_re (do_re ), // o
  80. .do_im (do_im ) // o
  81. );
  82. endmodule