cryptography ip-cores in vhdl / verilog
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

510 lines
20 KiB

  1. -- ======================================================================
  2. -- CBC-DES encryption/decryption testbench
  3. -- tests according to NIST 800-17 special publication
  4. -- Copyright (C) 2011 Torsten Meissner
  5. -------------------------------------------------------------------------
  6. -- This program is free software; you can redistribute it and/or modify
  7. -- it under the terms of the GNU General Public License as published by
  8. -- the Free Software Foundation; either version 2 of the License, or
  9. -- (at your option) any later version.
  10. -- This program is distributed in the hope that it will be useful,
  11. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. -- GNU General Public License for more details.
  14. -- You should have received a copy of the GNU General Public License
  15. -- along with this program; if not, write to the Free Software
  16. -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. -- ======================================================================
  18. -- Revision 1.0 2011/09/23
  19. -- Initial release, variable plaintext known answer test integrated
  20. -- Revision 1.1 2011/09/25
  21. -- integrated all encryption tests of NIST 800-17 publication except the modes-tests
  22. -- Revision 1.2 2011/10/05
  23. -- integrated all decryption tests of NIST 800-17 publication except the modes-tests
  24. library ieee;
  25. use ieee.std_logic_1164.all;
  26. use ieee.numeric_std.all;
  27. entity tb_cbcdes is
  28. end entity tb_cbcdes;
  29. architecture rtl of tb_cbcdes is
  30. type t_array is array (natural range <>) of std_logic_vector(0 to 63);
  31. constant c_variable_plaintext_known_answers : t_array(0 to 63) :=
  32. (x"95F8A5E5DD31D900", x"DD7F121CA5015619", x"2E8653104F3834EA",
  33. x"4BD388FF6CD81D4F", x"20B9E767B2FB1456", x"55579380D77138EF",
  34. x"6CC5DEFAAF04512F", x"0D9F279BA5D87260", x"D9031B0271BD5A0A",
  35. x"424250B37C3DD951", x"B8061B7ECD9A21E5", x"F15D0F286B65BD28",
  36. x"ADD0CC8D6E5DEBA1", x"E6D5F82752AD63D1", x"ECBFE3BD3F591A5E",
  37. x"F356834379D165CD", x"2B9F982F20037FA9", x"889DE068A16F0BE6",
  38. x"E19E275D846A1298", x"329A8ED523D71AEC", x"E7FCE22557D23C97",
  39. x"12A9F5817FF2D65D", x"A484C3AD38DC9C19", x"FBE00A8A1EF8AD72",
  40. x"750D079407521363", x"64FEED9C724C2FAF", x"F02B263B328E2B60",
  41. x"9D64555A9A10B852", x"D106FF0BED5255D7", x"E1652C6B138C64A5",
  42. x"E428581186EC8F46", x"AEB5F5EDE22D1A36", x"E943D7568AEC0C5C",
  43. x"DF98C8276F54B04B", x"B160E4680F6C696F", x"FA0752B07D9C4AB8",
  44. x"CA3A2B036DBC8502", x"5E0905517BB59BCF", x"814EEB3B91D90726",
  45. x"4D49DB1532919C9F", x"25EB5FC3F8CF0621", x"AB6A20C0620D1C6F",
  46. x"79E90DBC98F92CCA", x"866ECEDD8072BB0E", x"8B54536F2F3E64A8",
  47. x"EA51D3975595B86B", x"CAFFC6AC4542DE31", x"8DD45A2DDF90796C",
  48. x"1029D55E880EC2D0", x"5D86CB23639DBEA9", x"1D1CA853AE7C0C5F",
  49. x"CE332329248F3228", x"8405D1ABE24FB942", x"E643D78090CA4207",
  50. x"48221B9937748A23", x"DD7C0BBD61FAFD54", x"2FBC291A570DB5C4",
  51. x"E07C30D7E4E26E12", x"0953E2258E8E90A1", x"5B711BC4CEEBF2EE",
  52. x"CC083F1E6D9E85F6", x"D2FD8867D50D2DFE", x"06E7EA22CE92708F",
  53. x"166B40B44ABA4BD6");
  54. constant c_variable_key_known_answers : t_array(0 to 55) :=
  55. (x"95A8D72813DAA94D", x"0EEC1487DD8C26D5", x"7AD16FFB79C45926",
  56. x"D3746294CA6A6CF3", x"809F5F873C1FD761", x"C02FAFFEC989D1FC",
  57. x"4615AA1D33E72F10", x"2055123350C00858", x"DF3B99D6577397C8",
  58. x"31FE17369B5288C9", x"DFDD3CC64DAE1642", x"178C83CE2B399D94",
  59. x"50F636324A9B7F80", x"A8468EE3BC18F06D", x"A2DC9E92FD3CDE92",
  60. x"CAC09F797D031287", x"90BA680B22AEB525", x"CE7A24F350E280B6",
  61. x"882BFF0AA01A0B87", x"25610288924511C2", x"C71516C29C75D170",
  62. x"5199C29A52C9F059", x"C22F0A294A71F29F", x"EE371483714C02EA",
  63. x"A81FBD448F9E522F", x"4F644C92E192DFED", x"1AFA9A66A6DF92AE",
  64. x"B3C1CC715CB879D8", x"19D032E64AB0BD8B", x"3CFAA7A7DC8720DC",
  65. x"B7265F7F447AC6F3", x"9DB73B3C0D163F54", x"8181B65BABF4A975",
  66. x"93C9B64042EAA240", x"5570530829705592", x"8638809E878787A0",
  67. x"41B9A79AF79AC208", x"7A9BE42F2009A892", x"29038D56BA6D2745",
  68. x"5495C6ABF1E5DF51", x"AE13DBD561488933", x"024D1FFA8904E389",
  69. x"D1399712F99BF02E", x"14C1D7C1CFFEC79E", x"1DE5279DAE3BED6F",
  70. x"E941A33F85501303", x"DA99DBBC9A03F379", x"B7FC92F91D8E92E9",
  71. x"AE8E5CAA3CA04E85", x"9CC62DF43B6EED74", x"D863DBB5C59A91A0",
  72. x"A1AB2190545B91D7", x"0875041E64C570F7", x"5A594528BEBEF1CC",
  73. x"FCDB3291DE21F0C0", x"869EFD7F9F265A09");
  74. constant c_permutation_operation_known_answers_keys : t_array(0 to 31) :=
  75. (x"1046913489980131", x"1007103489988020", x"10071034C8980120",
  76. x"1046103489988020", x"1086911519190101", x"1086911519580101",
  77. x"5107B01519580101", x"1007B01519190101", x"3107915498080101",
  78. x"3107919498080101", x"10079115B9080140", x"3107911598080140",
  79. x"1007D01589980101", x"9107911589980101", x"9107D01589190101",
  80. x"1007D01598980120", x"1007940498190101", x"0107910491190401",
  81. x"0107910491190101", x"0107940491190401", x"19079210981A0101",
  82. x"1007911998190801", x"10079119981A0801", x"1007921098190101",
  83. x"100791159819010B", x"1004801598190101", x"1004801598190102",
  84. x"1004801598190108", x"1002911598100104", x"1002911598190104",
  85. x"1002911598100201", x"1002911698100101");
  86. constant c_permutation_operation_known_answers_cipher : t_array(0 to 31) :=
  87. (x"88D55E54F54C97B4", x"0C0CC00C83EA48FD", x"83BC8EF3A6570183",
  88. x"DF725DCAD94EA2E9", x"E652B53B550BE8B0", x"AF527120C485CBB0",
  89. x"0F04CE393DB926D5", x"C9F00FFC74079067", x"7CFD82A593252B4E",
  90. x"CB49A2F9E91363E3", x"00B588BE70D23F56", x"406A9A6AB43399AE",
  91. x"6CB773611DCA9ADA", x"67FD21C17DBB5D70", x"9592CB4110430787",
  92. x"A6B7FF68A318DDD3", x"4D102196C914CA16", x"2DFA9F4573594965",
  93. x"B46604816C0E0774", x"6E7E6221A4F34E87", x"AA85E74643233199",
  94. x"2E5A19DB4D1962D6", x"23A866A809D30894", x"D812D961F017D320",
  95. x"055605816E58608F", x"ABD88E8B1B7716F1", x"537AC95BE69DA1E1",
  96. x"AED0F6AE3C25CDD8", x"B3E35A5EE53E7B8D", x"61C79C71921A2EF8",
  97. x"E2F5728F0995013C", x"1AEAC39A61F0A464");
  98. constant c_substitution_table_test_keys : t_array(0 to 18) :=
  99. (x"7CA110454A1A6E57", x"0131D9619DC1376E", x"07A1133E4A0B2686",
  100. x"3849674C2602319E", x"04B915BA43FEB5B6", x"0113B970FD34F2CE",
  101. x"0170F175468FB5E6", x"43297FAD38E373FE", x"07A7137045DA2A16",
  102. x"04689104C2FD3B2F", x"37D06BB516CB7546", x"1F08260D1AC2465E",
  103. x"584023641ABA6176", x"025816164629B007", x"49793EBC79B3258F",
  104. x"4FB05E1515AB73A7", x"49E95D6D4CA229BF", x"018310DC409B26D6",
  105. x"1C587F1C13924FEF");
  106. constant c_substitution_table_test_plain : t_array(0 to 18) :=
  107. (x"01A1D6D039776742", x"5CD54CA83DEF57DA", x"0248D43806F67172",
  108. x"51454B582DDF440A", x"42FD443059577FA2", x"059B5E0851CF143A",
  109. x"0756D8E0774761D2", x"762514B829BF486A", x"3BDD119049372802",
  110. x"26955F6835AF609A", x"164D5E404F275232", x"6B056E18759F5CCA",
  111. x"004BD6EF09176062", x"480D39006EE762F2", x"437540C8698F3CFA",
  112. x"072D43A077075292", x"02FE55778117F12A", x"1D9D5C5018F728C2",
  113. x"305532286D6F295A");
  114. constant c_substitution_table_test_cipher : t_array(0 to 18) :=
  115. (x"690F5B0D9A26939B", x"7A389D10354BD271", x"868EBB51CAB4599A",
  116. x"7178876E01F19B2A", x"AF37FB421F8C4095", x"86A560F10EC6D85B",
  117. x"0CD3DA020021DC09", x"EA676B2CB7DB2B7A", x"DFD64A815CAF1A0F",
  118. x"5C513C9C4886C088", x"0A2AEEAE3FF4AB77", x"EF1BF03E5DFA575A",
  119. x"88BF0DB6D70DEE56", x"A1F9915541020B56", x"6FBF1CAFCFFD0556",
  120. x"2F22E49BAB7CA1AC", x"5A6B612CC26CCE4A", x"5F4C038ED12B2E41",
  121. x"63FAC0D034D9F793");
  122. signal s_reset : std_logic := '0';
  123. signal s_clk : std_logic := '0';
  124. signal s_start : std_logic := '0';
  125. signal s_mode : std_logic := '0';
  126. signal s_key : std_logic_vector(0 to 63) := (others => '0');
  127. signal s_iv : std_logic_vector(0 to 63) := (others => '0');
  128. signal s_datain : std_logic_vector(0 to 63) := (others => '0');
  129. signal s_validin : std_logic := '0';
  130. signal s_ready : std_logic := '0';
  131. signal s_dataout : std_logic_vector(0 to 63);
  132. signal s_validout : std_logic;
  133. component cbcdes is
  134. port (
  135. reset_i : in std_logic;
  136. clk_i : in std_logic;
  137. mode_i : in std_logic;
  138. start_i : in std_logic;
  139. iv_i : in std_logic_vector(0 to 63);
  140. key_i : in std_logic_vector(0 TO 63);
  141. data_i : in std_logic_vector(0 TO 63);
  142. valid_i : in std_logic;
  143. ready_o : out std_logic;
  144. data_o : out std_logic_vector(0 TO 63);
  145. valid_o : out std_logic
  146. );
  147. end component cbcdes;
  148. begin
  149. s_reset <= '1' after 100 ns;
  150. s_clk <= not(s_clk) after 10 ns;
  151. teststimuliP : process is
  152. begin
  153. -- ENCRYPTION TESTS
  154. s_start <= '0';
  155. s_mode <= '0';
  156. s_validin <= '0';
  157. s_iv <= (others => '0');
  158. s_key <= x"0101010101010101";
  159. s_datain <= x"8000000000000000";
  160. -- Variable plaintext known answer test
  161. for index in c_variable_plaintext_known_answers'range loop
  162. wait until rising_edge(s_clk) and s_ready = '1';
  163. s_validin <= '1';
  164. s_start <= '1';
  165. if(index /= 0) then
  166. s_datain <= '0' & s_datain(0 to 62);
  167. end if;
  168. wait until rising_edge(s_clk);
  169. s_validin <= '0';
  170. s_start <= '0';
  171. end loop;
  172. wait until rising_edge(s_clk);
  173. s_start <= '0';
  174. s_mode <= '0';
  175. s_validin <= '0';
  176. s_iv <= (others => '0');
  177. s_key <= (others => '0');
  178. s_datain <= (others => '0');
  179. wait for 1 us;
  180. -- Inverse permutation known answer test
  181. s_key <= x"0101010101010101";
  182. for index in c_variable_plaintext_known_answers'range loop
  183. wait until rising_edge(s_clk) and s_ready = '1';
  184. s_validin <= '1';
  185. s_start <= '1';
  186. s_datain <= c_variable_plaintext_known_answers(index);
  187. wait until rising_edge(s_clk);
  188. s_validin <= '0';
  189. s_start <= '0';
  190. end loop;
  191. wait until rising_edge(s_clk);
  192. s_start <= '0';
  193. s_mode <= '0';
  194. s_validin <= '0';
  195. s_iv <= (others => '0');
  196. s_key <= (others => '0');
  197. s_datain <= (others => '0');
  198. wait for 1 us;
  199. -- Variable key known answer test
  200. s_key <= x"8000000000000000";
  201. for index in c_variable_key_known_answers'range loop
  202. wait until rising_edge(s_clk) and s_ready = '1';
  203. s_validin <= '1';
  204. s_start <= '1';
  205. if(index /= 0) then
  206. if(index = 7 or index = 14 or index = 21 or index = 28 or index = 35 or
  207. index = 42 or index = 49) then
  208. s_key <= "00" & s_key(0 to 61);
  209. else
  210. s_key <= '0' & s_key(0 to 62);
  211. end if;
  212. end if;
  213. wait until rising_edge(s_clk);
  214. s_validin <= '0';
  215. s_start <= '0';
  216. end loop;
  217. wait until rising_edge(s_clk);
  218. s_start <= '0';
  219. s_mode <= '0';
  220. s_validin <= '0';
  221. s_iv <= (others => '0');
  222. s_key <= (others => '0');
  223. s_datain <= (others => '0');
  224. wait for 1 us;
  225. -- Permutation operation known answer test
  226. s_datain <= x"0000000000000000";
  227. for index in c_permutation_operation_known_answers_keys'range loop
  228. wait until rising_edge(s_clk) and s_ready = '1';
  229. s_validin <= '1';
  230. s_start <= '1';
  231. s_key <= c_permutation_operation_known_answers_keys(index);
  232. wait until rising_edge(s_clk);
  233. s_validin <= '0';
  234. s_start <= '0';
  235. end loop;
  236. wait until rising_edge(s_clk);
  237. s_start <= '0';
  238. s_mode <= '0';
  239. s_validin <= '0';
  240. s_iv <= (others => '0');
  241. s_key <= (others => '0');
  242. s_datain <= (others => '0');
  243. wait for 1 us;
  244. -- Substitution table known answer test
  245. for index in c_substitution_table_test_keys'range loop
  246. wait until rising_edge(s_clk) and s_ready = '1';
  247. s_validin <= '1';
  248. s_start <= '1';
  249. s_key <= c_substitution_table_test_keys(index);
  250. s_datain <= c_substitution_table_test_plain(index);
  251. wait until rising_edge(s_clk);
  252. s_validin <= '0';
  253. s_start <= '0';
  254. end loop;
  255. wait until rising_edge(s_clk);
  256. -- DECRYPTION TESTS
  257. s_start <= '0';
  258. s_mode <= '0';
  259. s_validin <= '0';
  260. s_iv <= (others => '0');
  261. s_key <= (others => '0');
  262. s_datain <= (others => '0');
  263. wait for 1 us;
  264. -- Variable ciphertext known answer test
  265. s_key <= x"0101010101010101";
  266. for index in c_variable_plaintext_known_answers'range loop
  267. wait until rising_edge(s_clk) and s_ready = '1';
  268. s_mode <= '1';
  269. s_start <= '1';
  270. s_validin <= '1';
  271. s_datain <= c_variable_plaintext_known_answers(index);
  272. wait until rising_edge(s_clk);
  273. s_validin <= '0';
  274. s_start <= '0';
  275. s_mode <= '0';
  276. end loop;
  277. wait until rising_edge(s_clk);
  278. s_start <= '0';
  279. s_mode <= '0';
  280. s_validin <= '0';
  281. s_iv <= (others => '0');
  282. s_key <= (others => '0');
  283. s_datain <= (others => '0');
  284. wait for 1 us;
  285. -- Initial permutation known answer test
  286. s_key <= x"0101010101010101";
  287. s_datain <= x"8000000000000000";
  288. for index in c_variable_plaintext_known_answers'range loop
  289. wait until rising_edge(s_clk) and s_ready = '1';
  290. s_mode <= '1';
  291. s_start <= '1';
  292. s_validin <= '1';
  293. if(index /= 0) then
  294. s_datain <= '0' & s_datain(0 to 62);
  295. end if;
  296. wait until rising_edge(s_clk);
  297. s_validin <= '0';
  298. s_start <= '0';
  299. s_mode <= '0';
  300. end loop;
  301. wait until rising_edge(s_clk);
  302. s_start <= '0';
  303. s_mode <= '0';
  304. s_validin <= '0';
  305. s_iv <= (others => '0');
  306. s_key <= (others => '0');
  307. s_datain <= (others => '0');
  308. wait for 1 us;
  309. -- Variable key known answer test
  310. s_key <= x"8000000000000000";
  311. for index in c_variable_key_known_answers'range loop
  312. wait until rising_edge(s_clk) and s_ready = '1';
  313. s_mode <= '1';
  314. s_start <= '1';
  315. s_validin <= '1';
  316. s_datain <= c_variable_key_known_answers(index);
  317. if(index /= 0) then
  318. if(index = 7 or index = 14 or index = 21 or index = 28 or index = 35 or
  319. index = 42 or index = 49) then
  320. s_key <= "00" & s_key(0 to 61);
  321. else
  322. s_key <= '0' & s_key(0 to 62);
  323. end if;
  324. end if;
  325. wait until rising_edge(s_clk);
  326. s_validin <= '0';
  327. s_start <= '0';
  328. s_mode <= '0';
  329. end loop;
  330. wait until rising_edge(s_clk);
  331. s_start <= '0';
  332. s_mode <= '0';
  333. s_validin <= '0';
  334. s_iv <= (others => '0');
  335. s_key <= (others => '0');
  336. s_datain <= (others => '0');
  337. wait for 1 us;
  338. -- Permutation operation known answer test
  339. for index in c_permutation_operation_known_answers_keys'range loop
  340. wait until rising_edge(s_clk) and s_ready = '1';
  341. s_mode <= '1';
  342. s_start <= '1';
  343. s_validin <= '1';
  344. s_datain <= c_permutation_operation_known_answers_cipher(index);
  345. s_key <= c_permutation_operation_known_answers_keys(index);
  346. wait until rising_edge(s_clk);
  347. s_validin <= '0';
  348. s_start <= '0';
  349. s_mode <= '0';
  350. end loop;
  351. wait until rising_edge(s_clk);
  352. s_start <= '0';
  353. s_mode <= '0';
  354. s_validin <= '0';
  355. s_iv <= (others => '0');
  356. s_key <= (others => '0');
  357. s_datain <= (others => '0');
  358. wait for 1 us;
  359. -- Substitution table known answer test
  360. for index in c_substitution_table_test_keys'range loop
  361. wait until rising_edge(s_clk) and s_ready = '1';
  362. s_mode <= '1';
  363. s_start <= '1';
  364. s_validin <= '1';
  365. s_key <= c_substitution_table_test_keys(index);
  366. s_datain <= c_substitution_table_test_cipher(index);
  367. wait until rising_edge(s_clk);
  368. s_validin <= '0';
  369. s_start <= '0';
  370. s_mode <= '0';
  371. end loop;
  372. wait until rising_edge(s_clk);
  373. s_start <= '0';
  374. s_mode <= '0';
  375. s_validin <= '0';
  376. s_iv <= (others => '0');
  377. s_key <= (others => '0');
  378. s_datain <= (others => '0');
  379. wait;
  380. end process teststimuliP;
  381. testcheckerP : process is
  382. variable v_plaintext : std_logic_vector(0 to 63) := x"8000000000000000";
  383. begin
  384. report "# ENCRYPTION TESTS";
  385. report "# Variable plaintext known answer test";
  386. for index in c_variable_plaintext_known_answers'range loop
  387. wait until rising_edge(s_clk) and s_validout = '1';
  388. assert (s_dataout = c_variable_plaintext_known_answers(index))
  389. report "encryption error"
  390. severity error;
  391. end loop;
  392. report "# Inverse permutation known answer test";
  393. for index in c_variable_plaintext_known_answers'range loop
  394. wait until rising_edge(s_clk) and s_validout = '1';
  395. assert (s_dataout = v_plaintext)
  396. report "encryption error"
  397. severity error;
  398. v_plaintext := '0' & v_plaintext(0 to 62);
  399. end loop;
  400. report "# Variable key known answer test";
  401. for index in c_variable_key_known_answers'range loop
  402. wait until rising_edge(s_clk) and s_validout = '1';
  403. assert (s_dataout = c_variable_key_known_answers(index))
  404. report "encryption error"
  405. severity error;
  406. end loop;
  407. report "# Permutation operation known answer test";
  408. for index in c_permutation_operation_known_answers_cipher'range loop
  409. wait until rising_edge(s_clk) and s_validout = '1';
  410. assert (s_dataout = c_permutation_operation_known_answers_cipher(index))
  411. report "encryption error"
  412. severity error;
  413. end loop;
  414. report "# Substitution table known answer test";
  415. for index in c_substitution_table_test_cipher'range loop
  416. wait until rising_edge(s_clk) and s_validout = '1';
  417. assert (s_dataout = c_substitution_table_test_cipher(index))
  418. report "encryption error"
  419. severity error;
  420. end loop;
  421. report "# DECRYPTION TESTS";
  422. report "# Variable ciphertext known answer test";
  423. v_plaintext := x"8000000000000000";
  424. for index in c_variable_plaintext_known_answers'range loop
  425. wait until rising_edge(s_clk) and s_validout = '1';
  426. assert (s_dataout = v_plaintext)
  427. report "decryption error"
  428. severity error;
  429. v_plaintext := '0' & v_plaintext(0 to 62);
  430. end loop;
  431. report "# Initial permutation known answer test";
  432. for index in c_variable_plaintext_known_answers'range loop
  433. wait until rising_edge(s_clk) and s_validout = '1';
  434. assert (s_dataout = c_variable_plaintext_known_answers(index))
  435. report "decryption error"
  436. severity error;
  437. end loop;
  438. report "# Variable key known answer test";
  439. for index in c_variable_key_known_answers'range loop
  440. wait until rising_edge(s_clk) and s_validout = '1';
  441. assert (s_dataout = x"0000000000000000")
  442. report "decryption error"
  443. severity error;
  444. end loop;
  445. report "# Permutation operation known answer test";
  446. for index in c_permutation_operation_known_answers_keys'range loop
  447. wait until rising_edge(s_clk) and s_validout = '1';
  448. assert (s_dataout = x"0000000000000000")
  449. report "decryption error"
  450. severity error;
  451. end loop;
  452. report "# Substitution table known answer test";
  453. for index in c_substitution_table_test_cipher'range loop
  454. wait until rising_edge(s_clk) and s_validout = '1';
  455. assert (s_dataout = c_substitution_table_test_plain(index))
  456. report "decryption error"
  457. severity error;
  458. end loop;
  459. report "# Successfully passed all tests";
  460. wait;
  461. end process testcheckerP;
  462. i_cbcdes : cbcdes
  463. port map (
  464. reset_i => s_reset,
  465. clk_i => s_clk,
  466. start_i => s_start,
  467. mode_i => s_mode,
  468. key_i => s_key,
  469. iv_i => s_iv,
  470. data_i => s_datain,
  471. valid_i => s_validin,
  472. ready_o => s_ready,
  473. data_o => s_dataout,
  474. valid_o => s_validout
  475. );
  476. end architecture rtl;