- 18
- 0
- 约 9页
- 2017-03-28 发布于重庆
- 举报
4第3章基本的VHDL模型结构
第三章 基本的VHDL模型结构
第一节 概述
一、VHDL基本组成:
实体说明entity
构造体architecture
二、三种编码格式
三、标识符、数据对象、数据类型、词法、属性
实例:8位数值比较器(CC14585)
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity comp8 is
port(
a: in std_logic_vector(7 downto 0);
b: in std_logic_vector(7 downto 0);
clk : in std_logic;
rst : in std_logic;
agtb,altb,aeqb : out std_logic
);
end entity comp8;
architecture behav of comp8 is
begin
process(rst,clk)
begin
if rst=1 then
agtb=0; altb=0; aeqb=0;
elsif clkevent and clk=1 then
if ab then
agtb=1; altb=0; aeqb=0;
elsif a=b then
agtb=0; alt
原创力文档

文档评论(0)