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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mulctrlandregs.vhd

?? ARM7內(nèi)核,vhdl源碼形式
?? VHD
字號:
--****************************************************************************************************
-- Multiplier control and Partial Sum/Carry registers for ARM core
-- Designed by Ruslan Lepetenok
-- Modified 12.02.2003
--****************************************************************************************************

library	IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;

use WORK.ARMPackage.all;

entity MulCtrlAndRegs is generic(EarlyTermination : boolean);
	                     port(
						   -- Global signals
	                       nRESET          : in  std_logic;
						   CLK             : in  std_logic;
						   CLKEN		   : in  std_logic;
	                       -- Interface for the 32x8 combinatorial multiplier 
	                       Rs9Out          : out std_logic_vector(8 downto 0);
	                       PartialSumOut   : out std_logic_vector(63 downto 0); 
						   PartialCarryOut : out std_logic_vector(63 downto 0); 
						   PartialSumIn    : in  std_logic_vector(63 downto 0); 
						   PartialCarryIn  : in  std_logic_vector(63 downto 0); 
						   PP4P            : out std_logic;
		                   PP4M            : out std_logic;
		                   -- Data inputs
	                       ADataIn         : in  std_logic_vector(31 downto 0); -- RdHi(Rn)/Rs data path 
						   BDataIn         : in  std_logic_vector(31 downto 0); -- RdLo(Rd)/Rm data path
						   -- Control inputs
						   LoadRsRm        : in  std_logic;  -- Load Rs and Rm and start
						   LoadPS          : in  std_logic;  -- Load partial sum register with RHi:RLo   
						   ClearPSC        : in  std_logic;  -- Clear prtial sum and carry register
						   UnsignedMul     : in  std_logic;  -- Unsigned multiplication
						   ReadLH	       : in  std_logic;	 -- 0 - Read PS/PC low,1 - Read PS/PC high
						   -- Control outputs
						   MulResRdy       : out std_logic; -- Multiplication result is ready
						   -- Result
						   ResPartSum      : out std_logic_vector(31 downto 0);
						   ResPartCarry    : out std_logic_vector(31 downto 0)
						      );
end MulCtrlAndRegs;

architecture RTL of MulCtrlAndRegs is

-- Partial sum and partial carry registers signals
signal PartialSumReg     : std_logic_vector(63 downto 0) := (others => '0');
signal PartialSumRegIn   : std_logic_vector(PartialSumReg'range) := (others => '0');
signal PartialCarryReg   : std_logic_vector(63 downto 0) := (others => '0');
signal PartialCarryRegIn : std_logic_vector(PartialCarryReg'range) := (others => '0');

signal PartialSumMasked  : std_logic_vector(PartialSumReg'range) := (others => '0');
signal PartialCarryMasked  : std_logic_vector(PartialCarryReg'range) := (others => '0');

signal PartialSumRealing   : std_logic_vector(PartialSumReg'range) := (others => '0');
signal PartialCarryRealing : std_logic_vector(PartialCarryReg'range) := (others => '0');

-- Control state machine
signal nMulSt0       : std_logic := '0';
signal MulSt1        : std_logic := '0';
signal MulSt2        : std_logic := '0';
signal MulSt3        : std_logic := '0';
signal MulSt4        : std_logic := '0';

-- Early termination signals
signal EarlyTerm1C   : std_logic := '0'; -- Early termination after the first cycle
signal EarlyTerm2C   : std_logic := '0'; -- Early termination after the second cycle
signal EarlyTerm3C   : std_logic := '0'; -- Early termination after the third cycle

signal MulResRdyInt  : std_logic := '0';

-- Realignment circuit
signal	RealignCnt   : std_logic_vector(1 downto 0) := (others => '0');
signal	RealignCntIn : std_logic_vector(RealignCnt'range) := (others => '0');

signal UMulLastCycle : std_logic := '0';

begin
	
Rs9Out <= ADataIn(7 downto 0)&'0' when LoadRsRm='1' else -- First cycle of the multiplication 
		  ADataIn(15 downto 7) when MulSt1='1' else 	 -- Second cycle of the multiplication 
		  ADataIn(23 downto 15) when MulSt2='1' else 	 -- Third cycle of the multiplication 
		  ADataIn(31 downto 23) when MulSt3='1' else 	 -- Forth cycle of the multiplication 
		  (others => CDnCr);
			  
MainControlSm:process(nRESET,CLK)
begin
if nRESET='0' then               -- Reset
 nMulSt0 <= '0';
  MulSt1 <= '0';
  MulSt2 <= '0';
  MulSt3 <= '0';
  MulSt4 <= '0';
  MulResRdyInt <= '0';
  UMulLastCycle <= '0';
 
elsif CLK='1' and CLK'event then -- Clock
  if CLKEN='1' then              -- Clock enable
  nMulSt0 <= (not nMulSt0 and LoadRsRm and not EarlyTerm1C) or (nMulSt0 and not(
  		     (MulSt1 and EarlyTerm2C)or
             (MulSt2 and EarlyTerm3C)or
			  MulSt3));
  
  MulSt1 <= not MulSt1 and not nMulSt0 and LoadRsRm and not EarlyTerm1C;
  MulSt2 <= not MulSt2 and MulSt1 and not EarlyTerm2C;
  MulSt3 <= not MulSt3 and MulSt2 and not EarlyTerm3C;
  MulResRdyInt <= (not MulResRdyInt and 
  				 ((LoadRsRm and EarlyTerm1C)or
                  (MulSt1 and EarlyTerm2C)or
  		          (MulSt2 and EarlyTerm3C)or
				   MulSt3))or 
				  (MulResRdyInt and not ClearPSC);   -- Clear ready flag after multiplication

UMulLastCycle <= not MulSt3 and MulSt2 and not EarlyTerm3C and 
                  UnsignedMul and ADataIn(ADataIn'high); -- The last cycle of unsigned multiplication and Rs[31]='1' -> +X

  end if;
end if;	 
end process;

MulResRdy <= MulResRdyInt;

-- +X
PP4P <= '1' when (nMulSt0='0' and EarlyTerm1C='1' and ADataIn(8 downto 7)="01")or
                 (MulSt1='1' and EarlyTerm2C='1' and ADataIn(16 downto 15)="01")or 
                 (MulSt2='1' and EarlyTerm3C='1' and ADataIn(24 downto 23)="01")or 
                  UMulLastCycle='1' else '0';

-- -X					  
PP4M <= '1' when (nMulSt0='0' and EarlyTerm1C='1' and ADataIn(8 downto 7)="10")or
                 (MulSt1='1' and EarlyTerm2C='1' and ADataIn(16 downto 15)="10")or 
                 (MulSt2='1' and EarlyTerm3C='1' and ADataIn(24 downto 23)="10")
                  else '0';

-- Early termination conditions
-- Cycle                              1               2                3         
-- Signed multiplication        [31:8]='0'/'1'	[31:16]='0'/'1'	 [31:24]='0'/'1'
-- Unsigned multiplication      [31:8]='0'	    [31:16]='0' 	 [31:24]='0'

-- Early termination logic
EarlyTerm1C <= '1' when((UnsignedMul='1' and ADataIn(31 downto 8)="0000000000000000000000000")or 
                        (UnsignedMul='0' and(ADataIn(31 downto 8)="0000000000000000000000000" or 
						ADataIn(31 downto 8)="1111111111111111111111111")))and 
                        EarlyTermination else '0';

EarlyTerm2C <= '1' when((UnsignedMul='1' and ADataIn(31 downto 16)="00000000000000000")or 
                        (UnsignedMul='0' and(ADataIn(31 downto 16)="00000000000000000" or 
						ADataIn(31 downto 16)="11111111111111111")))and 
					    EarlyTermination else '0';

EarlyTerm3C <= '1' when((UnsignedMul='1' and ADataIn(31 downto 24)="000000000")or 
                        (UnsignedMul='0' and(ADataIn(31 downto 24)="000000000" or 
						ADataIn(31 downto 24)="111111111")))and 
						EarlyTermination else '0';

			   
RealignmentCounter:process(nRESET,CLK)
begin
if nRESET='0' then                                -- Reset
 RealignCnt  <= (others => '0');
elsif CLK='1' and CLK'event then                  -- Clock
 if (LoadRsRm or nMulSt0)='1' and CLKEN='1' then  -- Clock enable
 RealignCnt  <= RealignCntIn;
 end if;	 
end if;	 
end process;			   

RealignCntIn <= (others => '0') when  LoadRsRm='1' else
				 RealignCnt + 1; 
				 
-- Partial sum and partial carry registers
PartialSum_Load_Rotate:process(nRESET,CLK)
begin
if nRESET='0' then                                        -- Reset
 PartialSumReg  <= (others => '0');
elsif CLK='1' and CLK'event then                          -- Clock
 if (LoadPS or LoadRsRm or nMulSt0 or ClearPSC)='1' and CLKEN='1' then -- Clock enable
 PartialSumReg  <= PartialSumRegIn;
 end if;	 
end if;	 
end process;

PartialCarry_Clear_Rotate:process(nRESET,CLK)
begin
if nRESET='0' then                                -- Reset
  PartialCarryReg <= (others => '0');	
elsif CLK='1' and CLK'event then                  -- Clock
 if (LoadRsRm or nMulSt0 or ClearPSC)='1' and CLKEN='1' then  -- Clock enable
  PartialCarryReg <= PartialCarryRegIn;	
 end if;	 
end if;	 
end process;

PartialSumRegIn <= (others => '0') when ClearPSC='1' else  -- Clear (after multiplication)
				   ADataIn&BDataIn  when LoadPS='1' else  -- Load (for accumulation)
                   PartialSumMasked;                      -- Rotate 

PartialSumMasked<= PartialSumIn(7 downto 0)&PartialSumIn(63 downto 8) when LoadRsRm='1' else
                   PartialSumIn(7 downto 0)&PartialSumReg(63 downto 56)&PartialSumIn(55 downto 8) when MulSt1='1' else
				   PartialSumIn(7 downto 0)&PartialSumReg(63 downto 48)&PartialSumIn(47 downto 8) when MulSt2='1' else
				   PartialSumIn(7 downto 0)&PartialSumReg(63 downto 40)&PartialSumIn(39 downto 8) when MulSt3='1' else
				   (others => CDnCr);
					   
PartialCarryRegIn  <= (others => '0') when ClearPSC='1' else  -- Clear (after multiplication)
                      PartialCarryMasked;                    -- Rotate 

PartialCarryMasked <= PartialCarryIn(7 downto 0)&PartialCarryIn(63 downto 8) when LoadRsRm='1' else
                      PartialCarryIn(7 downto 0)&PartialCarryReg(63 downto 56)&PartialCarryIn(55 downto 8) when MulSt1='1' else
				      PartialCarryIn(7 downto 0)&PartialCarryReg(63 downto 48)&PartialCarryIn(47 downto 8) when MulSt2='1' else
				      PartialCarryIn(7 downto 0)&PartialCarryReg(63 downto 40)&PartialCarryIn(39 downto 8) when MulSt3='1' else
				      (others => CDnCr);

PartialSumOut <= PartialSumReg;
PartialCarryOut	<= PartialCarryReg;

-- Result : partial sum and partial carry (64 bits)
PartialSumRealing <= PartialSumReg(55 downto 0)&PartialSumReg(63 downto 56) when RealignCnt="00" else -- Terminated after the second cycle ??
					 PartialSumReg(47 downto 0)&PartialSumReg(63 downto 48) when RealignCnt="01" else -- Terminated after the second cycle ??
                     PartialSumReg(39 downto 0)&PartialSumReg(63 downto 40) when RealignCnt="10" else -- Terminated after the third cycle ??
                     PartialSumReg(31 downto 0)&PartialSumReg(63 downto 32) when RealignCnt="11" else 
			         (others => CDnCr);	   

PartialCarryRealing <= PartialCarryReg(55 downto 0)&PartialCarryReg(63 downto 56) when RealignCnt="00" else -- Terminated after the second cycle ??
					   PartialCarryReg(47 downto 0)&PartialCarryReg(63 downto 48) when RealignCnt="01" else -- Terminated after the second cycle ??
                       PartialCarryReg(39 downto 0)&PartialCarryReg(63 downto 40) when RealignCnt="10" else -- Terminated after the third cycle	??
                       PartialCarryReg(31 downto 0)&PartialCarryReg(63 downto 32) when RealignCnt="11" else 
			           (others => CDnCr);	    

ResPartSum   <= PartialSumRealing(63 downto 32) when ReadLH='1' else
	            PartialSumRealing(31 downto 0);

-- Shift left partial carry by 1 
ResPartCarry <= PartialCarryRealing(62 downto 31) when ReadLH='1' else
	            PartialCarryRealing(30 downto 0)&'0';

end RTL;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷av一区二区三区大白胸| 国产精品一二三四五| 久久亚洲免费视频| 一本色道久久加勒比精品 | 一色屋精品亚洲香蕉网站| 欧美日韩中文字幕一区| 国产不卡一区视频| 麻豆国产91在线播放| 亚洲另类一区二区| 久久久久久99久久久精品网站| 欧美日韩一区二区在线视频| 国产乱子伦一区二区三区国色天香| 艳妇臀荡乳欲伦亚洲一区| 亚洲精品在线电影| 欧美一卡二卡在线观看| 91九色02白丝porn| 不卡av在线免费观看| 久久国产精品第一页| 日韩精品一区第一页| 亚洲一区二区三区影院| ●精品国产综合乱码久久久久| 久久久久久久久久久久久久久99| 欧美男同性恋视频网站| 欧美亚洲综合另类| 色综合久久88色综合天天6| 国产91综合网| 国产成人一区在线| 国产精品资源网| 精品一区二区综合| 免费不卡在线观看| 青草av.久久免费一区| 五月激情综合网| 香蕉成人伊视频在线观看| 亚洲一卡二卡三卡四卡五卡| 亚洲美女偷拍久久| 亚洲精品乱码久久久久久| 亚洲另类一区二区| 一区二区三区在线免费播放| 亚洲品质自拍视频| 亚洲男人的天堂在线aⅴ视频| 亚洲日本电影在线| 亚洲人成亚洲人成在线观看图片 | 国产一区二区伦理片| 精品一二三四区| 国产成人亚洲精品青草天美| 国产成人av电影在线观看| 国产精品一区在线| 国产成人av自拍| 97精品久久久久中文字幕| 91美女在线看| 欧美色图在线观看| 777欧美精品| 精品区一区二区| 久久精品视频一区| 亚洲视频免费看| 性感美女久久精品| 精品一区二区免费在线观看| 国产在线不卡视频| 99久久免费视频.com| 在线观看日韩毛片| 91精品黄色片免费大全| 精品粉嫩aⅴ一区二区三区四区| 精品国产1区2区3区| 综合网在线视频| 丝袜亚洲另类欧美| 久久97超碰国产精品超碰| 高清成人在线观看| 日本高清成人免费播放| 91麻豆精品国产91久久久久久久久| 精品精品欲导航| 国产精品久久看| 亚洲成人www| 国产呦精品一区二区三区网站| 成人少妇影院yyyy| 欧美日韩国产成人在线免费| 久久久综合激的五月天| 成人免费在线视频观看| 五月婷婷另类国产| 国产成人免费视频网站| 欧美日韩视频第一区| 精品国产三级a在线观看| 中文字幕在线不卡| 日韩电影在线一区二区三区| 成人免费毛片高清视频| 欧美精品自拍偷拍| 中文字幕av免费专区久久| 亚瑟在线精品视频| 不卡的电影网站| 日韩午夜在线观看视频| 国产精品传媒在线| 蜜臀av性久久久久蜜臀av麻豆| 成人黄色免费短视频| 欧美一区二区私人影院日本| 中文字幕中文字幕在线一区 | 国产在线播放一区二区三区| 色婷婷久久综合| 国产亚洲va综合人人澡精品| 亚洲一二三区不卡| 99热在这里有精品免费| 精品盗摄一区二区三区| 亚洲国产综合色| 91一区二区在线| 久久久欧美精品sm网站| 视频一区中文字幕国产| av在线不卡观看免费观看| 欧美一区二区人人喊爽| 亚洲乱码国产乱码精品精98午夜| 久久精品72免费观看| 成人av综合在线| 精品国产乱码久久久久久夜甘婷婷 | 国产69精品一区二区亚洲孕妇| 欧美精品一卡二卡| 亚洲一区二区中文在线| 一本一道久久a久久精品| 国产亚洲精品中文字幕| 九色综合狠狠综合久久| 欧美日韩激情一区二区三区| 亚洲欧洲日韩女同| 国产a久久麻豆| 久久婷婷色综合| 久久精品99久久久| 日韩女优电影在线观看| 午夜电影网亚洲视频| 91精品福利视频| 亚洲免费av高清| 91麻豆精品视频| 亚洲女同女同女同女同女同69| 成人中文字幕电影| 日本一区二区三区电影| 国产在线播精品第三| 精品国产乱码久久久久久图片| 美女脱光内衣内裤视频久久影院| 欧美疯狂做受xxxx富婆| 日韩精品欧美精品| 日韩一级免费观看| 天堂精品中文字幕在线| 91精品国产一区二区三区蜜臀| 亚洲成va人在线观看| 欧美日韩国产乱码电影| 午夜精品一区在线观看| 欧美老肥妇做.爰bbww| 日韩精品一二三| 日韩欧美国产一二三区| 国产在线精品一区二区夜色| 久久久久久**毛片大全| 成人国产亚洲欧美成人综合网| 中文字幕一区二区三区av| 在线视频欧美精品| 午夜精品影院在线观看| 日韩免费高清av| 国产成人激情av| 亚洲免费高清视频在线| 欧美日韩一级视频| 久久激情五月婷婷| 欧美激情自拍偷拍| 在线亚洲人成电影网站色www| 亚洲一区在线看| 日韩免费一区二区三区在线播放| 国模冰冰炮一区二区| 中文子幕无线码一区tr| 欧美三级午夜理伦三级中视频| 日av在线不卡| 国产午夜精品福利| 色综合久久精品| 日本视频在线一区| 久久精品亚洲乱码伦伦中文| 国产91在线看| 视频一区二区不卡| 欧美大片在线观看| 福利电影一区二区| 亚洲国产日产av| 欧美一区二区日韩| 国产精品亚洲人在线观看| 亚洲一区二区在线播放相泽| 678五月天丁香亚洲综合网| 久久99国产精品麻豆| 欧美精品日韩综合在线| 国产精品综合一区二区三区| 中文字幕一区二区三区乱码在线| 在线观看免费视频综合| 毛片av一区二区| 国产精品成人一区二区三区夜夜夜| 色哟哟在线观看一区二区三区| 性做久久久久久免费观看欧美| 精品成人私密视频| 99久精品国产| 日韩av在线播放中文字幕| 欧美精品一区二区三区在线 | 婷婷激情综合网| 久久久久久久综合| 欧美日韩dvd在线观看| 久久精品99国产精品日本| 国产精品美女久久久久久2018| 成人免费视频一区| 久久99热狠狠色一区二区| 中文字幕日韩av资源站| 日韩午夜在线影院| 欧美一a一片一级一片| 国产乱理伦片在线观看夜一区| 一区二区三区中文免费|