二输入与门电路设计范例 Library std Use std standard all Entity and2 is Port( a: in bit b: in bit. C: out bit) End and2 实体定义结束。 双减号为VHDL程序的注释符,类似C语言中的/注释符
二输入与门电路设计范例 Library std; Use std.standard.all; Entity and2 is Port( a : in bit; b : in bit; c : out bit); End and2; --实体定义结束。 双减号--为VHDL程序的注释符,类似C语言中的//注释符
二输入与门电路设计范例 Architecture na of and2 is Begin c<=0 When a=,, and b=0 else 0. when a=? and b=0 else 0.when a=,0, and b=1" else 符号<≡为信号直接赋值符。 End na 结构体Na Architecture nb of and2 is Begin C<= a and b: and为逻辑与操作 End nb;-结构体№b
二输入与门电路设计范例 Architecture Na of and2 is Begin c <=’0’ when a=’0’ and b = ‘0’ else ’0’ when a=’1’ and b = ‘0’ else ’0’ when a=’0’ and b = ‘1’ else ‘1’; 符号<=为信号直接赋值符。 End Na; --结构体Na Architecture Nb of and2 is Begin c <= a and b; --and 为逻辑与操作 End Nb; --结构体Nb
第一章VHDL的程序结构和软件操作 1VHDL程序的基本结构 12Max+plus的操作
第一章 VHDL的程序结构和软件操作 1-1 VHDL程序的基本结构 1-2 Max+plusⅡ的操作
1-1VHDL程序的基本结构 VHDL程序 c程序 Library std include“ stdio.h: Use std standard. all: include math. h Entity and2 is Port( a, b: in bit; c: out bit); int main(void) End and2 int a.b.c Architecture al of and2 is a=8 Begin c<=a and b c=atb End al; return c; j
1-1 VHDL程序的基本结构 include “stdio.h”; include “math.h”; int main(void) { int a,b,c; a=8; b=9; c=a+b; return c; } Library std; Use std.standard.all; Entity and2 is Port( a,b : in bit; c : out bit); End and2; Architecture a1 of and2 is Begin c <= a and b; End a1; VHDL程序 C程序
1-1VHDL程序的基本结构 (1) LIBRARY和 PACHAGE声明区; ■(2) ENTITY定义区; (3) ARCHIITECTURE定义区; (4) CONFIGURATION定义区
1-1 VHDL程序的基本结构 ◼ (1)LIBRARY和PACHAGE声明区; ◼ (2)ENTITY定义区; ◼ (3)ARCHITECTURE定义区; ◼ (4)CONFIGURATION定义区