用VHDL编写的计数器,能通过语法检测,但不可以综合,哪里出错了?提示 Variable i :std_logic_vector (7 downto 0) 中的“i” 有以下错误:“Signal i cannot be synthesized,bad synchronous description.The description style yo

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 04:22:48
用VHDL编写的计数器,能通过语法检测,但不可以综合,哪里出错了?提示 Variable i :std_logic_vector (7 downto 0) 中的“i” 有以下错误:“Signal i cannot be synthesized,bad synchronous description.The description style yo

用VHDL编写的计数器,能通过语法检测,但不可以综合,哪里出错了?提示 Variable i :std_logic_vector (7 downto 0) 中的“i” 有以下错误:“Signal i cannot be synthesized,bad synchronous description.The description style yo
用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

用VHDL编写的计数器,能通过语法检测,但不可以综合,哪里出错了?提示 Variable i :std_logic_vector (7 downto 0) 中的“i” 有以下错误:“Signal i cannot be synthesized,bad synchronous description.The description style yo
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 counter is
port(clk ,cw,increment,reset:in std_logic;
led :out std_logic_vector (7 downto 0) );
End counter;
Architecture art of counter is注意这里结构体名最好不要与实体名一致
Begin
Process(clk ,cw,increment,reset)
Variable i :std_logic_vector (7 downto 0);
Begin
If reset='1' then --复位不能用其上升沿,直接=1就可以了
i := "00000000";
elsIf(clk'event and clk = '1') then
If(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

用VHDL编写的计数器,能通过语法检测,但不可以综合,哪里出错了?提示 Variable i :std_logic_vector (7 downto 0) 中的“i” 有以下错误:“Signal i cannot be synthesized,bad synchronous description.The description style yo 用VHDL语言设计编写一个异步清零的模9计数器 怎样用VHDL设计含有异步清零和同步时钟使能的10位加法计数器 vhdl伪随机数求用vhdL语言编写一段产生1-7随机数字的程序 出租车计价器设计最好用VHDL编写 出租车计价器设计要求用VHDL编写 用VHDL语言编写下列题目要求的程序.设计一个七人表决电路,参加表决者七人,同意为1,不同意为0,同意者过半表决通过,绿色指示灯灭.表决不通过则红指示灯亮. 运用VHDL设计1个模为24的8421BCD码加法计数器 60进制减法计数器的VHDL描述急…… “避雷器放电计数器检测仪”的参数? vhdl语法规范的哪本书好 有个vhdl的语法问题问你 1.写一个带使能信号、清零信号、置数信号的六进制计数器的VHDL程序.2.由六进制、十进制计数器构成60进制 GMP车间检测,尘埃粒子计数器的等动力采样头有什么用 用vhdl语言编写一个程序,要求测量方波频率,显示在4个数码管上.只要求写出测量方波频率的那一个模块的程 避雷器放电计数器检测仪的工作原理? 用D触发器能组成计数器吗? 根据下面的实体描述,画出电路的结构框图,并用VHDL语言设计异步复位的十进制计数器cnt10.假设cnt10实根据下面的实体描述,画出电路的结构框图,并用VHDL语言设计异步复位的十进制计数器cnt10.