使用 VHDL 在 Quartus 中使用除法运算符的问题

问题描述

我们需要使用 VHDL 将两个整数相除并在 FPGA 上运行。下面是我们为整数加法编写的代码,它在 Quartus 中编译但是当我们尝试编译除法代码时,它给出了错误

“错误 (10327):divider.vhd(25) 处的 VHDL 错误:无法确定运算符“/”的定义 -- 找到 0 个可能的定义。

当我们在互联网上搜索时,我们发现有很多帖子说 VHDL 中通常没有执行整数除法。任何人都可以给我们一些建议来解决这个问题。 提前致谢

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.std_logic_unsigned.all;

entity divider is

port 
    (
    --clock,resetn :IN STD_LOGIC;
       
        a       : in  std_logic_vector (11 downto -4);
        b      : in  std_logic_vector (11 downto -4);
        Enable_FA: in std_logic;
        result  : out  std_logic_vector (23 downto -8)
    );

end entity;

architecture behaviour of divider is
begin
process(a,b,Enable_FA)
    begin
    if (Enable_FA='1') then
        result <= a / b;
    end if; 
end process;    
end behaviour;

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...