Preambles.bsv
上传用户:aoptech
上传日期:2014-09-22
资源大小:784k
文件大小:27k
源码类别:

3G开发

开发平台:

Others

  1. //----------------------------------------------------------------------//
  2. // The MIT License 
  3. // 
  4. // Copyright (c) 2007 Alfred Man Cheuk Ng, mcn02@mit.edu 
  5. // 
  6. // Permission is hereby granted, free of charge, to any person 
  7. // obtaining a copy of this software and associated documentation 
  8. // files (the "Software"), to deal in the Software without 
  9. // restriction, including without limitation the rights to use,
  10. // copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. // copies of the Software, and to permit persons to whom the
  12. // Software is furnished to do so, subject to the following conditions:
  13. // 
  14. // The above copyright notice and this permission notice shall be
  15. // included in all copies or substantial portions of the Software.
  16. // 
  17. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  19. // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  20. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  21. // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  22. // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  23. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  24. // OTHER DEALINGS IN THE SOFTWARE.
  25. //----------------------------------------------------------------------//
  26. import List::*;
  27. import Vector::*;
  28. import Complex::*;
  29. import DataTypes::*;
  30. import RegFile::*;
  31. import FixedPoint::*;
  32. import FPComplex::*;
  33. // function to generate short training sequence
  34. function Vector#(128, FPComplex#(2,14)) getShortPreambles();
  35. Vector#(128, FPComplex#(2,14)) tempV = Vector::toVector(
  36. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  37. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  38. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  39. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  40. List::cons(cmplx(fromRational(920000,10000000), fromRational(0,10000000)),
  41. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  42. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  43. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  44. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  45. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  46. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  47. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  48. List::cons(cmplx(fromRational(0,10000000), fromRational(920000,10000000)),
  49. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  50. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  51. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  52. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  53. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  54. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  55. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  56. List::cons(cmplx(fromRational(920000,10000000), fromRational(0,10000000)),
  57. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  58. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  59. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  60. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  61. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  62. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  63. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  64. List::cons(cmplx(fromRational(0,10000000), fromRational(920000,10000000)),
  65. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  66. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  67. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  68. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  69. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  70. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  71. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  72. List::cons(cmplx(fromRational(920000,10000000), fromRational(0,10000000)),
  73. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  74. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  75. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  76. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  77. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  78. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  79. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  80. List::cons(cmplx(fromRational(0,10000000), fromRational(920000,10000000)),
  81. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  82. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  83. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  84. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  85. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  86. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  87. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  88. List::cons(cmplx(fromRational(920000,10000000), fromRational(0,10000000)),
  89. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  90. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  91. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  92. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  93. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  94. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  95. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  96. List::cons(cmplx(fromRational(0,10000000), fromRational(920000,10000000)),
  97. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  98. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  99. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  100. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  101. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  102. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  103. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  104. List::cons(cmplx(fromRational(920000,10000000), fromRational(0,10000000)),
  105. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  106. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  107. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  108. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  109. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  110. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  111. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  112. List::cons(cmplx(fromRational(0,10000000), fromRational(920000,10000000)),
  113. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  114. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  115. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  116. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  117. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  118. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  119. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  120. List::cons(cmplx(fromRational(920000,10000000), fromRational(0,10000000)),
  121. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  122. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  123. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  124. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  125. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  126. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  127. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  128. List::cons(cmplx(fromRational(0,10000000), fromRational(920000,10000000)),
  129. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  130. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  131. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  132. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  133. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  134. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  135. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  136. List::cons(cmplx(fromRational(920000,10000000), fromRational(0,10000000)),
  137. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  138. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  139. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  140. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  141. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  142. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  143. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  144. List::cons(cmplx(fromRational(0,10000000), fromRational(920000,10000000)),
  145. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  146. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  147. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  148. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  149. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  150. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  151. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  152. List::cons(cmplx(fromRational(920000,10000000), fromRational(0,10000000)),
  153. List::cons(cmplx(fromRational(1427600,10000000), fromRational(-126500,10000000)),
  154. List::cons(cmplx(fromRational(-134700,10000000), fromRational(-785200,10000000)),
  155. List::cons(cmplx(fromRational(-1324400,10000000), fromRational(23400,10000000)),
  156. List::cons(cmplx(fromRational(460000,10000000), fromRational(460000,10000000)),
  157. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  158. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  159. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  160. List::cons(cmplx(fromRational(0,10000000), fromRational(920000,10000000)),
  161. List::cons(cmplx(fromRational(-126500,10000000), fromRational(1427600,10000000)),
  162. List::cons(cmplx(fromRational(-785200,10000000), fromRational(-134700,10000000)),
  163. List::cons(cmplx(fromRational(23400,10000000), fromRational(-1324400,10000000)),
  164. List::nil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
  165. return tempV;
  166. endfunction
  167. // function to generate long training sequence
  168. function Vector#(128, FPComplex#(2,14)) getLongPreambles();
  169. Vector#(128, FPComplex#(2,14)) tempV = Vector::toVector(
  170. List::cons(cmplx(fromRational(1562500,10000000), fromRational(0,10000000)),
  171. List::cons(cmplx(fromRational(-51200,10000000), fromRational(-1203300,10000000)),
  172. List::cons(cmplx(fromRational(397500,10000000), fromRational(-1111600,10000000)),
  173. List::cons(cmplx(fromRational(968300,10000000), fromRational(828000,10000000)),
  174. List::cons(cmplx(fromRational(211100,10000000), fromRational(278900,10000000)),
  175. List::cons(cmplx(fromRational(598200,10000000), fromRational(-877100,10000000)),
  176. List::cons(cmplx(fromRational(-1151300,10000000), fromRational(-551800,10000000)),
  177. List::cons(cmplx(fromRational(-383200,10000000), fromRational(-1061700,10000000)),
  178. List::cons(cmplx(fromRational(975400,10000000), fromRational(-258900,10000000)),
  179. List::cons(cmplx(fromRational(533400,10000000), fromRational(40800,10000000)),
  180. List::cons(cmplx(fromRational(9900,10000000), fromRational(-1150000,10000000)),
  181. List::cons(cmplx(fromRational(-1368000,10000000), fromRational(-473800,10000000)),
  182. List::cons(cmplx(fromRational(244800,10000000), fromRational(-585300,10000000)),
  183. List::cons(cmplx(fromRational(586700,10000000), fromRational(-149400,10000000)),
  184. List::cons(cmplx(fromRational(-224800,10000000), fromRational(1606600,10000000)),
  185. List::cons(cmplx(fromRational(1192400,10000000), fromRational(-41000,10000000)),
  186. List::cons(cmplx(fromRational(625000,10000000), fromRational(-625000,10000000)),
  187. List::cons(cmplx(fromRational(369200,10000000), fromRational(983400,10000000)),
  188. List::cons(cmplx(fromRational(-572100,10000000), fromRational(393000,10000000)),
  189. List::cons(cmplx(fromRational(-1312600,10000000), fromRational(652300,10000000)),
  190. List::cons(cmplx(fromRational(822200,10000000), fromRational(923600,10000000)),
  191. List::cons(cmplx(fromRational(695600,10000000), fromRational(141200,10000000)),
  192. List::cons(cmplx(fromRational(-603100,10000000), fromRational(812900,10000000)),
  193. List::cons(cmplx(fromRational(-564600,10000000), fromRational(-218000,10000000)),
  194. List::cons(cmplx(fromRational(-350400,10000000), fromRational(-1508900,10000000)),
  195. List::cons(cmplx(fromRational(-1218900,10000000), fromRational(-165700,10000000)),
  196. List::cons(cmplx(fromRational(-1273200,10000000), fromRational(-205000,10000000)),
  197. List::cons(cmplx(fromRational(750700,10000000), fromRational(-740400,10000000)),
  198. List::cons(cmplx(fromRational(-28100,10000000), fromRational(537700,10000000)),
  199. List::cons(cmplx(fromRational(-918900,10000000), fromRational(1151300,10000000)),
  200. List::cons(cmplx(fromRational(917200,10000000), fromRational(1058700,10000000)),
  201. List::cons(cmplx(fromRational(122800,10000000), fromRational(976000,10000000)),
  202. List::cons(cmplx(fromRational(-1562500,10000000), fromRational(0,10000000)),
  203. List::cons(cmplx(fromRational(122800,10000000), fromRational(-976000,10000000)),
  204. List::cons(cmplx(fromRational(917200,10000000), fromRational(-1058700,10000000)),
  205. List::cons(cmplx(fromRational(-918900,10000000), fromRational(-1151300,10000000)),
  206. List::cons(cmplx(fromRational(-28100,10000000), fromRational(-537700,10000000)),
  207. List::cons(cmplx(fromRational(750700,10000000), fromRational(740400,10000000)),
  208. List::cons(cmplx(fromRational(-1273200,10000000), fromRational(205000,10000000)),
  209. List::cons(cmplx(fromRational(-1218900,10000000), fromRational(165700,10000000)),
  210. List::cons(cmplx(fromRational(-350400,10000000), fromRational(1508900,10000000)),
  211. List::cons(cmplx(fromRational(-564600,10000000), fromRational(218000,10000000)),
  212. List::cons(cmplx(fromRational(-603100,10000000), fromRational(-812900,10000000)),
  213. List::cons(cmplx(fromRational(695600,10000000), fromRational(-141200,10000000)),
  214. List::cons(cmplx(fromRational(822200,10000000), fromRational(-923600,10000000)),
  215. List::cons(cmplx(fromRational(-1312600,10000000), fromRational(-652300,10000000)),
  216. List::cons(cmplx(fromRational(-572100,10000000), fromRational(-393000,10000000)),
  217. List::cons(cmplx(fromRational(369200,10000000), fromRational(-983400,10000000)),
  218. List::cons(cmplx(fromRational(625000,10000000), fromRational(625000,10000000)),
  219. List::cons(cmplx(fromRational(1192400,10000000), fromRational(41000,10000000)),
  220. List::cons(cmplx(fromRational(-224800,10000000), fromRational(-1606600,10000000)),
  221. List::cons(cmplx(fromRational(586700,10000000), fromRational(149400,10000000)),
  222. List::cons(cmplx(fromRational(244800,10000000), fromRational(585300,10000000)),
  223. List::cons(cmplx(fromRational(-1368000,10000000), fromRational(473800,10000000)),
  224. List::cons(cmplx(fromRational(9900,10000000), fromRational(1150000,10000000)),
  225. List::cons(cmplx(fromRational(533400,10000000), fromRational(-40800,10000000)),
  226. List::cons(cmplx(fromRational(975400,10000000), fromRational(258900,10000000)),
  227. List::cons(cmplx(fromRational(-383200,10000000), fromRational(1061700,10000000)),
  228. List::cons(cmplx(fromRational(-1151300,10000000), fromRational(551800,10000000)),
  229. List::cons(cmplx(fromRational(598200,10000000), fromRational(877100,10000000)),
  230. List::cons(cmplx(fromRational(211100,10000000), fromRational(-278900,10000000)),
  231. List::cons(cmplx(fromRational(968300,10000000), fromRational(-828000,10000000)),
  232. List::cons(cmplx(fromRational(397500,10000000), fromRational(1111600,10000000)),
  233. List::cons(cmplx(fromRational(-51200,10000000), fromRational(1203300,10000000)),
  234. List::cons(cmplx(fromRational(1562500,10000000), fromRational(0,10000000)),
  235. List::cons(cmplx(fromRational(-51200,10000000), fromRational(-1203300,10000000)),
  236. List::cons(cmplx(fromRational(397500,10000000), fromRational(-1111600,10000000)),
  237. List::cons(cmplx(fromRational(968300,10000000), fromRational(828000,10000000)),
  238. List::cons(cmplx(fromRational(211100,10000000), fromRational(278900,10000000)),
  239. List::cons(cmplx(fromRational(598200,10000000), fromRational(-877100,10000000)),
  240. List::cons(cmplx(fromRational(-1151300,10000000), fromRational(-551800,10000000)),
  241. List::cons(cmplx(fromRational(-383200,10000000), fromRational(-1061700,10000000)),
  242. List::cons(cmplx(fromRational(975400,10000000), fromRational(-258900,10000000)),
  243. List::cons(cmplx(fromRational(533400,10000000), fromRational(40800,10000000)),
  244. List::cons(cmplx(fromRational(9900,10000000), fromRational(-1150000,10000000)),
  245. List::cons(cmplx(fromRational(-1368000,10000000), fromRational(-473800,10000000)),
  246. List::cons(cmplx(fromRational(244800,10000000), fromRational(-585300,10000000)),
  247. List::cons(cmplx(fromRational(586700,10000000), fromRational(-149400,10000000)),
  248. List::cons(cmplx(fromRational(-224800,10000000), fromRational(1606600,10000000)),
  249. List::cons(cmplx(fromRational(1192400,10000000), fromRational(-41000,10000000)),
  250. List::cons(cmplx(fromRational(625000,10000000), fromRational(-625000,10000000)),
  251. List::cons(cmplx(fromRational(369200,10000000), fromRational(983400,10000000)),
  252. List::cons(cmplx(fromRational(-572100,10000000), fromRational(393000,10000000)),
  253. List::cons(cmplx(fromRational(-1312600,10000000), fromRational(652300,10000000)),
  254. List::cons(cmplx(fromRational(822200,10000000), fromRational(923600,10000000)),
  255. List::cons(cmplx(fromRational(695600,10000000), fromRational(141200,10000000)),
  256. List::cons(cmplx(fromRational(-603100,10000000), fromRational(812900,10000000)),
  257. List::cons(cmplx(fromRational(-564600,10000000), fromRational(-218000,10000000)),
  258. List::cons(cmplx(fromRational(-350400,10000000), fromRational(-1508900,10000000)),
  259. List::cons(cmplx(fromRational(-1218900,10000000), fromRational(-165700,10000000)),
  260. List::cons(cmplx(fromRational(-1273200,10000000), fromRational(-205000,10000000)),
  261. List::cons(cmplx(fromRational(750700,10000000), fromRational(-740400,10000000)),
  262. List::cons(cmplx(fromRational(-28100,10000000), fromRational(537700,10000000)),
  263. List::cons(cmplx(fromRational(-918900,10000000), fromRational(1151300,10000000)),
  264. List::cons(cmplx(fromRational(917200,10000000), fromRational(1058700,10000000)),
  265. List::cons(cmplx(fromRational(122800,10000000), fromRational(976000,10000000)),
  266. List::cons(cmplx(fromRational(-1562500,10000000), fromRational(0,10000000)),
  267. List::cons(cmplx(fromRational(122800,10000000), fromRational(-976000,10000000)),
  268. List::cons(cmplx(fromRational(917200,10000000), fromRational(-1058700,10000000)),
  269. List::cons(cmplx(fromRational(-918900,10000000), fromRational(-1151300,10000000)),
  270. List::cons(cmplx(fromRational(-28100,10000000), fromRational(-537700,10000000)),
  271. List::cons(cmplx(fromRational(750700,10000000), fromRational(740400,10000000)),
  272. List::cons(cmplx(fromRational(-1273200,10000000), fromRational(205000,10000000)),
  273. List::cons(cmplx(fromRational(-1218900,10000000), fromRational(165700,10000000)),
  274. List::cons(cmplx(fromRational(-350400,10000000), fromRational(1508900,10000000)),
  275. List::cons(cmplx(fromRational(-564600,10000000), fromRational(218000,10000000)),
  276. List::cons(cmplx(fromRational(-603100,10000000), fromRational(-812900,10000000)),
  277. List::cons(cmplx(fromRational(695600,10000000), fromRational(-141200,10000000)),
  278. List::cons(cmplx(fromRational(822200,10000000), fromRational(-923600,10000000)),
  279. List::cons(cmplx(fromRational(-1312600,10000000), fromRational(-652300,10000000)),
  280. List::cons(cmplx(fromRational(-572100,10000000), fromRational(-393000,10000000)),
  281. List::cons(cmplx(fromRational(369200,10000000), fromRational(-983400,10000000)),
  282. List::cons(cmplx(fromRational(625000,10000000), fromRational(625000,10000000)),
  283. List::cons(cmplx(fromRational(1192400,10000000), fromRational(41000,10000000)),
  284. List::cons(cmplx(fromRational(-224800,10000000), fromRational(-1606600,10000000)),
  285. List::cons(cmplx(fromRational(586700,10000000), fromRational(149400,10000000)),
  286. List::cons(cmplx(fromRational(244800,10000000), fromRational(585300,10000000)),
  287. List::cons(cmplx(fromRational(-1368000,10000000), fromRational(473800,10000000)),
  288. List::cons(cmplx(fromRational(9900,10000000), fromRational(1150000,10000000)),
  289. List::cons(cmplx(fromRational(533400,10000000), fromRational(-40800,10000000)),
  290. List::cons(cmplx(fromRational(975400,10000000), fromRational(258900,10000000)),
  291. List::cons(cmplx(fromRational(-383200,10000000), fromRational(1061700,10000000)),
  292. List::cons(cmplx(fromRational(-1151300,10000000), fromRational(551800,10000000)),
  293. List::cons(cmplx(fromRational(598200,10000000), fromRational(877100,10000000)),
  294. List::cons(cmplx(fromRational(211100,10000000), fromRational(-278900,10000000)),
  295. List::cons(cmplx(fromRational(968300,10000000), fromRational(-828000,10000000)),
  296. List::cons(cmplx(fromRational(397500,10000000), fromRational(1111600,10000000)),
  297. List::cons(cmplx(fromRational(-51200,10000000), fromRational(1203300,10000000)),
  298. List::nil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
  299. return tempV;
  300. endfunction
  301. // function to generate long training sequence (signs only)
  302. function Vector#(128, Complex#(Bit#(1))) getLongPreSigns();
  303. Vector#(128, Complex#(Bit#(1))) tempV = Vector::toVector(
  304. List::cons(cmplx(0, 0),
  305. List::cons(cmplx(1, 1),
  306. List::cons(cmplx(0, 1),
  307. List::cons(cmplx(0, 0),
  308. List::cons(cmplx(0, 0),
  309. List::cons(cmplx(0, 1),
  310. List::cons(cmplx(1, 1),
  311. List::cons(cmplx(1, 1),
  312. List::cons(cmplx(0, 1),
  313. List::cons(cmplx(0, 0),
  314. List::cons(cmplx(0, 1),
  315. List::cons(cmplx(1, 1),
  316. List::cons(cmplx(0, 1),
  317. List::cons(cmplx(0, 1),
  318. List::cons(cmplx(1, 0),
  319. List::cons(cmplx(0, 1),
  320. List::cons(cmplx(0, 1),
  321. List::cons(cmplx(0, 0),
  322. List::cons(cmplx(1, 0),
  323. List::cons(cmplx(1, 0),
  324. List::cons(cmplx(0, 0),
  325. List::cons(cmplx(0, 0),
  326. List::cons(cmplx(1, 0),
  327. List::cons(cmplx(1, 1),
  328. List::cons(cmplx(1, 1),
  329. List::cons(cmplx(1, 1),
  330. List::cons(cmplx(1, 1),
  331. List::cons(cmplx(0, 1),
  332. List::cons(cmplx(1, 0),
  333. List::cons(cmplx(1, 0),
  334. List::cons(cmplx(0, 0),
  335. List::cons(cmplx(0, 0),
  336. List::cons(cmplx(1, 0),
  337. List::cons(cmplx(0, 1),
  338. List::cons(cmplx(0, 1),
  339. List::cons(cmplx(1, 1),
  340. List::cons(cmplx(1, 1),
  341. List::cons(cmplx(0, 0),
  342. List::cons(cmplx(1, 0),
  343. List::cons(cmplx(1, 0),
  344. List::cons(cmplx(1, 0),
  345. List::cons(cmplx(1, 0),
  346. List::cons(cmplx(1, 1),
  347. List::cons(cmplx(0, 1),
  348. List::cons(cmplx(0, 1),
  349. List::cons(cmplx(1, 1),
  350. List::cons(cmplx(1, 1),
  351. List::cons(cmplx(0, 1),
  352. List::cons(cmplx(0, 0),
  353. List::cons(cmplx(0, 0),
  354. List::cons(cmplx(1, 1),
  355. List::cons(cmplx(0, 0),
  356. List::cons(cmplx(0, 0),
  357. List::cons(cmplx(1, 0),
  358. List::cons(cmplx(0, 0),
  359. List::cons(cmplx(0, 1),
  360. List::cons(cmplx(0, 0),
  361. List::cons(cmplx(1, 0),
  362. List::cons(cmplx(1, 0),
  363. List::cons(cmplx(0, 0),
  364. List::cons(cmplx(0, 1),
  365. List::cons(cmplx(0, 1),
  366. List::cons(cmplx(0, 0),
  367. List::cons(cmplx(1, 0),
  368. List::cons(cmplx(0, 0),
  369. List::cons(cmplx(1, 1),
  370. List::cons(cmplx(0, 1),
  371. List::cons(cmplx(0, 0),
  372. List::cons(cmplx(0, 0),
  373. List::cons(cmplx(0, 1),
  374. List::cons(cmplx(1, 1),
  375. List::cons(cmplx(1, 1),
  376. List::cons(cmplx(0, 1),
  377. List::cons(cmplx(0, 0),
  378. List::cons(cmplx(0, 1),
  379. List::cons(cmplx(1, 1),
  380. List::cons(cmplx(0, 1),
  381. List::cons(cmplx(0, 1),
  382. List::cons(cmplx(1, 0),
  383. List::cons(cmplx(0, 1),
  384. List::cons(cmplx(0, 1),
  385. List::cons(cmplx(0, 0),
  386. List::cons(cmplx(1, 0),
  387. List::cons(cmplx(1, 0),
  388. List::cons(cmplx(0, 0),
  389. List::cons(cmplx(0, 0),
  390. List::cons(cmplx(1, 0),
  391. List::cons(cmplx(1, 1),
  392. List::cons(cmplx(1, 1),
  393. List::cons(cmplx(1, 1),
  394. List::cons(cmplx(1, 1),
  395. List::cons(cmplx(0, 1),
  396. List::cons(cmplx(1, 0),
  397. List::cons(cmplx(1, 0),
  398. List::cons(cmplx(0, 0),
  399. List::cons(cmplx(0, 0),
  400. List::cons(cmplx(1, 0),
  401. List::cons(cmplx(0, 1),
  402. List::cons(cmplx(0, 1),
  403. List::cons(cmplx(1, 1),
  404. List::cons(cmplx(1, 1),
  405. List::cons(cmplx(0, 0),
  406. List::cons(cmplx(1, 0),
  407. List::cons(cmplx(1, 0),
  408. List::cons(cmplx(1, 0),
  409. List::cons(cmplx(1, 0),
  410. List::cons(cmplx(1, 1),
  411. List::cons(cmplx(0, 1),
  412. List::cons(cmplx(0, 1),
  413. List::cons(cmplx(1, 1),
  414. List::cons(cmplx(1, 1),
  415. List::cons(cmplx(0, 1),
  416. List::cons(cmplx(0, 0),
  417. List::cons(cmplx(0, 0),
  418. List::cons(cmplx(1, 1),
  419. List::cons(cmplx(0, 0),
  420. List::cons(cmplx(0, 0),
  421. List::cons(cmplx(1, 0),
  422. List::cons(cmplx(0, 0),
  423. List::cons(cmplx(0, 1),
  424. List::cons(cmplx(0, 0),
  425. List::cons(cmplx(1, 0),
  426. List::cons(cmplx(1, 0),
  427. List::cons(cmplx(0, 0),
  428. List::cons(cmplx(0, 1),
  429. List::cons(cmplx(0, 1),
  430. List::cons(cmplx(0, 0),
  431. List::cons(cmplx(1, 0),
  432. List::nil)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
  433. return tempV;
  434. endfunction
  435. // module to generate sample packet
  436. (* synthesize *)
  437. module mkPacket(RegFile#(Bit#(10), FPComplex#(2,14)));
  438. RegFile#(Bit#(10), FPComplex#(2,14)) regFile <- mkRegFileLoad("WiFiPacket.txt",0,1023);
  439. return regFile;
  440. endmodule
  441. // module to generate sample packet
  442. (* synthesize *)
  443. module mkTweakedPacket(RegFile#(Bit#(10), FPComplex#(2,14)));
  444. RegFile#(Bit#(10), FPComplex#(2,14)) regFile <- mkRegFileLoad("WiFiTweakedPacket.txt",0,1023);
  445. return regFile;
  446. endmodule