phase estimation update: quadrant quantization from 256 slices -> 512 slices

This commit is contained in:
mmehari 2022-01-04 22:15:16 +01:00
parent 53679a107f
commit 36c738fe98
6 changed files with 532 additions and 20 deletions

View File

@ -1,258 +1,514 @@
memory_initialization_radix=2;
memory_initialization_vector=
000000000,
000000001,
000000010,
000000011,
000000100,
000000101,
000000110,
000000111,
000001000,
000001001,
000001010,
000001011,
000001100,
000001101,
000001110,
000001111,
000010000,
000010001,
000010010,
000010011,
000010100,
000010101,
000010110,
000010111,
000011000,
000011001,
000011010,
000011011,
000011100,
000011101,
000011110,
000011111,
000100000,
000100001,
000100010,
000100011,
000100100,
000100101,
000100110,
000100111,
000101000,
000101001,
000101010,
000101011,
000101100,
000101101,
000101110,
000101111,
000110000,
000110001,
000110010,
000110011,
000110100,
000110101,
000110110,
000110111,
000111000,
000111001,
000111010,
000111011,
000111100,
000111101,
000111110,
000111111,
001000000,
001000001,
001000010,
001000011,
001000100,
001000101,
001000110,
001000111,
001001000,
001001001,
001001001,
001001010,
001001011,
001001100,
001001101,
001001110,
001001111,
001010000,
001010001,
001010010,
001010011,
001010100,
001010101,
001010110,
001010111,
001011000,
001011001,
001011010,
001011011,
001011100,
001011101,
001011110,
001011111,
001100000,
001100001,
001100010,
001100011,
001100100,
001100101,
001100110,
001100111,
001101000,
001101001,
001101001,
001101010,
001101011,
001101100,
001101101,
001101110,
001101111,
001110000,
001110001,
001110010,
001110011,
001110100,
001110101,
001110110,
001110111,
001111000,
001111001,
001111010,
001111011,
001111100,
001111100,
001111101,
001111110,
001111111,
010000000,
010000001,
010000010,
010000011,
010000100,
010000101,
010000110,
010000111,
010001000,
010001001,
010001010,
010001011,
010001011,
010001100,
010001101,
010001110,
010001111,
010010000,
010010001,
010010010,
010010011,
010010100,
010010101,
010010110,
010010111,
010010111,
010011000,
010011001,
010011010,
010011011,
010011100,
010011101,
010011110,
010011111,
010100000,
010100001,
010100001,
010100010,
010100011,
010100100,
010100101,
010100110,
010100111,
010101000,
010101001,
010101010,
010101010,
010101011,
010101100,
010101101,
010101110,
010101111,
010110000,
010110001,
010110010,
010110010,
010110011,
010110100,
010110101,
010110110,
010110111,
010111000,
010111001,
010111001,
010111010,
010111011,
010111100,
010111101,
010111110,
010111111,
011000000,
011000000,
011000001,
011000010,
011000011,
011000100,
011000101,
011000110,
011000110,
011000111,
011001000,
011001001,
011001010,
011001011,
011001100,
011001100,
011001101,
011001110,
011001111,
011010000,
011010001,
011010001,
011010010,
011010011,
011010100,
011010101,
011010110,
011010111,
011010111,
011011000,
011011001,
011011010,
011011011,
011011011,
011011100,
011011101,
011011110,
011011111,
011100000,
011100000,
011100001,
011100010,
011100011,
011100100,
011100101,
011100101,
011100110,
011100111,
011101000,
011101001,
011101001,
011101010,
011101011,
011101100,
011101101,
011101101,
011101110,
011101111,
011110000,
011110001,
011110001,
011110010,
011110011,
011110100,
011110101,
011110101,
011110110,
011110111,
011111000,
011111000,
011111001,
011111010,
011111011,
011111100,
011111100,
011111101,
011111110,
011111111,
011111111,
100000000,
100000001,
100000010,
100000011,
100000011,
100000100,
100000101,
100000110,
100000110,
100000111,
100001000,
100001001,
100001001,
100001010,
100001011,
100001100,
100001100,
100001101,
100001110,
100001111,
100001111,
100010000,
100010001,
100010010,
100010010,
100010011,
100010100,
100010101,
100010101,
100010110,
100010111,
100010111,
100011000,
100011001,
100011010,
100011010,
100011011,
100011100,
100011101,
100011101,
100011110,
100011111,
100011111,
100100000,
100100001,
100100010,
100100010,
100100011,
100100100,
100100100,
100100101,
100100110,
100100111,
100100111,
100101000,
100101001,
100101001,
100101010,
100101011,
100101011,
100101100,
100101101,
100101110,
100101110,
100101111,
100110000,
100110000,
100110001,
100110010,
100110010,
100110011,
100110100,
100110100,
100110101,
100110110,
100110110,
100110111,
100111000,
100111000,
100111001,
100111010,
100111010,
100111011,
100111100,
100111100,
100111101,
100111110,
100111110,
100111111,
101000000,
101000000,
101000001,
101000010,
101000010,
101000011,
101000100,
101000100,
101000101,
101000110,
101000110,
101000111,
101001000,
101001000,
101001001,
101001001,
101001010,
101001011,
101001011,
101001100,
101001101,
101001101,
101001110,
101001111,
101001111,
101010000,
101010000,
101010001,
101010010,
101010010,
101010011,
101010100,
101010100,
101010101,
101010101,
101010110,
101010111,
101010111,
101011000,
101011000,
101011001,
101011010,
101011010,
101011011,
101011100,
101011100,
101011101,
101011101,
101011110,
101011111,
101011111,
101100000,
101100000,
101100001,
101100010,
101100010,
101100011,
101100011,
101100100,
101100100,
101100101,
101100110,
101100110,
101100111,
101100111,
101101000,
101101001,
101101001,
101101010,
101101010,
101101011,
101101011,
101101100,
101101101,
101101101,
101101110,
101101110,
101101111,
101101111,
101110000,
101110001,
101110001,
101110010,
101110010,
101110011,
101110011,
101110100,
101110101,
101110101,
101110110,
101110110,
101110111,
101110111,
101111000,
101111000,
101111001,
101111010,
101111010,
101111011,
101111011,
101111100,
101111100,
101111101,
101111101,
101111110,
101111110,
101111111,
101111111,
110000000,
110000001,
110000001,
110000010,
110000010,
110000011,
110000011,
110000100,
110000100,
110000101,
110000101,
110000110,
110000110,
110000111,
110000111,
110001000,
110001000,
110001001,
110001001,
110001010,
110001011,
110001011,
110001100,
110001100,
110001101,
110001101,
110001110,
110001110,
110001111,
110001111,
110010000,
110010001;
110010000,
110010001,
110010001,
110010010;

View File

@ -89,8 +89,8 @@
<spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLK.ACLK.INSERT_VIP">0</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLK.ACLK.PHASE">0.000</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.RST.ARESETN.INSERT_VIP">0</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ADDRA_WIDTH">8</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ADDRB_WIDTH">8</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ADDRA_WIDTH">9</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ADDRB_WIDTH">9</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ALGORITHM">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_AXI_ID_WIDTH">4</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_AXI_SLAVE_TYPE">0</spirit:configurableElementValue>
@ -137,8 +137,8 @@
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MEM_TYPE">3</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MUX_PIPELINE_STAGES">0</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIM_TYPE">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_DEPTH_A">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_DEPTH_B">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_DEPTH_A">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_DEPTH_B">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_LATENCY_A">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_LATENCY_B">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_WIDTH_A">9</spirit:configurableElementValue>
@ -157,8 +157,8 @@
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_URAM">0</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WEA_WIDTH">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WEB_WIDTH">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_DEPTH_A">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_DEPTH_B">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_DEPTH_A">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_DEPTH_B">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_MODE_A">WRITE_FIRST</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_MODE_B">WRITE_FIRST</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_WIDTH_A">9</spirit:configurableElementValue>
@ -228,7 +228,7 @@
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Use_REGCEB_Pin">false</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Use_RSTA_Pin">false</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Use_RSTB_Pin">false</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Write_Depth_A">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Write_Depth_A">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Write_Width_A">9</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Write_Width_B">9</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ecctype">No_ECC</spirit:configurableElementValue>

View File

@ -1,258 +1,514 @@
memory_initialization_radix=2;
memory_initialization_vector=
000000000,
000000001,
000000010,
000000011,
000000100,
000000101,
000000110,
000000111,
000001000,
000001001,
000001010,
000001011,
000001100,
000001101,
000001110,
000001111,
000010000,
000010001,
000010010,
000010011,
000010100,
000010101,
000010110,
000010111,
000011000,
000011001,
000011010,
000011011,
000011100,
000011101,
000011110,
000011111,
000100000,
000100001,
000100010,
000100011,
000100100,
000100101,
000100110,
000100111,
000101000,
000101001,
000101010,
000101011,
000101100,
000101101,
000101110,
000101111,
000110000,
000110001,
000110010,
000110011,
000110100,
000110101,
000110110,
000110111,
000111000,
000111001,
000111010,
000111011,
000111100,
000111101,
000111110,
000111111,
001000000,
001000001,
001000010,
001000011,
001000100,
001000101,
001000110,
001000111,
001001000,
001001001,
001001001,
001001010,
001001011,
001001100,
001001101,
001001110,
001001111,
001010000,
001010001,
001010010,
001010011,
001010100,
001010101,
001010110,
001010111,
001011000,
001011001,
001011010,
001011011,
001011100,
001011101,
001011110,
001011111,
001100000,
001100001,
001100010,
001100011,
001100100,
001100101,
001100110,
001100111,
001101000,
001101001,
001101001,
001101010,
001101011,
001101100,
001101101,
001101110,
001101111,
001110000,
001110001,
001110010,
001110011,
001110100,
001110101,
001110110,
001110111,
001111000,
001111001,
001111010,
001111011,
001111100,
001111100,
001111101,
001111110,
001111111,
010000000,
010000001,
010000010,
010000011,
010000100,
010000101,
010000110,
010000111,
010001000,
010001001,
010001010,
010001011,
010001011,
010001100,
010001101,
010001110,
010001111,
010010000,
010010001,
010010010,
010010011,
010010100,
010010101,
010010110,
010010111,
010010111,
010011000,
010011001,
010011010,
010011011,
010011100,
010011101,
010011110,
010011111,
010100000,
010100001,
010100001,
010100010,
010100011,
010100100,
010100101,
010100110,
010100111,
010101000,
010101001,
010101010,
010101010,
010101011,
010101100,
010101101,
010101110,
010101111,
010110000,
010110001,
010110010,
010110010,
010110011,
010110100,
010110101,
010110110,
010110111,
010111000,
010111001,
010111001,
010111010,
010111011,
010111100,
010111101,
010111110,
010111111,
011000000,
011000000,
011000001,
011000010,
011000011,
011000100,
011000101,
011000110,
011000110,
011000111,
011001000,
011001001,
011001010,
011001011,
011001100,
011001100,
011001101,
011001110,
011001111,
011010000,
011010001,
011010001,
011010010,
011010011,
011010100,
011010101,
011010110,
011010111,
011010111,
011011000,
011011001,
011011010,
011011011,
011011011,
011011100,
011011101,
011011110,
011011111,
011100000,
011100000,
011100001,
011100010,
011100011,
011100100,
011100101,
011100101,
011100110,
011100111,
011101000,
011101001,
011101001,
011101010,
011101011,
011101100,
011101101,
011101101,
011101110,
011101111,
011110000,
011110001,
011110001,
011110010,
011110011,
011110100,
011110101,
011110101,
011110110,
011110111,
011111000,
011111000,
011111001,
011111010,
011111011,
011111100,
011111100,
011111101,
011111110,
011111111,
011111111,
100000000,
100000001,
100000010,
100000011,
100000011,
100000100,
100000101,
100000110,
100000110,
100000111,
100001000,
100001001,
100001001,
100001010,
100001011,
100001100,
100001100,
100001101,
100001110,
100001111,
100001111,
100010000,
100010001,
100010010,
100010010,
100010011,
100010100,
100010101,
100010101,
100010110,
100010111,
100010111,
100011000,
100011001,
100011010,
100011010,
100011011,
100011100,
100011101,
100011101,
100011110,
100011111,
100011111,
100100000,
100100001,
100100010,
100100010,
100100011,
100100100,
100100100,
100100101,
100100110,
100100111,
100100111,
100101000,
100101001,
100101001,
100101010,
100101011,
100101011,
100101100,
100101101,
100101110,
100101110,
100101111,
100110000,
100110000,
100110001,
100110010,
100110010,
100110011,
100110100,
100110100,
100110101,
100110110,
100110110,
100110111,
100111000,
100111000,
100111001,
100111010,
100111010,
100111011,
100111100,
100111100,
100111101,
100111110,
100111110,
100111111,
101000000,
101000000,
101000001,
101000010,
101000010,
101000011,
101000100,
101000100,
101000101,
101000110,
101000110,
101000111,
101001000,
101001000,
101001001,
101001001,
101001010,
101001011,
101001011,
101001100,
101001101,
101001101,
101001110,
101001111,
101001111,
101010000,
101010000,
101010001,
101010010,
101010010,
101010011,
101010100,
101010100,
101010101,
101010101,
101010110,
101010111,
101010111,
101011000,
101011000,
101011001,
101011010,
101011010,
101011011,
101011100,
101011100,
101011101,
101011101,
101011110,
101011111,
101011111,
101100000,
101100000,
101100001,
101100010,
101100010,
101100011,
101100011,
101100100,
101100100,
101100101,
101100110,
101100110,
101100111,
101100111,
101101000,
101101001,
101101001,
101101010,
101101010,
101101011,
101101011,
101101100,
101101101,
101101101,
101101110,
101101110,
101101111,
101101111,
101110000,
101110001,
101110001,
101110010,
101110010,
101110011,
101110011,
101110100,
101110101,
101110101,
101110110,
101110110,
101110111,
101110111,
101111000,
101111000,
101111001,
101111010,
101111010,
101111011,
101111011,
101111100,
101111100,
101111101,
101111101,
101111110,
101111110,
101111111,
101111111,
110000000,
110000001,
110000001,
110000010,
110000010,
110000011,
110000011,
110000100,
110000100,
110000101,
110000101,
110000110,
110000110,
110000111,
110000111,
110001000,
110001000,
110001001,
110001001,
110001010,
110001011,
110001011,
110001100,
110001100,
110001101,
110001101,
110001110,
110001110,
110001111,
110001111,
110010000,
110010001;
110010000,
110010001,
110010001,
110010010;

View File

@ -89,8 +89,8 @@
<spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLK.ACLK.INSERT_VIP">0</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.CLK.ACLK.PHASE">0.000</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="BUSIFPARAM_VALUE.RST.ARESETN.INSERT_VIP">0</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ADDRA_WIDTH">8</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ADDRB_WIDTH">8</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ADDRA_WIDTH">9</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ADDRB_WIDTH">9</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_ALGORITHM">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_AXI_ID_WIDTH">4</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_AXI_SLAVE_TYPE">0</spirit:configurableElementValue>
@ -137,8 +137,8 @@
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MEM_TYPE">3</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_MUX_PIPELINE_STAGES">0</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_PRIM_TYPE">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_DEPTH_A">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_DEPTH_B">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_DEPTH_A">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_DEPTH_B">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_LATENCY_A">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_LATENCY_B">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_READ_WIDTH_A">9</spirit:configurableElementValue>
@ -157,8 +157,8 @@
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_USE_URAM">0</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WEA_WIDTH">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WEB_WIDTH">1</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_DEPTH_A">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_DEPTH_B">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_DEPTH_A">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_DEPTH_B">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_MODE_A">WRITE_FIRST</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_MODE_B">WRITE_FIRST</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="MODELPARAM_VALUE.C_WRITE_WIDTH_A">9</spirit:configurableElementValue>
@ -228,7 +228,7 @@
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Use_REGCEB_Pin">false</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Use_RSTA_Pin">false</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Use_RSTB_Pin">false</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Write_Depth_A">256</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Write_Depth_A">512</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Write_Width_A">9</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.Write_Width_B">9</spirit:configurableElementValue>
<spirit:configurableElementValue spirit:referenceId="PARAM_VALUE.ecctype">No_ECC</spirit:configurableElementValue>

View File

@ -1,4 +1,4 @@
`define ATAN_LUT_LEN_SHIFT 8
`define ATAN_LUT_LEN_SHIFT 9
// changing this requires changing PI definition in common_params.v accordingly
`define ATAN_LUT_SCALE_SHIFT 9

View File

@ -27,8 +27,8 @@ reg [DATA_WIDTH-1:0] max;
reg [DATA_WIDTH-1:0] min;
wire [DATA_WIDTH-1:0] dividend;
wire [DATA_WIDTH-`ATAN_LUT_LEN_SHIFT-1:0] divisor;
assign dividend = (max > 8388608) ? min : {min[DATA_WIDTH-`ATAN_LUT_LEN_SHIFT-1:0], {`ATAN_LUT_LEN_SHIFT{1'b0}}};
assign divisor = (max > 8388608) ? max[DATA_WIDTH-1:`ATAN_LUT_LEN_SHIFT] : max[DATA_WIDTH-`ATAN_LUT_LEN_SHIFT-1:0];
assign dividend = (max > 4194304) ? min : {min[DATA_WIDTH-`ATAN_LUT_LEN_SHIFT-1:0], {`ATAN_LUT_LEN_SHIFT{1'b0}}};
assign divisor = (max > 4194304) ? max[DATA_WIDTH-1:`ATAN_LUT_LEN_SHIFT] : max[DATA_WIDTH-`ATAN_LUT_LEN_SHIFT-1:0];
wire div_in_stb;
@ -38,7 +38,7 @@ wire div_out_stb;
wire [`ATAN_LUT_LEN_SHIFT-1:0] atan_addr;
wire [`ATAN_LUT_SCALE_SHIFT-1:0] atan_data;
assign atan_addr = (quotient>255?255:quotient[`ATAN_LUT_LEN_SHIFT-1:0]);
assign atan_addr = (quotient>511?511:quotient[`ATAN_LUT_LEN_SHIFT-1:0]);
wire signed [`ATAN_LUT_SCALE_SHIFT:0] _phase = {1'b0, atan_data};
reg [2:0] quadrant;