完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
library ieee;
use ieee.std_logic_1164.all ; use ieee.std_logic_unsigned.all ; entity li is port (clk ,j ,en ,d ,c ,b ,a :in std_logic ;r1 ,r2 :out std_logic) ; end ; architecture behave of li is signal cq ,k ,mo :std_logic_vector (16 downto 0) ; signal cao1 ,cao2 :std_logic ; signal instruction :std_logic_vector (3 downto 0) ; begin instruction <= d &c &b &a ; with instruction select mo <="00000000000000111"when"0001", "00000000000001111"when"0010", "00000000000011111"when"0011", "00000000000111111"when"0100", "00000000001111111"when"0101", "00000000011111111"when"0110", "00000000111111111"when"0111", "00000001111111111"when"1000", "00000011111111111"when"1001", "00000111111111111"when"1010", "00001111111111111"when"1011", "00011111111111111"when"1100", "00111111111111111"when"1101", "01111111111111111"when"1110", "11111111111111111"when"1111", "00000000000000111"when others ; process (clk ,en ,j ,k ,cq) begin if clk'event and clk = '1'then k <= mo ; if en = '1'then if j = '0'then if cq < k then cq <= cq + 1 ; else cq <= ( (others = > '0') ; end if ; else if cq > 0 then cq <= cq - 1 ; else cq <= k ; end if ; end if ; else cq <= ( (others = > '0') ; end if ; end if ; end process ; process (en ,j ,cq ,k) begin if en = '1'then if j = '0'then if cq = k then cao1 <= '1'; else cao1 <= '0'; end if ; cao2 <= '0'; else if cq ="00000000000000000"then cao2 <= '1'; else cao2 <= '0'; end if ; cao1 <= '0'; end if ; else cao1 <= '0';cao2 <= '0'; end if ; end process ; r1 <= cao1 ; r2 <= cao2 ; end behave ; 以上是网上参考的变模计数器的VHDL代码,然而我在使用MAX PLUS 2 编译时却显示: unexpected end of file try using the text editor's syntax coloring command to find the missing delimiter or key word 检查一上午仍然没找到错误的地方,望各位大侠指导 |
|
相关推荐
1 个讨论
|
|
我今天也遇到这个问题,还没有解决
|
|
|
|
|
|
FPGA零基础学习系列精选:半导体存储器和可编程逻辑器件简介
222 浏览 0 评论
cmos的slvs-ec协议40针引脚该如何连接到xilinx a7开发版上?
354 浏览 0 评论
1303 浏览 1 评论
373 浏览 0 评论
【星嵌电子XQ138F-EVM开发板体验】(原创)8.安全FPGA防御黑客病毒(芯片设计制造级防护)源代码
1391 浏览 0 评论
1070 浏览 22 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-3-29 13:21 , Processed in 0.622676 second(s), Total 64, Slave 47 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 深圳华秋电子有限公司
电子发烧友 (电路图) 粤公网安备 44030402000349 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号