{"id":601,"date":"2015-10-17T08:38:36","date_gmt":"2015-10-17T08:38:36","guid":{"rendered":"http:\/\/coolt.ch\/notizen\/?p=601"},"modified":"2015-11-12T16:14:05","modified_gmt":"2015-11-12T16:14:05","slug":"textbasiertes-textscript","status":"publish","type":"post","link":"https:\/\/coolt.ch\/notizen\/textbasiertes-textscript\/","title":{"rendered":"Textbasiertes Testing: Aufbau Inputfile"},"content":{"rendered":"<p><strong>File mit Testwerten<\/strong><\/p>\n<pre class=\"lang:sh decode:true\">1 00000001 00000001 00000002 0\r\n1 FFFFFFFF FFFFFFFF 00000000 1\r\n2 00000004 00000005 FFFFFFFE 1\r\n2 FFFFFFFF FFFFFFFF 00000000 0\r\n\r\nwr_ram 0001 00F1  11\r\nwr_ram 0002 0015  11\r\nwr_rm  0002 F632  10\r\n\r\nrd_ram 0001 00F1  99\r\nrd_ram 0002 F615  99\r\n\r\nreset 00 00 00 00 00 00 00 00 00\r\ncheck 00 00 00 00 00 00 00 00 00\r\nsingl 13 01 00 00 00 00 00 00 00\r\ncheck 13 00 00 00 00 00 00 00 00<\/pre>\n<p>Die Daten werden entweder als<strong> string<\/strong>\u00a0 mit der Funktion <span class=\"lang:sh decode:true  crayon-inline \">read(&lt;von&gt;,&lt;zu&gt;) <\/span>\u00a0oder als <strong>Hex<\/strong>-Zahl <span class=\"lang:sh decode:true  crayon-inline \">hread(&lt;von&gt;,&lt;zu&gt;)<\/span>\u00a0 eingelesen (vgl. <a href=\"http:\/\/coolt.ch\/notizen\/std_logic_textio-vhd\/\">std_logic_textio.vhd<\/a>).<\/p>\n<p><strong>Richtige Zahlenwerte eintragen<\/strong><br \/>\nWeil die Zahlen als Hex interpretiert werden, entspricht eine<span class=\"lang:sh decode:true  crayon-inline \"> 0<\/span>\u00a0 <strong>4 Bits<\/strong>. Und die Zahl <span class=\"lang:sh decode:true  crayon-inline \">10<\/span>\u00a0 entspricht dem <strong>dezimalen Wert 15<\/strong>.<\/p>\n<p>Aus diesem Grund enstehen folgende Anzahl Bits:<br \/>\n<span class=\"lang:sh decode:true  crayon-inline \">00<\/span>\u00a0 im File\u00a0\u00a0\u00a0 -&gt;\u00a0\u00a0\u00a0\u00a0\u00a0 <span class=\"lang:sh decode:true  crayon-inline \">std_logic_vector(7 downto 0)<\/span>\u00a0 beim Einlesen in der Testbench<br \/>\n<span class=\"lang:sh decode:true  crayon-inline \">0 <\/span>\u00a0 im File\u00a0\u00a0\u00a0 -&gt;\u00a0\u00a0\u00a0\u00a0 <span class=\"lang:sh decode:true  crayon-inline \">std_logic_vector(3 downto 0)<\/span><br \/>\n<span class=\"lang:sh decode:true  crayon-inline \">7 <\/span>\u00a0im File\u00a0\u00a0\u00a0\u00a0 -&gt;\u00a0\u00a0\u00a0\u00a0 <span class=\"lang:sh decode:true  crayon-inline \">std_logic_vector(3 downto 0)<\/span><br \/>\n<span class=\"lang:sh decode:true  crayon-inline \">0F5<\/span>\u00a0 im File\u00a0 -&gt; \u00a0 \u00a0 <span class=\"lang:sh decode:true  crayon-inline \">std_logic_vector(11 downto 0)<\/span><\/p>\n<p><strong><br \/>\nAufbau der Token<br \/>\n<\/strong>Die Token k\u00f6nnen alle vom selben Datentyp sein und \u00fcber alle Testtyps die gleiche Struktur beinhalten. Das vereinfacht ihre Verarbeitung.<strong><br \/>\n<\/strong><\/p>\n<pre class=\"lang:sh decode:true\">&lt;Testtyp&gt;  &lt;Wert1&gt;   &lt;Wert2&gt;    &lt;Ergebnis_Addition&gt; &lt;Ueberlaufbit&gt;\r\n1          00000001  00000001   00000002             0<\/pre>\n<p>Im zweiten Beispiel h\u00e4ngt die Funktion der Token von dem Testtyp ab.<\/p>\n<pre class=\"lang:sh decode:true\">&lt;Testtyp&gt;  &lt;adress&gt;  &lt;value&gt;   &lt;byte enable&gt;\r\nwr_ram     0001      00F1      11<\/pre>\n<pre class=\"lang:sh decode:true\">&lt;Testtyp&gt;  &lt;address&gt;  &lt;result&gt;  &lt;byte enable&gt;\r\nrd_ram     0001       00F1      01<\/pre>\n<p><strong>Tipp: Fixe Tokenstruktur mit Auslassungen<\/strong><\/p>\n<pre class=\"lang:sh decode:true\">singl 14 01 <strong>00 00 00 00 00 00 00   \/\/ verwerfen<\/strong>\r\npolyp 13 01 14 01 15 01 14 00 02<\/pre>\n<p>Zum Decodieren wird es schwer, wenn unterschiedliche Verarbeitungs-Strukturen je nach Testtyp aufgebaut werden m\u00fcssen.<\/p>\n<p>Zu empfehlen ist, dass <strong>alle Test-Werte in einer Linie<\/strong> stehen und <strong>beim Verarbeiten<\/strong> gewisse Token <strong>verworfen<\/strong> werden.<\/p>\n<p><a href=\"http:\/\/coolt.ch\/notizen\/vhdl-textbasierte-test\/\">Umsetzung in VHDL<\/a><br \/>\n<strong><br \/>\n<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>File mit Testwerten 1 00000001 00000001 00000002 0 1 FFFFFFFF FFFFFFFF 00000000 1 2 00000004 00000005 FFFFFFFE 1 2 FFFFFFFF FFFFFFFF 00000000 0 wr_ram 0001 00F1 11 wr_ram 0002 0015 11 wr_rm 0002 F632 10 rd_ram 0001 00F1 99 rd_ram 0002 F615 99 reset 00 00 00 00 00 00 00 00 00 check 00 &hellip; <a href=\"https:\/\/coolt.ch\/notizen\/textbasiertes-textscript\/\" class=\"more-link\"><span class=\"screen-reader-text\">Textbasiertes Testing: Aufbau Inputfile<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[35,60],"tags":[43],"_links":{"self":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/601"}],"collection":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/comments?post=601"}],"version-history":[{"count":7,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/601\/revisions"}],"predecessor-version":[{"id":940,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/posts\/601\/revisions\/940"}],"wp:attachment":[{"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/media?parent=601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/categories?post=601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coolt.ch\/notizen\/wp-json\/wp\/v2\/tags?post=601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}