vhdl - 我在计数器中定义“计数”的方式类型的 VHDL 错误
问题描述
我的代码有问题,我不知道为什么。它告诉我行中有错误。
signal count : integer;
和
begin
sync:
我不确定在这里做什么。任何帮助都会很棒。艾伦。
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity COUNTER is
Port ( Reset : in STD_LOGIC;
Clock : in STD_LOGIC;
CountReset : in STD_LOGIC;
GC : out STD_LOGIC;
AC : out STD_LOGIC;
WC :out STD_LOGIC
);
end COUNTER;
architecture BEH of COUNTER is
signal count : integer;
begin
sync:
process (Reset,Clock)
begin
count <= 0;
if (Reset = '1') then
count <=0;
elsif (CountReset = '1') then
count <=0;
elsif (rising_edge(Clock)) then
count <= count + 1;
end if;
end process sync;
GC <= '1' when count = 500 else '0';
AC <= '1' when count = 300 else '0';
WC <= '1' when count = 500 else '0';
end BEH;
解决方案
推荐阅读
- html - 更改/覆盖 CSS 中 ::after 元素的 z-index
- spring - 春季 Kotlin Postgres
- c# - LINQ 表达式 'DbSet
.Where(p => p.IsValid)' 无法在 EF Core 3 中翻译 - python - 根据特定列中的条件应用公式
- regex - Lighttpd 清理 URL 并在 FQDN 之后删除所有内容?
- javascript - 猫鼬虚拟填充无限循环
- java - 是否有一种方法可以在所有引用消失后执行?
- templates - YouTrack 中新问题的描述字段中的默认文本
- twitter-bootstrap - 每行 5 张响应卡,带引导程序 4
- javascript - tinymce 如何映射所见即所得的 html 代码和存储到数据库的 textarea 的输出?