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

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

?? aes_tester.vhd

?? Consecutive AES core Description of project.. Features - AES encoder - 128/192/256 bit -
?? VHD
字號:
--*************************************************************************-- Project    : AES128                                                    *--                                                                        *-- Block Name : aes_fips_mctester.vhd                                     *--                                                                        *-- Author     : Hemanth Satyanarayana                                     *--                                                                        *-- Email      : hemanth@opencores.org                                     *--                                                                        *-- Description: Test bench module to test the aes implementation          *--              for general text based informal tests.                    *--                         .                                              *--                                                                        *-- Revision History                                                       *-- |-----------|-------------|---------|---------------------------------|*-- |   Name    |    Date     | Version |          Revision details       |*-- |-----------|-------------|---------|---------------------------------|*-- | Hemanth   | 15-Dec-2004 | 1.1.1.1 |            Uploaded             |*-- |-----------|-------------|---------|---------------------------------|*--                                                                        *--                                                                        *--*************************************************************************--                                                                        *-- Copyright (C) 2004 Author                                              *--                                                                        *-- This source file may be used and distributed without                   *-- restriction provided that this copyright statement is not              *-- removed from the file and that any derivative work contains            *-- the original copyright notice and the associated disclaimer.           *--                                                                        *-- This source file 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 source 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 source; if not, download it             *-- from http://www.opencores.org/lgpl.shtml                               *--                                                                        *--*************************************************************************library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.math_real.all;use std.textio.all;use ieee.std_logic_textio.all;use work.aes_tb_package.all;entity aes_tester is end aes_tester;architecture behavioral of aes_tester iscomponent aes128_fastport(      clk       : in std_logic;      reset     : in std_logic;      start     : in std_logic;      mode      : in std_logic;      load      : in std_logic;      key       : in std_logic_vector(63 downto 0);      data_in   : in std_logic_vector(63 downto 0);      data_out  : out std_logic_vector(127 downto 0);      done      : out std_logic     );     end component;constant total_num_char: integer:= 160;-- type array1 is array (1 to 300) of std_logic_vector(7 downto 0);-- array to hold binary representation of text inputtype array2 is array (1 to (total_num_char/16 + 1)) of std_logic_vector(127 downto 0);-- array to hold decrypted binary valuestype array3 is array (1 to 9) of std_logic_vector(127 downto 0);--@@@@@@@@@@@@@@@@@@@@@@@@@@@signal indicator: integer:=2; -- 1-> text_2_bits; 0-> bits_2_text; 2-> bits_2_bits--@@@@@@@@@@@@@@@@@@@@@@@@@@@signal clock_tb: std_logic:='0';signal reset_tb: std_logic:='0';signal load_tb : std_logic:='0';signal start_tb: std_logic:='0';signal done_tb : std_logic;--#############################signal mode_tb: std_logic:='0'; -- 1-> encode; 0-> decode--#############################signal data_in_tb: std_logic_vector(63 downto 0);signal data_out_tb: std_logic_vector(127 downto 0);signal key_tb: std_logic_vector(63 downto 0);constant key_val: std_logic_vector(127 downto 0):=X"000102030405060708090A0B0C0D0E0F";signal char_vector: array1:=(others =>(others => '0'));signal code_out: array2;signal decode_vector: array3;signal num_vecs: integer:=0;constant key_val_decode:std_logic_vector(127 downto 0):=X"13111D7FE3944A17F307A78B4D2B30C5";signal decode_out: array3;signal one_block_in: std_logic_vector(127 downto 0);signal one_block_out: std_logic_vector(127 downto 0);signal chk: character;signal chk3: character;signal chk1: std_logic:='0';signal length_inline: integer:=0;signal itr_cnt: integer:=0;signal chk2: integer:=0;beginaes_i: aes128_fast       port map(                  clk      => clock_tb,                  reset    => reset_tb,                  start    => start_tb,                  mode     => mode_tb,                  load     => load_tb,                  key      => key_tb,                  data_in  => data_in_tb,                  data_out => data_out_tb,                  done     => done_tb                 );processfile infile1: text open read_mode is "text_in.txt";file infile2: text open read_mode is "encoded_text.txt";file infile3: text open read_mode is "aes_data_in.txt";type char_array is array (1 to 6,1 to 40) of character; -- upto 6 lines of 40 characters each forvariable inline: line;                                  -- text_2_bit conversion modevariable one_char: character;variable linestr: char_array;variable outline: line;variable j: integer:=0;variable bits_128: std_logic_vector(127 downto 0);begin  wait for 1 ns;  if(indicator = 1) then    while(not endfile(infile1)) loop      readline(infile1,inline);      length_inline <= inline'length + length_inline;      wait for 1 ns;      for i in 1 to inline'length loop        read(inline,one_char);        char_vector(i+j) <= ascii_2_std_logic_vector(one_char);        chk <= one_char;      end loop;       j := length_inline;    end loop;    chk1 <= '1';  elsif(indicator = 0) then    while(not endfile(infile2)) loop      j:= j+1;      num_vecs <= j;      readline(infile2,inline);      read(inline,bits_128);      decode_vector(j) <= bits_128;    end loop;  elsif(indicator = 2) then      while(not endfile(infile3)) loop      readline(infile3,inline);      read(inline,bits_128);      one_block_in <= bits_128;    end loop;    end if;end process;clock_tb <= not clock_tb after 50 ns;reset_tb <= '1','0' after 150 ns;itr_cnt <= length_inline/16 when ((length_inline rem 16) = 0) else (length_inline/16 +1);processfile outfile1: text open write_mode is "coded_text.txt";file outfile2: text open write_mode is "decoded_text.txt";file outfile3: text open write_mode is "aes_data_out.txt";variable outline: line;variable x: integer:=0;variable getchar: character;begin key_tb <= (others => '0'); data_in_tb <= (others => '0'); code_out <=(others =>(others => '0')); wait for 10 ns; wait until (reset_tb = '0');if(indicator = 1) then wait until(clock_tb'event and clock_tb = '1'); for i in 1 to itr_cnt loop   load_tb <= '1';   key_tb <= key_val(127 downto 64);   data_in_tb <= (char_vector(1+x) & char_vector(2+x) & char_vector(3+x) & char_vector(4+x) &                   char_vector(5+x) & char_vector(6+x) & char_vector(7+x) & char_vector(8+x));                     wait until(clock_tb'event and clock_tb = '1');   load_tb <= '0';   key_tb <= key_val(63 downto 0);   data_in_tb <= (char_vector(9+x) & char_vector(10+x) & char_vector(11+x) & char_vector(12+x) &                  char_vector(13+x) & char_vector(14+x) & char_vector(15+x) & char_vector(16+x));   wait until(clock_tb'event and clock_tb = '1');   wait until(clock_tb'event and clock_tb = '1');   start_tb <= '1';   wait until(clock_tb'event and clock_tb = '1');   start_tb <= '0';   wait until(clock_tb'event and clock_tb = '1');   wait until done_tb = '1';   code_out(i) <= data_out_tb;   wait for 1 ns;   write(outline,code_out(i));   writeline(outfile1,outline);   wait until(clock_tb'event and clock_tb = '1');   chk2 <=i;   x:= x+16;   wait until(clock_tb'event and clock_tb = '1'); end loop;   wait until(clock_tb'event and clock_tb = '1');elsif(indicator = 0) then for i in 1 to num_vecs loop    load_tb <= '1';   key_tb <= key_val_decode(127 downto 64);   data_in_tb <= decode_vector(i)(127 downto 64);   wait until(clock_tb'event and clock_tb = '1');   load_tb <= '0';   key_tb <= key_val_decode(63 downto 0);   data_in_tb <= decode_vector(i)(63 downto 0);   wait until(clock_tb'event and clock_tb = '1');   wait until(clock_tb'event and clock_tb = '1');   start_tb <= '1';   wait until(clock_tb'event and clock_tb = '1');   start_tb <= '0';   wait until(clock_tb'event and clock_tb = '1');   wait until done_tb = '1';   decode_out(i) <= data_out_tb;   wait for 1 ns;   for k in 0 to 15 loop     getchar := std_logic_vector_2_ascii(decode_out(i)((127-(8*k)) downto (120-(8*k))));     chk3 <= getchar;     chk2 <= k;     wait for 1 ns;     if(getchar = '~') then       writeline(outfile2,outline);     else       write(outline,getchar);     end if;    end loop;    wait until(clock_tb'event and clock_tb = '1'); end loop;  elsif(indicator = 2)  then   load_tb <= '1';   if(mode_tb = '1') then     key_tb <= key_val(127 downto 64);   else     key_tb <= key_val_decode(127 downto 64);   end if;       data_in_tb <= one_block_in(127 downto 64);   wait until(clock_tb'event and clock_tb = '1');   wait until(clock_tb'event and clock_tb = '1');   wait until(clock_tb'event and clock_tb = '1');   load_tb <= '0';   if(mode_tb = '1') then     key_tb <= key_val(63 downto 0);   else     key_tb <= key_val_decode(63 downto 0);   end if;       data_in_tb <= one_block_in(63 downto 0);   wait until(clock_tb'event and clock_tb = '1');   wait until(clock_tb'event and clock_tb = '1');   start_tb <= '1';   wait until(clock_tb'event and clock_tb = '1');   start_tb <= '0';   wait until(clock_tb'event and clock_tb = '1');   wait until done_tb = '1';   one_block_out <= data_out_tb;   wait for 1 ns;   write(outline,one_block_out);   writeline(outfile3,outline);   hwrite(outline,one_block_out);   writeline(outfile3,outline);   wait until(clock_tb'event and clock_tb = '1'); end if;  wait;end process;            end behavioral;                                                

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲自拍偷拍麻豆| 久久久精品2019中文字幕之3| 国产精品一区二区三区网站| 天天操天天色综合| 亚洲一区二区三区三| 一区二区三区**美女毛片| 亚洲色图一区二区| 亚洲欧美日韩综合aⅴ视频| 国产精品女主播在线观看| 国产精品久久久久久久久快鸭| 国产三级三级三级精品8ⅰ区| 久久久五月婷婷| 国产视频不卡一区| 日韩美女视频一区二区 | 日本高清无吗v一区| 91蜜桃免费观看视频| 色www精品视频在线观看| 91福利资源站| 69堂成人精品免费视频| 欧美电影免费观看高清完整版 | 欧美三级乱人伦电影| 在线观看免费成人| 欧美一区二区三区免费在线看| 日韩精品中午字幕| 国产精品每日更新| 亚洲一区二区av在线| 久久99久久99| 99视频精品免费视频| 欧美日韩大陆在线| 国产亚洲精久久久久久| 亚洲男女一区二区三区| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产精品影视网| 欧美在线一区二区| 国产午夜精品福利| 日本免费在线视频不卡一不卡二| 国产精品一区一区三区| 欧美三级韩国三级日本三斤| 久久综合狠狠综合| 亚洲成人免费在线| 成人免费视频app| 日韩一级成人av| 中文字幕永久在线不卡| 日韩 欧美一区二区三区| 99re这里只有精品首页| 欧美mv日韩mv国产网站app| 亚洲欧美日韩在线播放| 国产一区二区三区在线看麻豆| 欧美综合一区二区| 国产日韩欧美a| 美国十次综合导航| 在线看日本不卡| 国产精品久久影院| 国产精品一色哟哟哟| 日韩一级大片在线| 偷拍亚洲欧洲综合| 欧洲色大大久久| 国产日韩视频一区二区三区| 日韩专区在线视频| 在线观看视频91| 自拍偷拍国产精品| 99久久久无码国产精品| 久久久久久久久久看片| 美日韩黄色大片| 欧美日韩五月天| 一区二区日韩电影| gogogo免费视频观看亚洲一| 国产欧美一区二区精品性色| 国内精品伊人久久久久影院对白| 欧美精品v日韩精品v韩国精品v| 亚洲精品国产成人久久av盗摄| 成人理论电影网| 国产精品亲子伦对白| 成人av在线影院| 亚洲国产高清aⅴ视频| 丁香一区二区三区| 欧美国产一区在线| 国产成人午夜电影网| 久久久亚洲国产美女国产盗摄 | 国产精品一区久久久久| 久久男人中文字幕资源站| 九九九久久久精品| 精品国产免费人成电影在线观看四季 | 91麻豆精品国产91久久久久久| 亚洲第一激情av| 91麻豆精品国产91久久久资源速度 | 亚洲国产精品精华液ab| 国产东北露脸精品视频| 亚洲国产高清不卡| 99精品视频在线观看免费| 亚洲卡通动漫在线| 欧美日韩中文精品| 麻豆国产精品官网| 国产欧美日本一区二区三区| 91在线无精精品入口| 亚洲一区欧美一区| 91麻豆精品国产91久久久久久| 久久国产麻豆精品| 国产日韩精品一区二区浪潮av | 免费欧美在线视频| 精品久久久久久久人人人人传媒| 久久99最新地址| 亚洲视频免费看| 欧美久久久久中文字幕| 狠狠色综合日日| 亚洲人成精品久久久久久| 欧美日韩高清在线| 国产精品白丝av| 亚洲日穴在线视频| 日韩欧美中文字幕一区| 成人h动漫精品一区二| 午夜在线成人av| 国产精品久久久久久久蜜臀| 欧美三区免费完整视频在线观看| 秋霞午夜av一区二区三区| 中国av一区二区三区| 91.com在线观看| 成人免费va视频| 麻豆一区二区99久久久久| 亚洲欧美一区二区三区极速播放| 日韩欧美中文字幕一区| 色婷婷香蕉在线一区二区| 久久成人久久鬼色| 性感美女极品91精品| 国产精品色噜噜| 精品捆绑美女sm三区| 欧美午夜精品免费| aaa亚洲精品一二三区| 精品伊人久久久久7777人| 亚洲一区二区3| 中文字幕一区二区三区不卡| 亚洲美女偷拍久久| 欧美国产欧美综合| 91精品黄色片免费大全| 在线亚洲欧美专区二区| 岛国一区二区三区| 国产资源在线一区| 麻豆成人91精品二区三区| 一区二区三区中文字幕| 国产精品不卡视频| 久久久99精品免费观看| 欧美精品一区二区三区蜜桃视频| 欧美三级韩国三级日本三斤 | 亚洲第一福利视频在线| 亚洲视频 欧洲视频| 国产精品无人区| 亚洲国产精品成人综合色在线婷婷| 欧美大度的电影原声| 欧美成人精品3d动漫h| 欧美一区中文字幕| 91精品国产丝袜白色高跟鞋| 欧美日韩国产乱码电影| 在线观看国产一区二区| 色菇凉天天综合网| 在线欧美日韩精品| 色婷婷av一区| 在线观看免费亚洲| 91精品国产综合久久香蕉的特点| 欧美日韩视频在线第一区 | 精品美女在线观看| 久久久久久久综合色一本| 久久天堂av综合合色蜜桃网| 久久综合国产精品| 亚洲国产精品成人综合色在线婷婷| 国产欧美日韩另类视频免费观看| 精品国产污污免费网站入口 | 久久久精品蜜桃| 中文字幕不卡在线观看| 日本一区二区成人在线| 亚洲人成人一区二区在线观看| 亚洲乱码一区二区三区在线观看| 亚洲欧美国产毛片在线| 午夜久久电影网| 黑人精品欧美一区二区蜜桃| 成人免费三级在线| 欧美无人高清视频在线观看| 4438x成人网最大色成网站| 日韩精品影音先锋| 国产精品私房写真福利视频| 亚洲精品伦理在线| 秋霞影院一区二区| 99久久久无码国产精品| 欧美情侣在线播放| 国产欧美日韩久久| 五月天一区二区三区| 蜜臀a∨国产成人精品| 丰满少妇久久久久久久| 欧美色图天堂网| 久久精品亚洲精品国产欧美kt∨ | 欧美日韩国产在线观看| 日韩一区二区免费视频| 中文字幕人成不卡一区| 奇米888四色在线精品| 成人精品国产福利| 欧美一区二区三区免费大片 | 日韩欧美亚洲国产另类| 国产精品久久久久毛片软件| 日本欧美韩国一区三区| 99久久国产综合色|国产精品| 欧美一区二区在线观看|