在Max+plus系统中有4个库能支持VHDL语言,它们分 别是Std库、IEEE库、 Altera库和Lpm库。Std库和IEEE库 提供基本的逻辑运算函数及数据类型转换函数等。IEEE 库中的程序包 std logic1164定义了 std logic和 std logic vector等数据类型
在Max+plusⅡ系统中有4个库能支持VHDL语言,它们分 别是Std库、IEEE库、Altera库和Lpm库。Std库和IEEE库 提供基本的逻辑运算函数及数据类型转换函数等。IEEE 库中的程序包std_logic_1164定义了std_logic和 std_logic_vector等数据类型
举例:设计一个与门电路 A BY 000 AB Y 10 001 逻辑符号 真值表
举例: 设计一个与门电路 & A B Y 1 1 1 1 0 0 0 1 0 0 0 0 A B Y 逻辑符号 真值表
实体定义: Library IeeE Use std standard. all Entity and2 is 首先定义输入输出端口名字, 模式(Mode),信号类型 Port(A: in bi B: in bit Y: out bit) 注意最后语句的分号在括号外 End and2
Library IEEE; Use std.standard.all; Entity and2 is Port( A: in bit; B: in bit; Y:out bit); End and2; --首先定义输入输出端口名字, 模式(Mode),信号类型 --注意最后语句的分号在括号外 实体定义:
结构体定义: Architecture Na of and2 is B egin Y<=0 when a=0andB=“0 else? when a=?1 andB=0 else 0? when A0? and B= 1 else 1 End Na 端口模式有以下几种类型:N;OUT; INOUT; BUFFER
Architecture Na of and2 is Begin Y<=’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 结构体定义: 端口模式有以下几种类型:IN ;OUT;INOUT;BUFFER
Architecture Nb of and2 is Begin c<=1 when a='1 and b= else End nb 以上结构体表达何种电路? 结论: 个实体可以有几个结构体,即结构体的定义可以有不同的形式
Architecture Nb of and2 is Begin c <=’1’ when a=’1’ and b = ‘1’ else ‘0’; End Nb; 以上结构体表达何种电路? 一个实体可以有几个结构体,即结构体的定义可以有不同的形式 结论: