完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
|
本帖最后由 lovely129 于 2014-7-3 17:28 编辑
本人新手,这是书上的例子,怎么会编译不成功? library ieee; use std_logic_1164.all; entity chop8_1 is port(d,rst,clk: in bit; q: out bit); end chop8_1; architecture chop of chop8_1 is type state is (zero,one,two,three); signal pr_state, nx_state: state; begin --lower section-- process(clk,rst) begin if (rst='1') then pr_state<=zero; elsif (clk'event and clk='1') then pr_state<=nx_state; end if; end process; --upper section-- process(pr_state,d) begin case pr_state is when zero=> q<='0'; if (d='1') then nx_state<=one; else nx_state<=zero; end if; when one=> q<='0'; if (d='1') then nx_state<=two; else nx_state<=zero; end if; when two=> q<='0'; if (d='1') then nx_state<=three; else nx_state<=zero; end if; when three=> q<='1'; if (d='0') then nx_state<=zero; else nx_state<=three; end if; end case; end process; end chop; Error (10482): VHDL error at chop8_1.vhd(2): object "std_logic_1164" is used but not declared Error (10800): VHDL error at chop8_1.vhd(2): selected name in use clause is not an expanded name |
|
相关推荐
2个回答
|
|
|
|
|
|
|
|
|
额,我怎么这么粗心 十分感谢! |
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
NVMe高速传输之摆脱XDMA设计51:主要功能测试结果与分析3 nvmePCIe高速存储 PCIe高速存储
230 浏览 0 评论
NVMe高速传输之摆脱XDMA设计50:主要功能测试结果与分析2 nvmePCIe高速存储
378 浏览 0 评论
NVMe高速传输之摆脱XDMA设计49:主要功能测试结果与分析1
1509 浏览 0 评论
935 浏览 0 评论
876 浏览 0 评论
4434 浏览 63 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-3 17:03 , Processed in 0.557119 second(s), Total 42, Slave 35 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2754