{"id":111,"date":"2016-01-13T12:02:33","date_gmt":"2016-01-13T12:02:33","guid":{"rendered":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/?p=111"},"modified":"2016-07-05T13:03:44","modified_gmt":"2016-07-05T12:03:44","slug":"concepts-iv-c-element","status":"publish","type":"post","link":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/2016\/01\/13\/concepts-iv-c-element\/","title":{"rendered":"Concepts IV: C-Element"},"content":{"rendered":"<p><strong><span style=\"text-decoration: underline\">C-Element<\/span><\/strong><\/p>\n<p>Finally, after introducing the basics of concepts, we can now apply this to the design of logic gates. In this post, we will produce a very standard gate, a <em>C-Element<\/em>.<\/p>\n<p>A C-Element&#8217;s basic operation is that, when all the inputs to the gate are high, or 1, then the output will be set high. This output will remain high until all of the inputs are low, or 0, at which point the output will be set low.<\/p>\n<p>So let&#8217;s describe this using concepts!<\/p>\n<p><strong><span style=\"text-decoration: underline\">Concepts<\/span><\/strong><\/p>\n<p>For this example, the C-Element we describe will be a 2 input gate. These will be\u00a0<strong>a\u00a0<\/strong>and\u00a0<strong>b<\/strong>. \u00a0The single output will be <strong>c.\u00a0<\/strong><\/p>\n<p>So let&#8217;s start with describing what causes the output to go high:<\/p>\n<p><strong>outputRise\u00a0= \u00a0a+ \u21dd c+ \u22c4 b+<\/strong> <strong>\u21dd c+<\/strong><\/p>\n<p>This concept will cause the output,\u00a0<strong>c<\/strong>, to go high when both the inputs,\u00a0<strong>a\u00a0<\/strong>and <strong>b,\u00a0<\/strong>are high.<\/p>\n<p>Next, let&#8217;s describe what causes the output to go low:<\/p>\n<p><strong>outputFall = \u00a0a- \u21dd c- \u22c4 b-<\/strong>\u00a0<strong>\u21dd c-<\/strong><\/p>\n<p>Similar to the previous concept,\u00a0<strong>outputFall<\/strong> will cause\u00a0<strong>c<\/strong> to go low only when both\u00a0<strong>a\u00a0<\/strong>and\u00a0<strong>b<\/strong> are low.<\/p>\n<p>And these two concepts describe the operation of a C-element. Let&#8217;s combine them, and then we can Convert them to an STG, giving us the following:<\/p>\n<p><strong>C-Element = outputRise\u00a0\u22c4 outputFall<\/strong><\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element1.png\" rel=\"attachment wp-att-112\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-112 size-full\" src=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element1.png\" alt=\"C-Element1\" width=\"1400\" height=\"442\" srcset=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element1.png 1400w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element1-300x95.png 300w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element1-768x242.png 768w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element1-1024x323.png 1024w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/a><\/p>\n<p>In this state however, this STG is not particularly useful, as there are no initial states, and therefore it cannot be simulated or synthesized. Thus, let&#8217;s add an initial state concept:<\/p>\n<p><strong>initialState = initialise(a, 0)\u00a0\u22c4 initialise(b, 0)\u00a0\u22c4 initialise(c, 0)<br \/>\nCElement \u00a0=\u00a0outputRise\u00a0\u22c4 outputFall\u00a0\u22c4 initialState<\/strong><\/p>\n<p>By setting all the initial states to 0, we can then test this STG using <em>Workcraft<b>,\u00a0<\/b><\/em>and see that the STG (shown below) operates as a C-element.<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element2.png\" rel=\"attachment wp-att-113\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-113 size-full\" src=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element2.png\" alt=\"C-Element2\" width=\"1400\" height=\"442\" srcset=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element2.png 1400w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element2-300x95.png 300w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element2-768x242.png 768w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2016\/01\/C-Element2-1024x323.png 1024w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/a><\/p>\n<p>This STG could also be tested by setting the initial states to any combination. The C-Element would still act as expected.<\/p>\n<p><strong><span style=\"text-decoration: underline\">Some reuse<\/span><\/strong><\/p>\n<p>It is possible to describe a C-Element using predefined gates. If we break down some of the concepts used above we find some interesting points.<\/p>\n<p>If we take the interactions of just one input signal and the output signal from the above concepts we get the following:<\/p>\n<p><strong>input1 = a+\u00a0\u21dd c+\u00a0\u22c4 a-\u00a0\u21dd c-<\/strong><\/p>\n<p>This concept is actually exactly the same as a gate we have previously defined: <a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/2015\/09\/30\/designing-asynchronous-logic-gates-using-behavioural-concepts-i-a-buffer-2\/\">a buffer<\/a>. Thus, a C-Element can actually be described using these:<\/p>\n<p><strong>CElement = buffer(a, b)\u00a0\u22c4 buffer(b, c)\u00a0\u22c4 initialState<\/strong><\/p>\n<p>The initial state must be included in order for the resulting STG to be usable in further operations.<\/p>\n<p><span style=\"text-decoration: underline\"><strong>Finally<\/strong><\/span><\/p>\n<p>This blog post has finally explained\u00a0how concepts can be used to design a logic gate, albeit a simple one. This includes describing it&#8217;s operations in terms of the interactions of the input and output signals, or using predefined concepts, particularly a buffer.<\/p>\n<p>The next post will continue in the effort to define logic gates using behavioural concepts, the next being an <em><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/2016\/07\/05\/concepts-v-set-reset-latch\/\">Set-Reset Latch<\/a>.\u00a0<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>C-Element Finally, after introducing the basics of concepts, we can now apply this to the design of logic gates. In this post, we will produce a very standard gate, a C-Element. A C-Element&#8217;s basic operation is that, when all the inputs to the gate are high, or 1, then the output will be set high. &hellip; <a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/2016\/01\/13\/concepts-iv-c-element\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Concepts IV: C-Element<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6010,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,9,2,6],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-asynchronous","category-celement","category-concepts","category-logic-gate"],"_links":{"self":[{"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/users\/6010"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":4,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":135,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/posts\/111\/revisions\/135"}],"wp:attachment":[{"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}