{"id":13,"date":"2015-09-30T12:06:51","date_gmt":"2015-09-30T11:06:51","guid":{"rendered":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/?p=13"},"modified":"2015-10-22T10:14:24","modified_gmt":"2015-10-22T09:14:24","slug":"designing-asynchronous-logic-gates-using-behavioural-concepts-i-a-buffer-2","status":"publish","type":"post","link":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/2015\/09\/30\/designing-asynchronous-logic-gates-using-behavioural-concepts-i-a-buffer-2\/","title":{"rendered":"Concepts I: A buffer"},"content":{"rendered":"<p><strong><span style=\"text-decoration: underline\">A Buffer<\/span><\/strong><\/p>\n<p>In this post, we will discuss\u00a0one of the most simple logic gates, a <em>buffer<\/em>.<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer_schematic.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-37 size-medium\" src=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer_schematic-300x92.png\" alt=\"buffer_schematic\" width=\"300\" height=\"92\" srcset=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer_schematic-300x92.png 300w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer_schematic-1024x315.png 1024w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer_schematic.png 1400w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>A buffer takes an input signal, and outputs a signal in the same state as the input signal, the output simply follows the input. For example, if the input signal changes from 0 to 1, the output will eventually change from 0 to 1. We say the output changes \u2018eventually\u2019 because the output changes after some unknown delay. It is possible for the input to change from 0 to 1, and then back to 0 very quickly, before we see any changes on the output. But intuitively, we want to be able to say that if the input transitions from 0 to 1, then stays 1 long enough, the output will follow and also transition to 1.<\/p>\n<p>So how can we design\u00a0these using concepts? We need to describe the causal relationship between the input and output; what occurs in the input to cause a transition in\u00a0the output? For a buffer, this is when a signal transition occurs on the input, this needs to be reflected on the output.\u00a0 This\u00a0can be described as:<\/p>\n<p><strong>buffer(in, out) = in+ <\/strong><strong>\u21dd out+ <\/strong><strong>\u22c4 in- <\/strong><strong>\u21dd out-<\/strong><\/p>\n<p>There are some operators to discuss here:<\/p>\n<p>\u21dd &#8211; Shows the causal relationship<br \/>\n\u22c4\u00a0\u00a0&#8211; The composition operator<\/p>\n<p>This concept therefore implies that <strong>in+<\/strong> causes <strong>out+<\/strong>, this is composed with<strong> in-<\/strong> causing <strong>out-<\/strong>.\u00a0 This covers all the operations of the buffer.<\/p>\n<p>But now, how does this turn into a Signal Transition Graph, which we can simulate, verify and test to ensure it works correctly? This is performed using an algorithm:<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer0.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-42 size-large\" src=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer0-1024x334.png\" alt=\"Buffer0\" width=\"474\" height=\"155\" srcset=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer0-1024x334.png 1024w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer0-300x98.png 300w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer0.png 1400w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>First of all, the algorithm takes the list of concepts and finds places one of these cycle\u00a0for each individual signal. This is to keep with the property of <em>consistency<\/em>, where positive (<strong>+<\/strong>) and negative (<strong>&#8211;<\/strong>) transitions of each signal must always alternate. This is also in-keeping with the possibility for a signal to transition one way and back quickly without affecting the others, as with the example of the input transitioning high and then low before the output changes.<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-45 size-large\" src=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer1-1024x334.png\" alt=\"buffer1\" width=\"474\" height=\"155\" srcset=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer1-1024x334.png 1024w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer1-300x98.png 300w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/buffer1.png 1400w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>Next, the algorithm uses the first concept, <strong>in+ <\/strong><strong>\u21dd<\/strong><strong> out+<\/strong>, to show this causality in the STG. This concept shows how the input rising causes the output to rise, so this is viewed in an STG by connecting the <strong>in_1<\/strong> place, which shows when the input has transitioned high, to the transition of <strong>out+<\/strong>. This is done using an arc\u00a0commonly known as a read-arc. This is because a one way arc connecting these STG components would mean that when <strong>out+<\/strong> occurs, a token in <strong>in_1<\/strong> is consumed, blocking <strong>in-<\/strong> from being enabled. A read-arc allows <strong>out+<\/strong> to simply check for a token in <strong>in_1<\/strong> for it to occur without consuming it.<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-48 size-large\" src=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer2-1024x376.png\" alt=\"Buffer2\" width=\"474\" height=\"174\" srcset=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer2-1024x376.png 1024w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer2-300x110.png 300w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/Buffer2.png 1400w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>In the final step for designing a buffer, another read arc is used which represents the concept of <strong>in- <\/strong><strong>\u21dd<\/strong><strong> out<\/strong>-, connecting <strong>in_0<\/strong> place with the <strong>out-<\/strong> transition. This conversion of a concept to an STG is now complete.<\/p>\n<p>Note that in the above STGs we assume that all signals are initialised to 0.\u00a0 In a later blog post we will see how to use concepts to specify initial states of all signals in a compositional manner.<\/p>\n<p><strong><span style=\"text-decoration: underline\">Reuse<\/span><\/strong><\/p>\n<p>Now we have defined a buffer, we can reuse this. As said earlier in this post, a concept can be defined as several concepts. Therefore, let use an example of a circuit which uses buffers.<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/double_buffer_schematic.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-40 size-large\" src=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/double_buffer_schematic-1024x257.png\" alt=\"double_buffer_schematic\" width=\"474\" height=\"119\" srcset=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/double_buffer_schematic-1024x257.png 1024w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/double_buffer_schematic-300x75.png 300w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/double_buffer_schematic.png 1400w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><\/p>\n<p>This circuit can be produced from the following concept:<\/p>\n<p><strong>doubleBuffer = buffer(a,b) <\/strong><strong>\u22c4<\/strong><strong> buffer(b,c)<\/strong><\/p>\n<p>In this circuit, <strong>a<\/strong> is an input, <strong>c<\/strong> is an output, and <strong>b<\/strong> is an internal signal connecting the output of <strong>buffer_1<\/strong> to the input of <strong>buffer_2<\/strong>. We could have described this using signal-level concepts, which would be a longer description that that of the one above. Since we have defined a buffer, we can simply reuse this definition in order to save time on describing concepts. This produces the following Signal Transition Graph:<\/p>\n<p><a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/doubleBufferSTG.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-55 size-full\" src=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/doubleBufferSTG.png\" alt=\"doubleBufferSTG\" width=\"1400\" height=\"346\" srcset=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/doubleBufferSTG.png 1400w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/doubleBufferSTG-300x74.png 300w, https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/files\/2015\/09\/doubleBufferSTG-1024x253.png 1024w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/a><\/p>\n<p>Comparing this STG to the STG for a single buffer, it is possible to see that <strong>a<\/strong> and <strong>b<\/strong> in this STG\u00a0form one buffer, and <strong>b <\/strong>and <strong>c<\/strong> form another buffer.\u00a0 Again, we assume that all signals are initially 0.<\/p>\n<p><span style=\"text-decoration: underline\"><strong>Finally<\/strong><\/span><\/p>\n<p>In this first blog post, we have discussed how to describe a simple logic gate, a buffer, in terms of concepts. How these concepts are then converted into a Signal Transition Graph is also described. Another useful aspect of concepts is their reusability, and how a defined concept can be reused is displayed in an example using two buffers.<\/p>\n<p>The following post, <strong><em>Concepts II: An inverter <\/em><\/strong>will discuss another simple logic gate, an inverter. After having defined these two gates, a further post will explain how initial states work, whether defined as part of a concept or not, using both a buffer and an inverter as examples.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A Buffer In this post, we will discuss\u00a0one of the most simple logic gates, a buffer. A buffer takes an input signal, and outputs a signal in the same state as the input signal, the output simply follows the input. For example, if the input signal changes from 0 to 1, the output will eventually &hellip; <a href=\"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/2015\/09\/30\/designing-asynchronous-logic-gates-using-behavioural-concepts-i-a-buffer-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Concepts I: A buffer<\/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,5,2,6],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-asynchronous","category-buffer","category-concepts","category-logic-gate"],"_links":{"self":[{"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/posts\/13","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=13"}],"version-history":[{"count":15,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":77,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/posts\/13\/revisions\/77"}],"wp:attachment":[{"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ncl.ac.uk\/jrbeaumont\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}