組成原理實(shí)驗(yàn)報(bào)告-基于硬布線控制器設(shè)計(jì)并實(shí)現(xiàn)_第1頁(yè)
組成原理實(shí)驗(yàn)報(bào)告-基于硬布線控制器設(shè)計(jì)并實(shí)現(xiàn)_第2頁(yè)
組成原理實(shí)驗(yàn)報(bào)告-基于硬布線控制器設(shè)計(jì)并實(shí)現(xiàn)_第3頁(yè)
組成原理實(shí)驗(yàn)報(bào)告-基于硬布線控制器設(shè)計(jì)并實(shí)現(xiàn)_第4頁(yè)
組成原理實(shí)驗(yàn)報(bào)告-基于硬布線控制器設(shè)計(jì)并實(shí)現(xiàn)_第5頁(yè)
已閱讀5頁(yè),還剩11頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、 計(jì)算機(jī)組成原理實(shí)驗(yàn)報(bào)告評(píng)語:課中檢查完成的題號(hào)及題數(shù): 課后完成的題號(hào)與題數(shù):成績(jī):指導(dǎo)教師:實(shí)驗(yàn)報(bào)告實(shí)驗(yàn)名稱:基于硬布線控制器設(shè)計(jì)并實(shí)現(xiàn)帶中斷功能的復(fù)雜模型機(jī)日期:2011-1-12班級(jí):學(xué)號(hào):姓名:一、實(shí)驗(yàn)?zāi)康模?.掌握硬布線控制器的組成原理、設(shè)計(jì)方法;2.了解硬布線控制器和微程序控制器的各自優(yōu)缺點(diǎn);3.掌握并會(huì)設(shè)計(jì)帶中斷功能的復(fù)雜模型機(jī)的硬布線控制器。二、實(shí)驗(yàn)內(nèi)容:1.根據(jù)帶中斷功能的復(fù)雜模型機(jī)的微程序流圖,畫出狀態(tài)機(jī)描述圖;2.分析每個(gè)狀態(tài)所需的控制信號(hào),產(chǎn)生控制信號(hào)表,并用VHDL語言來設(shè)計(jì)程序,實(shí)現(xiàn)狀態(tài)機(jī)描述的功能;3.用Quartus軟件進(jìn)行編譯鏈接,選擇器件,定義管腳,編程下

2、載,然后用CM3P聯(lián)機(jī)測(cè)試每一條機(jī)器指令的功能。 三、項(xiàng)目要求及分析: 實(shí)驗(yàn)要求設(shè)計(jì)帶中斷功能的復(fù)雜模型機(jī)的硬布線控制器,可先參照前面帶中斷處理能力的模型機(jī)設(shè)計(jì)實(shí)驗(yàn)畫出微程序流程圖,參照二進(jìn)制微代碼表設(shè)控制信號(hào)表。然后用VHDL語言編程實(shí)現(xiàn),主要注意原P<1>P<4>的修改,采用分支語句實(shí)現(xiàn)。然后就是連線裝載帶中斷處理能力的模型機(jī)微程序檢驗(yàn)。 四、具體實(shí)現(xiàn): 應(yīng)包括:狀態(tài)圖、控制信號(hào)表、控制引腳圖、VHDL程序、機(jī)器碼驗(yàn)證程序等。1、狀態(tài)圖: 2、控制狀態(tài)表:INTA/WR/RD/IOM/S3/S2/S1/S0/LDA/LDB/LDR0/LDSP/L0AD/LDAR/L

3、DIR/ALUB/RSB/RDB/RIB/SPB/PCB/LDPC/STI/CLIS0 100000000000100111111010S1 100000000000100111111011S2 100000000000110111110111S3 101000000000101111111011S4 100000000100100101111011S5100010010010100011111011S6100000000100100101111011S7 100000100010100011111011S8101000000000110111111011S910110000001010011

4、1111011S10101000000000110111111011S11100000000000100111111011S12101000000010100111111011S13110000000000100110111011S14100000000000000011111111S15100000000000100111111011S16110100000000100101111011S17101000000010100111111011S18110000000000100101111011S19100000001000100111101011S2010001101000110001111

5、1011S21100011000001100011111011S22100000000000110111101011S23101000000010100111111011S24100011000001100011111011S25100000000000110111101011S26101000000000000111111111S27100000000000000011111111S28101000001000100111111011S29101000000000110111111011S30101000000000110111111011S3110100000100010011111101

6、1S32101000000000110111111011S33000000000000110111101011S34110000000000100111110011S35100000001000100111101011S36100011010001100011111011S37000000000000110111111011S38101000000000000111111111S39101000001000100111111011S40100000000100100111011011S41100010010000110011111011S42100010011000100011111011S4

7、3101000001000100111111011S44100000000100100111110011S45100010010000110011111011S46100010011000100011111011S47100000001000100110111011S48100000001000100110111011S49100000000000110111110111S50100000000000110111110111S51100000000010100101111011S52100000000000100111111011S53100000000000110111110111S5410

8、0000000000100111111001S55100000000000100111111010S56100000000000110111101011S57100000001000100111101011S58100000001000100111101011S59100000000000110111110111S60100000000000110111110111S61100000000000110111110111S621000000000001101111101113、控制引腳圖:五、調(diào)試運(yùn)行結(jié)果: 4、VHDL程序:LIBRARY IEEE;USE IEEE.std_logic_116

9、4.ALL;ENTITY CONTROLLER ISPORT(RESET: INSTD_LOGIC;T1: INSTD_LOGIC;INTR : IN STD_LOGIC;INS : INSTD_LOGIC_VECTOR(7 DOWNTO 0);CTRL : OUTSTD_LOGIC_VECTOR(23 DOWNTO 0);END CONTROLLER;ARCHITECTURE CONTROLLER_ARCH OF CONTROLLER ISTYPE STATE IS (S0,S1,S2,S3,S4,S5,S6,S7,S8,S9,S10,S11,S12,S13,S14,S15,S16,S17,

10、S18,S19,S20,S21,S22,S23,S24,S25,S26,S27,S28,S29,S30,S31,S32,S33,S34,S35,S36,S37,S38,S39,S40,S41,S42,S43,S44,S45,S46,S47,S48,S49,S50,S51,S52,S53,S54,S55,S56,S57,S58,S59,S60,S61,S62);SIGNAL CUFSM: STATE;-CTRL:INTA,WR,RD,IOM,S3,S2,S1,S0,LDA,LDB,LDRI,LDSP,LOAD,LDAR,LDIR,ALU_B,RS_B,RD_B,RI_B,SP_B,PC_B,LD

11、PC,STI,CLIBEGINPROCESS (T1,RESET,INTR,INS)BEGINIF RESET = '0' THEN CTRL <= "100000000000100111111010" -CLICUFSM <= S0;ELSIF T1'EVENT AND T1 = '1' THENCASE CUFSM ISWHEN S0 =>CTRL <= "100000000000100111111011" -中斷判斷CUFSM <= S1;WHEN S1 =>IF INTR

12、='1' THEN CTRL <= "000000000000110111101011" -R0->BUS,BUS->ACUFSM <= S33;ELSE CTRL <= "100000000000110111110111" CUFSM <= S2;END IF;WHEN S33=>CTRL <= "110000000000100111110011" CUFSM <= S34;WHEN S34=>CTRL <= "100000001000100

13、111101011" CUFSM <= S35;WHEN S35=>CTRL <= "100011010001100011111011" CUFSM <= S36;WHEN S36=>CTRL <= "000000000000110111111011" CUFSM <= S37;WHEN S37=>CTRL <= "101000000000000111111111" CUFSM <= S38;WHEN S38=>CTRL <= "1000000

14、00000110111110111" CUFSM <= S2;WHEN S2=>CTRL <= "101000000000101111111011" CUFSM <= S3;WHEN S3 =>IF INS(7 downto 4) = "0000" THEN -ADD INSCTRL <= "100000001000100110111011" CUFSM <= S47;ELSIF INS(7 downto 4) = "0001" THEN -AND INSCTRL

15、 <= "100000001000100110111011" CUFSM <= S48;ELSIF INS(7 downto 4) = "0010" THEN - IN INSCTRL <= "100000000000110111110111" CUFSM <= S49;ELSIF INS(7 downto 4) = "0011" THEN -OUT INSCTRL <= "100000000000110111110111" CUFSM <= S50;ELSI

16、F INS(7 downto 4) = "0100" THEN - MOV INSCTRL <= "100000000010100101111011" CUFSM <= S51;ELSIF INS(7 downto 4) = "0101" THEN - HLT INSCTRL <= "100000000000100111111011" CUFSM <= S52;ELSIF INS(7 downto 4) = "0110" THEN - LDI INSCTRL <=

17、"100000000000110111110111" CUFSM <= S53;ELSIF INS(7 downto 4)= "0111" THEN - STI INSCTRL <= "100000000000100111111001" CUFSM <= S54;ELSIF INS(7 downto 4) = "1000" THEN - CLI INSCTRL <= "100000000000100111111010" CUFSM <= S55;ELSIF INS(

18、7 downto 4) = "1001" THEN - PUSH INSCTRL <= "100000000000110111101011" CUFSM <= S56;ELSIF INS(7 downto 4) = "1010" THEN - POP INSCTRL <= "100000001000100111101011" CUFSM <= S57;ELSIF INS(7 downto 4) = "1011" THEN - INET INSCTRL <= &quo

19、t;100000001000100111101011" CUFSM <= S58;ELSIF INS(7 downto 6) = "11" AND INS(3 downto 2) = "00" THEN - 直接 INSCTRL <= "100000000000110111110111" CUFSM <= S59;ELSIF INS(7 downto 6) = "11" AND INS(3 downto 2) = "01" THEN - 間接 INSCTRL <

20、= "100000000000110111110111" CUFSM <= S60;ELSIF INS(7 downto 6) = "11" AND INS(3 downto 2) = "10" THEN - 變址 INSCTRL <= "100000000000110111110111" CUFSM <= S61;ELSIF INS(7 downto 6) = "11" AND INS(3 downto 2) = "11" THEN - 相對(duì) INSCTR

21、L <= "100000000000110111110111" CUFSM <= S62;END IF;WHEN S47=>CTRL <= "100000000100100101111011" CUFSM <= S4;WHEN S4=>CTRL <= "100010010010100011111011" CUFSM <= S5;WHEN S5=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S

22、48=>CTRL <= "100000000100100101111011" CUFSM <= S6;WHEN S6 =>CTRL <= "100000100010100011111011" CUFSM <= S7;WHEN S7=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S49=>CTRL <= "101000000000110111111011" CUFSM <= S8;WHE

23、N S8=>CTRL <= "101100000010100111111011" CUFSM <= S9;WHEN S9=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S50=>CTRL <= "101000000000110111111011" CUFSM <= S10;WHEN S10=>CTRL <= "110100000000100101111011" CUFSM <= S16

24、;WHEN S16=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S51=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S52=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S53=>CTRL <= "101000000010100111111011" CUFSM <

25、= S17;WHEN S17=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S54=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S55=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S56=>CTRL <= "110000000000100101111011" CUFSM

26、 <= S18;WHEN S18=>CTRL <= "100000001000100111101011" CUFSM <= S19;WHEN S19=>CTRL <= "100011010001100011111011" CUFSM <= S20;WHEN S20=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S57=>CTRL <= "100011000001100011111011"

27、; CUFSM <= S21;WHEN S21=>CTRL <= "100000000000110111101011" CUFSM <= S22;WHEN S22=>CTRL <= "101000000010100111111011" CUFSM <= S23;WHEN S23=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S58=>CTRL <= "1000110000011000111110

28、11" CUFSM <= S24;WHEN S24=>CTRL <= "100000000000110111101011" CUFSM <= S25;WHEN S25=>CTRL <= "101000000000000111111111" CUFSM <= S26;WHEN S26=>CTRL <= "100000000000100111111011" CUFSM <= S1;WHEN S59=>CTRL <= "101000001000100

29、111111011" CUFSM <= S28;WHEN S28=>CTRL <= "101000000000110111111011" CUFSM <= S29;WHEN S60=>CTRL <= "101000000000110111111011" CUFSM <= S30;WHEN S30=>CTRL <= "101000001000100111111011" CUFSM <= S31;WHEN S31=>CTRL <= "1010000

30、00000110111111011" CUFSM <= S32;WHEN S61 =>CTRL <= "101000001000100111111011" CUFSM <= S39;WHEN S39 =>CTRL <= "100000000100100111011011" CUFSM <= S40;WHEN S40 =>CTRL <= "100010010000110011111011" CUFSM <= S41;WHEN S41 =>CTRL <= &

31、quot;100010011000100011111011" CUFSM <= S42;WHEN S62 =>CTRL <= "101000001000100111111011" CUFSM <= S43;WHEN S43 =>CTRL <= "100000000100100111110011" CUFSM <= S44;WHEN S44 =>CTRL <= "100010010000110011111011" CUFSM <= S45;WHEN S45 =>

32、CTRL <= "100010011000100011111011" CUFSM <= S46;WHEN S29=> IF INS(7 downto 4) = "1100" THEN CTRL <= "101000000010100111111011" CUFSM <= S12;ELSIF INS(7 downto 4) = "1101" THEN CTRL <= "110000000000100110111011" CUFSM <= S13;ELSIF

33、 INS(7 downto 4) = "1110" THEN CTRL <= "100000000000000011111111" CUFSM <= S14;ELSIF INS(7 downto 4) = "1111" THEN CTRL <= "100000000000100111111011" CUFSM <= S15;END IF;WHEN S32=> IF INS(7 downto 4) = "1100" THEN CTRL <= "1010

34、00000010100111111011" CUFSM <= S12;ELSIF INS(7 downto 4) = "1101" THEN CTRL <= "110000000000100110111011" CUFSM <= S13;ELSIF INS(7 downto 4) = "1110" THEN CTRL <= "100000000000000011111111" CUFSM <= S14;ELSIF INS(7 downto 4) = "1111&qu

35、ot; THEN CTRL <= "100000000000100111111011" CUFSM <= S15;END IF; WHEN S42 => IF INS(7 downto 4) = "1100" THEN CTRL <= "101000000010100111111011" CUFSM <= S12;ELSIF INS(7 downto 4) = "1101" THEN CTRL <= "110000000000100110111011" CUF

36、SM <= S13;ELSIF INS(7 downto 4) = "1110" THEN CTRL <= "100000000000000011111111" CUFSM <= S14;ELSIF INS(7 downto 4) = "1111" THEN CTRL <= "100000000000100111111011" CUFSM <= S15;END IF;WHEN S46 => IF INS(7 downto 4) = "1100" THEN CT

37、RL <= "101000000010100111111011" CUFSM <= S12;ELSIF INS(7 downto 4) = "1101" THEN CTRL <= "110000000000100110111011" CUFSM <= S13;ELSIF INS(7 downto 4) = "1110" THEN CTRL <= "100000000000000011111111" CUFSM <= S14;ELSIF INS(7 downto

38、 4) = "1111" THEN CTRL <= "100000000000100111111011" CUFSM <= S15;END IF; WHEN S12=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;WHEN S13=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;WHEN S

39、14=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;WHEN S15=> IF INS = "00000000" THEN CTRL <= "100000000000100111111011" CUFSM <= S11;ELSIF INS = "10000000" THEN CTRL <= "100000000000000011111111" CUFSM <= S27;END IF;WHEN S11=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;WHEN S27=>CTRL <= "100000000000100111111011" -R0->BUS,BUS->BCUFSM <= S1;END CASE;END IF;END PROCESS;END CONTROLLER_ARCH ;5、

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(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)論