当前位置:   article > 正文

基于FPGA的OFDM-BPSK链路verilog实现,开发平台为quartusii

ofdm-bpsk链路

目录

一、理论基础

二、核心程序

三、测试结果


一、理论基础

       OFDM(Orthogonal Frequency Division Multiplexing)和BPSK(Binary Phase Shift Keying)都是数字通信中常用的调制和多路复用技术。在一个OFDM-BPSK链路中,BPSK用于调制数据信号,而OFDM用于多路复用和传输。

  1. BPSK调制(Binary Phase Shift Keying): BPSK是一种基本的调制方式,它将数字比特转换为相位。在BPSK中,一个逻辑0被映射为一个特定相位(通常是0度),而一个逻辑1被映射为相位的反转(通常是180度)。这样,数字数据可以通过改变相位来调制成模拟信号。在接收端,可以通过检测相位来解调信号。

  2. OFDM(Orthogonal Frequency Division Multiplexing): OFDM是一种多载波调制技术,它将高速数据流分成多个低速子载波,这些子载波之间是正交的。每个子载波都可以独立传输信息,从而提高了频谱效率和抗多径干扰的能力。OFDM还使用了循环前缀(Cyclic Prefix)来抵消多径引起的符号间干扰。

         在一个OFDM-BPSK链路中,BPSK调制通常应用于每个子载波上的符号。OFDM将这些BPSK调制的符号组合成一个复杂的OFDM符号,然后进行传输。接收端将OFDM信号进行解调,分离各个子载波上的符号,再进行BPSK解调以还原原始二进制数据。OFDM-BPSK链路是一种强大的通信系统,通过将OFDM和BPSK相结合,可以实现高效的数据传输,抗多径干扰,以及适应不同信道条件的需求。

       设OFDM信号发射时间周期为[0,T],子载波数为N,N也是符号序列的时间间隔。可以证明满足子载波正交的条件为:=1/T。(式中为子载波的频率间隔。)输入数据流首先被QAM调制器调制,这里其实是完成一个星座点的映射过程,并没有进行频谱搬移。经过星座映射后得到的符号,存在两个相互正交的分量和。设。所以再进行OFDM调制进行频谱搬移后,已调信号的数学表达式为:

 

       由上式可知,恰好是的逆离散傅里叶变换(IDFT)。所以OFDM调制可以由IDFT实现,解调可以由DFT实现。

      对于调制过程,输入数据流首先被QAM调制器调制,这里其实是完成一个星座点的映射过程,并没有进行频谱搬移。得到了一个复符号流d[0],d[1],…,d[N-1],复符号流通过串/并变换,得到一系列并行的QAM符号d[0],d[1],…,d[N-1]。经过IFFT变换,得到一系列并行的符号流,,…,,再将它们经过并/串变换,得到一串串行的符号流,,…,。由于此时符号流为离散的,所以要经过D/A转换,将其变为时间上连续的信号。最后再将信号搬移到射频。解调过程正好相反。

        应此我们设计的数字系统是一个OFDM 通信系统中的基带数据处理部分,就是不包括变频,射频电路部分的设计,甚至没有加入同步的部分,而是只包括信道编码、交织、星座映射、FFT 和插入循环前缀的部分。。下面叙述一下发射和接收端的具体结构。

二、核心程序

  1. `timescale 1 ns / 1 ps
  2. module FFT_s2p(
  3. i_clk,
  4. i_rst,
  5. i_I,
  6. i_Q,
  7. o_flag,
  8. o_dout1,
  9. o_dout2,
  10. o_dout0,
  11. test1,
  12. test2
  13. );
  14. input i_clk;
  15. input i_rst;
  16. input signed[7:0]i_I;
  17. input signed[7:0]i_Q;
  18. output o_flag;
  19. output [31:0]o_dout1;
  20. output [31:0]o_dout2;
  21. output [31:0]o_dout0;
  22. output signed[7:0]test1;
  23. output signed[7:0]test2;
  24. reg signed[7:0]rt1,it1;
  25. reg signed[7:0]rt2,it2;
  26. reg signed[7:0]rt3,it3;
  27. reg signed[7:0]rt4,it4;
  28. reg signed[7:0]rt5,it5;
  29. reg signed[7:0]rt6,it6;
  30. reg signed[7:0]rt7,it7;
  31. reg signed[7:0]rt8,it8;
  32. reg signed[7:0]rt9,it9;
  33. reg signed[7:0]rt10,it10;
  34. reg signed[7:0]rt11,it11;
  35. reg signed[7:0]rt12,it12;
  36. reg signed[7:0]rt13,it13;
  37. reg signed[7:0]rt14,it14;
  38. reg signed[7:0]rt15,it15;
  39. reg signed[7:0]rt16,it16;
  40. reg signed[7:0]rt17,it17;
  41. reg signed[7:0]rt18,it18;
  42. reg signed[7:0]rt19,it19;
  43. reg signed[7:0]rt20,it20;
  44. reg signed[7:0]rt21,it21;
  45. reg signed[7:0]rt22,it22;
  46. reg signed[7:0]rt23,it23;
  47. reg signed[7:0]rt24,it24;
  48. reg signed[7:0]rt25,it25;
  49. reg signed[7:0]rt26,it26;
  50. reg signed[7:0]rt27,it27;
  51. reg signed[7:0]rt28,it28;
  52. reg signed[7:0]rt29,it29;
  53. reg signed[7:0]rt30,it30;
  54. reg signed[7:0]rt31,it31;
  55. reg signed[7:0]rt32,it32;
  56. reg signed[7:0]r1,i1;
  57. reg signed[7:0]r2,i2;
  58. reg signed[7:0]r3,i3;
  59. reg signed[7:0]r4,i4;
  60. reg signed[7:0]r5,i5;
  61. reg signed[7:0]r6,i6;
  62. reg signed[7:0]r7,i7;
  63. reg signed[7:0]r8,i8;
  64. reg signed[7:0]r9,i9;
  65. reg signed[7:0]r10,i10;
  66. reg signed[7:0]r11,i11;
  67. reg signed[7:0]r12,i12;
  68. reg signed[7:0]r13,i13;
  69. reg signed[7:0]r14,i14;
  70. reg signed[7:0]r15,i15;
  71. reg signed[7:0]r16,i16;
  72. reg signed[7:0]r17,i17;
  73. reg signed[7:0]r18,i18;
  74. reg signed[7:0]r19,i19;
  75. reg signed[7:0]r20,i20;
  76. reg signed[7:0]r21,i21;
  77. reg signed[7:0]r22,i22;
  78. reg signed[7:0]r23,i23;
  79. reg signed[7:0]r24,i24;
  80. reg signed[7:0]r25,i25;
  81. reg signed[7:0]r26,i26;
  82. reg signed[7:0]r27,i27;
  83. reg signed[7:0]r28,i28;
  84. reg signed[7:0]r29,i29;
  85. reg signed[7:0]r30,i30;
  86. reg signed[7:0]r31,i31;
  87. reg signed[7:0]r32,i32;
  88. reg[4:0]cnt;
  89. reg o_flag;
  90. always @(posedge i_clk or posedge i_rst)
  91. begin
  92. if(i_rst)
  93. begin
  94. o_flag <= 1'b0;
  95. cnt <= 5'd0;
  96. r1<= 0;i1<= 0;
  97. r2<= 0;i2<= 0;
  98. r3<= 0;i3<= 0;
  99. r4<= 0;i4<= 0;
  100. r5<= 0;i5<= 0;
  101. r6<= 0;i6<= 0;
  102. r7<= 0;i7<= 0;
  103. r8<= 0;i8<= 0;
  104. r9<= 0;i9<= 0;
  105. r10<= 0;i10<= 0;
  106. r11<= 0;i11<= 0;
  107. r12<= 0;i12<= 0;
  108. r13<= 0;i13<= 0;
  109. r14<= 0;i14<= 0;
  110. r15<= 0;i15<= 0;
  111. r16<= 0;i16<= 0;
  112. r17<= 0;i17<= 0;
  113. r18<= 0;i18<= 0;
  114. r19<= 0;i19<= 0;
  115. r20<= 0;i20<= 0;
  116. r21<= 0;i21<= 0;
  117. r22<= 0;i22<= 0;
  118. r23<= 0;i23<= 0;
  119. r24<= 0;i24<= 0;
  120. r25<= 0;i25<= 0;
  121. r26<= 0;i26<= 0;
  122. r27<= 0;i27<= 0;
  123. r28<= 0;i28<= 0;
  124. r29<= 0;i29<= 0;
  125. r30<= 0;i30<= 0;
  126. r31<= 0;i31<= 0;
  127. r32<= 0;i32<= 0;
  128. rt1<= 0;it1<= 0;
  129. rt2<= 0;it2<= 0;
  130. rt3<= 0;it3<= 0;
  131. rt4<= 0;it4<= 0;
  132. rt5<= 0;it5<= 0;
  133. rt6<= 0;it6<= 0;
  134. rt7<= 0;it7<= 0;
  135. rt8<= 0;it8<= 0;
  136. rt9<= 0;it9<= 0;
  137. rt10<= 0;it10<= 0;
  138. rt11<= 0;it11<= 0;
  139. rt12<= 0;it12<= 0;
  140. rt13<= 0;it13<= 0;
  141. rt14<= 0;it14<= 0;
  142. rt15<= 0;it15<= 0;
  143. rt16<= 0;it16<= 0;
  144. rt17<= 0;it17<= 0;
  145. rt18<= 0;it18<= 0;
  146. rt19<= 0;it19<= 0;
  147. rt20<= 0;it20<= 0;
  148. rt21<= 0;it21<= 0;
  149. rt22<= 0;it22<= 0;
  150. rt23<= 0;it23<= 0;
  151. rt24<= 0;it24<= 0;
  152. rt25<= 0;it25<= 0;
  153. rt26<= 0;it26<= 0;
  154. rt27<= 0;it27<= 0;
  155. rt28<= 0;it28<= 0;
  156. rt29<= 0;it29<= 0;
  157. rt30<= 0;it30<= 0;
  158. rt31<= 0;it31<= 0;
  159. rt32<= 0;it32<= 0;
  160. end
  161. else begin
  162. cnt <= cnt + 5'd1;
  163. rt1<= i_I;
  164. rt2<= rt1;
  165. rt3<= rt2;
  166. rt4<= rt3;
  167. rt5<= rt4;
  168. rt6<= rt5;
  169. rt7<= rt6;
  170. rt8<= rt7;
  171. rt9<= rt8;
  172. rt10<= rt9;
  173. rt11<= rt10;
  174. rt12<= rt11;
  175. rt13<= rt12;
  176. rt14<= rt13;
  177. rt15<= rt14;
  178. rt16<= rt15;
  179. rt17<= rt16;
  180. rt18<= rt17;
  181. rt19<= rt18;
  182. rt20<= rt19;
  183. rt21<= rt20;
  184. rt22<= rt21;
  185. rt23<= rt22;
  186. rt24<= rt23;
  187. rt25<= rt24;
  188. rt26<= rt25;
  189. rt27<= rt26;
  190. rt28<= rt27;
  191. rt29<= rt28;
  192. rt30<= rt29;
  193. rt31<= rt30;
  194. rt32<= rt31;
  195. it1<= i_Q;
  196. it2<= it1;
  197. it3<= it2;
  198. it4<= it3;
  199. it5<= it4;
  200. it6<= it5;
  201. it7<= it6;
  202. it8<= it7;
  203. it9<= it8;
  204. it10<= it9;
  205. it11<= it10;
  206. it12<= it11;
  207. it13<= it12;
  208. it14<= it13;
  209. it15<= it14;
  210. it16<= it15;
  211. it17<= it16;
  212. it18<= it17;
  213. it19<= it18;
  214. it20<= it19;
  215. it21<= it20;
  216. it22<= it21;
  217. it23<= it22;
  218. it24<= it23;
  219. it25<= it24;
  220. it26<= it25;
  221. it27<= it26;
  222. it28<= it27;
  223. it29<= it28;
  224. it30<= it29;
  225. it31<= it30;
  226. it32<= it31;
  227. if(cnt == 3)
  228. begin
  229. r1<= rt1;
  230. r2<= rt2;
  231. r3<= rt3;
  232. r4<= rt4;
  233. r5<= rt5;
  234. r6<= rt6;
  235. r7<= rt7;
  236. r8<= rt8;
  237. r9<= rt9;
  238. r10<= rt10;
  239. r11<= rt11;
  240. r12<= rt12;
  241. r13<= rt13;
  242. r14<= rt14;
  243. r15<= rt15;
  244. r16<= rt16;
  245. r17<= rt17;
  246. r18<= rt18;
  247. r19<= rt19;
  248. r20<= rt20;
  249. r21<= rt21;
  250. r22<= rt22;
  251. r23<= rt23;
  252. r24<= rt24;
  253. r25<= rt25;
  254. r26<= rt26;
  255. r27<= rt27;
  256. r28<= rt28;
  257. r29<= rt29;
  258. r30<= rt30;
  259. r31<= rt31;
  260. r32<= rt32;
  261. i1<= it1;
  262. i2<= it2;
  263. i3<= it3;
  264. i4<= it4;
  265. i5<= it5;
  266. i6<= it6;
  267. i7<= it7;
  268. i8<= it8;
  269. i9<= it9;
  270. i10<= it10;
  271. i11<= it11;
  272. i12<= it12;
  273. i13<= it13;
  274. i14<= it14;
  275. i15<= it15;
  276. i16<= it16;
  277. i17<= it17;
  278. i18<= it18;
  279. i19<= it19;
  280. i20<= it20;
  281. i21<= it21;
  282. i22<= it22;
  283. i23<= it23;
  284. i24<= it24;
  285. i25<= it25;
  286. i26<= it26;
  287. i27<= it27;
  288. i28<= it28;
  289. i29<= it29;
  290. i30<= it30;
  291. i31<= it31;
  292. i32<= it32;
  293. o_flag <= ~o_flag;
  294. end
  295. else begin
  296. r1<= r1;
  297. r2<= r2;
  298. r3<= r3;
  299. r4<= r4;
  300. r5<= r5;
  301. r6<= r6;
  302. r7<= r7;
  303. r8<= r8;
  304. r9<= r9;
  305. r10<= r10;
  306. r11<= r11;
  307. r12<= r12;
  308. r13<= r13;
  309. r14<= r14;
  310. r15<= r15;
  311. r16<= r16;
  312. r17<= r17;
  313. r18<= r18;
  314. r19<= r19;
  315. r20<= r20;
  316. r21<= r21;
  317. r22<= r22;
  318. r23<= r23;
  319. r24<= r24;
  320. r25<= r25;
  321. r26<= r26;
  322. r27<= r27;
  323. r28<= r28;
  324. r29<= r29;
  325. r30<= r30;
  326. r31<= r31;
  327. r32<= r32;
  328. i1<= i1;
  329. i2<= i2;
  330. i3<= i3;
  331. i4<= i4;
  332. i5<= i5;
  333. i6<= i6;
  334. i7<= i7;
  335. i8<= i8;
  336. i9<= i9;
  337. i10<= i10;
  338. i11<= i11;
  339. i12<= i12;
  340. i13<= i13;
  341. i14<= i14;
  342. i15<= i15;
  343. i16<= i16;
  344. i17<= i17;
  345. i18<= i18;
  346. i19<= i19;
  347. i20<= i20;
  348. i21<= i21;
  349. i22<= i22;
  350. i23<= i23;
  351. i24<= i24;
  352. i25<= i25;
  353. i26<= i26;
  354. i27<= i27;
  355. i28<= i28;
  356. i29<= i29;
  357. i30<= i30;
  358. i31<= i31;
  359. i32<= i32;
  360. o_flag <= o_flag;
  361. end
  362. end
  363. end
  364. wire signed[15:0]rr1,ii1;
  365. wire signed[15:0]rr2,ii2;
  366. wire signed[15:0]rr3,ii3;
  367. wire signed[15:0]rr4,ii4;
  368. wire signed[15:0]rr5,ii5;
  369. wire signed[15:0]rr6,ii6;
  370. wire signed[15:0]rr7,ii7;
  371. wire signed[15:0]rr8,ii8;
  372. wire signed[15:0]rr9,ii9;
  373. wire signed[15:0]rr10,ii10;
  374. wire signed[15:0]rr11,ii11;
  375. wire signed[15:0]rr12,ii12;
  376. wire signed[15:0]rr13,ii13;
  377. wire signed[15:0]rr14,ii14;
  378. wire signed[15:0]rr15,ii15;
  379. wire signed[15:0]rr16,ii16;
  380. wire signed[15:0]rr17,ii17;
  381. wire signed[15:0]rr18,ii18;
  382. wire signed[15:0]rr19,ii19;
  383. wire signed[15:0]rr20,ii20;
  384. wire signed[15:0]rr21,ii21;
  385. wire signed[15:0]rr22,ii22;
  386. wire signed[15:0]rr23,ii23;
  387. wire signed[15:0]rr24,ii24;
  388. wire signed[15:0]rr25,ii25;
  389. wire signed[15:0]rr26,ii26;
  390. wire signed[15:0]rr27,ii27;
  391. wire signed[15:0]rr28,ii28;
  392. wire signed[15:0]rr29,ii29;
  393. wire signed[15:0]rr30,ii30;
  394. wire signed[15:0]rr31,ii31;
  395. wire signed[15:0]rr32,ii32;
  396. assign rr1 = {126*r1}-{25*i1};
  397. assign ii1 = {25*r1}+{126*i1};
  398. assign rr2 = {118*r2}-{49*i2};
  399. assign ii2 = {49*r2}+{118*i2};
  400. assign rr3 = {106*r3}-{71*i3};
  401. assign ii3 = {71*r3}+{106*i3};
  402. assign rr4 = {91*r4}-{91*i4};
  403. assign ii4 = {91*r4}+{91*i4};
  404. assign rr5 = {71*r5}-{106*i5};
  405. assign ii5 = {106*r5}+{71*i5};
  406. assign rr6 = {49*r6}-{118*i6};
  407. assign ii6 = {118*r6}+{49*i6};
  408. assign rr7 = {25*r7}-{126*i7};
  409. assign ii7 = {126*r7}+{25*i7};
  410. assign rr8 = {0*r8}-{128*i8};
  411. assign ii8 = {128*r8}+{0*i8};
  412. assign rr9 = {-25*r9}-{126*i9};
  413. assign ii9 = {126*r9}+{-25*i9};
  414. assign rr10 = {-49*r10}-{118*i10};
  415. assign ii10 = {118*r10}+{-49*i10};
  416. assign rr11 = {-71*r11}-{106*i11};
  417. assign ii11 = {106*r11}+{-71*i11};
  418. assign rr12 = {-91*r12}-{91*i12};
  419. assign ii12 = {91*r12}+{-91*i12};
  420. assign rr13 = {-106*r13}-{71*i13};
  421. assign ii13 = {71*r13}+{-106*i13};
  422. assign rr14 = {-118*r14}-{49*i14};
  423. assign ii14 = {49*r14}+{-118*i14};
  424. assign rr15 = {-126*r15}-{25*i15};
  425. assign ii15 = {25*r15}+{-126*i15};
  426. assign rr16 = {-128*r16}-{0*i16};
  427. assign ii16 = {0*r16}+{-128*i16};
  428. assign rr17 = {-126*r17}-{-25*i17};
  429. assign ii17 = {-25*r17}+{-126*i17};
  430. assign rr18 = {-118*r18}-{-49*i18};
  431. assign ii18 = {-49*r18}+{-118*i18};
  432. assign rr19 = {-106*r19}-{-71*i19};
  433. assign ii19 = {-71*r19}+{-106*i19};
  434. assign rr20 = {-91*r20}-{-91*i20};
  435. assign ii20 = {-91*r20}+{-91*i20};
  436. assign rr21 = {-71*r21}-{-106*i21};
  437. assign ii21 = {-106*r21}+{-71*i21};
  438. assign rr22 = {-49*r22}-{-118*i22};
  439. assign ii22 = {-118*r22}+{-49*i22};
  440. assign rr23 = {-25*r23}-{-126*i23};
  441. assign ii23 = {-126*r23}+{-25*i23};
  442. assign rr24 = {0*r24}-{-128*i24};
  443. assign ii24 = {-128*r24}+{0*i24};
  444. assign rr25 = {25*r25}-{-126*i25};
  445. assign ii25 = {-126*r25}+{25*i25};
  446. assign rr26 = {49*r26}-{-118*i26};
  447. assign ii26 = {-118*r26}+{49*i26};
  448. assign rr27 = {71*r27}-{-106*i27};
  449. assign ii27 = {-106*r27}+{71*i27};
  450. assign rr28 = {91*r28}-{-91*i28};
  451. assign ii28 = {-91*r28}+{91*i28};
  452. assign rr29 = {106*r29}-{-71*i29};
  453. assign ii29 = {-71*r29}+{106*i29};
  454. assign rr30 = {118*r30}-{-49*i30};
  455. assign ii30 = {-49*r30}+{118*i30};
  456. assign rr31 = {126*r31}-{-25*i31};
  457. assign ii31 = {-25*r31}+{126*i31};
  458. assign rr32 = {128*r32}-{0*i32};
  459. assign ii32 = {0*r32}+{128*i32};
  460. assign test1 = r22;
  461. assign test2 = i22;
  462. assign o_dout1 = {~rr32[15],~rr31[15],~rr30[15],~rr29[15],~rr28[15],~rr27[15],~rr26[15],~rr25[15],
  463. ~rr24[15],~rr23[15],~rr22[15],~rr21[15],~rr20[15],~rr19[15],~rr18[15],~rr17[15],
  464. ~rr16[15],~rr15[15],~rr14[15],~rr13[15],~rr12[15],~rr11[15],~rr10[15],~rr9[15],
  465. ~rr8[15] ,~rr7[15] ,~rr6[15] ,~rr5[15] ,~rr4[15] ,~rr3[15] ,~rr2[15] ,~rr1[15]};
  466. assign o_dout2 = {~ii32[15],~ii31[15],~ii30[15],~ii29[15],~ii28[15],~ii27[15],~ii26[15],~ii25[15],
  467. ~ii24[15],~ii23[15],~ii22[15],~ii21[15],~ii20[15],~ii19[15],~ii18[15],~ii17[15],
  468. ~ii16[15],~ii15[15],~ii14[15],~ii13[15],~ii12[15],~ii11[15],~ii10[15],~ii9[15],
  469. ~ii8[15] ,~ii7[15] ,~ii6[15] ,~ii5[15] ,~ii4[15] ,~ii3[15] ,~ii2[15] ,~ii1[15]};
  470. assign o_dout0 = ~{rr32[15]^ii32[15],rr31[15]^ii31[15],rr30[15]^ii30[15],rr29[15]^ii29[15],
  471. rr28[15]^ii28[15],rr27[15]^ii27[15],rr26[15]^ii26[15],rr25[15]^ii25[15],
  472. rr24[15]^ii24[15],rr23[15]^ii23[15],rr22[15]^ii22[15],rr21[15]^ii21[15],
  473. rr20[15]^ii20[15],rr19[15]^ii19[15],rr18[15]^ii18[15],rr17[15]^ii17[15],
  474. rr16[15]^ii16[15],rr15[15]^ii15[15],rr14[15]^ii14[15],rr13[15]^ii13[15],
  475. rr12[15]^ii12[15],rr11[15]^ii11[15],rr10[15]^ii10[15],rr9[15]^ii9[15],
  476. rr8[15]^ii8[15],rr7[15]^ii7[15],rr6[15]^ii6[15],rr5[15]^ii5[15],
  477. rr4[15]^ii4[15],rr3[15]^ii3[15],rr2[15]^ii2[15],rr1[15]^ii1[15]};
  478. endmodule

  1. `timescale 1 ns / 1 ps
  2. module tops(
  3. i_clk,
  4. i_rst,
  5. o_signals,
  6. o_sp,
  7. o_spflag,
  8. o_Dreal,
  9. o_Dimag,
  10. o_flag_fft,
  11. o_doutfft1,
  12. o_Rec
  13. );
  14. input i_clk;
  15. input i_rst;
  16. output o_signals;
  17. output[31:0]o_sp;
  18. output o_spflag;
  19. output signed[8:0]o_Dreal;
  20. output signed[8:0]o_Dimag;
  21. output o_flag_fft;
  22. output[31:0]o_doutfft1;
  23. output o_Rec;
  24. signals signals_u(
  25. .i_clk (i_clk),
  26. .i_rst (i_rst),
  27. .o_dout (o_signals)
  28. );
  29. //Transform
  30. s2p s2p_u(
  31. .i_clk (i_clk),
  32. .i_rst (i_rst),
  33. .i_din (o_signals),
  34. .o_dout (o_sp),
  35. .o_flag (o_spflag)
  36. );
  37. //IFFT & P2S
  38. IFFTs_p2s IFFTs_p2s_u(
  39. .i_clk (i_clk),
  40. .i_rst (i_rst),
  41. .i_en (o_spflag),
  42. .i_dn (o_sp),
  43. .o_Dreal (o_Dreal),
  44. .o_Dimag (o_Dimag)
  45. );
  46. //Reciver
  47. //FFT & S2P
  48. FFT_s2p FFT_s2p_u(
  49. .i_clk (i_clk),
  50. .i_rst (i_rst),
  51. .i_I (o_Dreal[7:0]),
  52. .i_Q (o_Dimag[7:0]),
  53. .o_flag (o_flag_fft),
  54. .o_dout1 (o_doutfft1),
  55. .o_dout2 (),
  56. .o_dout0 (),
  57. .test1 (),
  58. .test2 ()
  59. );
  60. //P2SA01-119
  61. p2s p2s_u(
  62. .i_clk (i_clk),
  63. .i_rst (i_rst),
  64. .i_din (o_doutfft1),
  65. .i_en (o_flag_fft),
  66. .o_dout (o_Rec)
  67. );
  68. endmodule

三、测试结果

        根据上面的设计原理,使用BPSK作为映射方式,最后获得如下的仿真结果:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/507336
推荐阅读
相关标签
  

闽ICP备14008679号