完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
|
错误Else clause following a clock edge must hold the state of signal"d7"我在Q2上可以编译,但是到MAX+2上就不能~模块也不能生成,学校试验箱只能支持MAX+2,毕设的最后一步了 搞了好久都过不去~求大神们帮忙啊~
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_arith.all; entity xian is port ( clk:in std_logic; en:in std_logic; data0:in std_logic_vector(3 downto 0); data1:in std_logic_vector(3 downto 0); data2:in std_logic_vector(3 downto 0); data3:in std_logic_vector(3 downto 0); data4:in std_logic_vector(3 downto 0); data5:in std_logic_vector(3 downto 0); data6:in std_logic_vector(3 downto 0); data7:in std_logic_vector(3 downto 0); led:out std_logic_vector(7 downto 0); we:out std_logic_vector(7 downto 0) ); end xian; architecture one of xian is component display is port( din:in std_logic_vector(3 downto 0); dout:out std_logic_vector(7 downto 0)); end component; signal d0,d1,d2,d3,d4,d5,d6,d7:std_logic_vector(3 downto 0); signal dd0,dd1,dd2,dd3,dd4,dd5,dd6,dd7:std_logic_vector(7 downto 0); begin U1: display port map(d0,dd0); U2: display port map(d1,dd1); U3: display port map(d2,dd2); U4: display port map(d3,dd3); U5: display port map(d4,dd4); U6: display port map(d5,dd5); U7: display port map(d6,dd6); U8: display port map(d7,dd7); process(en) begin if(en='0') then d0<=d0; d1<=d1; d2<=d2; d3<=d3; d4<=d4; d5<=d5; d6<=d6; d7<=d7; else d0<=data0; d1<=data1; d2<=data2; d3<=data3; d4<=data4; d5<=data5; d6<=data6; d7<=data7; end if; end process; process(clk) variable cnt2:std_logic_vector(3 downto 0); begin if clk'event and clk='1' then cnt2:=cnt2+1; if cnt2="0001" then we<="11111110"; led<=dd0; elsif cnt2="0010" then we<="11111101"; led<=dd1; elsif cnt2="0011" then we<="11111011"; led<=dd2; elsif cnt2="0100" then we<="11110111"; led<=dd3; elsif cnt2="0101" then we<="11101111"; led<=dd4; elsif cnt2="0110" then we<="11011111"; led<=dd5; elsif cnt2="0111" then we<="10111111"; led<=dd6; elsif cnt2="1000" then we<="01111111"; led<=dd7; cnt2:="0000"; end if; end if; end process; end one; |
|
相关推荐
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 评论
4430 浏览 63 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-3 07:39 , Processed in 0.602788 second(s), Total 73, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
4093