?? control.vhd
字號(hào):
muxalu2_c<='0'; en_r1<='0'; en_r2<='0'; jmp_imm<=instr(11 downto 0); --end if; when "0110"=> --if((instr(15 downto 12)="0110")) then ----jls re<='0'; en_ir<='0'; comp_c<="001"; rra1<=instr(11 downto 10); en_r1<='1'; rra2<=instr(9 downto 8); en_r2<='1'; --en_wr<='0'; pcalu_c<="000"; comp_imm<=instr(7 downto 0); -- end i when "0111"=> --if((instr(15 downto 12)="0111")) then ----jls re<='0'; en_ir<='0'; comp_c<="010"; rra1<=instr(11 downto 10); en_r1<='1'; rra2<=instr(9 downto 8); en_r2<='1'; en_wr<='0'; pcalu_c<="000"; comp_imm<=instr(7 downto 0); -- end if; when "1000"=> --if((instr(15 downto 12)="1000")) then ----jlg re<='0'; en_ir<='0'; comp_c<="100"; rra1<=instr(11 downto 10); en_r1<='1'; rra2<=instr(9 downto 8); en_r2<='1'; en_wr<='0'; pcalu_c<="000"; comp_imm<=instr(7 downto 0); --end if; when "1001"=> --if (instr(15 downto 12)="1001") then ---rdm re<='1'; en_ir<='0'; rdm_imm<=instr(9 downto 0); --en_ir<='0'; alu_c<="00"; en_r1<='0'; en_r2<='0'; en_wr<='1'; wra<=rs; muxwrd_c<="10"; re<='1';--ram output enable pcalu_c<="001" ; --end if; when others=> null; end case; when EXECUTE => case temp is when "0001" => --IF((instr(15 downto 12)="0001")or (instr(15 downto 12)="0010") -- or(instr(15 downto 12)="0011")) then ----and,or,xor alu_c<="00"; wra<=instr(7 downto 6); en_r1<='0'; en_r2<='0'; muxwrd_c<="00"; en_wr<='1'; en_ir<='0'; re<='0'; pcalu_c<="100"; --pc+1 when "0010" => --IF((instr(15 downto 12)="0001")or (instr(15 downto 12)="0010") -- or(instr(15 downto 12)="0011")) then ----and,or,xor alu_c<="00"; wra<=instr(7 downto 6); en_r1<='0'; en_r2<='0'; muxwrd_c<="00"; en_wr<='1'; en_ir<='0'; re<='0'; pcalu_c<="100"; --pc+1 --end if; --end if; when "0011" => --IF((instr(15 downto 12)="0001")or (instr(15 downto 12)="0010") -- or(instr(15 downto 12)="0011")) then ----and,or,xor alu_c<="00"; wra<=instr(7 downto 6); en_r1<='0'; en_r2<='0'; muxwrd_c<="00"; en_wr<='1'; en_ir<='0'; re<='0'; pcalu_c<="100"; --pc+1 --end if; when "0100"=> --if(instr(15 downto 12)="0100") then ----mov re<='0'; en_ir<='0'; en_r1<='0'; en_r2<='0'; en_wr<='1'; wra<=rs; muxwrd_c<="01"; --wrd<=instr(0); muxwrd_mov<=instr(0); pcalu_c<="100" ; -- end if; when "0101" => --if(instr(15 downto 12)="0101") then ----jmp en_ir<='0'; re<='0'; pcalu_c<="010"; jmp_imm<=instr(11 downto 0); --end if; --if((instr(15 downto 12)="0110")) then ----jls when "0110"=> en_r1<='1'; en_r2<='1'; en_wr<='1'; re<='0'; en_ir<='0'; en_wr<='0'; comp_c<="001"; rra1<=instr(11 downto 10); rra2<=instr(9 downto 8); pcalu_c<="000"; comp_imm<=instr(7 downto 0); --end if; --if((instr(15 downto 12)="0110")) then ----jeq when "0111" => en_r1<='1'; en_r2<='1'; en_wr<='1'; re<='0'; en_ir<='0'; en_wr<='0'; comp_c<="010"; rra1<=instr(11 downto 10); rra2<=instr(9 downto 8); pcalu_c<="000"; comp_imm<=instr(7 downto 0); -- end if; --if((instr(15 downto 12)="0110")) then ----jlg when "1000" => en_r1<='1'; en_r2<='1'; en_wr<='1'; re<='0'; en_wr<='0'; en_ir<='0'; comp_c<="100"; rra1<=instr(11 downto 10); rra2<=instr(9 downto 8); pcalu_c<="000"; comp_imm<=instr(7 downto 0); --end if; when "1001"=> --if (instr(15 downto 12)="1001") then ---rdm rdm_imm<=instr(9 downto 0); alu_c<="00"; en_r1<='0'; en_r2<='0'; en_wr<='1'; wra<=rs; muxwrd_c<="10"; re<='1';--ram output enable pcalu_c<="001" ; --end if; when others=> null; end case; when others=> null; end case; end if; end process BODY_MAIN;end one;
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -