我想用megafunction做两个浮点数。我创建了宏功能fpalt_mult,但我没有继续, 我没有找到足够的关于如何做的例子。
entity multix is
port(
x: in std_logic_vector(31 downto 0);
y : in std_logic_vector(31 downto 0);
clk : in std_logic;
reset : in std_logic;
overflow : out std_logic;
result : out std_logic_vector(31 downto 0)
);
end multix;
architecture carp of multix is
COMPONENT multix_altfp_mult_pup
PORT (
aclr : IN STD_LOGIC ;
clk_en : IN STD_LOGIC ;
clk : IN STD_LOGIC ;
y : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
overflow : OUT STD_LOGIC ;
x : IN STD_LOGIC_VECTOR (31 DOWNTO 0);
result : OUT STD_LOGIC_VECTOR (31 DOWNTO 0)
);
END COMPONENT;
begin
multix PORT MAP (
aclr => aclr_sig,
clk_en => clk_en_sig,
clock => clock_sig,
dataa => dataa_sig,
datab => datab_sig,
overflow => overflow_sig,
result => result_sig
);
end architecture;