Basic of VHDL

Download Report

Transcript Basic of VHDL

Basic of VHDL
VHDL 의 구성
Package (option)
Entity and Architecture
Entity
Entity
Entity
process
process
process
Architect
ure
Architect
ure
Architect
ure
Module1
Module2
Configuration (option)
Module3
----
Basic of VHDL
- Entity : 회로의 Input, Output등을 선언
- Architecture : 회로의 동작 및 상호 연결을 기술 (VHDL description)
- Configuration : entity와 Architecture간의 상호 관계를 기술
- Package : C-language의 header file과 같은 역할을 수행
Data type, function, procedure등을 중복으로 선언
하거나 기술하지 않고 한번 기술한 것을 여러 설계에서
공동으로 사용할 수 있도록 모아 둠
Entity and Architecture
Entity : 1. 회로블록의 이름을 정의, I/O 인터페이스 정의
디자인 파라미터의 전달
2. Entity 선언 형식
ENTITY 엔티티_이름 IS
GENERIC (파라미터_리스트 );
PORT(포트_리스트);
END 엔티티_이름;
3. Generic 선언 형식
GENERIC ( 신호_이름,.. : [모드] 자료형[:=표현] ; … );
4. Port 선언 형식
PORT ( 신호_이름,.. : [모드] 자료형[:=표현] ; … );
Entity and Architecture
Entity 예) entity andg is
Generic( tphz, tplz : time :=3 ns;
default_value: integer: =1);
port(a, b : in bit;
z : out bit);
end andg;
* Red : 지정어 black : 식별어
A
Z
B
Entity and Architecture
Architecture : 1. 회로의 하드웨어를 기술
내부동작, 연결, 구조를 기술
2. architecture 선언형식
ARCHITECTURE 아키텍쳐_이름 OF 엔티티_이름 IS
{ 선언부 }
BEGIN
{ 병행문 }
END 아키텍쳐_이름;
Architecture 예)
architecture sample of andg is
begin
z <= a and b;
end sample;