vhdl - 如何在模拟开始时修复“内部编译器错误”
问题描述
我正在研究带有选择频率选项的分频器,但我无法让它工作。语法检查每次都通过,但是当我开始模拟时,我收到此错误:“FATAL_ERROR:Simulator:CompilerAssert.h:40:1.20 - 第 296 行的文件 ../src/VhdlTreeTransform.cpp 中的内部编译器错误获取技术支持问题,请访问http://www.xilinx.com/support。”
我已经在搜索这个问题,但找不到任何解决方案。我是这方面的新手,这可能是一些平庸的问题,如果你能帮我解决这个问题,我会很高兴。
主要代码在这里:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_unsigned.all;
use IEEE.NUMERIC_STD.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
entity Freq4Sel is
Port ( cp : in STD_LOGIC;
sel : in STD_LOGIC_VECTOR (1 downto 0);
outcp : buffer STD_LOGIC:= '0');
end Freq4Sel;
architecture Behavioral of Freq4Sel is
begin
process(cp)
variable selects : integer range 0 to 50000000;
variable temp: integer range 0 to 50000000 := 0;
begin
with sel select
selects := 50000000 when "11",
5000000 when "10",
2000000 when "01",
1000000 when others;
if (cp'event and cp = '1') then
temp := temp+1;
if(temp>=selects) then
outcp <= not outcp;
end if;
end if;
end process;
end Behavioral;
模拟测试文件在这里:
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;
ENTITY Freq4Sel_w IS
END Freq4Sel_w;
ARCHITECTURE behavior OF Freq4Sel_w IS
COMPONENT Freq4Sel
PORT(
cp : IN std_logic;
sel : IN std_logic_vector(1 downto 0);
outcp : BUFFER std_logic
);
END COMPONENT;
signal cp : std_logic := '0';
signal sel : std_logic_vector(1 downto 0) := "00";
signal outcp : std_logic;
constant cp_period : time := 10 ns;
BEGIN
uut: Freq4Sel PORT MAP (
cp => cp,
sel => sel,
outcp => outcp
);
cp_process :process
begin
cp <= '0';
wait for cp_period/2;
cp <= '1';
wait for cp_period/2;
end process;
stim_proc: process
begin
wait for 100 ns;
sel <= "10";
wait for cp_period*10;
wait;
end process;
END;
解决方案
推荐阅读
- ios - 在 Firestore 数据库中使用的最合适的时间戳格式是什么?
- java - 使用 Postman 将消息发布到 Slack 频道
- php - 使用一个标签将数据传递到 2 个页面
- ios - 用于本地化目的的文本连接
- mysql - 获得多个条件下的多个计数
- syslog - rsyslog 是否支持循环日志文件?
- youtube-api - 如何以编程方式与用户列表(电子邮件地址)共享“列出”视频?
- javascript - 使用 JavaScript 向上滚动时如何禁用菜单显示
- python - Python 从 Buffer 中读取数据
- mysql - 在 MySQL 中将 varchar 转换为日期的问题