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

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

?? compressor_tb.vhd

?? JPEG(Joint Photographic Expert Group,聯(lián)合攝影專家組)編碼的數(shù)據(jù)執(zhí)行解壓縮的各項功能.JPEG的VHDL實現(xiàn)代碼
?? VHD
字號:
---------------------------------------------------------------------------------------------------
--
-- Title       : JPEG Hardware Compressor Testbench
-- Design      : jpeg
-- Author      : Victor Lopez Lorenzo
-- E-mail      : galland@opencores.org
--
---------------------------------------------------------------------------------------------------
--
--
--    Copyright (C) 2004  Victor Lopez Lorenzo
--
--    This library is free software; you can redistribute it and/or
--    modify it under the terms of the GNU Lesser General Public
--    License as published by the Free Software Foundation; either
--    version 2.1 of the License, or (at your option) any later version.
--
--    This library is distributed in the hope that it will be useful,
--    but WITHOUT ANY WARRANTY; without even the implied warranty of
--    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--    Lesser General Public License for more details.
--
--    You should have received a copy of the GNU Lesser General Public
--    License along with this library; if not, write to the Free Software
--    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
--                                                                                                 
--
---------------------------------------------------------------------------------------------------
-- 
--    It is the compressor.vhd itself the one who writes the image.jpg output file
--    when simulated with this testbench.
--
---------------------------------------------------------------------------------------------------

library ieee,xilinxcorelib,unisim;
use ieee.std_logic_unsigned.all;
use ieee.numeric_std.all;
use ieee.std_logic_1164.all;


entity compressor_tb is
end compressor_tb;

architecture TB_ARCHITECTURE of compressor_tb is
	component compressor
	port(
		clk : in std_logic;
		reset : in std_logic;
      CompressImage : in std_logic; --must be active high for just one cycle
      Compression : in std_logic_vector(1 downto 0); --Quality: 00 = low, 01 = medium, 10 = high
      Mono : in std_logic; --active high for grey-scale input image (Red=Green=Blue)
      ImgColumns : in std_logic_vector(9 downto 0); --columns in each line of the image to compress
      ImgLines : in std_logic_vector(8 downto 0); --lines of the image to compress
      Compressing : out std_logic;
      ProcessRGB : in std_logic;
      ProcessingRGB : out std_logic;
      Red : in std_logic_vector(7 downto 0);
      Green : in std_logic_vector(7 downto 0);
      Blue : in std_logic_vector(7 downto 0);
      addr: out std_logic_VECTOR(15 downto 0);
      din: out std_logic_VECTOR(7 downto 0);
      we: out std_logic);
	end component;

	signal clk : std_logic;
	signal reset : std_logic;
	signal CompressImage : std_logic;
	signal Compression : std_logic_vector(1 downto 0);
   signal Mono : std_logic;
	signal ImgColumns : std_logic_vector(9 downto 0);
	signal ImgLines : std_logic_vector(8 downto 0);
	signal ProcessRGB : std_logic;
	signal Red : std_logic_vector(7 downto 0);
	signal Green : std_logic_vector(7 downto 0);
	signal Blue : std_logic_vector(7 downto 0);

	signal Compressing : std_logic;
	signal ProcessingRGB : std_logic;
	signal addr : std_logic_vector(15 downto 0);
	signal din : std_logic_vector(7 downto 0);
	signal we : std_logic;


   type ByteT is (c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,c31,c32,c33,c34,c35,c36,c37,c38,c39,c40,c41,c42,c43,c44,c45,c46,c47,c48,c49,c50,c51,c52,c53,c54,c55,c56,c57,c58,c59,c60,c61,c62,c63,c64,c65,c66,c67,c68,c69,c70,c71,c72,c73,c74,c75,c76,c77,c78,c79,c80,c81,c82,c83,c84,c85,c86,c87,c88,c89,c90,c91,c92,c93,c94,c95,c96,c97,c98,c99,c100,c101,c102,c103,c104,c105,c106,c107,c108,c109,c110,c111,c112,c113,c114,c115,c116,c117,c118,c119,c120,c121,c122,c123,c124,c125,c126,c127,c128,c129,c130,c131,c132,c133,c134,c135,c136,c137,c138,c139,c140,c141,c142,c143,c144,c145,c146,c147,c148,c149,c150,c151,c152,c153,c154,c155,c156,c157,c158,c159,c160,c161,c162,c163,c164,c165,c166,c167,c168,c169,c170,c171,c172,c173,c174,c175,c176,c177,c178,c179,c180,c181,c182,c183,c184,c185,c186,c187,c188,c189,c190,c191,c192,c193,c194,c195,c196,c197,c198,c199,c200,c201,c202,c203,c204,c205,c206,c207,c208,c209,c210,c211,c212,c213,c214,c215,c216,c217,c218,c219,c220,c221,c222,c223,c224,c225,c226,c227,c228,c229,c230,c231,c232,c233,c234,c235,c236,c237,c238,c239,c240,c241,c242,c243,c244,c245,c246,c247,c248,c249,c250,c251,c252,c253,c254,c255);
   subtype Byte is ByteT;
   type ByteFileType is file of Byte;
   file infile : ByteFileType open read_mode is "image.bmp";

   
   -- integer to bit_vector conversion
   function int2bit_vec(A: integer; SIZE: integer) return BIT_VECTOR is
   	variable RESULT: BIT_VECTOR(SIZE-1 downto 0);
   	variable TMP: integer;
   begin
   	TMP:=A;
   	for i in 0 to SIZE-1 loop
   		if TMP mod 2 = 1 then RESULT(i):='1';
   		else RESULT(i):='0';
   		end if;
   		TMP:=TMP / 2;
   	end loop;
   	return RESULT;
   end;

   
begin

	UUT : compressor
		port map (
			clk => clk,
			reset => reset,
			CompressImage => CompressImage,
			Compressing => Compressing,
			Compression => Compression,
         Mono => Mono,
			ImgColumns => ImgColumns,
			ImgLines => ImgLines,
			ProcessRGB => ProcessRGB,
			ProcessingRGB => ProcessingRGB,
			Red => Red,
			Green => Green,
			Blue => Blue,
			addr => addr,
			din => din,
			we => we
		);

   Clocket : process --40 MHz -> T = 25 ns 
   begin
      clk <= '1';
	   wait for 12.5 ns;
      clk <= '0';
	   wait for 12.5 ns;
   end process;

   reset <= '1', '0' after 20 ns;
   
   CompressImage <= '1'   , '0' after 45 ns;

   Compression <= "10"; --"01"; --Medium Quality (Q ITU standard)
   Mono <= '0';
   
   Data : process(clk)
      variable Clock_Up : std_logic := '1';
      variable Prev_Proc : std_logic;
      variable Bloque : std_logic_vector(511 downto 0) := X"30353A3E40404040353C3E41444141413B4045484341414144464745454444444445464747404040464646464542424247474648474242424747464648434343";
      --in decimal it is 48535862646464645360626568656565596469726765656568707169696868686869707171646464707070706966666671717072716666667171707072676767

      variable Line : std_logic_vector(8 downto 0);
      variable Column : std_logic_vector(9 downto 0);
      variable PixelIni : integer range 0 to 511;
      variable Pixel : Byte;
      variable Temp : std_logic_vector(7 downto 0);
      variable JumpHeader : std_logic := '0';      
      variable FinImg : std_logic;
   begin  
      if reset = '1' then
         Red <= (others => '1');
         Green <= (others => '1');
         Blue <= (others => '1');
         Prev_Proc := '1';
         Pixelini := 0;
         ProcessRGB <= '0';
         FinImg := '0';
         if JumpHeader = '0' then
            for i in 0 to 53 loop
               read(infile, Pixel);
               case i is
                  when 18 => --1st byte of Width
                     Column(7 downto 0) := To_Stdlogicvector(int2bit_vec(ByteT'pos(Pixel),8));
                  when 19 => --2nd byte of Width                                  
                     Temp := To_Stdlogicvector(int2bit_vec(ByteT'pos(Pixel),8));
                     Column(9 downto 8) := Temp(1 downto 0);
                  when 22 => --1st byte of Height
                     Line(7 downto 0) := To_Stdlogicvector(int2bit_vec(ByteT'pos(Pixel),8));
                  when 23 => --2nd byte of Height                                                 
                     Temp := To_Stdlogicvector(int2bit_vec(ByteT'pos(Pixel),8));
                     Line(8) := Temp(0);
                  when 24 => --we write to the Compressor the image dimensions
                     ImgColumns <= Column - 1; --remember for a 352x288 it is (0..351)x(0..287)
                     ImgLines <= Line - 1;
                  when others =>
                     null;
               end case;      
            end loop;            
            JumpHeader := '1';
         end if;   
         Line := (others => '0');
         Column := (others => '0');
      elsif (clk = '1' and clk'event) then
         if Prev_Proc = '1' and ProcessingRGB = '0' then
            --PixelIni := 511 - conv_integer(Line(2 downto 0))*64 - conv_integer(Column(2 downto 0))*8;
            --511-504 503-496 495-488 487-480 479-472 471-464 463-456 455-448
            read(infile,Pixel);  
            Blue <= To_Stdlogicvector(int2bit_vec(ByteT'pos(Pixel),8));
            read(infile,Pixel);  
            Green <= To_Stdlogicvector(int2bit_vec(ByteT'pos(Pixel),8));
            read(infile,Pixel);  
            Red <= To_Stdlogicvector(int2bit_vec(ByteT'pos(Pixel),8));
            --Red <= Bloque(PixelIni downto PixelIni - 7);
            --Green <= Bloque(PixelIni downto PixelIni - 7);
            --Blue <= Bloque(PixelIni downto PixelIni - 7);
            ProcessRGB <= '1';
            if Column = ImgColumns then
               Column := (others => '0');
               if Line = ImgLines then
                  Line := (others => '0');
               else
                  Line := Line + 1;
               end if;   
            else   
               Column := Column + 1;
            end if;   
               
         elsif ProcessingRGB = '1' then
            ProcessRGB <= '0';
         end if;

         if FinImg = '0' then
            Prev_Proc := ProcessingRGB;
         else
            Prev_Proc := '0'; --so that it doesn't send again the image
            ProcessRGB <= '0'; --must be done here because in the last cycle, with Line=0 and Column=0 the last pixel is being sent!
            File_Close(infile);
         end if;   

               assert not (FinImg='1' and Compressing = '0')
                  report "Compression Completed"
                     severity FAILURE; --everything went fine, it's just to stop the simulation
                              
        
         if Line = 0 and Column = 0 then
            FinImg := '1';
         end if;   
         
      end if;
   end process Data;      
   
end TB_ARCHITECTURE;

configuration TESTBENCH_FOR_compressor of compressor_tb is
	for TB_ARCHITECTURE
		for UUT : compressor
			use entity work.compressor(jpg);
		end for;
	end for;
end TESTBENCH_FOR_compressor;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩小视频| 国产精品福利av| 中文字幕视频一区| 天天亚洲美女在线视频| 97精品久久久午夜一区二区三区| 精品免费国产二区三区| 亚洲综合另类小说| 成人国产精品免费观看动漫 | 亚洲电影激情视频网站| 成人中文字幕合集| 久久久久综合网| 日本三级韩国三级欧美三级| 91丝袜呻吟高潮美腿白嫩在线观看| 久久先锋资源网| 国内精品在线播放| 日韩欧美国产一区二区三区| 亚州成人在线电影| 欧洲亚洲精品在线| 一区二区三区鲁丝不卡| 成人一区二区三区在线观看| 亚洲精品一区二区三区精华液| 日韩精品一级二级 | 日韩视频一区二区| 午夜激情综合网| 欧美视频在线一区二区三区 | 国产日韩精品一区| 国产麻豆成人精品| 26uuu亚洲综合色| 黄色资源网久久资源365| 欧美大尺度电影在线| 美腿丝袜亚洲一区| 精品国产三级a在线观看| 久久电影网站中文字幕| 精品国产百合女同互慰| 国产一区二区三区在线观看精品| 亚洲精品在线观| 国产精品一区2区| 欧美国产1区2区| 99久免费精品视频在线观看| 亚洲色图欧洲色图婷婷| 91小视频在线| 亚洲一二三四在线| 在线观看91精品国产麻豆| 蜜臀av性久久久久蜜臀aⅴ四虎| 日韩三级视频在线看| 精品亚洲porn| 国产精品美女久久久久aⅴ国产馆| aaa国产一区| 亚洲电影你懂得| 欧美精品一区二区三区在线| 国产一区二区三区免费播放| 中文字幕一区三区| 欧美图区在线视频| 国产在线不卡一区| 亚洲同性同志一二三专区| 欧美日韩在线播放| 国产精品资源网| 亚洲一区二区三区三| 日韩精品一区二区三区在线观看| 国产成人8x视频一区二区| 亚洲精品福利视频网站| 日韩一区二区三区视频在线| 大白屁股一区二区视频| 亚洲成人av资源| 久久综合资源网| 欧美中文字幕一二三区视频| 精品一区二区综合| 亚洲人妖av一区二区| 欧美一区二区日韩一区二区| 99久久精品情趣| 麻豆久久一区二区| 亚洲色图欧美激情| 欧美电影免费观看高清完整版在线观看| 国产.欧美.日韩| 日韩国产精品久久| 成人免费小视频| 久久品道一品道久久精品| 欧美日韩中文另类| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 日本高清不卡视频| 国产在线视频不卡二| 天天亚洲美女在线视频| 日韩毛片在线免费观看| 久久精品视频网| 欧美一级午夜免费电影| 91久久奴性调教| 国产成a人亚洲| 韩国午夜理伦三级不卡影院| 亚洲午夜国产一区99re久久| 国产精品国产成人国产三级| 2023国产一二三区日本精品2022| 欧洲av在线精品| 99久久久精品免费观看国产蜜| 国产一区二区91| 麻豆精品一区二区| 天天色 色综合| 亚洲一区国产视频| 亚洲精品少妇30p| 1区2区3区国产精品| 国产欧美一区二区精品性色超碰 | 欧美欧美午夜aⅴ在线观看| 9人人澡人人爽人人精品| 国产成人在线看| 狠狠色综合播放一区二区| 日本伊人色综合网| 午夜精品久久久久久久99水蜜桃| 亚洲欧美日韩中文播放| 亚洲欧美偷拍另类a∨色屁股| 亚洲国产岛国毛片在线| 中文字幕免费观看一区| 国产目拍亚洲精品99久久精品| 国产日韩精品一区| 日本一区二区成人在线| 国产精品网站在线| 欧美国产1区2区| 亚洲欧美日韩在线| 亚洲制服丝袜av| 婷婷中文字幕综合| 人人精品人人爱| 国产一区二区网址| 不卡大黄网站免费看| 91亚洲资源网| 欧美日韩欧美一区二区| 欧美一卡二卡三卡四卡| 精品国产三级a在线观看| 国产片一区二区三区| 中文字幕av不卡| 亚洲人被黑人高潮完整版| 亚洲一级二级三级| 美女久久久精品| 国产精品综合av一区二区国产馆| 国产精品1区二区.| 色综合视频在线观看| 欧洲激情一区二区| 日韩视频在线你懂得| 欧美激情一区三区| 亚洲最大成人网4388xx| 美女爽到高潮91| 成人h动漫精品| 欧美日韩国产色站一区二区三区| 日韩网站在线看片你懂的| 国产女人aaa级久久久级| 一区二区三区久久久| 美女mm1313爽爽久久久蜜臀| 成人国产亚洲欧美成人综合网| 欧美性三三影院| 久久亚洲影视婷婷| 亚洲精品成人天堂一二三| 日韩av一区二区三区| 成人av在线网| 日韩美女视频一区二区在线观看| 亚洲国产精品av| 视频一区中文字幕国产| 成人免费看片app下载| 91精品国产色综合久久久蜜香臀| 日本一区二区三区免费乱视频 | 在线不卡免费欧美| 欧美激情综合五月色丁香 | 91精品国产综合久久久久久久| 久久久久国产精品麻豆| 亚洲mv在线观看| 成人网男人的天堂| 欧美大片一区二区三区| 一区二区在线免费观看| 国产一区二区91| 欧美一级欧美三级| 一区二区三区不卡视频| 丁香啪啪综合成人亚洲小说| 日韩一区二区三区视频| 有码一区二区三区| 高潮精品一区videoshd| 日韩一区二区视频| 亚洲777理论| 色综合天天综合网天天狠天天 | 国产成a人亚洲精品| 日韩美女一区二区三区| 偷拍亚洲欧洲综合| aa级大片欧美| 国产精品三级视频| 国产乱码精品一区二区三区av| 欧美一区二区三区小说| 亚洲在线视频一区| 91精品办公室少妇高潮对白| 国产精品人妖ts系列视频| 国产夫妻精品视频| 精品日韩av一区二区| 麻豆一区二区三| 欧美一级精品在线| 丝瓜av网站精品一区二区| 欧美视频中文字幕| 亚洲国产成人av| 欧美吞精做爰啪啪高潮| 亚洲午夜影视影院在线观看| 91久久一区二区| 夜夜爽夜夜爽精品视频| 91国产成人在线| 亚洲综合久久av| 9191精品国产综合久久久久久| 亚洲高清免费观看 | 麻豆视频一区二区|