EDA技术实验71900实验一:三人表决器实验
一﹑实验目的要求
1﹑掌握Quartus II的基本操作,掌握电路库元件的建立与调用、设计处理、设计仿真等设计电路的基本操作过程;
2﹑掌握三人表决器的原理
3﹑掌握三人表决器的VHDL描述
二﹑实验原理
参考《数字电子技术》教材
三﹑实验基本内容
设计输入﹑设计处理,设计仿真
四﹑实验报告要求:
阐述三人表决器的原理,三人表决器的VHDL描述程序,三人表决器的RTL电路,三人表决器的仿真波形
附录:三人表决器的VHDL参考程序
-- Three-input Majority Voter
-- The entity declaration is followed by three alternative architectures which achieve the same functionality in different ways.
ENTITY maj IS
PORT(a,b,c : IN BIT; m : OUT BIT);
END maj;
--Dataflow style architecture
ARCHITECTURE concurrent OF maj IS
BEGIN
--selected signal assignment statement (concurrent)
WITH a&b&c SELECT
m <= '1' WHEN "110"|"101"|"011"|"111",'0' WHEN OTHERS;
END concurrent;
--Structural style architecture
ARCHITECTURE structure OF maj IS
--ponents used in architecture
COMPONENT and2 PORT(in1, in2 : IN BIT; out1 : OUT BIT);
PONENT;
COMPONENT or3 PORT(in1, in2, in3 : IN BIT; out1 : OUT BIT);
PONENT;
--declare local signals
SIGNAL w1, w2, w3 : BIT;
BEGIN
--component instantiation statements.
--ports ponent are mapped to signals
--within architecture by position.
gate1 : and2 PORT MAP (a, b, w1);
gate2 : and2 PORT MAP (b, c, w2);
gate3 : and2 PORT MAP (a, c, w3);
gate4 : or3 PORT MAP (w1, w2, w3, m);
END structure;
--Behavioural style architecture using a look-up table
ARCHITECTURE using_table OF maj IS
BEGIN
PROCESS(a,b,c)
CONSTANT lookuptable : BIT_VECTOR(0 TO 7) := "00010111";
VARIABLE index : NATURAL;
BEGIN
index := 0; --index must be cleared each time process executes
IF a = '1' THEN index := index + 1; END IF;
IF b = '1' THEN index := index + 2; END IF;
IF c = '1' THEN index := index + 4; END IF;
m <= lookuptable(index);
END PROCESS;
END using_table;
实验二:多路选择器实验
一﹑实验目的要求
1﹑掌握Quartus II的基本操作,掌握电路库元件的建立与调用、设计处理、设计仿真等设计电路的基本操作过程;
2﹑掌握多路选择器的原理
3﹑掌握多路选择器的VHDL描述
二﹑实验原理
参考《数字电子技术》教材
三﹑实验基本内容
设计输入﹑设计处理,设计仿真
四﹑实验报告要求:
阐述多路选择器的原理,多路选择器的VHDL描述程序(要求用when-else语句实现或者用case语句实现),多路选择器的RTL电路,多路选择器的仿真波形
EDA技术实验 来自淘豆网m.daumloan.com转载请标明出处.