VHDL描述: ENTITY mux IS 实体声明 PORT(d0,d1, sel:iN bit; q: out bit);-端口语句 END mux 结构体 ARCHITECTURE struct of mux IS COMPONENT and2 结构声明部分 PORT(a, b: iN bit; C: OUt bit) END COMPONENT COMPONENT on2 PORT(a, b: IN bit; c: OUT bit) END COMPONENT COMPONENT iny PORT(a: In bit C: OUt bit) END COMPONENT
VHDL描述: ENTITY mux IS --实体声明 PORT (d0, d1, sel: IN bit; q: OUT bit ); --端口语句 END mux; --结构体 ARCHITECTURE struct OF mux IS COMPONENT and2 --结构声明部分 PORT(a, b: IN bit; c: OUT bit); END COMPONENT; COMPONENT or2 PORT(a, b: IN bit; c: OUT bit); END COMPONENT; COMPONENT inv PORT (a: IN bit c: OUT bit); END COMPONENT;
SIGNAL aa ab nsel: bit 信号声明 FORU1 inV USE ENTITY WORK. Invt( behav);-配置说明 FOR U2, U3: and2 USE ENTITY WORK And gt(dflw) FOR U4 or 2 USE ENTITY WORK Or gt(archi) BEGIN ul: inv PORT MAP(sel, nsel) 结构体描述部分 u2: and2 PORT MAP (nsel, dl, ab) u3: and2 PORT MAP (dO, sel, aa) u4: or2 PORT MAP(aa, ab, q) ENd Struc
SIGNAL aa,ab, nsel: bit ; --信号声明 FOR U1 :inv USE ENTITY WORK. Invrt (behav); --配置说明 FOR U2 , U3:and2 USE ENTITY WORK. And_gt(dflw); -- FOR U4 :or 2 USE ENTITY WORK. Or_gt(arch1); -- BEGIN u1: inv PORT MAP (sel, nsel); --结构体描述部分 u2: and2 PORT MAP (nsel, d1, ab); u3: and2 PORT MAP (d0, sel, aa); u4: or2 PORT MAP (aa, ab, q); END struct;
用不同的参数实例化元件—ge eneric clause 例如:与门中, entity declaration中有 generic clause prop delay: time 在 architecture body中有 generic map: prop delay=>12 ns, generic map: prop delay=> 10 ns generic map: prop delay=>8 ns
用不同的参数实例化元件 —— generic clause 例如:与门中,entity declaration 中有generic clause: prop_delay : time; 在architecture body 中有: generic map : prop_delay => 12 ns; generic map : prop_delay => 10 ns; generic map : prop_delay => 8 ns;
第二节串行分解 硬件功能串行执行的结构
第二节 串行分解 硬件功能串行执行的结构
在ⅥHDL语言中可用作串行执行的语句有 控制语句( Control Statements) I语句、Case语句、Wai语句
在VHDL语言中可用作串行执行的语句有: 语言中可用作串行执行的语句有: z 控制语句(Control Statements) If语句、 Case语句、 Wait语句