作业3 DDS模块设计

作业要求

在FPGA上设计一个DDS模块,在DE0 开发板上运行,在FPGA芯片内部合成出数字波形即可。不用输出模拟信号,本模块满足以下条件

  • 使用板载晶振的50MHz时钟,合成以下频率的信号
  • 1、500KHz 正弦波信号。 2、1MHz 正弦波信号。 3、3MHz 正弦波信号。
  • 频率字字长32位,波表ROM尺寸为 10比特地址,1024个word
  • 波形格式为2补码格式,12比特量化
  • 每个CLK输出一个有效样点。
  • 输入信号为频率字和频率字输入使能信号
  • 使用板载的拨码开关(Switch)控制生成的波形信号的不同频率。

注意:波表ROM代码是用matlab或C打印生成的。不要手写

人工绘制的电路结构RTL设计图

作业3 DDS模块设计_第1张图片

Quartus扫描生成的电路RTL图

  • 顶层RTL图
    作业3 DDS模块设计_第2张图片
  • DDS_CORE_ROM RTL图
    作业3 DDS模块设计_第3张图片

SignalTap截图

  • 500KHz输出正弦波的样值波形截图
    作业3 DDS模块设计_第4张图片
  • 1MKHz输出正弦波的样值波形截图
    作业3 DDS模块设计_第5张图片
  • 3MKHz输出正弦波的样值波形截图
    作业3 DDS模块设计_第6张图片

设计代码

1. 生成波表ROM的MATLAB代码

function generate_DDS_rom()
clc;
close all;
disp('##########################################');
disp('# generate_DDS_rom() RUN');
disp('##########################################');

%%///////////////////////////////////////////////////
%   set your rom config here
rom_word_len = 12;  % rom data word length in bit
rom_addr_len = 10;  % rom address word length in bit
rom_file_name = 'DDS_CORE_ROM.v';  % rom file name
rom_file_dir  = './';  % rom file dir path
description   = 'DDS CORE ROM FILE' % rom description
%%///////////////////////////////////////////////////

rom_vec_len = 2^rom_addr_len;
index = [0:rom_vec_len-1] .';
rom_data_vec_float = sin(2*pi*index/rom_vec_len);
figure; plot(rom_data_vec_float);    % for debug
rom_data_vec_int = fix(rom_data_vec_float * (2^(rom_word_len-1) - 1));
figure; plot(rom_data_vec_int);    % for debug

rom_cfg.rom_word_len  = rom_word_len   ;
rom_cfg.rom_file_name = rom_file_name  ;
rom_cfg.rom_file_dir  = rom_file_dir   ;
rom_cfg.description   = description    ;
gen_rom_rtl(rom_cfg, rom_data_vec_int);


end % generate_DDS_rom()

% ///////////////////////////////////////////////////////////////////////////////
% gen_rom_rtl()
%   generate synthesizable rom  hdl code(need synthesizer support).
% ///////////////////////////////////////////////////////////////////////////////
% INPUT: 
%   data vector, must be integer value
%   rom word len
%   rom file dir string
%   rom file name string
% OUTPUT:
%   verilog format rom file, all data in 2's complement code format
function gen_rom_rtl(rom_cfg, data_vec);

  rom_word_len   = rom_cfg.rom_word_len  ;
  rom_file_name  = rom_cfg.rom_file_name ;
  rom_file_dir   = rom_cfg.rom_file_dir  ;

  description    = rom_cfg.description   ;
  data_vec_len = length(data_vec);
  addr_word_len  = ceil(log2(data_vec_len));

  % check input be integer value
  data_vec_fixed = fix(data_vec);
  diff_sum = sum(data_vec == data_vec_fixed);
  % all integer elements will cause the diff_sum be vector length 
  if(diff_sum < data_vec_len)
    fprintf(1,'# ERROR, gen_rom_rtl(), input data_vec must be integer value\n');
    return;
  end


  rom_file_dir_name = strcat(rom_file_dir, rom_file_name);

  data_vec_fixed_2c =  data_vec_fixed + (2^rom_word_len) .* (data_vec_fixed < 0);


  romNum        = 2^addr_word_len;
  data_str_cell  = cell(data_vec_len, 1);

  for(idx = 1:data_vec_len)
   data_str_cell{idx} = Dec2BinStr(data_vec_fixed_2c(idx), rom_word_len);
  end % for(idx = 1:data_vec_len)

  if(romNum > data_vec_len)
    for(idx = data_vec_len+1:romNum)
     data_str_cell{idx} = Dec2BinStr(0, rom_word_len); 
   end
  end

  fid_rom_file = fopen(rom_file_dir_name, 'w');
  if(fid_rom_file == -1)
    errMsg = strcat('ERROR, gen_rom_rtl(), create file',rom_file_dir_name, ',failed');
    fprintf(1, '%s\n', errMsg);
    return;
  end

  % rom data print 
  % get rom module name
  rom_name = rom_file_name;
  len_rom_file_name = length(rom_file_name);
  if(rom_name(len_rom_file_name-1:len_rom_file_name) == '.v')
    rom_name(len_rom_file_name-1:len_rom_file_name) = [];
  else
    fprintf(1,'#WARNINIG, gen_rom_rtl(), rom_file_name may error, check it!\n');
  end
  fprintf(fid_rom_file,  ...
  '// ************************************************************** //\n');
  fprintf(fid_rom_file,  ...
  '// FILE    : %s \n', rom_file_name);
  fprintf(fid_rom_file,  ...
  '// DSCP    : %s\n', description);
  fprintf(fid_rom_file,  ...
  '// ABOUT   : auto generated rom file by gen_rom_rtl.m\n');
  fprintf(fid_rom_file,  ...
  '// DATE    : %s \n',  datestr(now));
  fprintf(fid_rom_file,  ...
  '// ************************************************************** //\n');
  % generate the crom module
  fprintf(fid_rom_file, ...
  '// module %s()\n', rom_name);
  fprintf(fid_rom_file, ...
  'module %s(\n', rom_name);
  fprintf(fid_rom_file, ...
  '  CLK    ,           // clock\n');
  fprintf(fid_rom_file, ...
  '  RA     ,           // read address\n');
  fprintf(fid_rom_file, ...
  '  RD     );          // read data\n');

  fprintf(fid_rom_file, ...
  'input          CLK;\n');
  fprintf(fid_rom_file, ...
  'input  [%-2d :0] RA;\n', addr_word_len-1); 
  fprintf(fid_rom_file, ...
  'output [%-2d :0] RD;\n', rom_word_len-1);
  fprintf(fid_rom_file, ...
  'reg    [%-2d :0] RD;\n', rom_word_len-1);

  fprintf(fid_rom_file, ...
  'always @ (posedge CLK)\n'); 
  fprintf(fid_rom_file, ...
  '  case(RA)\n');

  for addr = 0:1:data_vec_len-1
    fprintf(fid_rom_file, ... 
  '     %-2d''d %-6d:RD = #1 %-2d''b %s; ', ...
      addr_word_len,addr, rom_word_len, data_str_cell{addr+1});
    fprintf(fid_rom_file, ... 
  '// %6d 0x%s \n', ...
      data_vec_fixed(addr+1), dec2hex(data_vec_fixed_2c(addr+1)));

  end
  fprintf(fid_rom_file, ...
  '  default : RD = #1 0;\n');
  fprintf(fid_rom_file, ...
  '  endcase\n');

  fprintf(fid_rom_file, ...
  'endmodule \n');
  fclose(fid_rom_file);
  fprintf(1,'# File: %s written\n', rom_file_dir_name);

end % function gen_rom_rtl() 
% ////////////////////////////////////////////////////////////////////
function str = Dec2BinStr(data, word_len)
  str = '';
  for(idx = word_len-1:-1:0)
    bit_val = bitand(1, bitshift(data, -idx));
    str = strcat(str, int2str(bit_val));
  end
end % function Dec2BinStr()

2. 波表ROM代码

module DDS_CORE_ROM(
  CLK    ,           // clock
  RA     ,           // read address
  RD     );          // read data
input          CLK;
input  [9  :0] RA;
output [11 :0] RD;
reg    [11 :0] RD;
always @ (posedge CLK)
  case(RA)
     10'd 0     :RD = #1 12'b 000000000000; //      0 0x0 
     10'd 1     :RD = #1 12'b 000000001100; //     12 0xC 
     10'd 2     :RD = #1 12'b 000000011001; //     25 0x19 
     10'd 3     :RD = #1 12'b 000000100101; //     37 0x25 
     10'd 4     :RD = #1 12'b 000000110010; //     50 0x32 
     10'd 5     :RD = #1 12'b 000000111110; //     62 0x3E 
     10'd 6     :RD = #1 12'b 000001001011; //     75 0x4B 
     10'd 7     :RD = #1 12'b 000001010111; //     87 0x57 
     10'd 8     :RD = #1 12'b 000001100100; //    100 0x64 
     10'd 9     :RD = #1 12'b 000001110000; //    112 0x70 
     10'd 10    :RD = #1 12'b 000001111101; //    125 0x7D 
     10'd 11    :RD = #1 12'b 000010001010; //    138 0x8A 
     10'd 12    :RD = #1 12'b 000010010110; //    150 0x96 
     10'd 13    :RD = #1 12'b 000010100011; //    163 0xA3 
     10'd 14    :RD = #1 12'b 000010101111; //    175 0xAF 
     10'd 15    :RD = #1 12'b 000010111100; //    188 0xBC 
     10'd 16    :RD = #1 12'b 000011001000; //    200 0xC8 
     10'd 17    :RD = #1 12'b 000011010101; //    213 0xD5 
     10'd 18    :RD = #1 12'b 000011100001; //    225 0xE1 
     10'd 19    :RD = #1 12'b 000011101110; //    238 0xEE 
     10'd 20    :RD = #1 12'b 000011111010; //    250 0xFA 
     10'd 21    :RD = #1 12'b 000100000111; //    263 0x107 
     10'd 22    :RD = #1 12'b 000100010011; //    275 0x113 
     10'd 23    :RD = #1 12'b 000100011111; //    287 0x11F 
     10'd 24    :RD = #1 12'b 000100101100; //    300 0x12C 
     10'd 25    :RD = #1 12'b 000100111000; //    312 0x138 
     10'd 26    :RD = #1 12'b 000101000101; //    325 0x145 
     10'd 27    :RD = #1 12'b 000101010001; //    337 0x151 
     10'd 28    :RD = #1 12'b 000101011101; //    349 0x15D 
     10'd 29    :RD = #1 12'b 000101101010; //    362 0x16A 
     10'd 30    :RD = #1 12'b 000101110110; //    374 0x176 
     10'd 31    :RD = #1 12'b 000110000011; //    387 0x183 
     10'd 32    :RD = #1 12'b 000110001111; //    399 0x18F 
     10'd 33    :RD = #1 12'b 000110011011; //    411 0x19B 
     10'd 34    :RD = #1 12'b 000110100111; //    423 0x1A7 
     10'd 35    :RD = #1 12'b 000110110100; //    436 0x1B4 
     10'd 36    :RD = #1 12'b 000111000000; //    448 0x1C0 
     10'd 37    :RD = #1 12'b 000111001100; //    460 0x1CC 
     10'd 38    :RD = #1 12'b 000111011000; //    472 0x1D8 
     10'd 39    :RD = #1 12'b 000111100101; //    485 0x1E5 
     10'd 40    :RD = #1 12'b 000111110001; //    497 0x1F1 
     10'd 41    :RD = #1 12'b 000111111101; //    509 0x1FD 
     10'd 42    :RD = #1 12'b 001000001001; //    521 0x209 
     10'd 43    :RD = #1 12'b 001000010101; //    533 0x215 
     10'd 44    :RD = #1 12'b 001000100001; //    545 0x221 
     10'd 45    :RD = #1 12'b 001000101110; //    558 0x22E 
     10'd 46    :RD = #1 12'b 001000111010; //    570 0x23A 
     10'd 47    :RD = #1 12'b 001001000110; //    582 0x246 
     10'd 48    :RD = #1 12'b 001001010010; //    594 0x252 
     10'd 49    :RD = #1 12'b 001001011110; //    606 0x25E 
     10'd 50    :RD = #1 12'b 001001101010; //    618 0x26A 
     10'd 51    :RD = #1 12'b 001001110110; //    630 0x276 
     10'd 52    :RD = #1 12'b 001010000010; //    642 0x282 
     10'd 53    :RD = #1 12'b 001010001110; //    654 0x28E 
     10'd 54    :RD = #1 12'b 001010011001; //    665 0x299 
     10'd 55    :RD = #1 12'b 001010100101; //    677 0x2A5 
     10'd 56    :RD = #1 12'b 001010110001; //    689 0x2B1 
     10'd 57    :RD = #1 12'b 001010111101; //    701 0x2BD 
     10'd 58    :RD = #1 12'b 001011001001; //    713 0x2C9 
     10'd 59    :RD = #1 12'b 001011010100; //    724 0x2D4 
     10'd 60    :RD = #1 12'b 001011100000; //    736 0x2E0 
     10'd 61    :RD = #1 12'b 001011101100; //    748 0x2EC 
     10'd 62    :RD = #1 12'b 001011111000; //    760 0x2F8 
     10'd 63    :RD = #1 12'b 001100000011; //    771 0x303 
     10'd 64    :RD = #1 12'b 001100001111; //    783 0x30F 
     10'd 65    :RD = #1 12'b 001100011010; //    794 0x31A 
     10'd 66    :RD = #1 12'b 001100100110; //    806 0x326 
     10'd 67    :RD = #1 12'b 001100110010; //    818 0x332 
     10'd 68    :RD = #1 12'b 001100111101; //    829 0x33D 
     10'd 69    :RD = #1 12'b 001101001000; //    840 0x348 
     10'd 70    :RD = #1 12'b 001101010100; //    852 0x354 
     10'd 71    :RD = #1 12'b 001101011111; //    863 0x35F 
     10'd 72    :RD = #1 12'b 001101101011; //    875 0x36B 
     10'd 73    :RD = #1 12'b 001101110110; //    886 0x376 
     10'd 74    :RD = #1 12'b 001110000001; //    897 0x381 
     10'd 75    :RD = #1 12'b 001110001101; //    909 0x38D 
     10'd 76    :RD = #1 12'b 001110011000; //    920 0x398 
     10'd 77    :RD = #1 12'b 001110100011; //    931 0x3A3 
     10'd 78    :RD = #1 12'b 001110101110; //    942 0x3AE 
     10'd 79    :RD = #1 12'b 001110111001; //    953 0x3B9 
     10'd 80    :RD = #1 12'b 001111000100; //    964 0x3C4 
     10'd 81    :RD = #1 12'b 001111010000; //    976 0x3D0 
     10'd 82    :RD = #1 12'b 001111011011; //    987 0x3DB 
     10'd 83    :RD = #1 12'b 001111100110; //    998 0x3E6 
     10'd 84    :RD = #1 12'b 001111110000; //   1008 0x3F0 
     10'd 85    :RD = #1 12'b 001111111011; //   1019 0x3FB 
     10'd 86    :RD = #1 12'b 010000000110; //   1030 0x406 
     10'd 87    :RD = #1 12'b 010000010001; //   1041 0x411 
     10'd 88    :RD = #1 12'b 010000011100; //   1052 0x41C 
     10'd 89    :RD = #1 12'b 010000100111; //   1063 0x427 
     10'd 90    :RD = #1 12'b 010000110001; //   1073 0x431 
     10'd 91    :RD = #1 12'b 010000111100; //   1084 0x43C 
     10'd 92    :RD = #1 12'b 010001000111; //   1095 0x447 
     10'd 93    :RD = #1 12'b 010001010001; //   1105 0x451 
     10'd 94    :RD = #1 12'b 010001011100; //   1116 0x45C 
     10'd 95    :RD = #1 12'b 010001100110; //   1126 0x466 
     10'd 96    :RD = #1 12'b 010001110001; //   1137 0x471 
     10'd 97    :RD = #1 12'b 010001111011; //   1147 0x47B 
     10'd 98    :RD = #1 12'b 010010000110; //   1158 0x486 
     10'd 99    :RD = #1 12'b 010010010000; //   1168 0x490 
     10'd 100   :RD = #1 12'b 010010011010; //   1178 0x49A 
     10'd 101   :RD = #1 12'b 010010100100; //   1188 0x4A4 
     10'd 102   :RD = #1 12'b 010010101111; //   1199 0x4AF 
     10'd 103   :RD = #1 12'b 010010111001; //   1209 0x4B9 
     10'd 104   :RD = #1 12'b 010011000011; //   1219 0x4C3 
     10'd 105   :RD = #1 12'b 010011001101; //   1229 0x4CD 
     10'd 106   :RD = #1 12'b 010011010111; //   1239 0x4D7 
     10'd 107   :RD = #1 12'b 010011100001; //   1249 0x4E1 
     10'd 108   :RD = #1 12'b 010011101011; //   1259 0x4EB 
     10'd 109   :RD = #1 12'b 010011110101; //   1269 0x4F5 
     10'd 110   :RD = #1 12'b 010011111111; //   1279 0x4FF 
     10'd 111   :RD = #1 12'b 010100001000; //   1288 0x508 
     10'd 112   :RD = #1 12'b 010100010010; //   1298 0x512 
     10'd 113   :RD = #1 12'b 010100011100; //   1308 0x51C 
     10'd 114   :RD = #1 12'b 010100100101; //   1317 0x525 
     10'd 115   :RD = #1 12'b 010100101111; //   1327 0x52F 
     10'd 116   :RD = #1 12'b 010100111001; //   1337 0x539 
     10'd 117   :RD = #1 12'b 010101000010; //   1346 0x542 
     10'd 118   :RD = #1 12'b 010101001011; //   1355 0x54B 
     10'd 119   :RD = #1 12'b 010101010101; //   1365 0x555 
     10'd 120   :RD = #1 12'b 010101011110; //   1374 0x55E 
     10'd 121   :RD = #1 12'b 010101100111; //   1383 0x567 
     10'd 122   :RD = #1 12'b 010101110001; //   1393 0x571 
     10'd 123   :RD = #1 12'b 010101111010; //   1402 0x57A 
     10'd 124   :RD = #1 12'b 010110000011; //   1411 0x583 
     10'd 125   :RD = #1 12'b 010110001100; //   1420 0x58C 
     10'd 126   :RD = #1 12'b 010110010101; //   1429 0x595 
     10'd 127   :RD = #1 12'b 010110011110; //   1438 0x59E 
     10'd 128   :RD = #1 12'b 010110100111; //   1447 0x5A7 
     10'd 129   :RD = #1 12'b 010110110000; //   1456 0x5B0 
     10'd 130   :RD = #1 12'b 010110111001; //   1465 0x5B9 
     10'd 131   :RD = #1 12'b 010111000001; //   1473 0x5C1 
     10'd 132   :RD = #1 12'b 010111001010; //   1482 0x5CA 
     10'd 133   :RD = #1 12'b 010111010011; //   1491 0x5D3 
     10'd 134   :RD = #1 12'b 010111011011; //   1499 0x5DB 
     10'd 135   :RD = #1 12'b 010111100100; //   1508 0x5E4 
     10'd 136   :RD = #1 12'b 010111101100; //   1516 0x5EC 
     10'd 137   :RD = #1 12'b 010111110101; //   1525 0x5F5 
     10'd 138   :RD = #1 12'b 010111111101; //   1533 0x5FD 
     10'd 139   :RD = #1 12'b 011000000101; //   1541 0x605 
     10'd 140   :RD = #1 12'b 011000001110; //   1550 0x60E 
     10'd 141   :RD = #1 12'b 011000010110; //   1558 0x616 
     10'd 142   :RD = #1 12'b 011000011110; //   1566 0x61E 
     10'd 143   :RD = #1 12'b 011000100110; //   1574 0x626 
     10'd 144   :RD = #1 12'b 011000101110; //   1582 0x62E 
     10'd 145   :RD = #1 12'b 011000110110; //   1590 0x636 
     10'd 146   :RD = #1 12'b 011000111110; //   1598 0x63E 
     10'd 147   :RD = #1 12'b 011001000101; //   1605 0x645 
     10'd 148   :RD = #1 12'b 011001001101; //   1613 0x64D 
     10'd 149   :RD = #1 12'b 011001010101; //   1621 0x655 
     10'd 150   :RD = #1 12'b 011001011101; //   1629 0x65D 
     10'd 151   :RD = #1 12'b 011001100100; //   1636 0x664 
     10'd 152   :RD = #1 12'b 011001101100; //   1644 0x66C 
     10'd 153   :RD = #1 12'b 011001110011; //   1651 0x673 
     10'd 154   :RD = #1 12'b 011001111011; //   1659 0x67B 
     10'd 155   :RD = #1 12'b 011010000010; //   1666 0x682 
     10'd 156   :RD = #1 12'b 011010001001; //   1673 0x689 
     10'd 157   :RD = #1 12'b 011010010000; //   1680 0x690 
     10'd 158   :RD = #1 12'b 011010010111; //   1687 0x697 
     10'd 159   :RD = #1 12'b 011010011111; //   1695 0x69F 
     10'd 160   :RD = #1 12'b 011010100110; //   1702 0x6A6 
     10'd 161   :RD = #1 12'b 011010101100; //   1708 0x6AC 
     10'd 162   :RD = #1 12'b 011010110011; //   1715 0x6B3 
     10'd 163   :RD = #1 12'b 011010111010; //   1722 0x6BA 
     10'd 164   :RD = #1 12'b 011011000001; //   1729 0x6C1 
     10'd 165   :RD = #1 12'b 011011001000; //   1736 0x6C8 
     10'd 166   :RD = #1 12'b 011011001110; //   1742 0x6CE 
     10'd 167   :RD = #1 12'b 011011010101; //   1749 0x6D5 
     10'd 168   :RD = #1 12'b 011011011011; //   1755 0x6DB 
     10'd 169   :RD = #1 12'b 011011100010; //   1762 0x6E2 
     10'd 170   :RD = #1 12'b 011011101000; //   1768 0x6E8 
     10'd 171   :RD = #1 12'b 011011101110; //   1774 0x6EE 
     10'd 172   :RD = #1 12'b 011011110101; //   1781 0x6F5 
     10'd 173   :RD = #1 12'b 011011111011; //   1787 0x6FB 
     10'd 174   :RD = #1 12'b 011100000001; //   1793 0x701 
     10'd 175   :RD = #1 12'b 011100000111; //   1799 0x707 
     10'd 176   :RD = #1 12'b 011100001101; //   1805 0x70D 
     10'd 177   :RD = #1 12'b 011100010011; //   1811 0x713 
     10'd 178   :RD = #1 12'b 011100011000; //   1816 0x718 
     10'd 179   :RD = #1 12'b 011100011110; //   1822 0x71E 
     10'd 180   :RD = #1 12'b 011100100100; //   1828 0x724 
     10'd 181   :RD = #1 12'b 011100101010; //   1834 0x72A 
     10'd 182   :RD = #1 12'b 011100101111; //   1839 0x72F 
     10'd 183   :RD = #1 12'b 011100110101; //   1845 0x735 
     10'd 184   :RD = #1 12'b 011100111010; //   1850 0x73A 
     10'd 185   :RD = #1 12'b 011100111111; //   1855 0x73F 
     10'd 186   :RD = #1 12'b 011101000101; //   1861 0x745 
     10'd 187   :RD = #1 12'b 011101001010; //   1866 0x74A 
     10'd 188   :RD = #1 12'b 011101001111; //   1871 0x74F 
     10'd 189   :RD = #1 12'b 011101010100; //   1876 0x754 
     10'd 190   :RD = #1 12'b 011101011001; //   1881 0x759 
     10'd 191   :RD = #1 12'b 011101011110; //   1886 0x75E 
     10'd 192   :RD = #1 12'b 011101100011; //   1891 0x763 
     10'd 193   :RD = #1 12'b 011101100111; //   1895 0x767 
     10'd 194   :RD = #1 12'b 011101101100; //   1900 0x76C 
     10'd 195   :RD = #1 12'b 011101110001; //   1905 0x771 
     10'd 196   :RD = #1 12'b 011101110101; //   1909 0x775 
     10'd 197   :RD = #1 12'b 011101111010; //   1914 0x77A 
     10'd 198   :RD = #1 12'b 011101111110; //   1918 0x77E 
     10'd 199   :RD = #1 12'b 011110000011; //   1923 0x783 
     10'd 200   :RD = #1 12'b 011110000111; //   1927 0x787 
     10'd 201   :RD = #1 12'b 011110001011; //   1931 0x78B 
     10'd 202   :RD = #1 12'b 011110001111; //   1935 0x78F 
     10'd 203   :RD = #1 12'b 011110010011; //   1939 0x793 
     10'd 204   :RD = #1 12'b 011110010111; //   1943 0x797 
     10'd 205   :RD = #1 12'b 011110011011; //   1947 0x79B 
     10'd 206   :RD = #1 12'b 011110011111; //   1951 0x79F 
     10'd 207   :RD = #1 12'b 011110100011; //   1955 0x7A3 
     10'd 208   :RD = #1 12'b 011110100110; //   1958 0x7A6 
     10'd 209   :RD = #1 12'b 011110101010; //   1962 0x7AA 
     10'd 210   :RD = #1 12'b 011110101110; //   1966 0x7AE 
     10'd 211   :RD = #1 12'b 011110110001; //   1969 0x7B1 
     10'd 212   :RD = #1 12'b 011110110100; //   1972 0x7B4 
     10'd 213   :RD = #1 12'b 011110111000; //   1976 0x7B8 
     10'd 214   :RD = #1 12'b 011110111011; //   1979 0x7BB 
     10'd 215   :RD = #1 12'b 011110111110; //   1982 0x7BE 
     10'd 216   :RD = #1 12'b 011111000001; //   1985 0x7C1 
     10'd 217   :RD = #1 12'b 011111000100; //   1988 0x7C4 
     10'd 218   :RD = #1 12'b 011111000111; //   1991 0x7C7 
     10'd 219   :RD = #1 12'b 011111001010; //   1994 0x7CA 
     10'd 220   :RD = #1 12'b 011111001101; //   1997 0x7CD 
     10'd 221   :RD = #1 12'b 011111001111; //   1999 0x7CF 
     10'd 222   :RD = #1 12'b 011111010010; //   2002 0x7D2 
     10'd 223   :RD = #1 12'b 011111010101; //   2005 0x7D5 
     10'd 224   :RD = #1 12'b 011111010111; //   2007 0x7D7 
     10'd 225   :RD = #1 12'b 011111011010; //   2010 0x7DA 
     10'd 226   :RD = #1 12'b 011111011100; //   2012 0x7DC 
     10'd 227   :RD = #1 12'b 011111011110; //   2014 0x7DE 
     10'd 228   :RD = #1 12'b 011111100000; //   2016 0x7E0 
     10'd 229   :RD = #1 12'b 011111100010; //   2018 0x7E2 
     10'd 230   :RD = #1 12'b 011111100101; //   2021 0x7E5 
     10'd 231   :RD = #1 12'b 011111100110; //   2022 0x7E6 
     10'd 232   :RD = #1 12'b 011111101000; //   2024 0x7E8 
     10'd 233   :RD = #1 12'b 011111101010; //   2026 0x7EA 
     10'd 234   :RD = #1 12'b 011111101100; //   2028 0x7EC 
     10'd 235   :RD = #1 12'b 011111101110; //   2030 0x7EE 
     10'd 236   :RD = #1 12'b 011111101111; //   2031 0x7EF 
     10'd 237   :RD = #1 12'b 011111110001; //   2033 0x7F1 
     10'd 238   :RD = #1 12'b 011111110010; //   2034 0x7F2 
     10'd 239   :RD = #1 12'b 011111110011; //   2035 0x7F3 
     10'd 240   :RD = #1 12'b 011111110101; //   2037 0x7F5 
     10'd 241   :RD = #1 12'b 011111110110; //   2038 0x7F6 
     10'd 242   :RD = #1 12'b 011111110111; //   2039 0x7F7 
     10'd 243   :RD = #1 12'b 011111111000; //   2040 0x7F8 
     10'd 244   :RD = #1 12'b 011111111001; //   2041 0x7F9 
     10'd 245   :RD = #1 12'b 011111111010; //   2042 0x7FA 
     10'd 246   :RD = #1 12'b 011111111011; //   2043 0x7FB 
     10'd 247   :RD = #1 12'b 011111111011; //   2043 0x7FB 
     10'd 248   :RD = #1 12'b 011111111100; //   2044 0x7FC 
     10'd 249   :RD = #1 12'b 011111111101; //   2045 0x7FD 
     10'd 250   :RD = #1 12'b 011111111101; //   2045 0x7FD 
     10'd 251   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 252   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 253   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 254   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 255   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 256   :RD = #1 12'b 011111111111; //   2047 0x7FF 
     10'd 257   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 258   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 259   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 260   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 261   :RD = #1 12'b 011111111110; //   2046 0x7FE 
     10'd 262   :RD = #1 12'b 011111111101; //   2045 0x7FD 
     10'd 263   :RD = #1 12'b 011111111101; //   2045 0x7FD 
     10'd 264   :RD = #1 12'b 011111111100; //   2044 0x7FC 
     10'd 265   :RD = #1 12'b 011111111011; //   2043 0x7FB 
     10'd 266   :RD = #1 12'b 011111111011; //   2043 0x7FB 
     10'd 267   :RD = #1 12'b 011111111010; //   2042 0x7FA 
     10'd 268   :RD = #1 12'b 011111111001; //   2041 0x7F9 
     10'd 269   :RD = #1 12'b 011111111000; //   2040 0x7F8 
     10'd 270   :RD = #1 12'b 011111110111; //   2039 0x7F7 
     10'd 271   :RD = #1 12'b 011111110110; //   2038 0x7F6 
     10'd 272   :RD = #1 12'b 011111110101; //   2037 0x7F5 
     10'd 273   :RD = #1 12'b 011111110011; //   2035 0x7F3 
     10'd 274   :RD = #1 12'b 011111110010; //   2034 0x7F2 
     10'd 275   :RD = #1 12'b 011111110001; //   2033 0x7F1 
     10'd 276   :RD = #1 12'b 011111101111; //   2031 0x7EF 
     10'd 277   :RD = #1 12'b 011111101110; //   2030 0x7EE 
     10'd 278   :RD = #1 12'b 011111101100; //   2028 0x7EC 
     10'd 279   :RD = #1 12'b 011111101010; //   2026 0x7EA 
     10'd 280   :RD = #1 12'b 011111101000; //   2024 0x7E8 
     10'd 281   :RD = #1 12'b 011111100110; //   2022 0x7E6 
     10'd 282   :RD = #1 12'b 011111100101; //   2021 0x7E5 
     10'd 283   :RD = #1 12'b 011111100010; //   2018 0x7E2 
     10'd 284   :RD = #1 12'b 011111100000; //   2016 0x7E0 
     10'd 285   :RD = #1 12'b 011111011110; //   2014 0x7DE 
     10'd 286   :RD = #1 12'b 011111011100; //   2012 0x7DC 
     10'd 287   :RD = #1 12'b 011111011010; //   2010 0x7DA 
     10'd 288   :RD = #1 12'b 011111010111; //   2007 0x7D7 
     10'd 289   :RD = #1 12'b 011111010101; //   2005 0x7D5 
     10'd 290   :RD = #1 12'b 011111010010; //   2002 0x7D2 
     10'd 291   :RD = #1 12'b 011111001111; //   1999 0x7CF 
     10'd 292   :RD = #1 12'b 011111001101; //   1997 0x7CD 
     10'd 293   :RD = #1 12'b 011111001010; //   1994 0x7CA 
     10'd 294   :RD = #1 12'b 011111000111; //   1991 0x7C7 
     10'd 295   :RD = #1 12'b 011111000100; //   1988 0x7C4 
     10'd 296   :RD = #1 12'b 011111000001; //   1985 0x7C1 
     10'd 297   :RD = #1 12'b 011110111110; //   1982 0x7BE 
     10'd 298   :RD = #1 12'b 011110111011; //   1979 0x7BB 
     10'd 299   :RD = #1 12'b 011110111000; //   1976 0x7B8 
     10'd 300   :RD = #1 12'b 011110110100; //   1972 0x7B4 
     10'd 301   :RD = #1 12'b 011110110001; //   1969 0x7B1 
     10'd 302   :RD = #1 12'b 011110101110; //   1966 0x7AE 
     10'd 303   :RD = #1 12'b 011110101010; //   1962 0x7AA 
     10'd 304   :RD = #1 12'b 011110100110; //   1958 0x7A6 
     10'd 305   :RD = #1 12'b 011110100011; //   1955 0x7A3 
     10'd 306   :RD = #1 12'b 011110011111; //   1951 0x79F 
     10'd 307   :RD = #1 12'b 011110011011; //   1947 0x79B 
     10'd 308   :RD = #1 12'b 011110010111; //   1943 0x797 
     10'd 309   :RD = #1 12'b 011110010011; //   1939 0x793 
     10'd 310   :RD = #1 12'b 011110001111; //   1935 0x78F 
     10'd 311   :RD = #1 12'b 011110001011; //   1931 0x78B 
     10'd 312   :RD = #1 12'b 011110000111; //   1927 0x787 
     10'd 313   :RD = #1 12'b 011110000011; //   1923 0x783 
     10'd 314   :RD = #1 12'b 011101111110; //   1918 0x77E 
     10'd 315   :RD = #1 12'b 011101111010; //   1914 0x77A 
     10'd 316   :RD = #1 12'b 011101110101; //   1909 0x775 
     10'd 317   :RD = #1 12'b 011101110001; //   1905 0x771 
     10'd 318   :RD = #1 12'b 011101101100; //   1900 0x76C 
     10'd 319   :RD = #1 12'b 011101100111; //   1895 0x767 
     10'd 320   :RD = #1 12'b 011101100011; //   1891 0x763 
     10'd 321   :RD = #1 12'b 011101011110; //   1886 0x75E 
     10'd 322   :RD = #1 12'b 011101011001; //   1881 0x759 
     10'd 323   :RD = #1 12'b 011101010100; //   1876 0x754 
     10'd 324   :RD = #1 12'b 011101001111; //   1871 0x74F 
     10'd 325   :RD = #1 12'b 011101001010; //   1866 0x74A 
     10'd 326   :RD = #1 12'b 011101000101; //   1861 0x745 
     10'd 327   :RD = #1 12'b 011100111111; //   1855 0x73F 
     10'd 328   :RD = #1 12'b 011100111010; //   1850 0x73A 
     10'd 329   :RD = #1 12'b 011100110101; //   1845 0x735 
     10'd 330   :RD = #1 12'b 011100101111; //   1839 0x72F 
     10'd 331   :RD = #1 12'b 011100101010; //   1834 0x72A 
     10'd 332   :RD = #1 12'b 011100100100; //   1828 0x724 
     10'd 333   :RD = #1 12'b 011100011110; //   1822 0x71E 
     10'd 334   :RD = #1 12'b 011100011000; //   1816 0x718 
     10'd 335   :RD = #1 12'b 011100010011; //   1811 0x713 
     10'd 336   :RD = #1 12'b 011100001101; //   1805 0x70D 
     10'd 337   :RD = #1 12'b 011100000111; //   1799 0x707 
     10'd 338   :RD = #1 12'b 011100000001; //   1793 0x701 
     10'd 339   :RD = #1 12'b 011011111011; //   1787 0x6FB 
     10'd 340   :RD = #1 12'b 011011110101; //   1781 0x6F5 
     10'd 341   :RD = #1 12'b 011011101110; //   1774 0x6EE 
     10'd 342   :RD = #1 12'b 011011101000; //   1768 0x6E8 
     10'd 343   :RD = #1 12'b 011011100010; //   1762 0x6E2 
     10'd 344   :RD = #1 12'b 011011011011; //   1755 0x6DB 
     10'd 345   :RD = #1 12'b 011011010101; //   1749 0x6D5 
     10'd 346   :RD = #1 12'b 011011001110; //   1742 0x6CE 
     10'd 347   :RD = #1 12'b 011011001000; //   1736 0x6C8 
     10'd 348   :RD = #1 12'b 011011000001; //   1729 0x6C1 
     10'd 349   :RD = #1 12'b 011010111010; //   1722 0x6BA 
     10'd 350   :RD = #1 12'b 011010110011; //   1715 0x6B3 
     10'd 351   :RD = #1 12'b 011010101100; //   1708 0x6AC 
     10'd 352   :RD = #1 12'b 011010100110; //   1702 0x6A6 
     10'd 353   :RD = #1 12'b 011010011111; //   1695 0x69F 
     10'd 354   :RD = #1 12'b 011010010111; //   1687 0x697 
     10'd 355   :RD = #1 12'b 011010010000; //   1680 0x690 
     10'd 356   :RD = #1 12'b 011010001001; //   1673 0x689 
     10'd 357   :RD = #1 12'b 011010000010; //   1666 0x682 
     10'd 358   :RD = #1 12'b 011001111011; //   1659 0x67B 
     10'd 359   :RD = #1 12'b 011001110011; //   1651 0x673 
     10'd 360   :RD = #1 12'b 011001101100; //   1644 0x66C 
     10'd 361   :RD = #1 12'b 011001100100; //   1636 0x664 
     10'd 362   :RD = #1 12'b 011001011101; //   1629 0x65D 
     10'd 363   :RD = #1 12'b 011001010101; //   1621 0x655 
     10'd 364   :RD = #1 12'b 011001001101; //   1613 0x64D 
     10'd 365   :RD = #1 12'b 011001000101; //   1605 0x645 
     10'd 366   :RD = #1 12'b 011000111110; //   1598 0x63E 
     10'd 367   :RD = #1 12'b 011000110110; //   1590 0x636 
     10'd 368   :RD = #1 12'b 011000101110; //   1582 0x62E 
     10'd 369   :RD = #1 12'b 011000100110; //   1574 0x626 
     10'd 370   :RD = #1 12'b 011000011110; //   1566 0x61E 
     10'd 371   :RD = #1 12'b 011000010110; //   1558 0x616 
     10'd 372   :RD = #1 12'b 011000001110; //   1550 0x60E 
     10'd 373   :RD = #1 12'b 011000000101; //   1541 0x605 
     10'd 374   :RD = #1 12'b 010111111101; //   1533 0x5FD 
     10'd 375   :RD = #1 12'b 010111110101; //   1525 0x5F5 
     10'd 376   :RD = #1 12'b 010111101100; //   1516 0x5EC 
     10'd 377   :RD = #1 12'b 010111100100; //   1508 0x5E4 
     10'd 378   :RD = #1 12'b 010111011011; //   1499 0x5DB 
     10'd 379   :RD = #1 12'b 010111010011; //   1491 0x5D3 
     10'd 380   :RD = #1 12'b 010111001010; //   1482 0x5CA 
     10'd 381   :RD = #1 12'b 010111000001; //   1473 0x5C1 
     10'd 382   :RD = #1 12'b 010110111001; //   1465 0x5B9 
     10'd 383   :RD = #1 12'b 010110110000; //   1456 0x5B0 
     10'd 384   :RD = #1 12'b 010110100111; //   1447 0x5A7 
     10'd 385   :RD = #1 12'b 010110011110; //   1438 0x59E 
     10'd 386   :RD = #1 12'b 010110010101; //   1429 0x595 
     10'd 387   :RD = #1 12'b 010110001100; //   1420 0x58C 
     10'd 388   :RD = #1 12'b 010110000011; //   1411 0x583 
     10'd 389   :RD = #1 12'b 010101111010; //   1402 0x57A 
     10'd 390   :RD = #1 12'b 010101110001; //   1393 0x571 
     10'd 391   :RD = #1 12'b 010101100111; //   1383 0x567 
     10'd 392   :RD = #1 12'b 010101011110; //   1374 0x55E 
     10'd 393   :RD = #1 12'b 010101010101; //   1365 0x555 
     10'd 394   :RD = #1 12'b 010101001011; //   1355 0x54B 
     10'd 395   :RD = #1 12'b 010101000010; //   1346 0x542 
     10'd 396   :RD = #1 12'b 010100111001; //   1337 0x539 
     10'd 397   :RD = #1 12'b 010100101111; //   1327 0x52F 
     10'd 398   :RD = #1 12'b 010100100101; //   1317 0x525 
     10'd 399   :RD = #1 12'b 010100011100; //   1308 0x51C 
     10'd 400   :RD = #1 12'b 010100010010; //   1298 0x512 
     10'd 401   :RD = #1 12'b 010100001000; //   1288 0x508 
     10'd 402   :RD = #1 12'b 010011111111; //   1279 0x4FF 
     10'd 403   :RD = #1 12'b 010011110101; //   1269 0x4F5 
     10'd 404   :RD = #1 12'b 010011101011; //   1259 0x4EB 
     10'd 405   :RD = #1 12'b 010011100001; //   1249 0x4E1 
     10'd 406   :RD = #1 12'b 010011010111; //   1239 0x4D7 
     10'd 407   :RD = #1 12'b 010011001101; //   1229 0x4CD 
     10'd 408   :RD = #1 12'b 010011000011; //   1219 0x4C3 
     10'd 409   :RD = #1 12'b 010010111001; //   1209 0x4B9 
     10'd 410   :RD = #1 12'b 010010101111; //   1199 0x4AF 
     10'd 411   :RD = #1 12'b 010010100100; //   1188 0x4A4 
     10'd 412   :RD = #1 12'b 010010011010; //   1178 0x49A 
     10'd 413   :RD = #1 12'b 010010010000; //   1168 0x490 
     10'd 414   :RD = #1 12'b 010010000110; //   1158 0x486 
     10'd 415   :RD = #1 12'b 010001111011; //   1147 0x47B 
     10'd 416   :RD = #1 12'b 010001110001; //   1137 0x471 
     10'd 417   :RD = #1 12'b 010001100110; //   1126 0x466 
     10'd 418   :RD = #1 12'b 010001011100; //   1116 0x45C 
     10'd 419   :RD = #1 12'b 010001010001; //   1105 0x451 
     10'd 420   :RD = #1 12'b 010001000111; //   1095 0x447 
     10'd 421   :RD = #1 12'b 010000111100; //   1084 0x43C 
     10'd 422   :RD = #1 12'b 010000110001; //   1073 0x431 
     10'd 423   :RD = #1 12'b 010000100111; //   1063 0x427 
     10'd 424   :RD = #1 12'b 010000011100; //   1052 0x41C 
     10'd 425   :RD = #1 12'b 010000010001; //   1041 0x411 
     10'd 426   :RD = #1 12'b 010000000110; //   1030 0x406 
     10'd 427   :RD = #1 12'b 001111111011; //   1019 0x3FB 
     10'd 428   :RD = #1 12'b 001111110000; //   1008 0x3F0 
     10'd 429   :RD = #1 12'b 001111100110; //    998 0x3E6 
     10'd 430   :RD = #1 12'b 001111011011; //    987 0x3DB 
     10'd 431   :RD = #1 12'b 001111010000; //    976 0x3D0 
     10'd 432   :RD = #1 12'b 001111000100; //    964 0x3C4 
     10'd 433   :RD = #1 12'b 001110111001; //    953 0x3B9 
     10'd 434   :RD = #1 12'b 001110101110; //    942 0x3AE 
     10'd 435   :RD = #1 12'b 001110100011; //    931 0x3A3 
     10'd 436   :RD = #1 12'b 001110011000; //    920 0x398 
     10'd 437   :RD = #1 12'b 001110001101; //    909 0x38D 
     10'd 438   :RD = #1 12'b 001110000001; //    897 0x381 
     10'd 439   :RD = #1 12'b 001101110110; //    886 0x376 
     10'd 440   :RD = #1 12'b 001101101011; //    875 0x36B 
     10'd 441   :RD = #1 12'b 001101011111; //    863 0x35F 
     10'd 442   :RD = #1 12'b 001101010100; //    852 0x354 
     10'd 443   :RD = #1 12'b 001101001000; //    840 0x348 
     10'd 444   :RD = #1 12'b 001100111101; //    829 0x33D 
     10'd 445   :RD = #1 12'b 001100110010; //    818 0x332 
     10'd 446   :RD = #1 12'b 001100100110; //    806 0x326 
     10'd 447   :RD = #1 12'b 001100011010; //    794 0x31A 
     10'd 448   :RD = #1 12'b 001100001111; //    783 0x30F 
     10'd 449   :RD = #1 12'b 001100000011; //    771 0x303 
     10'd 450   :RD = #1 12'b 001011111000; //    760 0x2F8 
     10'd 451   :RD = #1 12'b 001011101100; //    748 0x2EC 
     10'd 452   :RD = #1 12'b 001011100000; //    736 0x2E0 
     10'd 453   :RD = #1 12'b 001011010100; //    724 0x2D4 
     10'd 454   :RD = #1 12'b 001011001001; //    713 0x2C9 
     10'd 455   :RD = #1 12'b 001010111101; //    701 0x2BD 
     10'd 456   :RD = #1 12'b 001010110001; //    689 0x2B1 
     10'd 457   :RD = #1 12'b 001010100101; //    677 0x2A5 
     10'd 458   :RD = #1 12'b 001010011001; //    665 0x299 
     10'd 459   :RD = #1 12'b 001010001110; //    654 0x28E 
     10'd 460   :RD = #1 12'b 001010000010; //    642 0x282 
     10'd 461   :RD = #1 12'b 001001110110; //    630 0x276 
     10'd 462   :RD = #1 12'b 001001101010; //    618 0x26A 
     10'd 463   :RD = #1 12'b 001001011110; //    606 0x25E 
     10'd 464   :RD = #1 12'b 001001010010; //    594 0x252 
     10'd 465   :RD = #1 12'b 001001000110; //    582 0x246 
     10'd 466   :RD = #1 12'b 001000111010; //    570 0x23A 
     10'd 467   :RD = #1 12'b 001000101110; //    558 0x22E 
     10'd 468   :RD = #1 12'b 001000100001; //    545 0x221 
     10'd 469   :RD = #1 12'b 001000010101; //    533 0x215 
     10'd 470   :RD = #1 12'b 001000001001; //    521 0x209 
     10'd 471   :RD = #1 12'b 000111111101; //    509 0x1FD 
     10'd 472   :RD = #1 12'b 000111110001; //    497 0x1F1 
     10'd 473   :RD = #1 12'b 000111100101; //    485 0x1E5 
     10'd 474   :RD = #1 12'b 000111011000; //    472 0x1D8 
     10'd 475   :RD = #1 12'b 000111001100; //    460 0x1CC 
     10'd 476   :RD = #1 12'b 000111000000; //    448 0x1C0 
     10'd 477   :RD = #1 12'b 000110110100; //    436 0x1B4 
     10'd 478   :RD = #1 12'b 000110100111; //    423 0x1A7 
     10'd 479   :RD = #1 12'b 000110011011; //    411 0x19B 
     10'd 480   :RD = #1 12'b 000110001111; //    399 0x18F 
     10'd 481   :RD = #1 12'b 000110000011; //    387 0x183 
     10'd 482   :RD = #1 12'b 000101110110; //    374 0x176 
     10'd 483   :RD = #1 12'b 000101101010; //    362 0x16A 
     10'd 484   :RD = #1 12'b 000101011101; //    349 0x15D 
     10'd 485   :RD = #1 12'b 000101010001; //    337 0x151 
     10'd 486   :RD = #1 12'b 000101000101; //    325 0x145 
     10'd 487   :RD = #1 12'b 000100111000; //    312 0x138 
     10'd 488   :RD = #1 12'b 000100101100; //    300 0x12C 
     10'd 489   :RD = #1 12'b 000100011111; //    287 0x11F 
     10'd 490   :RD = #1 12'b 000100010011; //    275 0x113 
     10'd 491   :RD = #1 12'b 000100000111; //    263 0x107 
     10'd 492   :RD = #1 12'b 000011111010; //    250 0xFA 
     10'd 493   :RD = #1 12'b 000011101110; //    238 0xEE 
     10'd 494   :RD = #1 12'b 000011100001; //    225 0xE1 
     10'd 495   :RD = #1 12'b 000011010101; //    213 0xD5 
     10'd 496   :RD = #1 12'b 000011001000; //    200 0xC8 
     10'd 497   :RD = #1 12'b 000010111100; //    188 0xBC 
     10'd 498   :RD = #1 12'b 000010101111; //    175 0xAF 
     10'd 499   :RD = #1 12'b 000010100011; //    163 0xA3 
     10'd 500   :RD = #1 12'b 000010010110; //    150 0x96 
     10'd 501   :RD = #1 12'b 000010001010; //    138 0x8A 
     10'd 502   :RD = #1 12'b 000001111101; //    125 0x7D 
     10'd 503   :RD = #1 12'b 000001110000; //    112 0x70 
     10'd 504   :RD = #1 12'b 000001100100; //    100 0x64 
     10'd 505   :RD = #1 12'b 000001010111; //     87 0x57 
     10'd 506   :RD = #1 12'b 000001001011; //     75 0x4B 
     10'd 507   :RD = #1 12'b 000000111110; //     62 0x3E 
     10'd 508   :RD = #1 12'b 000000110010; //     50 0x32 
     10'd 509   :RD = #1 12'b 000000100101; //     37 0x25 
     10'd 510   :RD = #1 12'b 000000011001; //     25 0x19 
     10'd 511   :RD = #1 12'b 000000001100; //     12 0xC 
     10'd 512   :RD = #1 12'b 000000000000; //      0 0x0 
     10'd 513   :RD = #1 12'b 111111110100; //    -12 0xFF4 
     10'd 514   :RD = #1 12'b 111111100111; //    -25 0xFE7 
     10'd 515   :RD = #1 12'b 111111011011; //    -37 0xFDB 
     10'd 516   :RD = #1 12'b 111111001110; //    -50 0xFCE 
     10'd 517   :RD = #1 12'b 111111000010; //    -62 0xFC2 
     10'd 518   :RD = #1 12'b 111110110101; //    -75 0xFB5 
     10'd 519   :RD = #1 12'b 111110101001; //    -87 0xFA9 
     10'd 520   :RD = #1 12'b 111110011100; //   -100 0xF9C 
     10'd 521   :RD = #1 12'b 111110010000; //   -112 0xF90 
     10'd 522   :RD = #1 12'b 111110000011; //   -125 0xF83 
     10'd 523   :RD = #1 12'b 111101110110; //   -138 0xF76 
     10'd 524   :RD = #1 12'b 111101101010; //   -150 0xF6A 
     10'd 525   :RD = #1 12'b 111101011101; //   -163 0xF5D 
     10'd 526   :RD = #1 12'b 111101010001; //   -175 0xF51 
     10'd 527   :RD = #1 12'b 111101000100; //   -188 0xF44 
     10'd 528   :RD = #1 12'b 111100111000; //   -200 0xF38 
     10'd 529   :RD = #1 12'b 111100101011; //   -213 0xF2B 
     10'd 530   :RD = #1 12'b 111100011111; //   -225 0xF1F 
     10'd 531   :RD = #1 12'b 111100010010; //   -238 0xF12 
     10'd 532   :RD = #1 12'b 111100000110; //   -250 0xF06 
     10'd 533   :RD = #1 12'b 111011111001; //   -263 0xEF9 
     10'd 534   :RD = #1 12'b 111011101101; //   -275 0xEED 
     10'd 535   :RD = #1 12'b 111011100001; //   -287 0xEE1 
     10'd 536   :RD = #1 12'b 111011010100; //   -300 0xED4 
     10'd 537   :RD = #1 12'b 111011001000; //   -312 0xEC8 
     10'd 538   :RD = #1 12'b 111010111011; //   -325 0xEBB 
     10'd 539   :RD = #1 12'b 111010101111; //   -337 0xEAF 
     10'd 540   :RD = #1 12'b 111010100011; //   -349 0xEA3 
     10'd 541   :RD = #1 12'b 111010010110; //   -362 0xE96 
     10'd 542   :RD = #1 12'b 111010001010; //   -374 0xE8A 
     10'd 543   :RD = #1 12'b 111001111101; //   -387 0xE7D 
     10'd 544   :RD = #1 12'b 111001110001; //   -399 0xE71 
     10'd 545   :RD = #1 12'b 111001100101; //   -411 0xE65 
     10'd 546   :RD = #1 12'b 111001011001; //   -423 0xE59 
     10'd 547   :RD = #1 12'b 111001001100; //   -436 0xE4C 
     10'd 548   :RD = #1 12'b 111001000000; //   -448 0xE40 
     10'd 549   :RD = #1 12'b 111000110100; //   -460 0xE34 
     10'd 550   :RD = #1 12'b 111000101000; //   -472 0xE28 
     10'd 551   :RD = #1 12'b 111000011011; //   -485 0xE1B 
     10'd 552   :RD = #1 12'b 111000001111; //   -497 0xE0F 
     10'd 553   :RD = #1 12'b 111000000011; //   -509 0xE03 
     10'd 554   :RD = #1 12'b 110111110111; //   -521 0xDF7 
     10'd 555   :RD = #1 12'b 110111101011; //   -533 0xDEB 
     10'd 556   :RD = #1 12'b 110111011111; //   -545 0xDDF 
     10'd 557   :RD = #1 12'b 110111010010; //   -558 0xDD2 
     10'd 558   :RD = #1 12'b 110111000110; //   -570 0xDC6 
     10'd 559   :RD = #1 12'b 110110111010; //   -582 0xDBA 
     10'd 560   :RD = #1 12'b 110110101110; //   -594 0xDAE 
     10'd 561   :RD = #1 12'b 110110100010; //   -606 0xDA2 
     10'd 562   :RD = #1 12'b 110110010110; //   -618 0xD96 
     10'd 563   :RD = #1 12'b 110110001010; //   -630 0xD8A 
     10'd 564   :RD = #1 12'b 110101111110; //   -642 0xD7E 
     10'd 565   :RD = #1 12'b 110101110010; //   -654 0xD72 
     10'd 566   :RD = #1 12'b 110101100111; //   -665 0xD67 
     10'd 567   :RD = #1 12'b 110101011011; //   -677 0xD5B 
     10'd 568   :RD = #1 12'b 110101001111; //   -689 0xD4F 
     10'd 569   :RD = #1 12'b 110101000011; //   -701 0xD43 
     10'd 570   :RD = #1 12'b 110100110111; //   -713 0xD37 
     10'd 571   :RD = #1 12'b 110100101100; //   -724 0xD2C 
     10'd 572   :RD = #1 12'b 110100100000; //   -736 0xD20 
     10'd 573   :RD = #1 12'b 110100010100; //   -748 0xD14 
     10'd 574   :RD = #1 12'b 110100001000; //   -760 0xD08 
     10'd 575   :RD = #1 12'b 110011111101; //   -771 0xCFD 
     10'd 576   :RD = #1 12'b 110011110001; //   -783 0xCF1 
     10'd 577   :RD = #1 12'b 110011100110; //   -794 0xCE6 
     10'd 578   :RD = #1 12'b 110011011010; //   -806 0xCDA 
     10'd 579   :RD = #1 12'b 110011001110; //   -818 0xCCE 
     10'd 580   :RD = #1 12'b 110011000011; //   -829 0xCC3 
     10'd 581   :RD = #1 12'b 110010111000; //   -840 0xCB8 
     10'd 582   :RD = #1 12'b 110010101100; //   -852 0xCAC 
     10'd 583   :RD = #1 12'b 110010100001; //   -863 0xCA1 
     10'd 584   :RD = #1 12'b 110010010101; //   -875 0xC95 
     10'd 585   :RD = #1 12'b 110010001010; //   -886 0xC8A 
     10'd 586   :RD = #1 12'b 110001111111; //   -897 0xC7F 
     10'd 587   :RD = #1 12'b 110001110011; //   -909 0xC73 
     10'd 588   :RD = #1 12'b 110001101000; //   -920 0xC68 
     10'd 589   :RD = #1 12'b 110001011101; //   -931 0xC5D 
     10'd 590   :RD = #1 12'b 110001010010; //   -942 0xC52 
     10'd 591   :RD = #1 12'b 110001000111; //   -953 0xC47 
     10'd 592   :RD = #1 12'b 110000111100; //   -964 0xC3C 
     10'd 593   :RD = #1 12'b 110000110000; //   -976 0xC30 
     10'd 594   :RD = #1 12'b 110000100101; //   -987 0xC25 
     10'd 595   :RD = #1 12'b 110000011010; //   -998 0xC1A 
     10'd 596   :RD = #1 12'b 110000010000; //  -1008 0xC10 
     10'd 597   :RD = #1 12'b 110000000101; //  -1019 0xC05 
     10'd 598   :RD = #1 12'b 101111111010; //  -1030 0xBFA 
     10'd 599   :RD = #1 12'b 101111101111; //  -1041 0xBEF 
     10'd 600   :RD = #1 12'b 101111100100; //  -1052 0xBE4 
     10'd 601   :RD = #1 12'b 101111011001; //  -1063 0xBD9 
     10'd 602   :RD = #1 12'b 101111001111; //  -1073 0xBCF 
     10'd 603   :RD = #1 12'b 101111000100; //  -1084 0xBC4 
     10'd 604   :RD = #1 12'b 101110111001; //  -1095 0xBB9 
     10'd 605   :RD = #1 12'b 101110101111; //  -1105 0xBAF 
     10'd 606   :RD = #1 12'b 101110100100; //  -1116 0xBA4 
     10'd 607   :RD = #1 12'b 101110011010; //  -1126 0xB9A 
     10'd 608   :RD = #1 12'b 101110001111; //  -1137 0xB8F 
     10'd 609   :RD = #1 12'b 101110000101; //  -1147 0xB85 
     10'd 610   :RD = #1 12'b 101101111010; //  -1158 0xB7A 
     10'd 611   :RD = #1 12'b 101101110000; //  -1168 0xB70 
     10'd 612   :RD = #1 12'b 101101100110; //  -1178 0xB66 
     10'd 613   :RD = #1 12'b 101101011100; //  -1188 0xB5C 
     10'd 614   :RD = #1 12'b 101101010001; //  -1199 0xB51 
     10'd 615   :RD = #1 12'b 101101000111; //  -1209 0xB47 
     10'd 616   :RD = #1 12'b 101100111101; //  -1219 0xB3D 
     10'd 617   :RD = #1 12'b 101100110011; //  -1229 0xB33 
     10'd 618   :RD = #1 12'b 101100101001; //  -1239 0xB29 
     10'd 619   :RD = #1 12'b 101100011111; //  -1249 0xB1F 
     10'd 620   :RD = #1 12'b 101100010101; //  -1259 0xB15 
     10'd 621   :RD = #1 12'b 101100001011; //  -1269 0xB0B 
     10'd 622   :RD = #1 12'b 101100000001; //  -1279 0xB01 
     10'd 623   :RD = #1 12'b 101011111000; //  -1288 0xAF8 
     10'd 624   :RD = #1 12'b 101011101110; //  -1298 0xAEE 
     10'd 625   :RD = #1 12'b 101011100100; //  -1308 0xAE4 
     10'd 626   :RD = #1 12'b 101011011011; //  -1317 0xADB 
     10'd 627   :RD = #1 12'b 101011010001; //  -1327 0xAD1 
     10'd 628   :RD = #1 12'b 101011000111; //  -1337 0xAC7 
     10'd 629   :RD = #1 12'b 101010111110; //  -1346 0xABE 
     10'd 630   :RD = #1 12'b 101010110101; //  -1355 0xAB5 
     10'd 631   :RD = #1 12'b 101010101011; //  -1365 0xAAB 
     10'd 632   :RD = #1 12'b 101010100010; //  -1374 0xAA2 
     10'd 633   :RD = #1 12'b 101010011001; //  -1383 0xA99 
     10'd 634   :RD = #1 12'b 101010001111; //  -1393 0xA8F 
     10'd 635   :RD = #1 12'b 101010000110; //  -1402 0xA86 
     10'd 636   :RD = #1 12'b 101001111101; //  -1411 0xA7D 
     10'd 637   :RD = #1 12'b 101001110100; //  -1420 0xA74 
     10'd 638   :RD = #1 12'b 101001101011; //  -1429 0xA6B 
     10'd 639   :RD = #1 12'b 101001100010; //  -1438 0xA62 
     10'd 640   :RD = #1 12'b 101001011001; //  -1447 0xA59 
     10'd 641   :RD = #1 12'b 101001010000; //  -1456 0xA50 
     10'd 642   :RD = #1 12'b 101001000111; //  -1465 0xA47 
     10'd 643   :RD = #1 12'b 101000111111; //  -1473 0xA3F 
     10'd 644   :RD = #1 12'b 101000110110; //  -1482 0xA36 
     10'd 645   :RD = #1 12'b 101000101101; //  -1491 0xA2D 
     10'd 646   :RD = #1 12'b 101000100101; //  -1499 0xA25 
     10'd 647   :RD = #1 12'b 101000011100; //  -1508 0xA1C 
     10'd 648   :RD = #1 12'b 101000010100; //  -1516 0xA14 
     10'd 649   :RD = #1 12'b 101000001011; //  -1525 0xA0B 
     10'd 650   :RD = #1 12'b 101000000011; //  -1533 0xA03 
     10'd 651   :RD = #1 12'b 100111111011; //  -1541 0x9FB 
     10'd 652   :RD = #1 12'b 100111110010; //  -1550 0x9F2 
     10'd 653   :RD = #1 12'b 100111101010; //  -1558 0x9EA 
     10'd 654   :RD = #1 12'b 100111100010; //  -1566 0x9E2 
     10'd 655   :RD = #1 12'b 100111011010; //  -1574 0x9DA 
     10'd 656   :RD = #1 12'b 100111010010; //  -1582 0x9D2 
     10'd 657   :RD = #1 12'b 100111001010; //  -1590 0x9CA 
     10'd 658   :RD = #1 12'b 100111000010; //  -1598 0x9C2 
     10'd 659   :RD = #1 12'b 100110111011; //  -1605 0x9BB 
     10'd 660   :RD = #1 12'b 100110110011; //  -1613 0x9B3 
     10'd 661   :RD = #1 12'b 100110101011; //  -1621 0x9AB 
     10'd 662   :RD = #1 12'b 100110100011; //  -1629 0x9A3 
     10'd 663   :RD = #1 12'b 100110011100; //  -1636 0x99C 
     10'd 664   :RD = #1 12'b 100110010100; //  -1644 0x994 
     10'd 665   :RD = #1 12'b 100110001101; //  -1651 0x98D 
     10'd 666   :RD = #1 12'b 100110000101; //  -1659 0x985 
     10'd 667   :RD = #1 12'b 100101111110; //  -1666 0x97E 
     10'd 668   :RD = #1 12'b 100101110111; //  -1673 0x977 
     10'd 669   :RD = #1 12'b 100101110000; //  -1680 0x970 
     10'd 670   :RD = #1 12'b 100101101001; //  -1687 0x969 
     10'd 671   :RD = #1 12'b 100101100001; //  -1695 0x961 
     10'd 672   :RD = #1 12'b 100101011010; //  -1702 0x95A 
     10'd 673   :RD = #1 12'b 100101010100; //  -1708 0x954 
     10'd 674   :RD = #1 12'b 100101001101; //  -1715 0x94D 
     10'd 675   :RD = #1 12'b 100101000110; //  -1722 0x946 
     10'd 676   :RD = #1 12'b 100100111111; //  -1729 0x93F 
     10'd 677   :RD = #1 12'b 100100111000; //  -1736 0x938 
     10'd 678   :RD = #1 12'b 100100110010; //  -1742 0x932 
     10'd 679   :RD = #1 12'b 100100101011; //  -1749 0x92B 
     10'd 680   :RD = #1 12'b 100100100101; //  -1755 0x925 
     10'd 681   :RD = #1 12'b 100100011110; //  -1762 0x91E 
     10'd 682   :RD = #1 12'b 100100011000; //  -1768 0x918 
     10'd 683   :RD = #1 12'b 100100010010; //  -1774 0x912 
     10'd 684   :RD = #1 12'b 100100001011; //  -1781 0x90B 
     10'd 685   :RD = #1 12'b 100100000101; //  -1787 0x905 
     10'd 686   :RD = #1 12'b 100011111111; //  -1793 0x8FF 
     10'd 687   :RD = #1 12'b 100011111001; //  -1799 0x8F9 
     10'd 688   :RD = #1 12'b 100011110011; //  -1805 0x8F3 
     10'd 689   :RD = #1 12'b 100011101101; //  -1811 0x8ED 
     10'd 690   :RD = #1 12'b 100011101000; //  -1816 0x8E8 
     10'd 691   :RD = #1 12'b 100011100010; //  -1822 0x8E2 
     10'd 692   :RD = #1 12'b 100011011100; //  -1828 0x8DC 
     10'd 693   :RD = #1 12'b 100011010110; //  -1834 0x8D6 
     10'd 694   :RD = #1 12'b 100011010001; //  -1839 0x8D1 
     10'd 695   :RD = #1 12'b 100011001011; //  -1845 0x8CB 
     10'd 696   :RD = #1 12'b 100011000110; //  -1850 0x8C6 
     10'd 697   :RD = #1 12'b 100011000001; //  -1855 0x8C1 
     10'd 698   :RD = #1 12'b 100010111011; //  -1861 0x8BB 
     10'd 699   :RD = #1 12'b 100010110110; //  -1866 0x8B6 
     10'd 700   :RD = #1 12'b 100010110001; //  -1871 0x8B1 
     10'd 701   :RD = #1 12'b 100010101100; //  -1876 0x8AC 
     10'd 702   :RD = #1 12'b 100010100111; //  -1881 0x8A7 
     10'd 703   :RD = #1 12'b 100010100010; //  -1886 0x8A2 
     10'd 704   :RD = #1 12'b 100010011101; //  -1891 0x89D 
     10'd 705   :RD = #1 12'b 100010011001; //  -1895 0x899 
     10'd 706   :RD = #1 12'b 100010010100; //  -1900 0x894 
     10'd 707   :RD = #1 12'b 100010001111; //  -1905 0x88F 
     10'd 708   :RD = #1 12'b 100010001011; //  -1909 0x88B 
     10'd 709   :RD = #1 12'b 100010000110; //  -1914 0x886 
     10'd 710   :RD = #1 12'b 100010000010; //  -1918 0x882 
     10'd 711   :RD = #1 12'b 100001111101; //  -1923 0x87D 
     10'd 712   :RD = #1 12'b 100001111001; //  -1927 0x879 
     10'd 713   :RD = #1 12'b 100001110101; //  -1931 0x875 
     10'd 714   :RD = #1 12'b 100001110001; //  -1935 0x871 
     10'd 715   :RD = #1 12'b 100001101101; //  -1939 0x86D 
     10'd 716   :RD = #1 12'b 100001101001; //  -1943 0x869 
     10'd 717   :RD = #1 12'b 100001100101; //  -1947 0x865 
     10'd 718   :RD = #1 12'b 100001100001; //  -1951 0x861 
     10'd 719   :RD = #1 12'b 100001011101; //  -1955 0x85D 
     10'd 720   :RD = #1 12'b 100001011010; //  -1958 0x85A 
     10'd 721   :RD = #1 12'b 100001010110; //  -1962 0x856 
     10'd 722   :RD = #1 12'b 100001010010; //  -1966 0x852 
     10'd 723   :RD = #1 12'b 100001001111; //  -1969 0x84F 
     10'd 724   :RD = #1 12'b 100001001100; //  -1972 0x84C 
     10'd 725   :RD = #1 12'b 100001001000; //  -1976 0x848 
     10'd 726   :RD = #1 12'b 100001000101; //  -1979 0x845 
     10'd 727   :RD = #1 12'b 100001000010; //  -1982 0x842 
     10'd 728   :RD = #1 12'b 100000111111; //  -1985 0x83F 
     10'd 729   :RD = #1 12'b 100000111100; //  -1988 0x83C 
     10'd 730   :RD = #1 12'b 100000111001; //  -1991 0x839 
     10'd 731   :RD = #1 12'b 100000110110; //  -1994 0x836 
     10'd 732   :RD = #1 12'b 100000110011; //  -1997 0x833 
     10'd 733   :RD = #1 12'b 100000110001; //  -1999 0x831 
     10'd 734   :RD = #1 12'b 100000101110; //  -2002 0x82E 
     10'd 735   :RD = #1 12'b 100000101011; //  -2005 0x82B 
     10'd 736   :RD = #1 12'b 100000101001; //  -2007 0x829 
     10'd 737   :RD = #1 12'b 100000100110; //  -2010 0x826 
     10'd 738   :RD = #1 12'b 100000100100; //  -2012 0x824 
     10'd 739   :RD = #1 12'b 100000100010; //  -2014 0x822 
     10'd 740   :RD = #1 12'b 100000100000; //  -2016 0x820 
     10'd 741   :RD = #1 12'b 100000011110; //  -2018 0x81E 
     10'd 742   :RD = #1 12'b 100000011011; //  -2021 0x81B 
     10'd 743   :RD = #1 12'b 100000011010; //  -2022 0x81A 
     10'd 744   :RD = #1 12'b 100000011000; //  -2024 0x818 
     10'd 745   :RD = #1 12'b 100000010110; //  -2026 0x816 
     10'd 746   :RD = #1 12'b 100000010100; //  -2028 0x814 
     10'd 747   :RD = #1 12'b 100000010010; //  -2030 0x812 
     10'd 748   :RD = #1 12'b 100000010001; //  -2031 0x811 
     10'd 749   :RD = #1 12'b 100000001111; //  -2033 0x80F 
     10'd 750   :RD = #1 12'b 100000001110; //  -2034 0x80E 
     10'd 751   :RD = #1 12'b 100000001101; //  -2035 0x80D 
     10'd 752   :RD = #1 12'b 100000001011; //  -2037 0x80B 
     10'd 753   :RD = #1 12'b 100000001010; //  -2038 0x80A 
     10'd 754   :RD = #1 12'b 100000001001; //  -2039 0x809 
     10'd 755   :RD = #1 12'b 100000001000; //  -2040 0x808 
     10'd 756   :RD = #1 12'b 100000000111; //  -2041 0x807 
     10'd 757   :RD = #1 12'b 100000000110; //  -2042 0x806 
     10'd 758   :RD = #1 12'b 100000000101; //  -2043 0x805 
     10'd 759   :RD = #1 12'b 100000000101; //  -2043 0x805 
     10'd 760   :RD = #1 12'b 100000000100; //  -2044 0x804 
     10'd 761   :RD = #1 12'b 100000000011; //  -2045 0x803 
     10'd 762   :RD = #1 12'b 100000000011; //  -2045 0x803 
     10'd 763   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 764   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 765   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 766   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 767   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 768   :RD = #1 12'b 100000000001; //  -2047 0x801 
     10'd 769   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 770   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 771   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 772   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 773   :RD = #1 12'b 100000000010; //  -2046 0x802 
     10'd 774   :RD = #1 12'b 100000000011; //  -2045 0x803 
     10'd 775   :RD = #1 12'b 100000000011; //  -2045 0x803 
     10'd 776   :RD = #1 12'b 100000000100; //  -2044 0x804 
     10'd 777   :RD = #1 12'b 100000000101; //  -2043 0x805 
     10'd 778   :RD = #1 12'b 100000000101; //  -2043 0x805 
     10'd 779   :RD = #1 12'b 100000000110; //  -2042 0x806 
     10'd 780   :RD = #1 12'b 100000000111; //  -2041 0x807 
     10'd 781   :RD = #1 12'b 100000001000; //  -2040 0x808 
     10'd 782   :RD = #1 12'b 100000001001; //  -2039 0x809 
     10'd 783   :RD = #1 12'b 100000001010; //  -2038 0x80A 
     10'd 784   :RD = #1 12'b 100000001011; //  -2037 0x80B 
     10'd 785   :RD = #1 12'b 100000001101; //  -2035 0x80D 
     10'd 786   :RD = #1 12'b 100000001110; //  -2034 0x80E 
     10'd 787   :RD = #1 12'b 100000001111; //  -2033 0x80F 
     10'd 788   :RD = #1 12'b 100000010001; //  -2031 0x811 
     10'd 789   :RD = #1 12'b 100000010010; //  -2030 0x812 
     10'd 790   :RD = #1 12'b 100000010100; //  -2028 0x814 
     10'd 791   :RD = #1 12'b 100000010110; //  -2026 0x816 
     10'd 792   :RD = #1 12'b 100000011000; //  -2024 0x818 
     10'd 793   :RD = #1 12'b 100000011010; //  -2022 0x81A 
     10'd 794   :RD = #1 12'b 100000011011; //  -2021 0x81B 
     10'd 795   :RD = #1 12'b 100000011110; //  -2018 0x81E 
     10'd 796   :RD = #1 12'b 100000100000; //  -2016 0x820 
     10'd 797   :RD = #1 12'b 100000100010; //  -2014 0x822 
     10'd 798   :RD = #1 12'b 100000100100; //  -2012 0x824 
     10'd 799   :RD = #1 12'b 100000100110; //  -2010 0x826 
     10'd 800   :RD = #1 12'b 100000101001; //  -2007 0x829 
     10'd 801   :RD = #1 12'b 100000101011; //  -2005 0x82B 
     10'd 802   :RD = #1 12'b 100000101110; //  -2002 0x82E 
     10'd 803   :RD = #1 12'b 100000110001; //  -1999 0x831 
     10'd 804   :RD = #1 12'b 100000110011; //  -1997 0x833 
     10'd 805   :RD = #1 12'b 100000110110; //  -1994 0x836 
     10'd 806   :RD = #1 12'b 100000111001; //  -1991 0x839 
     10'd 807   :RD = #1 12'b 100000111100; //  -1988 0x83C 
     10'd 808   :RD = #1 12'b 100000111111; //  -1985 0x83F 
     10'd 809   :RD = #1 12'b 100001000010; //  -1982 0x842 
     10'd 810   :RD = #1 12'b 100001000101; //  -1979 0x845 
     10'd 811   :RD = #1 12'b 100001001000; //  -1976 0x848 
     10'd 812   :RD = #1 12'b 100001001100; //  -1972 0x84C 
     10'd 813   :RD = #1 12'b 100001001111; //  -1969 0x84F 
     10'd 814   :RD = #1 12'b 100001010010; //  -1966 0x852 
     10'd 815   :RD = #1 12'b 100001010110; //  -1962 0x856 
     10'd 816   :RD = #1 12'b 100001011010; //  -1958 0x85A 
     10'd 817   :RD = #1 12'b 100001011101; //  -1955 0x85D 
     10'd 818   :RD = #1 12'b 100001100001; //  -1951 0x861 
     10'd 819   :RD = #1 12'b 100001100101; //  -1947 0x865 
     10'd 820   :RD = #1 12'b 100001101001; //  -1943 0x869 
     10'd 821   :RD = #1 12'b 100001101101; //  -1939 0x86D 
     10'd 822   :RD = #1 12'b 100001110001; //  -1935 0x871 
     10'd 823   :RD = #1 12'b 100001110101; //  -1931 0x875 
     10'd 824   :RD = #1 12'b 100001111001; //  -1927 0x879 
     10'd 825   :RD = #1 12'b 100001111101; //  -1923 0x87D 
     10'd 826   :RD = #1 12'b 100010000010; //  -1918 0x882 
     10'd 827   :RD = #1 12'b 100010000110; //  -1914 0x886 
     10'd 828   :RD = #1 12'b 100010001011; //  -1909 0x88B 
     10'd 829   :RD = #1 12'b 100010001111; //  -1905 0x88F 
     10'd 830   :RD = #1 12'b 100010010100; //  -1900 0x894 
     10'd 831   :RD = #1 12'b 100010011001; //  -1895 0x899 
     10'd 832   :RD = #1 12'b 100010011101; //  -1891 0x89D 
     10'd 833   :RD = #1 12'b 100010100010; //  -1886 0x8A2 
     10'd 834   :RD = #1 12'b 100010100111; //  -1881 0x8A7 
     10'd 835   :RD = #1 12'b 100010101100; //  -1876 0x8AC 
     10'd 836   :RD = #1 12'b 100010110001; //  -1871 0x8B1 
     10'd 837   :RD = #1 12'b 100010110110; //  -1866 0x8B6 
     10'd 838   :RD = #1 12'b 100010111011; //  -1861 0x8BB 
     10'd 839   :RD = #1 12'b 100011000001; //  -1855 0x8C1 
     10'd 840   :RD = #1 12'b 100011000110; //  -1850 0x8C6 
     10'd 841   :RD = #1 12'b 100011001011; //  -1845 0x8CB 
     10'd 842   :RD = #1 12'b 100011010001; //  -1839 0x8D1 
     10'd 843   :RD = #1 12'b 100011010110; //  -1834 0x8D6 
     10'd 844   :RD = #1 12'b 100011011100; //  -1828 0x8DC 
     10'd 845   :RD = #1 12'b 100011100010; //  -1822 0x8E2 
     10'd 846   :RD = #1 12'b 100011101000; //  -1816 0x8E8 
     10'd 847   :RD = #1 12'b 100011101101; //  -1811 0x8ED 
     10'd 848   :RD = #1 12'b 100011110011; //  -1805 0x8F3 
     10'd 849   :RD = #1 12'b 100011111001; //  -1799 0x8F9 
     10'd 850   :RD = #1 12'b 100011111111; //  -1793 0x8FF 
     10'd 851   :RD = #1 12'b 100100000101; //  -1787 0x905 
     10'd 852   :RD = #1 12'b 100100001011; //  -1781 0x90B 
     10'd 853   :RD = #1 12'b 100100010010; //  -1774 0x912 
     10'd 854   :RD = #1 12'b 100100011000; //  -1768 0x918 
     10'd 855   :RD = #1 12'b 100100011110; //  -1762 0x91E 
     10'd 856   :RD = #1 12'b 100100100101; //  -1755 0x925 
     10'd 857   :RD = #1 12'b 100100101011; //  -1749 0x92B 
     10'd 858   :RD = #1 12'b 100100110010; //  -1742 0x932 
     10'd 859   :RD = #1 12'b 100100111000; //  -1736 0x938 
     10'd 860   :RD = #1 12'b 100100111111; //  -1729 0x93F 
     10'd 861   :RD = #1 12'b 100101000110; //  -1722 0x946 
     10'd 862   :RD = #1 12'b 100101001101; //  -1715 0x94D 
     10'd 863   :RD = #1 12'b 100101010100; //  -1708 0x954 
     10'd 864   :RD = #1 12'b 100101011010; //  -1702 0x95A 
     10'd 865   :RD = #1 12'b 100101100001; //  -1695 0x961 
     10'd 866   :RD = #1 12'b 100101101001; //  -1687 0x969 
     10'd 867   :RD = #1 12'b 100101110000; //  -1680 0x970 
     10'd 868   :RD = #1 12'b 100101110111; //  -1673 0x977 
     10'd 869   :RD = #1 12'b 100101111110; //  -1666 0x97E 
     10'd 870   :RD = #1 12'b 100110000101; //  -1659 0x985 
     10'd 871   :RD = #1 12'b 100110001101; //  -1651 0x98D 
     10'd 872   :RD = #1 12'b 100110010100; //  -1644 0x994 
     10'd 873   :RD = #1 12'b 100110011100; //  -1636 0x99C 
     10'd 874   :RD = #1 12'b 100110100011; //  -1629 0x9A3 
     10'd 875   :RD = #1 12'b 100110101011; //  -1621 0x9AB 
     10'd 876   :RD = #1 12'b 100110110011; //  -1613 0x9B3 
     10'd 877   :RD = #1 12'b 100110111011; //  -1605 0x9BB 
     10'd 878   :RD = #1 12'b 100111000010; //  -1598 0x9C2 
     10'd 879   :RD = #1 12'b 100111001010; //  -1590 0x9CA 
     10'd 880   :RD = #1 12'b 100111010010; //  -1582 0x9D2 
     10'd 881   :RD = #1 12'b 100111011010; //  -1574 0x9DA 
     10'd 882   :RD = #1 12'b 100111100010; //  -1566 0x9E2 
     10'd 883   :RD = #1 12'b 100111101010; //  -1558 0x9EA 
     10'd 884   :RD = #1 12'b 100111110010; //  -1550 0x9F2 
     10'd 885   :RD = #1 12'b 100111111011; //  -1541 0x9FB 
     10'd 886   :RD = #1 12'b 101000000011; //  -1533 0xA03 
     10'd 887   :RD = #1 12'b 101000001011; //  -1525 0xA0B 
     10'd 888   :RD = #1 12'b 101000010100; //  -1516 0xA14 
     10'd 889   :RD = #1 12'b 101000011100; //  -1508 0xA1C 
     10'd 890   :RD = #1 12'b 101000100101; //  -1499 0xA25 
     10'd 891   :RD = #1 12'b 101000101101; //  -1491 0xA2D 
     10'd 892   :RD = #1 12'b 101000110110; //  -1482 0xA36 
     10'd 893   :RD = #1 12'b 101000111111; //  -1473 0xA3F 
     10'd 894   :RD = #1 12'b 101001000111; //  -1465 0xA47 
     10'd 895   :RD = #1 12'b 101001010000; //  -1456 0xA50 
     10'd 896   :RD = #1 12'b 101001011001; //  -1447 0xA59 
     10'd 897   :RD = #1 12'b 101001100010; //  -1438 0xA62 
     10'd 898   :RD = #1 12'b 101001101011; //  -1429 0xA6B 
     10'd 899   :RD = #1 12'b 101001110100; //  -1420 0xA74 
     10'd 900   :RD = #1 12'b 101001111101; //  -1411 0xA7D 
     10'd 901   :RD = #1 12'b 101010000110; //  -1402 0xA86 
     10'd 902   :RD = #1 12'b 101010001111; //  -1393 0xA8F 
     10'd 903   :RD = #1 12'b 101010011001; //  -1383 0xA99 
     10'd 904   :RD = #1 12'b 101010100010; //  -1374 0xAA2 
     10'd 905   :RD = #1 12'b 101010101011; //  -1365 0xAAB 
     10'd 906   :RD = #1 12'b 101010110101; //  -1355 0xAB5 
     10'd 907   :RD = #1 12'b 101010111110; //  -1346 0xABE 
     10'd 908   :RD = #1 12'b 101011000111; //  -1337 0xAC7 
     10'd 909   :RD = #1 12'b 101011010001; //  -1327 0xAD1 
     10'd 910   :RD = #1 12'b 101011011011; //  -1317 0xADB 
     10'd 911   :RD = #1 12'b 101011100100; //  -1308 0xAE4 
     10'd 912   :RD = #1 12'b 101011101110; //  -1298 0xAEE 
     10'd 913   :RD = #1 12'b 101011111000; //  -1288 0xAF8 
     10'd 914   :RD = #1 12'b 101100000001; //  -1279 0xB01 
     10'd 915   :RD = #1 12'b 101100001011; //  -1269 0xB0B 
     10'd 916   :RD = #1 12'b 101100010101; //  -1259 0xB15 
     10'd 917   :RD = #1 12'b 101100011111; //  -1249 0xB1F 
     10'd 918   :RD = #1 12'b 101100101001; //  -1239 0xB29 
     10'd 919   :RD = #1 12'b 101100110011; //  -1229 0xB33 
     10'd 920   :RD = #1 12'b 101100111101; //  -1219 0xB3D 
     10'd 921   :RD = #1 12'b 101101000111; //  -1209 0xB47 
     10'd 922   :RD = #1 12'b 101101010001; //  -1199 0xB51 
     10'd 923   :RD = #1 12'b 101101011100; //  -1188 0xB5C 
     10'd 924   :RD = #1 12'b 101101100110; //  -1178 0xB66 
     10'd 925   :RD = #1 12'b 101101110000; //  -1168 0xB70 
     10'd 926   :RD = #1 12'b 101101111010; //  -1158 0xB7A 
     10'd 927   :RD = #1 12'b 101110000101; //  -1147 0xB85 
     10'd 928   :RD = #1 12'b 101110001111; //  -1137 0xB8F 
     10'd 929   :RD = #1 12'b 101110011010; //  -1126 0xB9A 
     10'd 930   :RD = #1 12'b 101110100100; //  -1116 0xBA4 
     10'd 931   :RD = #1 12'b 101110101111; //  -1105 0xBAF 
     10'd 932   :RD = #1 12'b 101110111001; //  -1095 0xBB9 
     10'd 933   :RD = #1 12'b 101111000100; //  -1084 0xBC4 
     10'd 934   :RD = #1 12'b 101111001111; //  -1073 0xBCF 
     10'd 935   :RD = #1 12'b 101111011001; //  -1063 0xBD9 
     10'd 936   :RD = #1 12'b 101111100100; //  -1052 0xBE4 
     10'd 937   :RD = #1 12'b 101111101111; //  -1041 0xBEF 
     10'd 938   :RD = #1 12'b 101111111010; //  -1030 0xBFA 
     10'd 939   :RD = #1 12'b 110000000101; //  -1019 0xC05 
     10'd 940   :RD = #1 12'b 110000010000; //  -1008 0xC10 
     10'd 941   :RD = #1 12'b 110000011010; //   -998 0xC1A 
     10'd 942   :RD = #1 12'b 110000100101; //   -987 0xC25 
     10'd 943   :RD = #1 12'b 110000110000; //   -976 0xC30 
     10'd 944   :RD = #1 12'b 110000111100; //   -964 0xC3C 
     10'd 945   :RD = #1 12'b 110001000111; //   -953 0xC47 
     10'd 946   :RD = #1 12'b 110001010010; //   -942 0xC52 
     10'd 947   :RD = #1 12'b 110001011101; //   -931 0xC5D 
     10'd 948   :RD = #1 12'b 110001101000; //   -920 0xC68 
     10'd 949   :RD = #1 12'b 110001110011; //   -909 0xC73 
     10'd 950   :RD = #1 12'b 110001111111; //   -897 0xC7F 
     10'd 951   :RD = #1 12'b 110010001010; //   -886 0xC8A 
     10'd 952   :RD = #1 12'b 110010010101; //   -875 0xC95 
     10'd 953   :RD = #1 12'b 110010100001; //   -863 0xCA1 
     10'd 954   :RD = #1 12'b 110010101100; //   -852 0xCAC 
     10'd 955   :RD = #1 12'b 110010111000; //   -840 0xCB8 
     10'd 956   :RD = #1 12'b 110011000011; //   -829 0xCC3 
     10'd 957   :RD = #1 12'b 110011001110; //   -818 0xCCE 
     10'd 958   :RD = #1 12'b 110011011010; //   -806 0xCDA 
     10'd 959   :RD = #1 12'b 110011100110; //   -794 0xCE6 
     10'd 960   :RD = #1 12'b 110011110001; //   -783 0xCF1 
     10'd 961   :RD = #1 12'b 110011111101; //   -771 0xCFD 
     10'd 962   :RD = #1 12'b 110100001000; //   -760 0xD08 
     10'd 963   :RD = #1 12'b 110100010100; //   -748 0xD14 
     10'd 964   :RD = #1 12'b 110100100000; //   -736 0xD20 
     10'd 965   :RD = #1 12'b 110100101100; //   -724 0xD2C 
     10'd 966   :RD = #1 12'b 110100110111; //   -713 0xD37 
     10'd 967   :RD = #1 12'b 110101000011; //   -701 0xD43 
     10'd 968   :RD = #1 12'b 110101001111; //   -689 0xD4F 
     10'd 969   :RD = #1 12'b 110101011011; //   -677 0xD5B 
     10'd 970   :RD = #1 12'b 110101100111; //   -665 0xD67 
     10'd 971   :RD = #1 12'b 110101110010; //   -654 0xD72 
     10'd 972   :RD = #1 12'b 110101111110; //   -642 0xD7E 
     10'd 973   :RD = #1 12'b 110110001010; //   -630 0xD8A 
     10'd 974   :RD = #1 12'b 110110010110; //   -618 0xD96 
     10'd 975   :RD = #1 12'b 110110100010; //   -606 0xDA2 
     10'd 976   :RD = #1 12'b 110110101110; //   -594 0xDAE 
     10'd 977   :RD = #1 12'b 110110111010; //   -582 0xDBA 
     10'd 978   :RD = #1 12'b 110111000110; //   -570 0xDC6 
     10'd 979   :RD = #1 12'b 110111010010; //   -558 0xDD2 
     10'd 980   :RD = #1 12'b 110111011111; //   -545 0xDDF 
     10'd 981   :RD = #1 12'b 110111101011; //   -533 0xDEB 
     10'd 982   :RD = #1 12'b 110111110111; //   -521 0xDF7 
     10'd 983   :RD = #1 12'b 111000000011; //   -509 0xE03 
     10'd 984   :RD = #1 12'b 111000001111; //   -497 0xE0F 
     10'd 985   :RD = #1 12'b 111000011011; //   -485 0xE1B 
     10'd 986   :RD = #1 12'b 111000101000; //   -472 0xE28 
     10'd 987   :RD = #1 12'b 111000110100; //   -460 0xE34 
     10'd 988   :RD = #1 12'b 111001000000; //   -448 0xE40 
     10'd 989   :RD = #1 12'b 111001001100; //   -436 0xE4C 
     10'd 990   :RD = #1 12'b 111001011001; //   -423 0xE59 
     10'd 991   :RD = #1 12'b 111001100101; //   -411 0xE65 
     10'd 992   :RD = #1 12'b 111001110001; //   -399 0xE71 
     10'd 993   :RD = #1 12'b 111001111101; //   -387 0xE7D 
     10'd 994   :RD = #1 12'b 111010001010; //   -374 0xE8A 
     10'd 995   :RD = #1 12'b 111010010110; //   -362 0xE96 
     10'd 996   :RD = #1 12'b 111010100011; //   -349 0xEA3 
     10'd 997   :RD = #1 12'b 111010101111; //   -337 0xEAF 
     10'd 998   :RD = #1 12'b 111010111011; //   -325 0xEBB 
     10'd 999   :RD = #1 12'b 111011001000; //   -312 0xEC8 
     10'd 1000  :RD = #1 12'b 111011010100; //   -300 0xED4 
     10'd 1001  :RD = #1 12'b 111011100001; //   -287 0xEE1 
     10'd 1002  :RD = #1 12'b 111011101101; //   -275 0xEED 
     10'd 1003  :RD = #1 12'b 111011111001; //   -263 0xEF9 
     10'd 1004  :RD = #1 12'b 111100000110; //   -250 0xF06 
     10'd 1005  :RD = #1 12'b 111100010010; //   -238 0xF12 
     10'd 1006  :RD = #1 12'b 111100011111; //   -225 0xF1F 
     10'd 1007  :RD = #1 12'b 111100101011; //   -213 0xF2B 
     10'd 1008  :RD = #1 12'b 111100111000; //   -200 0xF38 
     10'd 1009  :RD = #1 12'b 111101000100; //   -188 0xF44 
     10'd 1010  :RD = #1 12'b 111101010001; //   -175 0xF51 
     10'd 1011  :RD = #1 12'b 111101011101; //   -163 0xF5D 
     10'd 1012  :RD = #1 12'b 111101101010; //   -150 0xF6A 
     10'd 1013  :RD = #1 12'b 111101110110; //   -138 0xF76 
     10'd 1014  :RD = #1 12'b 111110000011; //   -125 0xF83 
     10'd 1015  :RD = #1 12'b 111110010000; //   -112 0xF90 
     10'd 1016  :RD = #1 12'b 111110011100; //   -100 0xF9C 
     10'd 1017  :RD = #1 12'b 111110101001; //    -87 0xFA9 
     10'd 1018  :RD = #1 12'b 111110110101; //    -75 0xFB5 
     10'd 1019  :RD = #1 12'b 111111000010; //    -62 0xFC2 
     10'd 1020  :RD = #1 12'b 111111001110; //    -50 0xFCE 
     10'd 1021  :RD = #1 12'b 111111011011; //    -37 0xFDB 
     10'd 1022  :RD = #1 12'b 111111100111; //    -25 0xFE7 
     10'd 1023  :RD = #1 12'b 111111110100; //    -12 0xFF4 
  default : RD = #1 0;
  endcase
endmodule 

3. SW_FR模块

module SW_FR(
    CLK     ,   //input clock
    SWFR    ,   //input word
    FQWD    ,   // output frequency word
    FWEN    );  // output frequency word update enable

parameter VAL_FREQ_BASE = 32'h051E_B851;  // 50MHz clock, 1MHz out wave freqword value

input CLK,FWEN;       
input [2:0] SWFR; 
output reg[31:0] FQWD; 

always @(posedge CLK) begin
    if (FWEN) begin
        case(SWFR)
        3'd1: FQWD <= VAL_FREQ_BASE * 0.5 ;//500KHz
        3'd2: FQWD <= VAL_FREQ_BASE       ;//1MHz
        3'd4: FQWD <= VAL_FREQ_BASE * 3   ;//3MHz
        default: FQWD <= 32'h0            ;//output none
        endcase
    end
    else begin
        FQWD <= FQWD;
    end
end
endmodule

4. DDS_CORE_SINE模块

module DDS_CORE_SINE(
  CLK   ,   //input clock
  INCR  ,   //counter increase value  
  SINOUT);  //counter value

input CLK;
input [31:0] INCR;
output reg[9:0] SINOUT;

always @ (posedge CLK) begin
  SINOUT <= INCR + SINOUT;
end
endmodule   

你可能感兴趣的:(EDA硬件设计,fpga)