{"id":1278,"date":"2021-11-05T12:14:31","date_gmt":"2021-11-05T12:14:31","guid":{"rendered":"https:\/\/dsd.webs.upv.es\/?p=1278"},"modified":"2022-10-26T08:09:24","modified_gmt":"2022-10-26T08:09:24","slug":"realizacion-de-soluciones-segmentadas-ii","status":"publish","type":"post","link":"https:\/\/dsd.webs.upv.es\/?p=1278","title":{"rendered":"Realizaci\u00f3n de soluciones segmentadas II"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"paso-2-modificacion-de-la-latencia\">Paso 2: Modificaci\u00f3n de la latencia<\/h2>\n\n\n<style>\n       .errordiv { padding:10px; margin:10px; border: 1px solid #555555;color: #000000;background-color: #f8f8f8; width:500px; }#advanced_iframe {visibility:visible;opacity:1;vertical-align:top;}.ai-info-bottom-iframe { position: fixed; z-index: 10000; bottom:0; left: 0; margin: 0px; text-align: center; width: 100%; background-color: #ff9999; padding-left: 5px;padding-bottom: 5px; border-top: 1px solid #aaa } a.ai-bold {font-weight: bold;}#ai-layer-div-advanced_iframe p {height:100%;margin:0;padding:0}<\/style><script type=\"text\/javascript\">var ai_iframe_width_advanced_iframe = 0;var ai_iframe_height_advanced_iframe = 0;function aiReceiveMessageadvanced_iframe(event) {  aiProcessMessage(event,\"advanced_iframe\", \"true\",\"\",\"false\",\"false\");}if (window.addEventListener) {  window.addEventListener(\"message\", aiReceiveMessageadvanced_iframe);} else if (el.attachEvent)  {  el.attachEvent(\"message\", aiReceiveMessageadvanced_iframe);}var aiOnloadScrollTop=\"true\";var aiShowDebug=false;\n\t\tif (typeof aiReadyCallbacks === 'undefined') {\n\t\t\tvar aiReadyCallbacks = [];\n\t\t} else if (!(aiReadyCallbacks instanceof Array)) {\n\t\t\tvar aiReadyCallbacks = [];\n\t\t}    function aiShowIframeId(id_iframe) { jQuery(\"#\"+id_iframe).css(\"visibility\", \"visible\");    }    function aiResizeIframeHeight(height) { aiResizeIframeHeight(height,advanced_iframe); }    function aiResizeIframeHeightId(height,width,id) {aiResizeIframeHeightById(id,height);}<\/script><iframe id=\"advanced_iframe\"  name=\"advanced_iframe\"  src=\"https:\/\/media.upv.es\/player\/embed.html?id=9c0231d0-3e2e-11ec-8a9e-a18d1c24491a\"  width=\"100%\"  height=\"600\"  frameborder=\"0\"  border=\"0\"  allowtransparency=\"true\"  loading=\"lazy\"  style=\";border-width: 0px;;border: none;;width:100%;;height:600px;\" ><\/iframe><script type=\"text\/javascript\">var ifrm_advanced_iframe = document.getElementById(\"advanced_iframe\");var hiddenTabsDoneadvanced_iframe = false;\nfunction resizeCallbackadvanced_iframe() {}<\/script><script type=\"text\/javascript\"><\/script><p style=\"display:block !important; visibility:visible !important;margin: -18px 14px 0 0;padding-left: 3px;padding-top:3px;background: white; overflow: hidden; position: relative; line-height:15px;width: fit-content;\"><small style=\"display:block !important;visibility:visible !important\">powered by Advanced iFrame<\/small><\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"718\" src=\"https:\/\/dsd.webs.upv.es\/wp-content\/uploads\/2021\/11\/image-1.png\" alt=\"\" class=\"wp-image-1279\" srcset=\"https:\/\/dsd.webs.upv.es\/wp-content\/uploads\/2021\/11\/image-1.png 924w, https:\/\/dsd.webs.upv.es\/wp-content\/uploads\/2021\/11\/image-1-300x233.png 300w, https:\/\/dsd.webs.upv.es\/wp-content\/uploads\/2021\/11\/image-1-768x597.png 768w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">El resultado de este proceso de modificaci\u00f3n del ASM, transcrito a SystemVerilog es el siguiente:<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:verilog decode:true \" >module sed2(\n\tCLK,\n\tSTART,\n\tRESET,\n\tX,\n\tFIN,\n\tCOUNT\n);\n\n\ninput wire\tCLK;\ninput wire\tSTART;\ninput wire\tRESET;\ninput wire\t[7:0] X;\noutput logic\tFIN;\noutput logic\t[3:0] COUNT;\n\nenum logic [2:0] {idle,comp,inc,No_inc,finali} state;\nlogic [3:0] Cont;\n\n\nlogic start;\nlogic [3:0] Sal;\nlogic [8:0] Reg;\nlogic [8:0] X_reg;\n\nassign start=START;\n\nalways_ff @(posedge CLK, negedge RESET)\nif (!RESET)\n    begin\n        Reg&lt;='0;\n        Cont&lt;='0;\n        Sal&lt;='0;\n        X_reg&lt;='0;\n        state&lt;=idle;\n    end\nelse\ncase (state)\n    idle: if (start)\n            begin\n                Sal&lt;='0;\n                Reg&lt;=8'b1;\n                X_reg&lt;=X;\n                Cont&lt;='0;\n                state&lt;=comp;\n            end\n          else\n            state&lt;=idle;\n\n    comp:\n        begin\n            Cont&lt;=Cont+1;\n            if (Reg&gt;X)\n                state&lt;=No_inc;\n            else\n                state&lt;=inc;\n        end\n    inc:\n        begin\n            Sal&lt;=Sal+1;\n            if (Cont==15)\n                state&lt;=finali;\n            else\n                begin\n                    Reg&lt;=(Sal+2)**2;\n                    state&lt;=comp;\n                end\n        end\n    No_inc:\n        begin\n            Sal&lt;=Sal;\n            if (Cont==15)\n                state&lt;=finali;\n            else\n                state&lt;=comp;\n        end\n    finali:\n        if (!start)\n            state&lt;=idle;  \n        else\n            state&lt;=finali;     \nendcase\nassign COUNT=Sal;\nalways_comb\ncase (state)\n    finali: FIN=1'b1;\n    default: FIN=1'b0;\nendcase\nendmodule<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Paso 2: Modificaci\u00f3n de la latencia El resultado de este proceso de modificaci\u00f3n del ASM, transcrito a SystemVerilog es el siguiente:<\/p>\n","protected":false},"author":2,"featured_media":1279,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57,27],"tags":[25,59],"class_list":["post-1278","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asm","category-diseno","tag-asm","tag-latencia"],"featured_image_src":"https:\/\/dsd.webs.upv.es\/wp-content\/uploads\/2021\/11\/image-1.png","author_info":{"display_name":"ralfgad","author_link":"https:\/\/dsd.webs.upv.es\/?author=2"},"_links":{"self":[{"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=\/wp\/v2\/posts\/1278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1278"}],"version-history":[{"count":2,"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=\/wp\/v2\/posts\/1278\/revisions"}],"predecessor-version":[{"id":1449,"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=\/wp\/v2\/posts\/1278\/revisions\/1449"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=\/wp\/v2\/media\/1279"}],"wp:attachment":[{"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dsd.webs.upv.es\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}