亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? al8051.vhd

?? 使用VHDL語言編寫的8051IP核
?? VHD
?? 第 1 頁 / 共 5 頁
字號:
--------------------------------------------------------------------------------------
-- Copyright (c) 1999 by Alatek. All rights reserved.
--
-- DESIGN        :   AL8051
-- FILE NAME     :   AL8051.vhd
-- DESCRIPTION   :   Top Level
--
-- CREATED       :   01/01/1999
-- MODIFIED      :   
-- VERSION       :   1.0
-- AUTHOR        :   Anatoli Sergyienko, Volodymir Lepekha
-- HISTORY       :   
--------------------------------------------------------------------------------------

library IEEE;
use IEEE.Std_Logic_1164.all;
library work;
use work.registers.all;

--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--  I/O wires of the I8051 are the following
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
entity AL8051 is
	Port (
		Port0: inout Std_Logic_Vector (7 downto 0);
		Port1: inout Std_Logic_Vector (7 downto 0);
		Port2: inout Std_Logic_Vector (7 downto 0);
		Port3: inout Std_Logic_Vector (7 downto 0);
		CLK: Std_Logic;
		ALE: out Std_Logic;
		PSEN: out Std_Logic;
		EA: in Std_Logic;
		RST: Std_Logic
		);
end AL8051;

--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--  Architecture of the I8031 is the following
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


architecture AL8051_ARCH of AL8051 is
	signal y,y1,x,z,h,h1,yk,ht,ht1,pop,pop1,popp,ht1p : Integer range 0 to 65535;
--	type BYTE1 is array (0 to 255) of Bit_Vector (7 downto 0);
--	type BYTE2 is array (0 to 1023) of Bit_Vector (7 downto 0);
	type VEC is array (4 downto 0) of Integer range 0 to 100;
	signal DRAM: RAMemo; 
	signal PCBus,zo,zo1,zo2,zo3,zcom,zcom1:Bit_Vector (7 downto 0); 
	signal SMOD,SBUFs,SBUF1,SCONs,SCON1:Bit_Vector (7 downto 0);
	signal zox: Bit_Vector(0 to 2);
	signal z1,u,u1,u1k,u12,u2,u3,u4,u5,u6,z2,zvp,z11,z12,flz2,ft: Bit;
	signal utt,utt1,utt1p,ut0,ut1,ut2,ut3,fal0,fal1,fal2,fal3: Bit;
	signal PRP0,PRP1,PRP00,PRP01,PRP02,PRP03,PRP04,PRP05: Bit;
	signal SDR,SDR1,zpp,strb:Bit;
	signal q1,q2,q3: Std_Logic;
	signal p5,p50,p51:Bit_Vector (4 downto 0);
	signal TMODs,TCONs,TL0s,TH0s,TL1s,TH1s,Accumulator,PSWs: Bit_Vector (7 downto 0);
	signal TCONa,TL0a,TH0a,TL1a,TH1a,dcom,ACOM: Bit_Vector (7 downto 0);
	signal ppp: Bit_Vector (15 downto 0);
	signal ttt:Std_Logic_Vector (7 downto 0);
	signal tt0:Std_Logic_Vector (7 downto 0);
	signal pp3: Bit_Vector (1 downto 0);
	signal zbuf,zpos,zsdv,zpp1,zpp2,start,zh,zh1,outact: Bit;
	signal PRT1,TFP,TFP1,TFP1p,PRR1,PB,RB1,SC2: Bit;
	signal PRBit,PRBit1,flpp,flpp0,flpp1,fr: Bit;
	signal flp0,flp1,flp2,flp3,CLKu,CYCLE : Bit;
	signal larger: Std_Logic;
	signal BUP0,BUP1,BUP2,BUP3: Bit_Vector (7 downto 0);   
	
	
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	-- this is a program ROM
	-- in file  IPMemory.vhd
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	component  IPMemory
		Port (
			i:  in Integer range 0 to 65535;    --address
			PCBus: inout Bit_Vector (7 downto 0);  --data
			z:  in Bit;                         --
			z1: in Bit
			);
	end component;
	
	component console  
		Port (
			qq: in RAMemo;
			BYTE1: in Bit_Vector (7 downto 0);
			com: in Bit_Vector (7 downto 0); 
			r_TCON: in Bit_Vector (7 downto 0);
			r_SCON: in Bit_Vector (7 downto 0);
			r_TH0: in Bit_Vector (7 downto 0);
			r_TL0: in Bit_Vector (7 downto 0);
			r_TH1: in Bit_Vector (7 downto 0);
			r_TL1: in Bit_Vector (7 downto 0);
			r_bp0: in Bit_Vector (7 downto 0);
			r_bp1: in Bit_Vector (7 downto 0);
			r_bp2: in Bit_Vector (7 downto 0);
			r_bp3: in Bit_Vector (7 downto 0);
			y : in Integer
			);
	end component;
	
	
	
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	-- this is a Timer Unit of MCS51
	-- 
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	component Timer is
		Port (
			l0: in Bit_Vector (7 downto 0);
			h0: in Bit_Vector (7 downto 0);
			l1: in Bit_Vector (7 downto 0);
			h1: in Bit_Vector (7 downto 0);
			l0a: out Bit_Vector (7 downto 0);        
			h0a: out Bit_Vector (7 downto 0);
			l1a: out Bit_Vector (7 downto 0);
			h1a: out Bit_Vector (7 downto 0);
			TCONa: out Bit_Vector (7 downto 0);
			TMOD: in Bit_Vector (7 downto 0);
			TCON: in Bit_Vector (7 downto 0);
			Port3: in Std_Logic_Vector (7 downto 0); 
			s: in Bit;
			TFP: out Bit
			);
	end component;
	
	begin
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^
	-- Switshing memory and timers
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^
	UPP:  IPMemory
	Port map (
		i => y,    --address 
		PCBus => PCBus,	--data
		z => zh,			  -- output data event
		z1 => zh1			--addres latch event
		);
	
	UUW: console 
	Port map(
		qq => dram,
		BYTE1 => ZCOM1,
		com => dcom,
		r_TCON => TCONa,
		r_SCON => SCONs,
		r_TH0 =>  TH0a,
		r_TL0 =>  TL0a,
		r_TH1 =>  TH1a,
		r_TL1 =>  TL1a,
		r_bp0 =>  bup0,
		r_bp1 =>  bup1,
		r_bp2 =>  bup2,
		r_bp3 =>  bup3,
		y  => y
		);
	
	
	UT: Timer
	Port map (
		TMOD => TMODs,
		l0 => TL0s,
		h0 => TH0s,
		l1 => TL1s,
		h1 => TH1s,
		TCON => TCONs,        
		l0a => TL0a,
		h0a => TH0a,
		l1a => TL1a,
		h1a => TH1a,
		TCONa => TCONa,
		Port3 => Port3,
		s => z1,
		TFP => TFP
		);
	
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^
	-- Decoding machine cycles,
	-- Reset
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^
	process (CLK)
		begin
		CLKu <=to_bit(CLK);
	end process;
		
	CLK_dc: process (CLKu,rst)
		variable a: Bit := '0';
		begin
		
		if ht = 23 then ht <= 0; 
						else ht <= ht +1;
		end if;
		if ht = 0 then utt <= not utt; end if;
		if ht = 10 then ut3 <= not ut3; end if;
		if ht = 20 then ut0 <= not ut0; end if;
		if ht = 21 then ut1 <= not ut1; end if; 
		if ht = 22 then ut2 <= not ut2; end if; 
					-- h- machine phase =0...11
		if h = 11 then h <= 0; else h <= h+1; end if;
					-- ui - machine phases =0, 1
					-- two times slower THan h
		if h = 10 then  u <= not u; end if;
		if h = 1 then  u12 <= not u12; end if; 
		if h = 2 then  u2 <= not u2; end if; 
		if h = 3 then  u3 <= not u3; end if;  
		if h = 4 then  u4 <= not u4; end if;   
		if h = 8 then  u5 <= not u5; end if;   
		if h = 9 then  u6 <= not u6; end if; 
		
		if h = 2 then PSEN <= '1';   end if;     	 --PSEN
		if flz2 = '0' and fr = '1'  then 
			if h = 8 then 
			PSEN <= '0'; end if;				  
		end if; 
		
		if flz2 = '0' then  
			if h = 2 then 
					ALE <= '1'; end if;			--ALE
		end if; 
		if h = 6 then ALE <= '0'; end if; 
	
		u1 <=to_bit(RST); 									--u1 = Reset
		if u1k = '1' then 
			ALE <= '1';
			PSEN <= '1'; 
		end if;
		
	end process CLK_dc;
	
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	-- Input outer Interrupt signals
	-- through Port3(2) and Port 3(3)
	--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	process (Port3(2),PRP00)    -- INT0
		variable a: Bit;
	begin
		if Port3(2) = '0' then
				PRP0 <= '1';
		else PRP0 <= '0';
		end if;   
		if a /= PRP00 then PRP0 <= '0'; end if;    
		a:= PRP00;           
	end process;
	
	
	process (Port3(3),PRP01)    -- INT1
		variable a: Bit;
	begin
		if Port3(3) = '0' then 
				PRP1 <= '1';
		else PRP1 <= '0';
		end if;    
		if a /= PRP01 then PRP1 <= '0'; end if;    
		a:= PRP01;                    
	end process;
	
	
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--  the main process 
--  of the I8051 processor kernel
--
--  there are some procedures
--  which work only in this process
--  and use this process variables
--  as side effects
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	kernel: process
		variable pCLK,s,bank,fpr,fpru,j,k1,k2: Integer range -300 to 65663 := 0;
		variable si,sti,ik,k,ik1,kk,jk: Integer range -300 to 65663 := 0;
		variable PR,pr0,pr1,pr10,prp,pr111,ccom:Bit_Vector (7 downto 0);		
		--	variable com	   :Bit_Vector (7 downto 0);
		variable pr2:Bit_Vector (15 downto 0);
		variable pr3:Bit_Vector (3 downto 0);
		variable pr4:Bit_Vector (2 downto 0);
		variable pr5:Bit_Vector (4 downto 0);	  
		variable pr6:Bit_Vector (6 downto 0);
		variable pr50,pr51:Bit_Vector (4 downto 0);
		variable fl0,fl1,flint,flint1: Bit;         
		variable ff,ffc,b,b1,b2,b3,b4,b5,ff1b:Bit := '0';
		variable G0,G1,CT0,CT1,M00,M01,M10,M11:Bit := '0';
		variable FBit,TR0,TR1,TF0,TF1,INT0,INT1,T0,T1:Bit := '0';
		variable ADBit:Bit_Vector (255 downto 0);
		variable BUFP0,BUFP1,BUFP2,BUFP3: Bit_Vector (7 downto 0);		  
		Variable addrhi:	   Bit_Vector (7 downto 0);	
		variable pre: bit;		   		
		variable adp: integer;	
		variable fli: bit;
		
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- this procedure returns <k1>
-- -Integer value of the byte Vector <com>        
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
		procedure Proc2         					       -- byte ==> Integer
			(variable k1 : out Integer range 0 to 255;
			variable com1 : in Bit_Vector (7 downto 0) )
			is                         
			variable k11 : Integer range 0 to 255;
			variable com11 : Bit_Vector (7 downto 0);
		begin 
			com11 := com1; k11:=0;
			for j in 7 downto 0 loop
				k11:=2*k11;
				if com11(j) = '1' then 
					k11:=k11+1;
				end if;
			end loop;
			k1:= k11;
		end procedure Proc2;
		
---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- this procedure returns the byte Vector <com1>
-- -representation of the Integer<k1>   	  
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		procedure Proc3         						       -- Integer ==>  byte 
			(variable k1 : in Integer range 0 to 255;
			variable com1 : out Bit_Vector (7 downto 0)	)
			is                         
			variable t,k11 : Integer range 0 to 255;
			variable com11 : Bit_Vector (7 downto 0);
		begin 
			k11:= k1;  t:=128;
			for j in 7 downto 0 loop
				if k11 < t then com11(j) := '0';
								else com11(j) := '1'; k11 := k11 - t; 
				end if;
				t := t/2;
			end loop;    
			com1 := com11; 
		end procedure Proc3;
		
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
-- this procedure returns <k1>
-- -Integer value of a half word Vector <com1>         	
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
		procedure Proc21                -- 2 byte ==> Integer
			(variable k1 : out Integer range 0 to 65535;
			variable com1 : in Bit_Vector (15 downto 0)	)
			is                         
			variable k11 : Integer range 0 to 65535;
			variable com11 : Bit_Vector (15 downto 0);
		begin 
			com11 := com1;  k11:=0;
			for j in 15 downto 0 loop
				k11:=2*k11;
				if com11(j) = '1' then k11:=k11+1;  end if;
			end loop;
			k1:= k11;
		end procedure Proc21;
		
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^	  
-- this procedure returns the halphword Vector <com1>
-- -representation of the Integer<k1>   	  	  
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		procedure Proc31                -- Integer ==> 2 byte 
			(variable k1 : in Integer range 0 to 65536;
			variable com1 : out Bit_Vector (15 downto 0))
			is                         
			variable t,k11 : Integer range 0 to 65536;
			variable com11 : Bit_Vector (15 downto 0);
		begin 
			k11:= k1; t:=32768;
			for j in 15 downto 0 loop
				if k11 < t then com11(j) := '0';
								else com11(j) := '1'; k11 := k11 - t; 
				end if;
				t := t/2;
			end loop;    
			com1 := com11; 
		end procedure Proc31;
		
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- this procedure returns byte <com>
-- -a following instruction byte        
--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		procedure Proc1 is  -- com := pc
			variable a: Bit; -- flag (0 - vnutr./1 - vnesh.) PP
			variable ih: Integer :=0;
		begin
			ik := (ik + 1) mod 32;
			outact<='0';
			ih := i;
			if EA = '1'or EA='H'  then 
				if i < 4095 then a := '0'; 
								else a := '1'; ih := y; 			-- - 4096; 
					outact<='1';
				end if;
				else a := '1'; ih := y;
			end if;                         
			fr <= a;
			if a = '0'then
				wait on u2;
				zh <= not zh; 			   -- output data event IPMemory
				wait for 0.5 ns;
				for j in 0 to 7 loop
					if PCBus(j) = '1' then com(j) := '1'; 
												else com(j) := '0'; 
					end if;
				end loop;     
				zcom1 <= com; 
				wait on u4;
				zh1 <= not zh1; 			   --addres latch event	 IPMemory
				wait for 0.5 ns;
				wait on u;   
			else 
				BUFP0 := "11111111"; 
				bup0 <= bufp0; wait for 1 ps;
				y1 <= ih;
				wait for 1 ns;
				proc31(ih,pr2);
				ppp <= pr2;
				y1 <= ih;
				wait on u2; 
				
				for j in 0 to 7 loop
					if Port0(j) = '1' then com(j) := '1'; 
											else com(j) := '0'; 
					end if;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品香蕉一区二区三区| 精品国产凹凸成av人网站| 亚洲色图制服丝袜| 99国产麻豆精品| 亚洲精品中文字幕乱码三区| 欧美系列日韩一区| 青青草视频一区| 久久品道一品道久久精品| 成人性生交大片| 亚洲精品国产一区二区精华液| 欧美丝袜丝交足nylons| 麻豆一区二区三区| 国产视频一区二区三区在线观看| yourporn久久国产精品| 午夜成人在线视频| 国产欧美日韩麻豆91| 91视频观看视频| 奇米一区二区三区av| 久久精品亚洲麻豆av一区二区| 91视频免费看| 国产真实乱偷精品视频免| 中文字幕一区在线观看视频| 欧美日韩国产高清一区二区三区 | 国产高清在线精品| 亚洲精品国产视频| 欧美一区日韩一区| 国产在线精品视频| 亚洲天堂精品视频| 欧美日韩国产综合一区二区| 免费成人av资源网| 一区二区三区精品在线观看| 欧美日韩你懂的| 另类的小说在线视频另类成人小视频在线| 亚洲地区一二三色| 国产精品久久久久久亚洲毛片| 欧美性受极品xxxx喷水| 国产高清在线精品| 五月婷婷综合激情| 国产欧美日韩在线| 91精品福利在线一区二区三区 | 国产女人18毛片水真多成人如厕| 99热在这里有精品免费| 天天av天天翘天天综合网| 日韩一级大片在线观看| 国产精品一区在线观看你懂的| 悠悠色在线精品| 中文久久乱码一区二区| 91麻豆精品国产无毒不卡在线观看| 国产盗摄精品一区二区三区在线| 亚洲成人自拍网| 中国色在线观看另类| 日韩精品一区二区三区老鸭窝| 99精品久久只有精品| 国产精品 日产精品 欧美精品| 三级不卡在线观看| 亚洲国产日韩av| 亚洲激情网站免费观看| 国产精品电影一区二区| 日韩你懂的电影在线观看| 欧美精品1区2区| 欧美日韩综合在线| 在线视频欧美精品| 色悠悠久久综合| 色拍拍在线精品视频8848| 国产激情一区二区三区| 久久精品国产澳门| 美女视频网站黄色亚洲| 免费精品视频在线| 美女视频第一区二区三区免费观看网站 | 日韩亚洲欧美综合| 日韩一级成人av| 日韩精品中午字幕| 日韩女优av电影| 精品国产乱码久久久久久1区2区 | 国产精品1024| 国产成人在线看| 国产精品2024| 高清久久久久久| caoporn国产精品| 99麻豆久久久国产精品免费| 99re成人精品视频| 日本电影欧美片| 欧美色综合影院| 91麻豆精品国产91久久久 | 国产精品另类一区| 中文字幕精品在线不卡| 国产精品高潮久久久久无| 中文字幕av在线一区二区三区| 欧美激情综合五月色丁香| 亚洲三级免费电影| 中文字幕一区二区三区在线不卡| 国产精品久久久久影院色老大| 中文字幕不卡在线观看| 精品国产一二三| 国产色产综合色产在线视频 | 日韩美女视频在线| 国产欧美精品一区二区三区四区 | 丝袜亚洲另类欧美| 另类中文字幕网| 不卡一二三区首页| 欧美日韩免费观看一区二区三区| 91精品国产日韩91久久久久久| 精品国产一区二区三区四区四| 国产亚洲精品资源在线26u| 亚洲猫色日本管| 日韩1区2区日韩1区2区| 成人一级黄色片| 欧美午夜精品一区二区蜜桃| 日韩免费观看高清完整版| 国产亚洲精品中文字幕| 亚洲成av人影院在线观看网| 蜜臀va亚洲va欧美va天堂| 丁香一区二区三区| 在线区一区二视频| 国产亚洲欧美日韩俺去了| 亚洲自拍偷拍av| 国产成人综合网站| 欧美日韩中文另类| 国产偷国产偷精品高清尤物| 亚洲最大成人综合| 韩日精品视频一区| 欧美日韩美女一区二区| 中文字幕国产一区二区| 视频一区二区三区在线| 成人影视亚洲图片在线| 欧美日韩一卡二卡三卡| 久久综合网色—综合色88| 亚洲美女少妇撒尿| 精品夜夜嗨av一区二区三区| 91在线播放网址| 亚洲精品一区二区三区四区高清| 一区二区三区国产精品| 国产在线国偷精品产拍免费yy | 中文一区二区完整视频在线观看| 亚洲综合在线视频| 另类综合日韩欧美亚洲| 欧美日韩黄色影视| 亚洲人成7777| 成人精品视频.| 欧美电视剧免费全集观看| 亚洲成a人片在线观看中文| 99久久精品一区二区| 国产欧美日产一区| 美女网站在线免费欧美精品| 欧美日韩精品三区| 伊人开心综合网| 不卡欧美aaaaa| 国产日韩三级在线| 狠狠色伊人亚洲综合成人| 91精品国产福利在线观看| 亚洲午夜在线视频| 在线观看亚洲专区| 亚洲免费观看高清在线观看| av不卡在线播放| 国产精品久久综合| 粉嫩绯色av一区二区在线观看| 日韩免费观看2025年上映的电影| 亚洲一级二级三级| 欧美主播一区二区三区| 亚洲人一二三区| 岛国精品在线观看| 久久精品亚洲麻豆av一区二区 | 精品无码三级在线观看视频| 欧美日本在线播放| 午夜精品久久久久久久久| 在线免费观看日本一区| 亚洲视频一二区| 色综合天天做天天爱| 一区二区三区在线影院| 91福利国产成人精品照片| 亚洲一区二区3| 91麻豆精品国产91久久久久久久久| 日韩二区三区在线观看| 日韩三级免费观看| 国内成人免费视频| 国产精品少妇自拍| 97久久久精品综合88久久| 亚洲欧美一区二区三区国产精品 | 国产亚洲一区二区三区在线观看 | 99久久精品国产毛片| 亚洲婷婷综合久久一本伊一区| 色综合天天做天天爱| 亚洲观看高清完整版在线观看| 欧美日韩一区在线| 看片的网站亚洲| 久久久亚洲国产美女国产盗摄| 成人激情动漫在线观看| 国产精品传媒入口麻豆| 色av一区二区| 日本最新不卡在线| 精品久久久久久久久久久久久久久久久| 麻豆91在线观看| 久久综合999| 成人黄色大片在线观看| 亚洲人亚洲人成电影网站色| 丁香婷婷综合色啪| 丝袜亚洲另类欧美| 国产精品色一区二区三区| 欧美自拍丝袜亚洲| 国产精品1区2区3区|