{"id":192,"date":"2018-04-11T09:03:02","date_gmt":"2018-04-11T09:03:02","guid":{"rendered":"http:\/\/ferrywahyuwibowo.my.id\/?p=192"},"modified":"2018-04-12T04:20:28","modified_gmt":"2018-04-12T04:20:28","slug":"2-1-multiplexer-using-vhdl","status":"publish","type":"post","link":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/192\/2-1-multiplexer-using-vhdl\/","title":{"rendered":"2-1 Multiplexer Using VHDL"},"content":{"rendered":"<p>A multiplexer connects data from 2n inputs to the outputs, where n is a number of inputs selector. Generally, the multiplexer is written as mux and it is a digital switch. Example of this device is shown in Figure 1.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/ferrywahyu.files.wordpress.com\/2012\/01\/mux21.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-274\" title=\"mux21\" src=\"https:\/\/ferrywahyu.files.wordpress.com\/2012\/01\/mux21.jpg?w=468&amp;h=242\" alt=\"\" width=\"468\" height=\"242\" data-attachment-id=\"274\" data-permalink=\"https:\/\/ferrywahyu.wordpress.com\/2012\/01\/28\/rangkaian-multiplekser-2-1-menggunakan-vhdl-berbasis-fpga-asic\/mux21\/\" data-orig-file=\"https:\/\/ferrywahyu.files.wordpress.com\/2012\/01\/mux21.jpg?w=468&amp;h=242\" data-orig-size=\"865,448\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"mux21\" data-image-description=\"\" data-medium-file=\"https:\/\/ferrywahyu.files.wordpress.com\/2012\/01\/mux21.jpg?w=468&amp;h=242?w=300\" data-large-file=\"https:\/\/ferrywahyu.files.wordpress.com\/2012\/01\/mux21.jpg?w=468&amp;h=242?w=468\" \/><\/a>Figure 1. Mux 2-1<\/p>\n<p>VHDL code for the 2-1 Mux as written below,<\/p>\n<p><em>LIBRARY ieee ;<\/em><\/p>\n<p><em>USE ieee.std_logic_1164.all ;<\/em><\/p>\n<p><em>ENTITY mux21 IS<\/em><\/p>\n<p><em>PORT (\u00a0 w0, w1, <\/em>s\u00a0 :<em> IN \u00a0 STD_LOGIC ;<\/em><\/p>\n<p>f\u00a0 :<em> OUT \u00a0 STD_LOGIC ) ;<\/em><\/p>\n<p><em>END;<\/em><\/p>\n<p><em>ARCHITECTURE <\/em>watak<em> OF mux21 IS<\/em><\/p>\n<p><em>BEGIN<\/em><\/p>\n<p><em>WITH s SELECT<\/em><\/p>\n<p><em>f &lt;=\u00a0 w0 WHEN \u20180\u2019,<\/em><\/p>\n<p><em>w1 WHEN OTHERS ;<\/em><\/p>\n<p><em>END Behavior ;<\/em><\/p>\n<p>or it could be written as other design using VHDL code as below,<\/p>\n<p><em>LIBRARY <\/em>ieee<em> ;<\/em><\/p>\n<p><em>USE <\/em>ieee<em>.std_logic_1164.all ;<\/em><\/p>\n<p><em>ENTITY mux21 IS<\/em><\/p>\n<p><em>PORT (w0, w1, <\/em>s :<em> IN\u00a0 STD_LOGIC ;<\/em><\/p>\n<p>f :<em> \u00a0 OUT\u00a0 STD_LOGIC ) ;<\/em><\/p>\n<p><em>END;<\/em><\/p>\n<p><em>ARCHITECTURE <\/em>watak<em> OF mux21 IS<\/em><\/p>\n<p><em>BEGIN<\/em><\/p>\n<p><em>f &lt;= w0 WHEN s = \u20180\u2019 ELSE w1 ;<\/em><\/p>\n<p><em>END;<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A multiplexer connects data from 2n inputs to the outputs, where n is a number of inputs selector. Generally, the multiplexer is written as mux and it is a digital switch. Example of this device is shown in Figure 1. Figure 1. Mux 2-1 VHDL code for the 2-1 Mux as written below, LIBRARY ieee [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":193,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[7,16,13,27,32,31,14,15,26,10,8],"_links":{"self":[{"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/posts\/192"}],"collection":[{"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":3,"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/posts\/192\/revisions\/205"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/media\/193"}],"wp:attachment":[{"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ferrywahyuwibowo.my.id\/index.php\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}