vhdl 初学者 菜鸟问题 本人用vhdl做一个七段数码管驱动cc4511
来源:百度知道 编辑:UC知道 时间:2024/07/01 03:33:35
vhdl 初学者 菜鸟问题 本人用vhdl做一个七段数码管驱动cc4511,可是编译时老是出错 。 望哪位大侠帮忙看看 ,或者帮忙编一个:
我编的源程序:
library ieee;
use ieee.std_logic_1164.all;
entity cc4511 is --BCD七段数码管 显示驱动的端口描述
port( lt, bi, le: in std_logic;
insign :in std_logic_vector(3 downto 0); --输入端口DBCA
outsign :out std_logic_vector(6 downto 0)); --输出端口abcdefg
end cc4511;
architecture logic of 4511 is
process(lt,bi,le,insign)
begin
if (lt='0') then
outsign<="1111111";
elsif (bi='0') then --lt='1' and bi='0'
outsign<="0000000";
elsif (le='0') then --lt='1'and bi='1' and le='0'
--DCBA 译码部分
case insign is
when "0000"=> outsign<="1111110"; --****0
我编的源程序:
library ieee;
use ieee.std_logic_1164.all;
entity cc4511 is --BCD七段数码管 显示驱动的端口描述
port( lt, bi, le: in std_logic;
insign :in std_logic_vector(3 downto 0); --输入端口DBCA
outsign :out std_logic_vector(6 downto 0)); --输出端口abcdefg
end cc4511;
architecture logic of 4511 is
process(lt,bi,le,insign)
begin
if (lt='0') then
outsign<="1111111";
elsif (bi='0') then --lt='1' and bi='0'
outsign<="0000000";
elsif (le='0') then --lt='1'and bi='1' and le='0'
--DCBA 译码部分
case insign is
when "0000"=> outsign<="1111110"; --****0
我复制了你给你程序,在quartus下运行时发生了几个错误和几个警告,已经改正过来了,你看看自己对着改下,基本上你写的挺好的,就是有些细节考虑的不是很周到,而且错误也很原始,像结构体后面少了个begin,呵呵,不够细心,附上仿真图,你看看效果吧,有问题在交流,我也是个初学者……
library ieee;
use ieee.std_logic_1164.all;
entity cc4511 is --BCD七段数码管 显示驱动的端口描述
port( lt, bi, le: in std_logic;
insign :in std_logic_vector(3 downto 0); --输入端口DBCA
outsign :out std_logic_vector(6 downto 0)); --输出端口abcdefg
end cc4511;
architecture logic of cc4511 is
begin
process(lt,bi,le,insign)
begin
if (lt='0') then
outsign<="1111111";
elsif (bi='0') then --lt='1' and bi='0'
outsign<="0000000";
elsif (le='0') then --lt=