EDA試驗(yàn)總結(jié) EDA試驗(yàn)收獲與體會(huì)(5篇)_第1頁
EDA試驗(yàn)總結(jié) EDA試驗(yàn)收獲與體會(huì)(5篇)_第2頁
EDA試驗(yàn)總結(jié) EDA試驗(yàn)收獲與體會(huì)(5篇)_第3頁
EDA試驗(yàn)總結(jié) EDA試驗(yàn)收獲與體會(huì)(5篇)_第4頁
EDA試驗(yàn)總結(jié) EDA試驗(yàn)收獲與體會(huì)(5篇)_第5頁
已閱讀5頁,還剩49頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

本文格式為Word版,下載可任意編輯——EDA試驗(yàn)總結(jié)EDA試驗(yàn)收獲與體會(huì)(5篇)總結(jié)是對(duì)過去一定時(shí)期的工作、學(xué)習(xí)或思想狀況進(jìn)行回想、分析,并做出客觀評(píng)價(jià)的書面材料,它可使零星的、短淺的、表面的感性認(rèn)知上升到全面的、系統(tǒng)的、本質(zhì)的理性認(rèn)識(shí)上來,讓我們一起認(rèn)真地寫一份總結(jié)吧。大家想知道怎么樣才能寫一篇比較優(yōu)質(zhì)的總結(jié)嗎?下面是我為大家?guī)淼目偨Y(jié)書優(yōu)秀范文,希望大家可以喜歡。

EDA試驗(yàn)總結(jié)EDA試驗(yàn)收獲與體會(huì)篇一

eda技術(shù)試驗(yàn)

二、教材名稱:《eda技術(shù)使用教程》,潘松等編著。

三、本課程教學(xué)目的、要求:

介紹eda的基本知識(shí)、常用的eda工具的使用方法和目標(biāo)器件的結(jié)構(gòu)原理、vhdl設(shè)計(jì)輸入方法(圖形和文本)、vhdl仿真、vhdl的設(shè)計(jì)優(yōu)化等。

eda技術(shù)作為重要的專業(yè)課程,其實(shí)踐性強(qiáng)。在教學(xué)時(shí)要重視理論和實(shí)踐的緊湊結(jié)合,通過大量上機(jī)操作,使學(xué)生把握vhdl的基本結(jié)構(gòu)和編程思想。試驗(yàn)1原理圖輸入方法及8位全加器設(shè)計(jì)(4課時(shí))

1)試驗(yàn)?zāi)康模?/p>

熟悉利用max+plusⅱ的原理圖輸入方法設(shè)計(jì)簡單組合電路,把握層次化設(shè)計(jì)的方法,并通過一個(gè)8位全加器的設(shè)計(jì)把握利用eda軟件進(jìn)行電子電路設(shè)計(jì)的詳細(xì)流程。2)試驗(yàn)報(bào)告要求:

詳細(xì)表達(dá)8位加法器的設(shè)計(jì)流程;給出各層次的原理圖及其對(duì)應(yīng)的仿真波形圖;給出加法器的延時(shí)狀況。

3)試驗(yàn)步驟:

(1)設(shè)計(jì)一個(gè)一位半加器。

步驟1:輸入設(shè)計(jì)項(xiàng)目和存盤步驟2:輸入半加器元件:步驟3:將項(xiàng)目設(shè)置為工程文件步驟4:選擇目標(biāo)器件并編譯步驟5:時(shí)序仿真步驟6:包裝元件入庫

選擇菜單“file〞→“open〞,在“open〞對(duì)話框中選擇原理圖編輯文件選項(xiàng)“graphiceditorfiles〞,,重新開啟半加器設(shè)計(jì)文件,然后選擇如圖4-5中“file〞菜單的“createdefaultsymbol〞項(xiàng),將當(dāng)前文件變成了一個(gè)包裝好的單一元件(symbol),并被放置在工程路徑指定的目錄中以備后用。

(2)利用半加器組成一個(gè)一位全加器,并記錄仿真結(jié)果。(3)利用全加器組成一個(gè)八位全加器,并記錄仿真結(jié)果。

試驗(yàn)二

簡單組合電路和時(shí)序電路設(shè)計(jì)(4課時(shí))

一、試驗(yàn)?zāi)康模?/p>

熟悉max+plusⅱ的vhdl文本設(shè)計(jì)流程全過程,學(xué)習(xí)簡單組合電路和時(shí)序電路的設(shè)計(jì)和仿真方法。

二、試驗(yàn)內(nèi)容

1:首先利用max+plusⅱ完成2選1多路選擇器和一位全加器的文本編輯輸入和仿真測(cè)試等步驟,給出仿真波形,驗(yàn)證本項(xiàng)設(shè)計(jì)的功能。

2:設(shè)計(jì)觸發(fā)器(j-k),給出程序設(shè)計(jì)、軟件編譯、仿真分析、硬件測(cè)試及詳細(xì)試驗(yàn)過程。

3:先設(shè)計(jì)或門和一位半加器的vhdl描述文件,并進(jìn)行仿真調(diào)試,再用元件例化的方法實(shí)現(xiàn)一位全加器,并仿真調(diào)試。要求記錄vhdl文件內(nèi)容和仿真波形結(jié)果。

4:用一位全加器設(shè)計(jì)8為全加器。要求記錄vhdl文件內(nèi)容和仿真波形結(jié)果。(選作)參考程序entitymux21aisport(a,b:inbit;s:inbit;y:outbit);endentitymux21a;architectureoneofmux21aissignald,e:bit;begind=aand(nots);e=bands;y=dore;endarchitectureone;

libraryieee;use;entityor2aisport(a,b:instd_logic;c:outstd_logic);endentityor2a;

architecturefu1ofor2aisbeginc=aorb;endarchitecturefu1;

半加器描述(1)libraryieee;use;entityadderisport(a,b:instd_logic;co,so:outstd_logic);endentityadder;architecturefh1ofadderisbeginso=not(axor(notb));co=aandb;endarchitecturefh1;

1位二進(jìn)制全加器頂層設(shè)計(jì)描述libraryieee;use;entityf_adderisport(ain,bin,cin:instd_logic;cout,sum:outstd_logic);endentityf_adder;architecturefd1off_adderiscomponenth_adderport(a,b:instd_logic;co,so:outstd_logic);endcomponent;componentor2aport(a,b:instd_logic;c:outstd_logic);endcomponent;

signald,e,f:std_logic;beginu1:h_adderportmap(a=ain,b=bin,co=d,so=e);u2:h_adderportmap(a=e,b=cin,co=f,so=sum);u3:or2aportmap(a=d,b=f,c=cout);endarchitecturefd1;二選一多路選擇器仿真結(jié)果:

試驗(yàn)三

含異步清0和同步時(shí)鐘使能的4位加法計(jì)數(shù)器(4課時(shí))

一、試驗(yàn)?zāi)康模?/p>

學(xué)習(xí)計(jì)數(shù)器的設(shè)計(jì)、仿真,進(jìn)一步熟悉vhdl設(shè)計(jì)技術(shù)。

二、試驗(yàn)內(nèi)容:

設(shè)計(jì)一含計(jì)數(shù)使能、異步復(fù)位和能進(jìn)行計(jì)數(shù)值并行預(yù)置功能的4位加法計(jì)數(shù)器。rst是異步清零信號(hào),高電平有效;clk是時(shí)鐘輸入信號(hào);d0、d1、d2、d3是4位數(shù)據(jù)輸入端(數(shù)據(jù)預(yù)置輸入端)。q0、q1、q2、q3為計(jì)數(shù)器輸出端。cout為進(jìn)位輸出端。ena為使能端,為?1?時(shí),計(jì)數(shù)器實(shí)現(xiàn)對(duì)clk時(shí)鐘脈沖信號(hào)的加1計(jì)數(shù),為0時(shí)中止計(jì)數(shù)。

參考程序:libraryieee;use;use;entitycnt4bisport(clk:instd_logic;rst:instd_logic;ena:instd_logic;outy:outstd_logic_vector(3downto0);cout:outstd_logic);endcnt4b;architecturebehavofcnt4bissignalcqi:std_logic_vector(3downto0);beginp_reg:process(clk,rst,ena)beginifrst='1'thencqi=“0000〞;elsifclk'eventandclk='1'thenifena='1'thencqi=cqi+1;elsecqi=“0000〞;endif;endif;outy=cqi;endprocessp_reg;cout=cqi(0)andcqi(1)andcqi(2)andcqi(3);--進(jìn)位輸出endbehav;

試驗(yàn)四

7段數(shù)碼顯示譯碼器設(shè)計(jì)(2課時(shí))

一、試驗(yàn)?zāi)康模?/p>

1、學(xué)習(xí)7段數(shù)碼顯示譯碼器設(shè)計(jì);

2、學(xué)習(xí)vhdl的多層次設(shè)計(jì)方法。

二、試驗(yàn)原理:

7段數(shù)碼是純組合電路,尋常的小規(guī)模專用ic,如74或4000系列的器件只能作十進(jìn)制bcd碼譯碼,然而數(shù)字系統(tǒng)中的數(shù)據(jù)處理和運(yùn)算都是2進(jìn)制的,所以輸出表達(dá)都是16進(jìn)制的,為了滿足16進(jìn)制數(shù)的譯碼顯示,最便利的方法就是利用譯碼程序在fpga/cpld中來實(shí)現(xiàn)。但為了簡化過程,首先完成7段bcd碼譯碼器的設(shè)計(jì)。例如輸出為“1101101〞時(shí),數(shù)碼管的7個(gè)段:g、f、e、d、c、b、a分別接1、1、0、1、1、0、1;接有高電平的段發(fā)亮,于是數(shù)碼管顯示“5〞。

圖6-21共陰數(shù)碼管及其電路

三、試驗(yàn)內(nèi)容

1、編程實(shí)現(xiàn)7段數(shù)碼顯示譯碼器設(shè)計(jì);

2、對(duì)7段數(shù)碼顯示譯碼器設(shè)計(jì)進(jìn)行編輯、仿真,給出其所有信號(hào)的時(shí)序仿真波形;參考程序:libraryieee;use;entitydecl7sisport(a:instd_logic_vector(3downto0);led7s:outstd_logic_vector(6downto0));end;architectureoneofdecl7sisbeginprocess(a)begincaseaiswhen“0000〞=led7s=“0111111〞;when“0001〞=led7s=“0000110〞;when“0010〞=led7s=“1011011〞;when“0011〞=led7s=“1001111〞;when“0100〞=led7s=“1100110〞;when“0101〞=led7s=“1101101〞;when“0110〞=led7s=“1111101〞;when“0111〞=led7s=“0000111〞;when“1000〞=led7s=“1111111〞;when“1001〞=led7s=“1101111〞;whenothers=null;endcase;endprocess;end;仿真結(jié)果:

綜合后的計(jì)數(shù)器和譯碼器連接電路的頂層文件原理圖:

試驗(yàn)五

用狀態(tài)機(jī)實(shí)現(xiàn)序列檢測(cè)器的設(shè)計(jì)(4課時(shí))

一、試驗(yàn)?zāi)康模?/p>

1、把握狀態(tài)機(jī)的編程方法和步驟;

2、把握用狀態(tài)機(jī)設(shè)計(jì)序列檢測(cè)器的方法和步驟;

二、試驗(yàn)內(nèi)容

用狀態(tài)機(jī)編程實(shí)現(xiàn)對(duì)系列數(shù)“11100101〞的檢測(cè),當(dāng)某一系列串(以左移方式)進(jìn)入檢測(cè)器后,若該串與預(yù)置的系列數(shù)一致,則輸出“a〞,否則輸出“b〞。

三、試驗(yàn)步驟:

1、編輯系列檢測(cè)器的vhdl程序;

2、仿真測(cè)試并給出仿真波形,了解控制信號(hào)的時(shí)序;

3、將上述方案改為系列檢測(cè)密碼為可預(yù)置(外部輸入)狀況,重新編寫程序、編譯和仿真,并記錄仿真結(jié)果。參考程序:

libraryieee;use;entityschkisport(din,clk,clr:instd_logic;ab:outstd_logic_vector(3downto0));endschk;architecturebehvofschkissignalq:integerrange0to8;signald:std_logic_vector(7downto0);begind=“11100101〞;process(clk,clr)beginifclr='1'thenq=0;elsifclk='1'andclk'eventthencaseqiswhen0=ifdin=d(7)thenq=1;elseq=0;endif;when1=ifdin=d(6)thenq=2;elseq=0;endif;when2=ifdin=d(5)thenq=3;elseq=0;endif;when3=ifdin=d(4)thenq=4;elseq=0;endif;when4=ifdin=d(3)thenq=5;elseq=0;endif;when5=ifdin=d(2)thenq=6;elseq=0;endif;when6=ifdin=d(1)thenq=7;elseq=0;endif;when7=ifdin=d(0)thenq=8;elseq=0;endif;whenothers=q=0;endcase;endif;endprocess;process(q)beginifq=8thenab=“1010〞;elseab=“1011〞;endif;endprocess;endbehv;仿真結(jié)果:

提高型試驗(yàn):

試驗(yàn)六

用vhdl實(shí)現(xiàn)數(shù)字鐘及校園打鈴系統(tǒng)(6課時(shí))

一、試驗(yàn)?zāi)康募耙螅?/p>

1、把握vhdl語言的基本結(jié)構(gòu)及編程思想。

2、把握vhdl語言的進(jìn)行系統(tǒng)設(shè)計(jì)的方法和步驟。

3、提高學(xué)生綜合應(yīng)用能力。

二、試驗(yàn)內(nèi)容:

1、用vhdl實(shí)現(xiàn)數(shù)字鐘及校園打鈴系統(tǒng)的軟件編輯。

2、用vhdl實(shí)現(xiàn)數(shù)字鐘及校園打鈴系統(tǒng)的軟件仿真。

三、試驗(yàn)步驟

1、用vhdl編輯60進(jìn)制計(jì)數(shù)器,并進(jìn)行軟件仿真。

2、用vhdl編輯24進(jìn)制計(jì)數(shù)器,并進(jìn)行軟件仿真。

3、用vhdl編輯30進(jìn)制計(jì)數(shù)器,并進(jìn)行軟件仿真。

4、用元件例化的方法實(shí)現(xiàn)數(shù)字鐘的軟件編輯及軟件仿真。

5、實(shí)現(xiàn)數(shù)字鐘的校時(shí)功能。

6、實(shí)現(xiàn)數(shù)字鐘的打鈴功能。

7、完成數(shù)字鐘及校園打鈴系統(tǒng)的試驗(yàn)報(bào)告。

試驗(yàn)七

a/d采樣控制器設(shè)計(jì)

一、試驗(yàn)?zāi)康募耙螅?/p>

1、把握vhdl語言的基本結(jié)構(gòu)及編程思想。

2、把握a/d采樣控制器的工作原理。

3、把握a/d采樣控制器的vhdl語言編程方法。

二、試驗(yàn)內(nèi)容:

1、設(shè)計(jì)一a/d0809模數(shù)轉(zhuǎn)換器控制器。

2、將轉(zhuǎn)換結(jié)果送數(shù)碼管顯示器顯示(2位)。

3、模擬輸入通道為in0。

三、試驗(yàn)步驟:

1、adc0809特點(diǎn)介紹

(1)、單極性輸入,8位a/d轉(zhuǎn)換精度。(2)、逐次迫近式,每次采樣時(shí)間約為100us(3)、8通道模擬輸入

2、a/d轉(zhuǎn)換器外部引腳功能結(jié)構(gòu)圖

3、a/d轉(zhuǎn)換器時(shí)序圖

4、ad轉(zhuǎn)換控制器與ad轉(zhuǎn)換器的接口電路框圖

5、狀態(tài)控制

s0狀態(tài):初始狀態(tài)。addc=‘1’,選擇1通道模擬信號(hào)輸入。

ale=start=oe=lock=‘0’;

s1狀態(tài):通道鎖存。ale=‘1’,start=oe=lock=‘0’;

s2狀態(tài):啟動(dòng)a/d轉(zhuǎn)換。ale=‘1’,start=‘1’,oe=lock=‘0’;s3狀態(tài):a/d轉(zhuǎn)換等待狀態(tài)。

ale=start=‘0’,oe=lock=‘0’;

ifeoc=‘0’

保持當(dāng)前狀態(tài)不變,繼續(xù)等待a/d轉(zhuǎn)換。

else

轉(zhuǎn)換終止,進(jìn)入下一狀態(tài)。

s4狀態(tài):數(shù)據(jù)輸出允許狀態(tài)。a/d轉(zhuǎn)換完畢,開啟數(shù)據(jù)輸出允許信號(hào)。

ale=‘0’,start=‘0’,oe=‘1’,lock=‘0’;

s5狀態(tài):數(shù)據(jù)鎖存狀態(tài)。開啟數(shù)據(jù)鎖存信號(hào),將轉(zhuǎn)換結(jié)果送鎖存器鎖存。

ale=‘0’,start=‘0’,oe=‘1’,lock=‘1’;s6狀態(tài):延時(shí)狀態(tài)。為了保證數(shù)據(jù)可靠鎖存,延時(shí)一個(gè)時(shí)鐘狀態(tài)周期。

ale=‘0’,start=‘0’,oe=‘1’,lock=‘1’;其它狀態(tài):返回到初始狀態(tài)。ale=start=oe=lock=‘0’;

6、參考程序:libraryieee;use;entityad0809is

port(d:instd_logic_vector(7downto0);

clk0,eoc:instd_logic;

adda,oe:outstd_logic;

ale,start:outstd_logic;

q:outstd_logic_vector(7downto0);

:outintegerrange15downto0);endad0809;architecturebehavofad0809is

typest_typeis(s0,s1,s2,s3,s4,s5,s6,s7);

signalcurrent_state,next_state:st_type;

signalregl:std_logic_vector(7downto0);

signallock:std_logic;

begin

adda='1';

pro:process(current_state,eoc)

begin

casecurrent_stateis

whens0==0;ale='0';start='0';oe='0';lock='0';next_state=s1;

whens1==1;ale='0';start='0';oe='0';lock='0';next_state=s2;

whens2==2;ale='1';start='1';oe='0';lock='0';next_state=s3;

whens3==3;ale='1';start='1';oe='0';lock='0';

ifeoc='0'thennext_state=s4;

elsenext_state=s3;

endif;

whens4==4;ale='0';start='0';oe='0';lock='0';

ifeoc='1'thennext_state=s5;

elsenext_state=s4;

endif;

whens5==5;ale='0';start='1';oe='1';lock='0';next_state=s6;

whens6==6;ale='0';start='0';oe='1';lock='1';next_state=s7;

whens7==7;ale='0';start='0';oe='1';lock='1';next_state=s0;

whenothers=next_state=s0;

endcase;

endprocesspro;reg:process(clk0)

begin

ifclk0'eventandclk0='1'then

current_state=next_state;

endif;

endprocessreg;

com:process(lock)

begin

iflock'eventandlock='1'then

regl=d;

endif;

endprocesscom;

q=regl;endbehav;

試驗(yàn)八

數(shù)字頻率計(jì)設(shè)計(jì)

一、試驗(yàn)?zāi)康募耙螅?/p>

1、把握vhdl語言的基本結(jié)構(gòu)及編程思想。

2、把握數(shù)字頻率計(jì)的工作原理。

3、把握數(shù)字頻率計(jì)的vhdl語言編程方法。

二、試驗(yàn)內(nèi)容:

1、設(shè)計(jì)8位十進(jìn)制數(shù)字頻率計(jì)。

2、測(cè)量頻率范圍為1hz-50mhz

三、試驗(yàn)原理:測(cè)頻原理框圖

四、試驗(yàn)步驟1、8位十進(jìn)制計(jì)數(shù)器設(shè)計(jì)

(1)用vhdl設(shè)計(jì)十進(jìn)制計(jì)數(shù)器,并進(jìn)行軟件和硬件仿真參考程序如下:libraryieee;use;use;entitycnt10is

port(clk,rst,en:instd_logic;

cq:outstd_logic_vector(3downto0);

cout:outstd_logic);

endcnt10;architecturebehavofcnt10isbegin

process(clk,rst,en)

variablecqi:std_logic_vector(3downto0);

begin

ifrst='1'then

cqi:=(others='0');--計(jì)數(shù)器復(fù)位

elsifclk'eventandclk='1'then

--檢測(cè)時(shí)鐘上升沿

ifen='1'then

--檢測(cè)是否允許計(jì)數(shù)

ifcqi“1001〞then

cqi:=cqi+1;--允許計(jì)數(shù)

else

cqi:=(others='0');--大于9,計(jì)數(shù)值清零

endif;

endif;

endif;

ifcqi=“1001〞thencout='1';--計(jì)數(shù)大于9,輸出進(jìn)位信號(hào)

else

cout='0';

endif;

cq=cqi;

--將計(jì)數(shù)值向端口輸出

endprocess;endbehav;(2)8位十進(jìn)制頻率計(jì)電路圖2、32位鎖存器設(shè)計(jì)參考程序

libraryieee;use;use;entityreg32bis

port(load:instd_logic;

din:instd_logic_vector(31downto0);

dout:outstd_logic_vector(31downto0));

endreg32b;architecturebehavofreg32bisbegin

process(load,din)

begin

ifload'eventandload='1'then

dout=din;

endprocess;endbehav;3控制器設(shè)計(jì)

(1)控制器時(shí)序圖

(2)參考程序libraryieee;use;use;entitytestctlis

port(clk:instd_logic;

tsten:out

std_logic;

clr_cnt:out

std_logic;

load:out

std_logic);

endtestctl;architecturebehavoftestctlis

signaldiv2clk:std_logic;begin

process(clk)

begin

ifclk'eventandclk='1'then

div2clk=notdiv2clk;

endprocess;

process(clk,div2clk)

begin

ifclk='0'anddiv2clk='0'

then

clr_cnt='1';

elseclr_cnt='0';

endif;

endprocess;

load=notdiv2clk;

tsten=div2clk;endbehav;

endif;endif;

試驗(yàn)九

dac接口電路與波形發(fā)生器設(shè)計(jì)

一、試驗(yàn)?zāi)康募耙螅?/p>

1、把握vhdl語言的基本結(jié)構(gòu)及編程思想。

2、把握da轉(zhuǎn)換器接口方法。

3、把握da轉(zhuǎn)換器的vhdl語言編程方法。

二、試驗(yàn)內(nèi)容:

1、設(shè)計(jì)一dac0832數(shù)模轉(zhuǎn)換器控制器。

2、要求使用dac轉(zhuǎn)換器輸出一正弦波,最大值為5v。(使用單緩沖方式)

3、要求正弦波頻率能步進(jìn)可調(diào),步進(jìn)間隔為100hz。(使用2個(gè)按鍵控制,一個(gè)步進(jìn)為加,另一個(gè)為步進(jìn)減)

三、試驗(yàn)原理

1、dac0832特點(diǎn)(1)、8位電流dac轉(zhuǎn)換,輸出為電流信號(hào),因此要轉(zhuǎn)換為電壓輸出,必需外接集成運(yùn)算放大器。(2)、轉(zhuǎn)換時(shí)間約為50500ns,轉(zhuǎn)換速度比電壓型dac轉(zhuǎn)換器快,電壓型一般為110us(3)、20腳雙列直插式封裝的cmos型器件。(4)、內(nèi)部具有兩極數(shù)據(jù)寄放器,可采用單或雙緩沖方式。

2、d/a轉(zhuǎn)換器外部引腳功能及內(nèi)部結(jié)構(gòu)圖

3、工作方式

方式一:直通工作方式(本試驗(yàn)采用此種方式)

一般用于只有一路輸出信號(hào)的狀況。

接線狀況:ile=1,cs=wr1=wr2

=xfer=0方式

二、雙緩沖器工作方式

采用兩步操作完成,可使da轉(zhuǎn)換輸出前一數(shù)據(jù)的同時(shí),將采集下一個(gè)數(shù)據(jù)送到8位輸入寄放器,以提高轉(zhuǎn)換速度。

一般用于多路da輸出。

4、da轉(zhuǎn)換器與控制器接口電路設(shè)計(jì)

5、試驗(yàn)儀實(shí)際接口電路圖

6、da轉(zhuǎn)換器輸出波形步進(jìn)可調(diào)控制電路設(shè)計(jì)設(shè)計(jì)思想:

設(shè)輸入控制器的時(shí)鐘頻率為50mhz。

1、da轉(zhuǎn)換一次,需要一個(gè)時(shí)鐘周期。若采用64點(diǎn)輸出,則需要64個(gè)時(shí)鐘周期。假使控制器時(shí)鐘頻率為64hz,則輸出的正弦波頻率為1hz。

2、因此,只需要控制da轉(zhuǎn)換控制器的時(shí)鐘頻率,則就可以控制正弦波頻率,正弦波頻率與時(shí)鐘頻率的關(guān)系為1:64。

3、題目要求正弦波步進(jìn)頻率為100hz,則時(shí)鐘頻率步進(jìn)應(yīng)為6400hz。按“加〞鍵,則時(shí)鐘頻率增加6400hz,按“減〞減,時(shí)鐘頻率減小6400hz。

7、帶按鍵控制da轉(zhuǎn)換器與控制器接口電路設(shè)計(jì)

四、試驗(yàn)程序參考程序:

libraryieee;use;entitydac0832is

port(clk:instd_logic;

dd:outintegerrange255downto0);enddac0832;architecturebehavofdac0832issignalq:integerrange63downto0;signald:integerrange255downto0;begin

process(clk)

begin

ifclk'eventandclk='1'thenq=q+1;

endif;

endprocess;process(q)

begin

caseq

is

when00=d=254;when01=d=252;when02=d=249;when03=d=245;

when04=d=239;when05=d=233;when

06=d=225;when

07=d=217;

when08=d=207;when09=d=197;when

10=d=186;when

11=d=174;

when12=d=162;when13=d=150;when14=d=137;when

15=d=124;

when16=d=112;when17=d=99;when18=d=87;

when

19=d=75;

when20=d=64;when

21=d=53;when22=d=43;

when23=d=34;

when24=d=26;when25=d=19;when

26=d=13;

when

27=d=8;

when28=d=4;

when

29=d=1;

when30=d=0;

when

31=d=0;

when32=d=1;when33=d=4;

when34=d=8;

when35=d=13;when36=d=19;when37=d=26;

when38=d=34;

when

39=d=43;

when40=d=53;when

41=d=64;when42=d=75;

when

43=d=87;

when44=d=99;when45=d=112;when46=d=124;when

47=d=137;

when48=d=150;when49=d=162;when50=d=255;when51=d=174;

when52=d=186;when53=d=197;when54=d=207;when55=d=217;

when56=d=225;when57=d=233;when58=d=239;when

59=d=245;

when60=d=249;when61=d=252;when62=d=254;when63=d=255;whenothers=null;endcase;endprocess;

dd=d;

end;

試驗(yàn)十

七段顯示器動(dòng)態(tài)掃描電路設(shè)計(jì)(提高型)

試驗(yàn)?zāi)康募耙螅?/p>

1、把握vhdl語言的基本結(jié)構(gòu)及編程思想。

2、把握七段顯示器動(dòng)態(tài)掃描電路設(shè)計(jì)方法。設(shè)計(jì)要求:

1、設(shè)計(jì)一個(gè)七段數(shù)碼管動(dòng)態(tài)掃描電路。

2、數(shù)碼管個(gè)數(shù)為8個(gè),共陰極接法。

3、設(shè)計(jì)bcd碼--七段字符碼的轉(zhuǎn)換電路;

4、設(shè)計(jì)一電路,控制上述電路實(shí)現(xiàn)“12345678〞八個(gè)數(shù)字的顯示,要求顯示方式為:

(1)自左至右逐個(gè)點(diǎn)亮數(shù)碼管,最終全亮;再重復(fù)以上動(dòng)作,每次變化時(shí)間間隔為1秒。

(2)自左至右點(diǎn)亮數(shù)碼管,每次只點(diǎn)亮一個(gè),最終全息滅,再重復(fù)以上動(dòng)作,每次變化時(shí)間間隔為1秒。

(3)先中間兩個(gè)點(diǎn)亮,再依次向外點(diǎn)亮;全亮后,再依次向中間熄滅;重復(fù)上述步驟,每次變化時(shí)間間隔為1秒。一、七段顯示器動(dòng)態(tài)掃描電路設(shè)計(jì)框圖

二、存儲(chǔ)器設(shè)計(jì)(8位8字節(jié)靜態(tài)隨機(jī)存儲(chǔ)器sram)libraryieee;

use;entitymemo_rd_wrisport(wr,rd:instd_logic;

a:instd_logic_vector(2downto0);

b:instd_logic_vector(2downto0);

d:instd_logic_vector(7downto0);

q:outstd_logic_vector(7downto0));endmemo_rd_wr;architectureaofmemo_rd_wris

signalq0,q1,q2,q3:std_logic_vector(7downto0);

signalq4,q5,q6,q7:std_logic_vector(7downto0);beginprocess(wr,a)

begin

ifwr='1'then

case

a

is

when“000〞=q0=d;

when“001〞=q1=d;

when“010〞=q2=d;

when“011〞=q3=d;

when“100〞=q4=d;

when“101〞=q5=d;

when“110〞=q6=d;

when“111〞=q7=d;

whenothers=null;

endcase;

endif;

endprocess;process(rd,b)

begin

ifrd='1'then

case

b

is

when“000〞=q=q0;

when“001〞=q=q1;

when“010〞=q=q2;

when“011〞=q=q3;

when“100〞=q=q4;

when“101〞=q=q5;

when“110〞=q=q6;

when“111〞=q=q7;

whenothers=null;

endcase;

endif;

endprocess;enda;

四、循環(huán)取數(shù)電路設(shè)計(jì)libraryieee;

use;entityget_codeisport(clk1:instd_logic;

d:instd_logic_vector(7downto0);

rd:outstd_logic;

a:outstd_logic_vector(2downto0);

dout:outstd_logic_vector(7downto0));endget_code;architectureaofget_code

is

signalload:std_logic;

signal:std_logic_vector(7downto0);

signalnum:integerrange7downto0;begin

rd=?1?;

load=clk1;process(clk1)

begin

ifclk1'eventandclk1='1'then

ifnum=7

then

num=num+1;

elsenum=0;

endif;

endif;endprocess;process(num)

begin

casenumis

when0=a=“000〞;

when1=a=“001〞;

when2=a=“010〞;

when3=a=“011〞;

when4=a=“100〞;

when5=a=“101〞;

when6=a=“110〞;

when7=a=“111〞;

whenothers=null;

endcase;

endprocess;process(load)

begin

ifload?eventandload=?1?

then上升沿鎖存

=d;

endif;endprocess;dout(7downto0)=(7downto0);enda;

五、掃描控制器設(shè)計(jì)libraryieee;

use;entityscan_8isport(clk2:instd_logic;

c:outstd_logic_vector(7downto0));

endscan_8;architectureaofscan_8

is

signalnum:integerrange7downto0;beginprocess(clk2)

begin

ifclk2'eventandclk2=‘1'then

ifnum=7

then

num=num+1;

elsenum=0;

endif;

endif;endprocess;process(num)

begin

case

num

is

when1=c=“11111110〞;when2=c=“11111101〞;

when3=c=“11111011〞;when4=c=“11110111〞;

when5=c=“11101111〞;when6=c=“11011111〞;

when7=c=“10111111〞;when0=c=“01111111〞;

when

others=null;

endcase;endprocess;enda;

應(yīng)用實(shí)例一:顯示“01234567〞八個(gè)數(shù)字

libraryieee;

use;entitydisp_dataisport(clk:instd_logic;

wr:outstd_logic;

a:outstd_logic_vector(2downto0);

q:outstd_logic_vector(7downto0));enddisp_data;architectureaofdisp_data

is

--signal:std_logic_vector(7downto0);

signalnum:integerrange7downto0;begin

wr=?1?;process(clk)

begin

ifclk'eventandclk='1'then

ifnum=7

then

num=num+1;

elsenum=0;

endif;

endif;endprocess;process(num)

begin

casenumis

when0=q=“00111111〞;a=“000〞;

when1=q=“00000110〞;a=“001〞;

when2=q=“01011011〞;a=“010〞;

when3=q=“01001111〞;a=“011〞;

when4=q=“01100110〞;a=“100〞;

when5=q=“01101101〞;a=“101〞;

when6=q=“01111101〞;a=“110〞;

when7=q=“01111111〞;a=“111〞;

whenothers=null;

endcase;endprocess;enda;試驗(yàn)十一

彩燈控制器設(shè)計(jì)(提高型試驗(yàn))

試驗(yàn)?zāi)康募耙螅?/p>

1、把握vhdl語言的基本結(jié)構(gòu)及編程思想。

2、把握vhdl語言的進(jìn)行系統(tǒng)設(shè)計(jì)的方法和步驟。

3、培養(yǎng)學(xué)生綜合應(yīng)用能力。試驗(yàn)內(nèi)容:

1、了解各類節(jié)日彩燈的顯示方式(主要是動(dòng)態(tài)方式)(上街觀測(cè));

2、將你所了解的狀況,畫出你的設(shè)計(jì)思想框圖;

3、根據(jù)框圖畫出電路框圖(用eda技術(shù));

4、用vhdl語言編程實(shí)現(xiàn);

5、完成課程設(shè)計(jì)報(bào)告(約2000字)

試驗(yàn)

十二、紅綠交通燈控制系統(tǒng)

試驗(yàn)?zāi)康募耙螅?/p>

1、把握vhdl語言的基本結(jié)構(gòu)及編程思想。

2、把握vhdl語言的進(jìn)行系統(tǒng)設(shè)計(jì)的方法和步驟。

3、培養(yǎng)學(xué)生綜合應(yīng)用能力。試驗(yàn)內(nèi)容:

設(shè)計(jì)一個(gè)簡易十字路口交通燈控制器。要求:

1、每個(gè)路口有紅、綠、黃三個(gè)指示燈指示交通運(yùn)行狀況。紅燈亮,阻止車輛通行;綠燈亮,車輛正常通行。

2、利用兩位數(shù)碼管顯示通行到計(jì)時(shí)時(shí)間。

3、用vhdl語言編程實(shí)現(xiàn);

4、完成課程設(shè)計(jì)報(bào)告試驗(yàn)步驟:

1、紅綠黃燈秒計(jì)數(shù)選擇控制電路(traffic_mux)sing_state:

00

綠燈20秒(橫向路口);

01

黃燈5秒(橫向路口)

綠燈20秒(直向路口)

黃燈5秒(直向路口)

recount:重新計(jì)數(shù)信號(hào)。=?1?,發(fā)送倒計(jì)時(shí)時(shí)間數(shù)據(jù);=?0?,正常倒計(jì)時(shí);libraryieee;

use;use;

use;entitytraffic_muxis

port(reset,clk_1hz,recount:instd_logic;

sign_state:instd_logic_vector(1downto0);

load:outintegerrange255downto0);end;

begin

process(reset,clk_1s)

begin

ifreset='1'then

load=“00000000〞;

elsif(clk_1hz'eventandclk_1hz='1')

then

if

recount='1‘

then

casesign_stateis

when“00〞=load=20;

when“01〞=load=5;

when“10〞=load=20;

when“01〞=load=5;

whenothers=null;

endcase;

endif;

endif;endprocess;endbehavior;

2、倒計(jì)時(shí)控制電路(count_down)libraryieee;use;use;use;entitycount_downisport(reset,clk_1hz:instd_logic;recount:instd_logic;load:inintegerrange255downto0;seg7:outstd_logic_vector(15downto0);next_state:outstd_logic);end;architecturebehaviorofcount_downissignalcnt_ff:integerrange255downto0;beginprocess(clk_1hz,reset)beginif(reset='1')thencnt_ff=“00000000〞;seg7=“***0〞;elsif(clk_1hz'eventandclk_1hz='1')thenifrecount='1‘thencnt_ff=load-1;elsecnt_ff=cnt_ff-1;endif;endif;endprocess;process(cnt_ff)begincasecnt_ffiswhen0=seg7=“***1〞;when1=seg7=“***0〞;when2=seg7=“***1〞;when3=seg7=“***1〞;when4=seg7=“***0〞;when5=seg7=“***1〞;when6=seg7=“***1〞;when7=seg7=“***1〞;when8=seg7=“***1〞;when9=seg7=“***1〞;when10=seg7=“***1〞;when11=seg7=“***0〞;when12=seg7=“***1〞;when13=seg7=“***1〞;when14=seg7=“***0〞;when15=seg7=“***1〞;when16=seg7=“***1〞;when17=seg7=“***1〞;when18=seg7=“***1〞;when19=seg7=“***1〞;when20=seg7=“***1〞;when21=seg7=“***0〞;when22=seg7=“***1〞;when23=seg7=“***1〞;when24=seg7=“***0〞;when25=seg7=“***1〞;when26=seg7=“***1〞;when27=seg7=“***1〞;when28=seg7=“***1〞;when29=seg7=“***1〞;whenothers=seg7=“***1〞;endcase;endprocess;next_state='1'whencnt_ff=1else'0';endbehavior;

3、紅綠燈信號(hào)控制電路(traffic_fsm)libraryieee;use;use;use;entitytraffic_fsmisport(reset,clk,clk_1hz,flash_1hz:instd_logic;a_m:instd_logic;next_state:instd_logic;recount:outstd_logic;sign_state:outstd_logic_vector(1downto0);red:outstd_logic_vector(1downto0);green:outstd_logic_vector(1downto0);yellow:outstd_logic_vector(1downto0));end;architecturebehavioroftraffic_fsmistypesreg0_typeis(r0g1,r0y1,g0r1,y0r1,y0y1,y0g1,g0y1,r0r1);signalstate:sreg0_type;signallight:std_logic_vector(5downto0);beginif(reset='1')thenstate=r0g1;

設(shè)定當(dāng)前為橫向紅燈亮,豎向綠燈亮sign_state=“01〞;選擇20秒倒計(jì)時(shí)

recount=‘1’;裝入計(jì)數(shù)初值并啟動(dòng)倒計(jì)時(shí)elseif(clk'eventandclk='1')thencasestateiswhenr0g1=if(a_m='1'andclk_1hz='1')thenif(next_state=‘1’)then--當(dāng)前計(jì)數(shù)完畢,轉(zhuǎn)入下一種計(jì)時(shí)

recount='1';state=r0y1;sign_state=“01〞;elserecount=‘0’;state=r0g1;否則,繼續(xù)倒計(jì)時(shí)endif;whenr0y1=--nowstate:red0onyellow1flashif(a_m='1'andclk_1hz='1')thenif(next_state='1')thenrecount='1';state=g0r1;sign_state=“10〞;elserecount='0';state=r0y1;endif;wheng0r1=--nowstate:green0onred1onif(a_m='1'andena_1hz='1')thenif(next_state='1')thenrecount='1';state=y0r1;sign_state=“11〞;elserecount='0';state=g0r1;endif;wheny0r1=--nowstate:green0onred1onif(a_m='1'andena_1hz='1')thenif(next_state='1')thenrecount='1';state=r0g1;sign_state=“00〞;elserecount='0';state=y0r1;--red=2'b10;green=2'b00;yellow=2'b01;endif;whenothers=state=r0g1;recount='0';sign_state=“00〞;endcase;endif;endif;endprocess;--light:r(10)y(10)g(10)light=“010010〞when(state=r0g1)else“011000〞when(state=r0y1)else“100001〞when(state=g0r1)else“100100〞when(state=y0r1)else“110000〞;red=light(5downto4);yellow=light(3downto2)and(flash_1hzflash_1hz);green=light(1downto0);endbehavior;

EDA試驗(yàn)總結(jié)EDA試驗(yàn)收獲與體會(huì)篇二

試驗(yàn)四計(jì)數(shù)器與七段譯碼器及顯示的設(shè)計(jì)

一試驗(yàn)?zāi)康?/p>

1、把握七段譯碼器的工作原理;

2、學(xué)會(huì)用vhdl硬件描述語言進(jìn)行數(shù)字系統(tǒng)設(shè)計(jì);

3、學(xué)會(huì)運(yùn)用波形仿真測(cè)試檢驗(yàn)程序的正確性;

4、用quartusii完成基本組合電路的設(shè)計(jì)。

二試驗(yàn)儀器

pc機(jī)、quartusii6.0軟件、康芯eda試驗(yàn)箱

三試驗(yàn)內(nèi)容

選gw48系統(tǒng)的試驗(yàn)電路模式6,用數(shù)碼8顯示譯碼輸出(pio46-pio40),鍵3到鍵8作為控制輸入端。完成計(jì)數(shù)器的數(shù)碼管顯示設(shè)計(jì)。

四試驗(yàn)原理及步驟

7段數(shù)碼是純組合電路,尋常的小規(guī)模專用ic,如74或4000系列的器件只能作十進(jìn)制bcd碼譯碼,然而數(shù)字系統(tǒng)中的數(shù)據(jù)處理和運(yùn)算都是2進(jìn)制的,所以輸出表達(dá)都是16進(jìn)制的,為了滿足16進(jìn)制數(shù)的譯碼顯示,最便利的方法就是利用譯碼程序在fpga/cpld中來實(shí)現(xiàn)。例6-18作為7段譯碼器,輸出信號(hào)led7s的7位分別接如圖6-2數(shù)碼管的7個(gè)段,高位在左,低位在右。例如當(dāng)led7s輸出為“1101101〞時(shí),數(shù)碼管的7個(gè)段:g、f、e、d、c、b、a分別接1、1、0、1、1、0、1;接有高電平的段發(fā)亮,于是數(shù)碼管顯示“5〞。注意,這里沒有考慮表示小數(shù)點(diǎn)的發(fā)光管,假使要考慮,需要增加段h,例6-18中的led7s:outstd_logic_vector(6downto0)應(yīng)改為...(7downto0)。

1、根據(jù)譯碼器真值表寫出原程序。

譯碼器真值表:

數(shù)

輸入

輸出

值a

bcdabcdefg00000111111010001011000020010110110130011111100140100011001150101101101160110101111101111110000810001111111910011111011a0101110111b10110011111c11001001110d11010111101e11101001111f11111000111

三、試驗(yàn)內(nèi)容:

1、說明以下程序中各語句的含義,以及該例的整體功能。在quartusii6.0上對(duì)以下該例進(jìn)行編輯、編譯、綜合、適配、仿真,給出其所有信號(hào)的時(shí)序仿真波形(提醒:用輸入總線的方式給出輸入信號(hào)仿真數(shù)據(jù))。

libraryieee;use;entitydecl7sisport(a:instd_logic_vector(3downto0);led7s:outstd_logic_vector(6downto0));end;architectureoneofdecl7sisbeginprocess(a)begincasea(3downto0)iswhen“0000〞=led7s=“0111111〞;--x“3f〞0when“0001〞=led7s=“0000110〞;--x“06〞1when“0010〞=led7s=“1011011〞;--x“5b〞2when“0011〞=led7s=“1001111〞;--x“4f〞3when“0100〞=led7s=“1100110〞;--x“66〞4when“0101〞=led7s=“1101101〞;--x“6d〞5when“0110〞=led7s=“1111101〞;--x“7d〞6when“0111〞=led7s=“0000111〞;--x“07〞7when“1000〞=led7s=“1111111〞;--x“7f〞8when“1001〞=led7s=“1101111〞;--x“6f〞9when“1010〞=led7s=“1110111〞;--x“77〞10when“1011〞=led7s=“1111100〞;--x“7c〞11when“1100〞=led7s=“0111001〞;--x“39〞12when“1101〞=led7s=“1011110〞;--x“5e〞13when“1110〞=led7s=“1111001〞;--x“79〞14when“1111〞=led7s=“1110001〞;--x“71〞15whenothers=null;endcase;endprocess;end;

圖3-1共陰數(shù)碼管及其電路

2、引腳鎖定以及硬件下載測(cè)試。建議選試驗(yàn)電路模式6,用數(shù)碼8顯示譯碼輸出(pio46--pio40),鍵

8、鍵

7、鍵

6、鍵5四位控制輸入,硬件驗(yàn)證譯碼器的工作性能。

3、用vhdl完成四位二進(jìn)制加法計(jì)數(shù)器設(shè)計(jì),命名為cnt4b.4、用vhdl例化語句(參考試驗(yàn)1中的1位全加vhdl文本輸入設(shè)計(jì))按圖3-2的方式,完成頂層文件設(shè)計(jì),并重復(fù)以上試驗(yàn)過程。注意圖3-2中的tmp是4位總線,led是7位總線。對(duì)于引腳鎖定和試驗(yàn),建議仍選試驗(yàn)電路模式6,用數(shù)碼8顯示譯碼輸出,用鍵3作為時(shí)鐘輸入(每按2次鍵為1個(gè)時(shí)鐘脈沖),或直接時(shí)鐘信號(hào)clock0。

圖3-2計(jì)數(shù)器和譯碼器連接電路的頂層文件原理圖

(提醒:

1、將教材p89頁程序和p154頁程序讀懂,分別建立工程、生成各自原理圖。

2、將上述兩個(gè)原理圖按教材p155頁圖6-19連接起來建立新的原理圖設(shè)計(jì)文件。

3、將上述原理圖文件編譯、仿真、引腳綁定,下載到試驗(yàn)箱驗(yàn)證。)

四、試驗(yàn)報(bào)告要求

1、總結(jié)quartusii6.0vhdl中case語句應(yīng)用及多層次設(shè)計(jì)方法

2、根據(jù)以上的試驗(yàn)內(nèi)容寫出試驗(yàn)報(bào)告,包括程序設(shè)計(jì)、軟件編譯、仿真分析、硬件測(cè)試和試驗(yàn)過程;設(shè)計(jì)程序、程序分析報(bào)告、仿真波形圖及其分析報(bào)告;

3、心得體會(huì)――本次試驗(yàn)中你的感受;你從試驗(yàn)中獲得了哪些收益;本次試驗(yàn)?zāi)愕某晒χ?;本次試?yàn)中還有待改進(jìn)的地方;下次試驗(yàn)應(yīng)當(dāng)從哪些地方進(jìn)行改進(jìn);怎樣提高自的試驗(yàn)效率和試驗(yàn)水平等等。

五、問題與思考:

只要求譯出數(shù)字0~9和“-〞,怎樣修改程序?

EDA試驗(yàn)總結(jié)EDA試驗(yàn)收獲與體會(huì)篇三

數(shù)字eda試驗(yàn)報(bào)告薛蕾0941903207

數(shù)字eda試驗(yàn)試驗(yàn)報(bào)告

學(xué)院:計(jì)算機(jī)科學(xué)與工程學(xué)院專業(yè):通信工程學(xué)號(hào):0941903207姓名:薛蕾指導(dǎo)老師:錢強(qiáng)

數(shù)字eda試驗(yàn)報(bào)告薛蕾0941903207試驗(yàn)一四選一數(shù)據(jù)選擇器的設(shè)計(jì)

一、試驗(yàn)?zāi)康?/p>

1、熟悉quartusii軟件的使用。

2、了解數(shù)據(jù)選擇器的工作原理。

3、熟悉eda開發(fā)的基本流程。

二、試驗(yàn)原理及內(nèi)容

試驗(yàn)原理

數(shù)據(jù)選擇器在實(shí)際中得到了廣泛的應(yīng)用,特別是在通信中為了利用多路信號(hào)中的一路,可以采用數(shù)據(jù)選擇器進(jìn)行選擇再對(duì)該路信號(hào)加以利用。從多路輸入信號(hào)中選擇其中一路進(jìn)行輸出的電路稱為數(shù)據(jù)選擇器?;颍涸诘刂沸盘?hào)控制下,從多路輸入信息中選擇其中的某一路信息作為輸出的電路稱為數(shù)據(jù)選擇器。數(shù)據(jù)選擇器又叫多路選擇器,簡稱mux。4選1數(shù)據(jù)選擇器:

(1)原理框圖:如右圖。

d0、d1、d2、d3

:輸入數(shù)據(jù)a1、a0

:地址變量

由地址碼決定從4路輸入中選擇哪1路輸出。

(2)真值表如下圖:(3)規(guī)律圖

數(shù)據(jù)選擇器的原理比較簡單,首先必需設(shè)置一個(gè)選擇標(biāo)志信號(hào),目的就是為了從多路信號(hào)中選擇所需要的一路信號(hào),選擇標(biāo)志信號(hào)的一種狀態(tài)對(duì)應(yīng)著一路信號(hào)。在應(yīng)用中,設(shè)置一定的選擇標(biāo)志信號(hào)狀態(tài)即可得到相應(yīng)的某一路信號(hào)。這就是數(shù)據(jù)選擇器的實(shí)現(xiàn)原理。

三.試驗(yàn)內(nèi)容

1、分別采用原理圖和vhdl語言的形式設(shè)計(jì)4選1數(shù)據(jù)選擇器

2、對(duì)所涉及的電路進(jìn)行編譯及正確的仿真。電路圖:

四、試驗(yàn)程序

libraryieee;use;

entitymux4is

port(a0,a1,a2,a3:instd_logic;

s:instd_logic_vector(1downto0);

y:outstd_logic);endmux4;architecturearchmuxofmux4is

beginy=a0whens=“00〞else

--當(dāng)s=00時(shí),y=a0a1whens=“01〞else

--當(dāng)s=01時(shí),y=a1a2whens=“10〞else

--當(dāng)s=10時(shí),y=a2a3;

--當(dāng)s取其它值時(shí),y=a2endarchmux;

五、運(yùn)行結(jié)果

六.試驗(yàn)總結(jié)

真值表分析:

當(dāng)js=0時(shí),a1,a0取00,01,10,11時(shí),分別可取d0,d1,d2,d3.試驗(yàn)二血型配對(duì)器的設(shè)計(jì)

一、試驗(yàn)?zāi)康?/p>

1、進(jìn)一步熟悉quartusii軟件的使用。

2、把握簡單組合規(guī)律電路的設(shè)計(jì)方法與功能仿真技巧。

3、進(jìn)一步學(xué)習(xí)quartusii中基于原理圖設(shè)計(jì)的流程。

二、試驗(yàn)原理及內(nèi)容

試驗(yàn)原理

人類有o、a、b、ab4種基本血型,輸血者與受血者的血型必需符合圖示原則。設(shè)計(jì)一血型配對(duì)電路,用以檢測(cè)輸血者與受血者之間的血型關(guān)系是否符合,假使符合,輸出為1,否則為0。

已知:ab血型是萬能受血者,o血型是萬能獻(xiàn)血者!假使要輸血給o型血,那么可以的血型是o型!假使要輸血給a型血,那么可以的血型是a,o型!假使要輸血給b型血,那么可以的血型是b,o型!

假使要輸血給ab型血,那么可以的血型是a,b,ab,o型!

輸血者

受血者

oa

oabab

bab

三.試驗(yàn)內(nèi)容

1、用vhdl語言編寫程序?qū)崿F(xiàn)血型配對(duì)器的功能libraryieee;use;use;use;entityuexingisport(p,q,r,s:instd_logic;f:outstd_logic);enduexing;architectureaofuexingisbegin

f=((notp)and(notq))or(rands)or((notp)ands)or((notq)andr);enda;

2、對(duì)所編寫的電路進(jìn)行編譯及正確的仿真。

試驗(yàn)分析真值表

pqrsf***************11111

p,q表示輸血者的血型;r,s,表示受血者的血型。當(dāng)兩者符合血型協(xié)同原則時(shí),f=1,否則為0.四、運(yùn)行結(jié)果

五、試驗(yàn)總結(jié)

本試驗(yàn)給出了四種不同的血型編碼,pq(1,1),rs(1,1)表示ab型血,p,q(1,0),rs(1,0)表示b型血,pq(0,1),rs(0,1)表示a型血,pq(0,0),rs(0,0)表示o型血。根據(jù)真值表,并根據(jù)試驗(yàn)的原理圖,畫出電路圖并進(jìn)行連接。

試驗(yàn)三簡單數(shù)字鐘的設(shè)計(jì)

一、試驗(yàn)?zāi)康?/p>

1、了解數(shù)字鐘的工作原理。

2、進(jìn)一步學(xué)習(xí)quartusii中基于vhdl設(shè)計(jì)的流程。

3、把握vhdl編寫中的一些小技巧。

4、把握簡單時(shí)序規(guī)律電路的設(shè)計(jì)方法與功能仿真技巧。

二、試驗(yàn)原理及內(nèi)容

試驗(yàn)原理

簡單數(shù)字鐘應(yīng)當(dāng)具有顯示時(shí)-分-秒的功能。首先要知道鐘表的工作機(jī)理,整個(gè)鐘表的工作應(yīng)當(dāng)是在1hz信號(hào)的作用下進(jìn)行,這樣每來一個(gè)時(shí)鐘信號(hào),秒增加1秒,當(dāng)秒從59秒跳轉(zhuǎn)到00秒時(shí),分鐘增加1分,同時(shí)當(dāng)分鐘從59分跳轉(zhuǎn)

三.試驗(yàn)內(nèi)容

1、用原理圖的方式編寫一個(gè)12/24進(jìn)制的計(jì)數(shù)器,并創(chuàng)立為symbol文件。

2、用vhdl的方式編寫一個(gè)60進(jìn)制的計(jì)數(shù)器,并創(chuàng)立為symbol文件。

3、創(chuàng)立頂層文件。調(diào)用已編寫的symbol文件,設(shè)計(jì)簡單的數(shù)字鐘電路。

2、對(duì)所編寫的電路進(jìn)行編譯及正確的仿真。

二十四進(jìn)制vhdllibraryieee;use;use;use;entitycnt24isport(cp,en,rd,ld:instd_logic;

d

:instd_logic_vector(5downto0);

co

:outstd_logic;q

:outstd_logic_vector(5downto0));endcnt24;architecturestrofcnt24is

signalqn:std_logic_vector(5downto0);

beginco='1'when(qn=“010111〞anden='1')

else'0';process(cp,rd)

beginif(rd='0')then

qn=“000000〞;elsif(cp'eventandcp='1')thenif(ld='0')thenqn=d;

elsif(en='1')thenqn=qn+1;endif;endif;endprocess;q=qn;endstr;

六十進(jìn)制vhdllibraryieee;use;use;use;entityjsq60isport(en,rd,cp:instd_logic;

qh:bufferstd_logic_vector(3downto0);

ql:bufferstd_logic_vector(3downto0);

co:outstd_logic);endjsq60;architecturebofjsq60isbeginco='1'when(qh=“0101〞andql=“1001〞anden='1')else'0';process(cp,rd)

beginif(rd='0')thenqh=“0000〞;ql=“0000〞;elsif(cp'eventandcp='1')then

if(en='1')then

if(ql=9)then

ql=“0000〞;

if(qh=5)then

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論