Line 16... |
Line 16... |
-- See the License for the specific language governing permissions and
|
-- See the License for the specific language governing permissions and
|
-- limitations under the License.
|
-- limitations under the License.
|
--
|
--
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
|
|
library ieee, common_pkg_lib, common_components_lib, common_mult_lib, technology_lib;
|
library ieee, common_pkg_lib, common_components_lib, astron_multiplier_lib;
|
use IEEE.std_logic_1164.all;
|
use IEEE.std_logic_1164.all;
|
USE technology_lib.technology_select_pkg.ALL;
|
--USE technology_lib.technology_select_pkg.ALL;
|
use common_pkg_lib.common_pkg.all;
|
use common_pkg_lib.common_pkg.all;
|
|
|
entity rTwoWMul is
|
entity rTwoWMul is
|
generic (
|
generic (
|
g_technology : NATURAL := c_tech_select_default;
|
g_technology : NATURAL := 0;
|
g_stage : natural := 1;
|
g_stage : natural := 1;
|
g_lat : natural := 3+1 -- 3 for mult, 1 for round
|
g_lat : natural := 3+1 -- 3 for mult, 1 for round
|
);
|
);
|
port (
|
port (
|
clk : in std_logic;
|
clk : in std_logic;
|
Line 104... |
Line 104... |
-- . for c_lat = 0,1,2 use the RTL multiplier
|
-- . for c_lat = 0,1,2 use the RTL multiplier
|
-- . for c_lat >= 3 default best use the FPGA multiplier IP block.
|
-- . for c_lat >= 3 default best use the FPGA multiplier IP block.
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
|
|
gen_rtl : if g_stage=1 or c_in_dat_w>c_dsp_mult_w or c_lat<c_dsp_mult_lat generate
|
gen_rtl : if g_stage=1 or c_in_dat_w>c_dsp_mult_w or c_lat<c_dsp_mult_lat generate
|
u_CmplxMul : entity common_mult_lib.common_complex_mult
|
u_CmplxMul : entity astron_multiplier_lib.common_complex_mult
|
generic map (
|
generic map (
|
g_technology => g_technology,
|
g_technology => g_technology,
|
g_variant => "RTL",
|
g_variant => "RTL",
|
g_in_a_w => c_in_dat_w,
|
g_in_a_w => c_in_dat_w,
|
g_in_b_w => c_weight_w,
|
g_in_b_w => c_weight_w,
|
Line 132... |
Line 132... |
out_val => OPEN
|
out_val => OPEN
|
);
|
);
|
end generate;
|
end generate;
|
|
|
gen_ip : if g_stage>1 and c_in_dat_w<=c_dsp_mult_w and c_lat>=c_dsp_mult_lat generate
|
gen_ip : if g_stage>1 and c_in_dat_w<=c_dsp_mult_w and c_lat>=c_dsp_mult_lat generate
|
u_cmplx_mul : entity common_mult_lib.common_complex_mult
|
u_cmplx_mul : entity astron_multiplier_lib.common_complex_mult
|
generic map (
|
generic map (
|
g_technology => g_technology,
|
g_technology => g_technology,
|
g_variant => "IP",
|
g_variant => "IP",
|
g_in_a_w => in_re'length,
|
g_in_a_w => in_re'length,
|
g_in_b_w => weight_re'length,
|
g_in_b_w => weight_re'length,
|