完善资料让更多小伙伴认识你,还能领取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个回答
|
|
|
|
|
|
额,我怎么这么粗心十分感谢! |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
828 浏览 0 评论
367 浏览 0 评论
1089 浏览 0 评论
380 浏览 0 评论
FPGA零基础学习系列精选:半导体存储器和可编程逻辑器件简介
1013 浏览 0 评论
1438 浏览 35 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-24 09:28 , Processed in 0.411136 second(s), Total 72, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号