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

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

?? stdlogar.vhd

?? 基于VHDL編寫的SDR-SDRAM控制器的編程
?? VHD
?? 第 1 頁 / 共 5 頁
字號:
    end;


    function "/="(L: SIGNED; R: UNSIGNED) return BOOLEAN is
	constant length: INTEGER := max(L'length, R'length + 1);
    begin
	return bitwise_neq( STD_ULOGIC_VECTOR( CONV_SIGNED(L, length) ),
		STD_ULOGIC_VECTOR( CONV_SIGNED(R, length) ) );
    end;


    function "/="(L: UNSIGNED; R: INTEGER) return BOOLEAN is
	constant length: INTEGER := L'length + 1;
    begin
	return bitwise_neq( STD_ULOGIC_VECTOR( CONV_SIGNED(L, length) ),
		STD_ULOGIC_VECTOR( CONV_SIGNED(R, length) ) );
    end;


    function "/="(L: INTEGER; R: UNSIGNED) return BOOLEAN is
	constant length: INTEGER := R'length + 1;
    begin
	return bitwise_neq( STD_ULOGIC_VECTOR( CONV_SIGNED(L, length) ),
		STD_ULOGIC_VECTOR( CONV_SIGNED(R, length) ) );
    end;


    function "/="(L: SIGNED; R: INTEGER) return BOOLEAN is
	constant length: INTEGER := L'length;
    begin
	return bitwise_neq( STD_ULOGIC_VECTOR( CONV_SIGNED(L, length) ),
		STD_ULOGIC_VECTOR( CONV_SIGNED(R, length) ) );
    end;


    function "/="(L: INTEGER; R: SIGNED) return BOOLEAN is
	constant length: INTEGER := R'length;
    begin
	return bitwise_neq( STD_ULOGIC_VECTOR( CONV_SIGNED(L, length) ),
		STD_ULOGIC_VECTOR( CONV_SIGNED(R, length) ) );
    end;



    function SHL(ARG: UNSIGNED; COUNT: UNSIGNED) return UNSIGNED is
	constant control_msb: INTEGER := COUNT'length - 1;
	variable control: UNSIGNED (control_msb downto 0);
	constant result_msb: INTEGER := ARG'length-1;
	subtype rtype is UNSIGNED (result_msb downto 0);
	variable result, temp: rtype;
    begin
	control := MAKE_BINARY(COUNT);
	if (control(0) = 'X') then
	    result := rtype'(others => 'X');
	    return result;
	end if;
	result := ARG;
	for i in 0 to control_msb loop
	    if control(i) = '1' then
		temp := rtype'(others => '0');
		if 2**i <= result_msb then
		    temp(result_msb downto 2**i) := 
				    result(result_msb - 2**i downto 0);
		end if;
		result := temp;
	    end if;
	end loop;
	return result;
    end;

    function SHL(ARG: SIGNED; COUNT: UNSIGNED) return SIGNED is
	constant control_msb: INTEGER := COUNT'length - 1;
	variable control: UNSIGNED (control_msb downto 0);
	constant result_msb: INTEGER := ARG'length-1;
	subtype rtype is SIGNED (result_msb downto 0);
	variable result, temp: rtype;
    begin
	control := MAKE_BINARY(COUNT);
	if (control(0) = 'X') then
	    result := rtype'(others => 'X');
	    return result;
	end if;
	result := ARG;
	for i in 0 to control_msb loop
	    if control(i) = '1' then
		temp := rtype'(others => '0');
		if 2**i <= result_msb then
		    temp(result_msb downto 2**i) := 
				    result(result_msb - 2**i downto 0);
		end if;
		result := temp;
	    end if;
	end loop;
	return result;
    end;


    function SHR(ARG: UNSIGNED; COUNT: UNSIGNED) return UNSIGNED is
	constant control_msb: INTEGER := COUNT'length - 1;
	variable control: UNSIGNED (control_msb downto 0);
	constant result_msb: INTEGER := ARG'length-1;
	subtype rtype is UNSIGNED (result_msb downto 0);
	variable result, temp: rtype;
    begin
	control := MAKE_BINARY(COUNT);
	if (control(0) = 'X') then
	    result := rtype'(others => 'X');
	    return result;
	end if;
	result := ARG;
	for i in 0 to control_msb loop
	    if control(i) = '1' then
		temp := rtype'(others => '0');
		if 2**i <= result_msb then
		    temp(result_msb - 2**i downto 0) := 
					result(result_msb downto 2**i);
		end if;
		result := temp;
	    end if;
	end loop;
	return result;
    end;

    function SHR(ARG: SIGNED; COUNT: UNSIGNED) return SIGNED is
	constant control_msb: INTEGER := COUNT'length - 1;
	variable control: UNSIGNED (control_msb downto 0);
	constant result_msb: INTEGER := ARG'length-1;
	subtype rtype is SIGNED (result_msb downto 0);
	variable result, temp: rtype;
	variable sign_bit: STD_ULOGIC;
    begin
	control := MAKE_BINARY(COUNT);
	if (control(0) = 'X') then
	    result := rtype'(others => 'X');
	    return result;
	end if;
	result := ARG;
	sign_bit := ARG(ARG'left);
	for i in 0 to control_msb loop
	    if control(i) = '1' then
		temp := rtype'(others => sign_bit);
		if 2**i <= result_msb then
		    temp(result_msb - 2**i downto 0) := 
					result(result_msb downto 2**i);
		end if;
		result := temp;
	    end if;
	end loop;
	return result;
    end;




    function CONV_INTEGER(ARG: INTEGER) return INTEGER is
    begin
	return ARG;
    end;

    function CONV_INTEGER(ARG: UNSIGNED) return INTEGER is
	variable result: INTEGER;
	variable tmp: STD_ULOGIC;
	-- synopsys built_in SYN_UNSIGNED_TO_INTEGER
    begin
	-- synopsys synthesis_off
	assert ARG'length <= 31
	    report "ARG is too large in CONV_INTEGER"
	    severity FAILURE;
	result := 0;
	for i in ARG'range loop
	    result := result * 2;
	    tmp := tbl_BINARY(ARG(i));
	    if tmp = '1' then
		result := result + 1;
	    elsif tmp = 'X' then
		assert false
		report "CONV_INTEGER: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, and it has been converted to 0."
		severity WARNING;
	    end if;
	end loop;
	return result;
	-- synopsys synthesis_on
    end;


    function CONV_INTEGER(ARG: SIGNED) return INTEGER is
	variable result: INTEGER;
	variable tmp: STD_ULOGIC;
	-- synopsys built_in SYN_SIGNED_TO_INTEGER
    begin
	-- synopsys synthesis_off
	assert ARG'length <= 32
	    report "ARG is too large in CONV_INTEGER"
	    severity FAILURE;
	result := 0;
	for i in ARG'range loop
	    if i /= ARG'left then
		result := result * 2;
	        tmp := tbl_BINARY(ARG(i));
	        if tmp = '1' then
		    result := result + 1;
	        elsif tmp = 'X' then
		    assert false
		    report "CONV_INTEGER: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, and it has been converted to 0."
		    severity WARNING;
	        end if;
	    end if;
	end loop;
	tmp := MAKE_BINARY(ARG(ARG'left));
	if tmp = '1' then
	    if ARG'length = 32 then
		result := (result - 2**30) - 2**30;
	    else
		result := result - (2 ** (ARG'length-1));
	    end if;
	end if;
	return result;
	-- synopsys synthesis_on
    end;


    function CONV_INTEGER(ARG: STD_ULOGIC) return SMALL_INT is
	variable tmp: STD_ULOGIC;
	-- synopsys built_in SYN_FEED_THRU
    begin
	-- synopsys synthesis_off
	tmp := tbl_BINARY(ARG);
	if tmp = '1' then
	    return 1;
	elsif tmp = 'X' then
	    assert false
	    report "CONV_INTEGER: There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand, and it has been converted to 0."
	    severity WARNING;
	    return 0;
	else
	    return 0;
	end if;
	-- synopsys synthesis_on
    end;


    -- convert an integer to a unsigned STD_ULOGIC_VECTOR
    function CONV_UNSIGNED(ARG: INTEGER; SIZE: INTEGER) return UNSIGNED is
	variable result: UNSIGNED(SIZE-1 downto 0);
	variable temp: integer;
	-- synopsys built_in SYN_INTEGER_TO_UNSIGNED
    begin
	-- synopsys synthesis_off
	temp := ARG;
	for i in 0 to SIZE-1 loop
	    if (temp mod 2) = 1 then
		result(i) := '1';
	    else 
		result(i) := '0';
	    end if;
	    if temp > 0 then
		temp := temp / 2;
	    else
		temp := (temp - 1) / 2; -- simulate ASR
	    end if;
	end loop;
	return result;
	-- synopsys synthesis_on
    end;


    function CONV_UNSIGNED(ARG: UNSIGNED; SIZE: INTEGER) return UNSIGNED is
	constant msb: INTEGER := min(ARG'length, SIZE) - 1;
	subtype rtype is UNSIGNED (SIZE-1 downto 0);
	variable new_bounds: UNSIGNED (ARG'length-1 downto 0);
	variable result: rtype;
	-- synopsys built_in SYN_ZERO_EXTEND
    begin
	-- synopsys synthesis_off
	new_bounds := MAKE_BINARY(ARG);
	if (new_bounds(0) = 'X') then
	    result := rtype'(others => 'X');
	    return result;
	end if;
	result := rtype'(others => '0');
	result(msb downto 0) := new_bounds(msb downto 0);
	return result;
	-- synopsys synthesis_on
    end;


    function CONV_UNSIGNED(ARG: SIGNED; SIZE: INTEGER) return UNSIGNED is
	constant msb: INTEGER := min(ARG'length, SIZE) - 1;
	subtype rtype is UNSIGNED (SIZE-1 downto 0);
	variable new_bounds: UNSIGNED (ARG'length-1 downto 0);
	variable result: rtype;
	-- synopsys built_in SYN_SIGN_EXTEND
    begin
	-- synopsys synthesis_off
	new_bounds := MAKE_BINARY(ARG);
	if (new_bounds(0) = 'X') then
	    result := rtype'(others => 'X');
	    return result;
	end if;
	result := rtype'(others => new_bounds(new_bounds'left));
	result(msb downto 0) := new_bounds(msb downto 0);
	return result;
	-- synopsys synthesis_on
    end;


    function CONV_UNSIGNED(ARG: STD_ULOGIC; SIZE: INTEGER) return UNSIGNED is
	subtype rtype is UNSIGNED (SIZE-1 downto 0);
	variable result: rtype;
	-- synopsys built_in SYN_ZERO_EXTEND
    begin
	-- synopsys synthesis_off
	result := rtype'(others => '0');
	result(0) := MAKE_BINARY(ARG);
	if (result(0) = 'X') then
	    result := rtype'(others => 'X');
	end if;
	return result;
	-- synopsys synthesis_on
    end;


    -- convert an integer to a 2's complement STD_ULOGIC_VECTOR
    function CONV_SIGNED(ARG: INTEGER; SIZE: INTEGER) return SIGNED is
	variable result: SIGNED (SIZE-1 downto 0);
	variable temp: integer;
	-- synopsys built_in SYN_INTEGER_TO_SIGNED
    begin
	-- synopsys synthesis_off
	temp := ARG;
	for i in 0 to SIZE-1 loop
	    if (temp mod 2) = 1 then
		result(i) := '1';
	    else 
		result(i) := '0';
	    end if;
	    if temp > 0 then
		temp := temp / 2;
	    else
		temp := (temp - 1) / 2; -- simulate ASR
	    end if;
	end loop;
	return result;
	-- synopsys synthesis_on
    end;


    function CONV_SIGNED(ARG: UNSIGNED; SIZE: INTEGER) return SIGNED is
	constant msb: INTEGER := min(ARG'length, SIZE) - 1;
	subtype rtype is SIGNED (SIZE-1 downto 0);
	variable new_bounds : SIGNED (ARG'length-1 downto 0);
	variable result: rtype;
	-- synopsys built_in SYN_ZERO_EXTEND
    begin
	-- synopsys synthesis_off
	new_bounds := MAKE_BINARY(ARG);
	if (new_bounds(0) = 'X') then
	    result := rtype'(others => 'X');
	    return result;
	end if;
	result := rtype'(others => '0');
	result(msb downto 0) := new_bounds(msb downto 0);
	return result;
	-- synopsys synthesis_on
    end;

    function CONV_SIGNED(ARG: SIGNED; SIZE: INTEGER) return SIGNED is
	constant msb: INTEGER := min(ARG'length, SIZE) - 1;
	subtype rtype is SIGNED (SIZE-1 downto 0);
	variable new_bounds : SIGNED (ARG'length-1 downto 0);
	variable result: rtype;
	-- synopsys built_in SYN_SIGN_EXTEND
    begin
	-- synopsys synthesis_off
	new_bounds := MAKE_BINARY(ARG);
	if (new_bounds(0) = 'X') then
	    result := rtype'(others => 'X');
	    return result;
	end if;
	result := rtype'(others => new_bounds(new_bounds'left));
	result(msb downto 0) := new_bounds(msb downto 0);
	return result;
	-- synopsys synthesis_on
    end;


    function CONV_SIGNED(ARG: STD_ULOGIC; SIZE: INTEGER) return SIGNED is
	subtype rtype is SIGNED (SIZE-1 downto 0);
	variable result: rtype;
	-- synopsys built_in SYN_ZERO_EXTEND
    begin
	-- synopsys synthesis_off
	result := rtype'(others => '0');
	result(0) := MAKE_BINARY(ARG);
	if (result(0) = 'X') then
	    result := rtype'(others => 'X');
	end if;
	return result;
	-- synopsys synthesis_on
    end;


    -- convert an integer to an STD_LOGIC_VECTOR
    function CONV_STD_LOGIC_VECTOR(ARG: INTEGER; SIZE: INTEGER) return STD_LOGIC_VECTOR is
	variable result: STD_LOGIC_VECTOR (SIZE-1 downto 0);
	variable temp: integer;
	-- synopsys built_in SYN_INTEGER_TO_SIGNED
    begin
	-- synopsys synthesis_off
	temp := ARG;
	for i in 0 to SIZE-1 loop
	    if (temp mod 2) = 1 then
		result(i) := '1';
	    else 
		result(i) := '0';
	    end if;
	    if temp > 0 then
		temp := temp / 2;
	    else
		temp := (temp - 1) / 2; -- simulate ASR
	    end if;
	end loop;
	return result;
	-- synopsys synthesis_on
    end;


 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频在线免费看| 91国产福利在线| 欧美日韩国产高清一区二区三区| 久久精品水蜜桃av综合天堂| 午夜伦欧美伦电影理论片| 成人高清av在线| 精品成人一区二区三区四区| 洋洋成人永久网站入口| 成人av电影在线| xvideos.蜜桃一区二区| 日韩av在线发布| 欧洲色大大久久| 国产精品久久久久久久久免费桃花 | 国产乱对白刺激视频不卡| 欧美日本在线看| 亚洲精品ww久久久久久p站| 成人网页在线观看| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 欧美福利视频一区| 亚洲女子a中天字幕| 成人av在线播放网站| 精品999在线播放| 视频一区国产视频| 欧美专区在线观看一区| 亚洲三级免费观看| av电影在线观看不卡| 中文字幕欧美国产| 国产成人综合亚洲91猫咪| 久久午夜老司机| 国产原创一区二区三区| 日韩女优毛片在线| 免费国产亚洲视频| 日韩一卡二卡三卡国产欧美| 天堂蜜桃一区二区三区| 欧美日本在线播放| 午夜国产不卡在线观看视频| 欧美日韩一区二区三区四区五区| 亚洲一区二区三区四区在线观看| 在线视频综合导航| 一区二区高清免费观看影视大全| 色综合天天狠狠| 亚洲欧美偷拍另类a∨色屁股| 色综合天天综合网国产成人综合天| 中文字幕在线免费不卡| 99久久夜色精品国产网站| 综合欧美一区二区三区| 一本大道久久a久久综合| 亚洲最新视频在线观看| 欧美日韩国产精品成人| 日本少妇一区二区| xfplay精品久久| 国产成人av电影| 亚洲欧洲精品一区二区三区不卡 | 日韩成人精品在线观看| 欧美成人激情免费网| 国产在线精品一区二区夜色 | 日韩三级精品电影久久久| 久久精品国产色蜜蜜麻豆| 久久婷婷国产综合国色天香| 国产成人综合亚洲网站| 国产精品国产三级国产普通话蜜臀 | 综合久久一区二区三区| 在线观看网站黄不卡| 首页亚洲欧美制服丝腿| 欧美videos中文字幕| 国产成人精品综合在线观看| 亚洲欧美偷拍卡通变态| 欧美高清视频www夜色资源网| 毛片av一区二区| 国产三级精品在线| 91国产免费观看| 奇米影视在线99精品| 久久伊99综合婷婷久久伊| av在线一区二区| 性做久久久久久久免费看| 欧美tickling挠脚心丨vk| 国产·精品毛片| 一区二区三区高清在线| 91精品国产91久久久久久一区二区| 国产一区久久久| 亚洲精品国产一区二区精华液| 91精品婷婷国产综合久久性色| 国产乱人伦偷精品视频不卡| 亚洲精品国产a久久久久久| 日韩一级黄色片| caoporm超碰国产精品| 亚洲成人在线免费| 国产人成一区二区三区影院| 欧美午夜不卡视频| 国产一区二区三区视频在线播放| 亚洲精品成a人| 久久影音资源网| 欧美色倩网站大全免费| 国产精品亚洲а∨天堂免在线| 夜夜精品视频一区二区| 久久久精品国产免大香伊| 欧美专区日韩专区| 国产一区二区女| 亚洲国产综合人成综合网站| 久久品道一品道久久精品| 欧美午夜视频网站| 国产99久久久国产精品潘金网站| 亚洲成人免费av| 中文字幕在线不卡一区| 日韩欧美在线一区二区三区| 色综合天天性综合| 国产精品一区二区三区网站| 亚洲一级二级三级在线免费观看| 国产亚洲成年网址在线观看| 欧美高清一级片在线| 91视频在线看| 国产精品影视在线| 日韩在线a电影| 亚洲激情中文1区| 国产日本亚洲高清| 日韩精品一区二区三区视频播放 | 色一情一乱一乱一91av| 国产综合色视频| 日韩avvvv在线播放| 一区二区三区资源| 国产精品久久久久影院老司| 日韩精品一区二区三区四区视频| 欧美系列亚洲系列| av综合在线播放| 国产麻豆精品久久一二三| 日韩高清不卡一区二区三区| 亚洲综合无码一区二区| 中文字幕日韩av资源站| 久久久国产精品午夜一区ai换脸| 欧美日韩另类国产亚洲欧美一级| 91麻豆文化传媒在线观看| 懂色av一区二区三区蜜臀| 韩日欧美一区二区三区| 日本在线不卡视频| 午夜精品在线看| 亚洲图片有声小说| 亚洲一区影音先锋| 亚洲欧美日韩国产一区二区三区| 久久人人97超碰com| 欧美一区二区在线视频| 欧美无砖专区一中文字| 日本精品裸体写真集在线观看| 成人午夜av在线| 国产不卡高清在线观看视频| 精品一区二区三区的国产在线播放| 日韩黄色一级片| 日韩精彩视频在线观看| 日韩成人dvd| 日本在线播放一区二区三区| 日韩精品欧美精品| 日本vs亚洲vs韩国一区三区| 视频一区二区三区中文字幕| 性欧美疯狂xxxxbbbb| 午夜久久福利影院| 日产精品久久久久久久性色| 一本色道久久综合亚洲aⅴ蜜桃| www.亚洲国产| 99久久精品国产毛片| 99免费精品视频| 91蜜桃婷婷狠狠久久综合9色| 色综合久久天天| 欧美性大战久久久久久久蜜臀| 欧美婷婷六月丁香综合色| 欧美日韩久久一区二区| 538prom精品视频线放| 日韩亚洲欧美高清| 亚洲精品一区二区三区福利| 久久女同互慰一区二区三区| 国产欧美日韩综合精品一区二区| 中文字幕欧美日韩一区| 综合色中文字幕| 亚洲一级在线观看| 日本欧美加勒比视频| 精品在线观看视频| 国产精品亚洲一区二区三区在线 | 亚洲丶国产丶欧美一区二区三区| 亚洲国产精品一区二区www在线| 五月天亚洲精品| 另类人妖一区二区av| 国产一区二三区好的| 国产成人av电影在线播放| 99v久久综合狠狠综合久久| 在线日韩av片| 日韩三级中文字幕| 国产色综合一区| 樱花影视一区二区| 日韩电影在线免费看| 国产米奇在线777精品观看| 国产999精品久久久久久 | 麻豆一区二区99久久久久| 韩国女主播成人在线观看| 成人av免费在线播放| 欧美在线观看禁18| 欧美成人一级视频| 中文字幕在线观看不卡| 婷婷激情综合网| 国产传媒欧美日韩成人| 欧美午夜精品理论片a级按摩| 精品美女被调教视频大全网站| 国产精品久久久久一区|