VHDL语言 循环设计求教!

[复制链接]
查看11 | 回复2 | 2009-6-17 11:30:25 | 显示全部楼层 |阅读模式
设计一个电路 有一个输入T 三个输出L1 L2 L3
若T=1 则按照如下3步循环:
1.L1=0 L2=0 L3=1
2.L1=0 L2=1 L3=0
3.L1=1 L2=0 L3=0
若T=0 则跳出循环
要求在循环中每一步都先判断是否T=0
请问这个程序怎么设计?

回复

使用道具 举报

千问 | 2009-6-17 11:30:25 | 显示全部楼层
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all;entity led is port( reset: instd_logic; clk : instd_logic; led :out std_logic_vector(2 downto 0));end entity;architecture behave of led issignal cnt : std_logic_vector(24 downto 0);sig...
回复

使用道具 举报

千问 | 2009-6-17 11:30:25 | 显示全部楼层
libraryieee;useieee.std_logic_1164.all;useieee.std_logic_arith.all;useieee.std_logic_unsigned.all;entityledisport(reset:instd_logic;clk:inst...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行