数字设计与数制编码基础
1. VHDL在数字设计中的应用
VHDL(超高速集成电路硬件描述语言)能根据行为描述生成具有特定行为的电路。它通过明确分离输入/输出定义(“实体”)和内部实现(“架构”),让设计者轻松定义函数的替代实现,而无需在设计层次结构的其他地方进行更改。
例如,多路复用器的VHDL程序如下:
library IEEE;
use IEEE.std_logic_1164.all;
entity Vchap1mux is
port ( A, B, S: in STD_LOGIC;
Z: out STD_LOGIC );
end Vchap1mux;
architecture Vchap1mux_arch of Vchap1mux is
begin
Z <= A when S = '0' else B;
end Vchap1mux_arch;
其“结构化”的VHDL程序为:
architecture Vchap1mux_gate_arch of Vchap1mux is
signal SN, ASN, SB: STD_LOGIC;
begin
U1: INV (S, SN);
U2: AND2 (A, SN, ASN);
U3: AND2 (S, B, SB);
U4: OR2 (ASN, SB, Z);
end Vchap1mux_gate_arch;
超级会员免费看
订阅专栏 解锁全文
39

被折叠的 条评论
为什么被折叠?



