早教吧作业答案频道 -->其他-->
用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编写的计数器,能通过...的网友还看了以下:
我国科学家张辰宇在研究中发现,给小鼠喂养大米后,在小鼠的血清中检测到了来自大米的微小RNA,这种R 2020-05-17 …
(本小题满分12分)为了预防春季流感,市防疫部门提供了编号为1,2,3,4的四种疫苗供市民选择注射 2020-06-19 …
博览群书,总不能全看吧.看些什么书才能丰富知识面,能够写出文章.做一个知书达理的人,主要想提高语言的 2020-11-16 …
编写程序,实现200以内加减法测试.要求如下:a两点运算数用rand()函数产生b测试编写程序,实现 2020-11-20 …
“嫦娥二号”探测器成功着陆于月球表面后,“玉兔号”月球车与其分离开始探测工作.“玉兔号”月球车轮上凸 2020-12-07 …
如图1为某班一次地理野外实习的观测点分布图,①-④为观测点编号.图2为该班某小组在其中一个观测点所做 2020-12-10 …
我的作文水平急剧下降,写的时候不知道写什么,希望哪位高手提一些快速提高作文水平的方法以前写的时候能编 2020-12-19 …
在一个真核细胞基因的编码区中,有两个外显子和一个内含子,测得一个外显子有126个碱基,另一个外显子有 2020-12-24 …
不构成回路怎么会有电压所用编码器是24V两线制供电.现将编码器的负接线柱的0V导线拆下,24V电源正 2020-12-27 …
在“用伏安法测电阻”的实验中,连接电路时突然发现电流表损坏不能正常使用了,若应用现有的器材在不拆开电 2021-01-22 …