早教吧作业答案频道 -->其他-->
用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
提示 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编写的计数器,能通过...的网友还看了以下:
设A为n阶方阵,且A^2=0,则下列选项中错误的是A.A可逆B.A+E可逆C.设A为n阶方阵,且A 2020-05-14 …
设A为n阶方阵,且A^2=0,则下列选项中错误的是A.A可逆B.A+E可逆C.设A为n阶方阵,且A 2020-05-14 …
数学圆锥曲线 直线与椭圆 已知椭圆x^2/a^2+y^2/b^2=1(a>b>0)的左右焦点分别为 2020-06-27 …
麦角醇(e了它小s着e了小l)在紫外光照射下可转化为抗软骨病的维生素D2,麦角醇的结构为:下列关于 2020-07-09 …
英语单词填空1.时间状语:d-r-n-2.场所:b-s-s-o-f-r--e-a-t-e-t3.教 2020-07-14 …
看音标写单词,急[重音selibreit](好像有抄错,l可能没有,[in重音vait][pu倒e 2020-07-15 …
如图①所示,已知A、B为直线l上两点,点C为直线l上方一动点,连接AC、BC,分别以AC、BC为边向 2020-10-31 …
设随机变量ξ具有分布:P(ξ=k)=1/2^k,求Eξ和Dξ(k为正整数)我知道Eξ可用乘公比再用错 2020-11-03 …
甲是一种可用于净水和膨化食品的盐,由A、B、C、D、E五种短周期元素组成.甲溶于水后可电离出三种离子 2020-11-03 …
英语单词排列以下字母排列成一个单词,1.e,n,a,l,r2.a,o,o,l,l,b,f,t3.i, 2020-12-24 …