早教吧 育儿知识 作业答案 考试题库 百科 知识分享

用VHDL编写的计数器,能通过语法检测,但不可以综合,哪里出错了?提示Variablei:stdlogicvector(7downto0)中的“i”有以下错误:“Signalicannotbesynthesized,badsynchronousdescription.Thedescriptionstyleyo

题目详情
用VHDL编写的计数器,能通过语法检测,但不可以综合,哪里出错了?
提示 Variable i :std_logic_vector (7 downto 0) 中的“i” 有以下错误:

Signal i cannot be synthesized,bad synchronous description.The description style you are using to describe a synchronous element (register,memory,etc.) is not supported in the current software release.”
Library ieee;
Use ieee.std_logic_1164.all;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
Entity counter is
port(clk ,cw,increment,reset:in std_logic;
led :out std_logic_vector (7 downto 0) );
End counter;
Architecture counter of counter is
Begin
Process(clk ,cw,increment,reset)
Variable i :std_logic_vector (7 downto 0);
Begin
If(reset'event and reset = '1') then
i := "00000000";
elsIf(clk'event and clk = '1') then
If(increment'event and increment = '1') then
If(cw = '1') then
i := i + 1;
elsIf(cw = '0') then
i := i - 1;
End if;
Else null;
End if;
End if;
led
▼优质解答
答案和解析
oh my god!你连用了三个时钟上升沿,难怪会说你bad synchronous description.程序改正如下:Library ieee;Use ieee.std_logic_1164.all;USE IEEE.STD_LOGIC_UNSIGNED.ALL;use IEEE.STD_LOGIC_ARITH.ALL;Entity counte...
看了用VHDL编写的计数器,能通过...的网友还看了以下:

英语作文怎么规避语法错误不知道怎么搞的,语法知识明明知道,但是写作文总是错,已经检查过很多次了,批  2020-05-17 …

A.可纠正一位差错B.可检测所有偶数位错C.可检测所有小于校验位长度的突发错D.可检测所有小于  2020-05-26 …

A.可纠正一位差错B.可检测所有偶数位错C.可检测所有小于校验位长度的突发错D.可检测所有等于  2020-05-26 …

在( )的情况下,银行业金融机构有权拒绝检查。 A.检查人员未出示检查通知书 B.检查人员未出示合法  2020-06-27 …

关于分式方程的检验我一直不是太情楚,这个检验只能证明分式方程乘了一个为0或不为0的式子,但还是无法  2020-06-30 …

有关监督检查部门已经依法做出的检查结论能够满足其他监督检查部门履行本部门职责需要的,其他监督检查部门  2020-11-03 …

我们马上要生物地理会考了但是我一直有个问题老得不到解决?每次考试时,做完题目有的错的老检查不出来,以  2020-11-06 …

Help!英语大神看这里Asisknowntousall,firstimpressionplaysa  2020-11-26 …

英语翻译机械检查:检查外观质量符合其图纸工艺要求检查外形尺寸及安装尺寸符合图纸要求装配质量符合图纸要  2020-12-01 …

某工厂的以为产品检测员在检验产品时,同样也会把次品检验为正品,把正品错误的检验为次品,已知他把正品检  2020-12-10 …