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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? txt_util.vhd

?? VHDL的字符串處理函數(shù)庫(kù)
?? VHD
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
library	ieee;
use	ieee.std_logic_1164.all;
use	std.textio.all;


package	txt_util is

	-- prints a	message	to the screen
	procedure print(text: string);

	-- prints the message when active
	-- useful for debug	switches
	procedure print(active:	boolean; text: string);

	-- converts	std_logic into a character
	function chr(sl: std_logic)	return character;

	-- converts	std_logic into a string	(1 to 1)
	function str(sl: std_logic)	return string;

	-- converts	std_logic_vector into a	string (binary base)
	function str(slv: std_logic_vector)	return string;

	-- converts	boolean	into a string
	function str(b:	boolean) return	string;

	-- converts	an integer into	a single character
	-- (can	also be	used for hex conversion	and	other bases)
	function chr(int: integer) return character;

	-- converts	integer	into string	using specified	base
	function str(int: integer; base: integer) return string;

	-- converts	integer	to string, using base 10
	function str(int: integer) return string;

	-- convert std_logic_vector	into a string in hex format
	function hstr(slv: std_logic_vector) return	string;


	-- functions to	manipulate strings
	-----------------------------------

	-- convert a character to upper	case
	function to_upper(c: character)	return character;

	-- convert a character to lower	case
	function to_lower(c: character)	return character;

	-- convert a string	to upper case
	function to_upper(s: string) return	string;

	-- convert a string	to lower case
	function to_lower(s: string) return	string;

   
	
	-- functions to	convert	strings	into other formats
	--------------------------------------------------
	
	-- converts	a character	into std_logic
	function to_std_logic(c: character)	return std_logic; 
	
	-- converts	a string into std_logic_vector
	function to_std_logic_vector(s:	string)	return std_logic_vector; 

	-- converts	an integer to a	string
	function int_to_str(value :	integer; len : POSITIVE) return	string;

	-- converts	a string to	a integer
	function str_to_int(str	: string) return integer;

	-- converts	a integer to a hexadecimal number string
	function int_to_hex_str(value :	integer; len : POSITIVE) return	string;

	-- converts	a hexadecimal number string	to a integer
	function hex_str_to_int(str	: string) return integer;

  
	-- file	I/O
	-----------
	   
	-- read	variable length	string from	input file
	procedure str_read(file	in_file: TEXT; 
					   res_string: out string);
		
	-- print string	to a file and start	new	line
	procedure print(file out_file: TEXT;
					new_string:	in	string);
	
	-- print character to a	file and start new line
	procedure print(file out_file: TEXT;
					char:		in	character);
					
end	txt_util;




package	body txt_util is




   -- prints text to the screen

   procedure print(text: string) is
	 variable msg_line:	line;
	 begin
	   write(msg_line, text);
	   writeline(output, msg_line);
   end print;




   -- prints text to the screen	when active

   procedure print(active: boolean;	text: string)  is
	 begin
	  if active	then
		 print(text);
	  end if;
   end print;


   -- converts std_logic into a	character

   function	chr(sl:	std_logic) return character	is
	variable c:	character;
	begin
	  case sl is
		 when 'U' => c:= 'U';
		 when 'X' => c:= 'X';
		 when '0' => c:= '0';
		 when '1' => c:= '1';
		 when 'Z' => c:= 'Z';
		 when 'W' => c:= 'W';
		 when 'L' => c:= 'L';
		 when 'H' => c:= 'H';
		 when '-' => c:= '-';
	  end case;
	return c;
   end chr;



   -- converts std_logic into a	string (1 to 1)

   function	str(sl:	std_logic) return string is
	variable s:	string(1 to	1);
	begin
		s(1) :=	chr(sl);
		return s;
   end str;



   -- converts std_logic_vector	into a string (binary base)
   -- (this	also takes care	of the fact	that the range of
   --  a string	is natural while a std_logic_vector	may
   --  have	an integer range)

   function	str(slv: std_logic_vector) return string is
	 variable result : string (1 to	slv'length);
	 variable r	: integer;
   begin
	 r := 1;
	 for i in slv'range	loop
		result(r) := chr(slv(i));
		r := r + 1;
	 end loop;
	 return	result;
   end str;


   function	str(b: boolean)	return string is

	begin
	   if b	then
		  return "true";
	  else
		return "false";
	   end if;
	end	str;


   -- converts an integer into a character
   -- for 0	to 9 the obvious mapping is	used, higher
   -- values are mapped	to the characters A-Z
   -- (this	is usefull for systems with	base > 10)
   -- (adapted from	Steve Vogwell's	posting	in comp.lang.vhdl)

   function	chr(int: integer) return character is
	variable c:	character;
   begin
		case int is
		  when	0 => c := '0';
		  when	1 => c := '1';
		  when	2 => c := '2';
		  when	3 => c := '3';
		  when	4 => c := '4';
		  when	5 => c := '5';
		  when	6 => c := '6';
		  when	7 => c := '7';
		  when	8 => c := '8';
		  when	9 => c := '9';
		  when 10 => c := 'A';
		  when 11 => c := 'B';
		  when 12 => c := 'C';
		  when 13 => c := 'D';
		  when 14 => c := 'E';
		  when 15 => c := 'F';
		  when 16 => c := 'G';
		  when 17 => c := 'H';
		  when 18 => c := 'I';
		  when 19 => c := 'J';
		  when 20 => c := 'K';
		  when 21 => c := 'L';
		  when 22 => c := 'M';
		  when 23 => c := 'N';
		  when 24 => c := 'O';
		  when 25 => c := 'P';
		  when 26 => c := 'Q';
		  when 27 => c := 'R';
		  when 28 => c := 'S';
		  when 29 => c := 'T';
		  when 30 => c := 'U';
		  when 31 => c := 'V';
		  when 32 => c := 'W';
		  when 33 => c := 'X';
		  when 34 => c := 'Y';
		  when 35 => c := 'Z';
		  when others => c := '?';
		end	case;
		return c;
	end	chr;



   -- convert integer to string	using specified	base
   -- (adapted from	Steve Vogwell's	posting	in comp.lang.vhdl)

   function	str(int: integer; base:	integer) return	string is

	variable temp:		string(1 to	10);
	variable num:		integer;
	variable abs_int:	integer;
	variable len:		integer	:= 1;
	variable power:		integer	:= 1;

   begin

	-- bug fix for negative	numbers
	abs_int	:= abs(int);

	num		:= abs_int;

	while num >= base loop					   -- Determine	how	many
	  len := len + 1;						   -- characters required
	  num := num / base;					   -- to represent the
	end	loop ;								   -- number.

	for	i in len downto	1 loop				   -- Convert the number to
	  temp(i) := chr(abs_int/power mod base);  -- a	string starting
	  power	:= power * base;				   -- with the right hand
	end	loop ;								   -- side.

	-- return result and add sign if required
	if int < 0 then
	   return '-'& temp(1 to len);
	 else
	   return temp(1 to	len);
	end	if;

   end str;


  -- convert integer to	string,	using base 10
  function str(int:	integer) return	string is

   begin

	return str(int,	10)	;

   end str;



   -- converts a std_logic_vector into a hex string.
   function	hstr(slv: std_logic_vector)	return string is
	   variable	hexlen:	integer;
	   variable	longslv	: std_logic_vector(67 downto 0)	:= (others => '0');
	   variable	hex	: string(1 to 16);
	   variable	fourbit	: std_logic_vector(3 downto	0);
	 begin
	   hexlen := (slv'left+1)/4;
	   if (slv'left+1) mod 4 /=	0 then
		 hexlen	:= hexlen +	1;
	   end if;
	   longslv(slv'left	downto 0) := slv;
	   for i in	(hexlen	-1)	downto 0 loop
		 fourbit :=	longslv(((i*4)+3) downto (i*4));
		 case fourbit is
		   when	"0000" => hex(hexlen -I) :=	'0';
		   when	"0001" => hex(hexlen -I) :=	'1';
		   when	"0010" => hex(hexlen -I) :=	'2';
		   when	"0011" => hex(hexlen -I) :=	'3';
		   when	"0100" => hex(hexlen -I) :=	'4';
		   when	"0101" => hex(hexlen -I) :=	'5';
		   when	"0110" => hex(hexlen -I) :=	'6';
		   when	"0111" => hex(hexlen -I) :=	'7';
		   when	"1000" => hex(hexlen -I) :=	'8';
		   when	"1001" => hex(hexlen -I) :=	'9';
		   when	"1010" => hex(hexlen -I) :=	'A';
		   when	"1011" => hex(hexlen -I) :=	'B';
		   when	"1100" => hex(hexlen -I) :=	'C';
		   when	"1101" => hex(hexlen -I) :=	'D';
		   when	"1110" => hex(hexlen -I) :=	'E';
		   when	"1111" => hex(hexlen -I) :=	'F';
		   when	"ZZZZ" => hex(hexlen -I) :=	'z';
		   when	"UUUU" => hex(hexlen -I) :=	'u';
		   when	"XXXX" => hex(hexlen -I) :=	'x';
		   when	others => hex(hexlen -I) :=	'?';
		 end case;
	   end loop;
	   return hex(1	to hexlen);
	 end hstr;



   -- functions	to manipulate strings
   -----------------------------------


   -- convert a	character to upper case

   function	to_upper(c:	character) return character	is

	  variable u: character;

	begin

	   case	c is
		when 'a' =>	u := 'A';
		when 'b' =>	u := 'B';
		when 'c' =>	u := 'C';
		when 'd' =>	u := 'D';
		when 'e' =>	u := 'E';
		when 'f' =>	u := 'F';
		when 'g' =>	u := 'G';
		when 'h' =>	u := 'H';
		when 'i' =>	u := 'I';
		when 'j' =>	u := 'J';
		when 'k' =>	u := 'K';
		when 'l' =>	u := 'L';
		when 'm' =>	u := 'M';
		when 'n' =>	u := 'N';
		when 'o' =>	u := 'O';
		when 'p' =>	u := 'P';
		when 'q' =>	u := 'Q';
		when 'r' =>	u := 'R';
		when 's' =>	u := 'S';
		when 't' =>	u := 'T';
		when 'u' =>	u := 'U';
		when 'v' =>	u := 'V';
		when 'w' =>	u := 'W';
		when 'x' =>	u := 'X';
		when 'y' =>	u := 'Y';
		when 'z' =>	u := 'Z';
		when others	=> u :=	c;
	end	case;

	  return u;

   end to_upper;


   -- convert a	character to lower case

   function	to_lower(c:	character) return character	is

	  variable l: character;

	begin

	   case	c is
		when 'A' =>	l := 'a';
		when 'B' =>	l := 'b';
		when 'C' =>	l := 'c';
		when 'D' =>	l := 'd';
		when 'E' =>	l := 'e';
		when 'F' =>	l := 'f';
		when 'G' =>	l := 'g';
		when 'H' =>	l := 'h';
		when 'I' =>	l := 'i';
		when 'J' =>	l := 'j';
		when 'K' =>	l := 'k';
		when 'L' =>	l := 'l';
		when 'M' =>	l := 'm';
		when 'N' =>	l := 'n';
		when 'O' =>	l := 'o';
		when 'P' =>	l := 'p';
		when 'Q' =>	l := 'q';
		when 'R' =>	l := 'r';
		when 'S' =>	l := 's';
		when 'T' =>	l := 't';
		when 'U' =>	l := 'u';
		when 'V' =>	l := 'v';
		when 'W' =>	l := 'w';
		when 'X' =>	l := 'x';
		when 'Y' =>	l := 'y';
		when 'Z' =>	l := 'z';
		when others	=> l :=	c;
	end	case;

	  return l;

   end to_lower;



   -- convert a	string to upper	case

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品国产99久久久久久白柏| 青草av.久久免费一区| 国产精品久久久久久一区二区三区 | 亚洲男人的天堂网| 亚洲精品久久久久久国产精华液| 专区另类欧美日韩| 亚洲综合免费观看高清完整版| 亚洲mv在线观看| 蜜臀av在线播放一区二区三区| 国内外精品视频| 丰满少妇久久久久久久| 99久久综合国产精品| 91九色最新地址| 这里只有精品视频在线观看| 精品黑人一区二区三区久久| 中文字幕巨乱亚洲| 国产精品激情偷乱一区二区∴| **性色生活片久久毛片| 亚洲国产日韩av| 免费观看成人鲁鲁鲁鲁鲁视频| 国产高清成人在线| 日本道免费精品一区二区三区| 色国产综合视频| 日韩精品一区国产麻豆| 国产欧美一区二区精品性色超碰| 国产精品久久二区二区| 日一区二区三区| 国产成人亚洲精品狼色在线| 欧美中文一区二区三区| 欧美一区二区三区色| 国产亚洲成av人在线观看导航| 天天综合网天天综合色| 国产**成人网毛片九色| 欧美日韩国产一级| 国产精品久久久久一区| 男女男精品网站| 一本久久综合亚洲鲁鲁五月天 | 亚洲欧洲一区二区三区| 亚洲18影院在线观看| www.色综合.com| 日韩一级片在线播放| 一区二区中文视频| 国产成人啪免费观看软件| 6080日韩午夜伦伦午夜伦| 日本一区二区高清| 国产一区二区不卡老阿姨| 欧美色综合网站| 一二三四区精品视频| 九色综合狠狠综合久久| 色av一区二区| 国产欧美va欧美不卡在线 | 欧美高清视频在线高清观看mv色露露十八 | 精品无人区卡一卡二卡三乱码免费卡| av电影在线不卡| 精品电影一区二区| 亚洲激情欧美激情| 成人晚上爱看视频| 精品日韩欧美在线| 男女性色大片免费观看一区二区| 一本大道久久a久久精二百| 欧美一级片在线观看| 日韩综合小视频| 色琪琪一区二区三区亚洲区| 国产亚洲精品久| 国产精品亚洲一区二区三区在线| 欧美一区日韩一区| 国产精品久久久久久久久晋中 | 欧美性三三影院| 亚洲色图欧美激情| 91一区二区在线| 国产精品无码永久免费888| 国产成人免费在线视频| 亚洲精品在线电影| 蜜桃精品视频在线观看| 日韩一区二区三免费高清| 五月综合激情网| 在线日韩国产精品| 亚洲制服丝袜av| 欧洲国内综合视频| 亚洲精品成人悠悠色影视| 色久优优欧美色久优优| 亚洲女与黑人做爰| 白白色 亚洲乱淫| 亚洲国产成人午夜在线一区| 国产精品系列在线观看| 国产精品色婷婷| 成人福利电影精品一区二区在线观看| 久久综合九色综合97婷婷女人| 国产九色精品成人porny| 久久新电视剧免费观看| 久久99国产乱子伦精品免费| 久久精品亚洲乱码伦伦中文| 激情五月婷婷综合| 欧美激情在线看| 成人av动漫在线| 亚洲欧美激情视频在线观看一区二区三区 | 一区二区三区在线免费播放| 欧美三级视频在线| 亚洲成人综合在线| 欧美伦理电影网| 极品少妇一区二区| 久久久亚洲精华液精华液精华液| 久久精品噜噜噜成人88aⅴ| 久久综合成人精品亚洲另类欧美 | 国产精品一区二区91| 国产成人av网站| 久久美女艺术照精彩视频福利播放 | 麻豆国产精品视频| 日韩亚洲欧美在线| 精品一区二区三区免费毛片爱| 欧美大片在线观看| 国产传媒一区在线| 亚洲情趣在线观看| 欧美伦理电影网| 久久99国产精品免费| 国产午夜亚洲精品羞羞网站| 成人av在线一区二区三区| 亚洲精品综合在线| 欧美亚洲动漫精品| 美女任你摸久久| 日韩欧美一二三| 国产在线视视频有精品| 国产欧美一区二区三区沐欲| 91色porny蝌蚪| 午夜精品一区二区三区电影天堂| 日韩欧美亚洲另类制服综合在线 | ww久久中文字幕| 国产成人日日夜夜| 一区二区久久久久久| 日韩一区二区三区av| 成人妖精视频yjsp地址| 亚洲精品欧美在线| 欧美大片一区二区| 99久久精品免费看国产| 五月婷婷色综合| 精品国产青草久久久久福利| 国产成a人亚洲| 亚洲一区二区三区国产| 久久夜色精品国产欧美乱极品| 972aa.com艺术欧美| 午夜国产精品一区| 中文字幕高清不卡| 欧美精品久久99| 91麻豆自制传媒国产之光| 国产在线看一区| 午夜不卡av免费| 怡红院av一区二区三区| 中文字幕+乱码+中文字幕一区| 91精品国产综合久久福利| 91久久久免费一区二区| 粉嫩av一区二区三区粉嫩| 韩国成人在线视频| 首页国产欧美日韩丝袜| 亚洲免费av高清| 亚洲乱码精品一二三四区日韩在线 | 国产美女久久久久| 91亚洲国产成人精品一区二三| 日韩一级二级三级精品视频| 久久久电影一区二区三区| 亚洲国产视频a| 欧美精品一二三| 性久久久久久久| 欧美成va人片在线观看| 国内精品久久久久影院色| 91麻豆精品国产91久久久久| 久久青草国产手机看片福利盒子 | 欧美一级日韩免费不卡| 欧美午夜免费电影| 91免费视频大全| 国产高清一区日本| 国产精选一区二区三区| 激情av综合网| 久久99国内精品| 精品一区二区三区在线播放视频| 日本美女一区二区三区| 日韩高清在线一区| 日韩精品成人一区二区三区| 亚洲va欧美va人人爽| 亚洲亚洲精品在线观看| 亚洲国产乱码最新视频| 亚洲一区二区三区在线看| 亚洲激情第一区| 亚洲夂夂婷婷色拍ww47| 亚洲最新在线观看| 亚洲最大成人网4388xx| 亚洲精品视频一区| 一区二区三区不卡视频| 亚洲综合在线电影| 亚洲香蕉伊在人在线观| 午夜精品免费在线观看| 免费在线看一区| 久久精品国产免费看久久精品| 奇米888四色在线精品| 免费欧美高清视频| 国产最新精品精品你懂的| 国产激情视频一区二区在线观看| 国产99久久久精品| av不卡在线播放| 欧美视频在线一区| 欧美一区日韩一区|