Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
intro_example:inverter [2020/12/02 01:00]
127.0.0.1 external edit
intro_example:inverter [2022/05/13 09:15] (current)
rajit
Line 4: Line 4:
  
 An inverter is a very simple process that has a one-bit digital input and one bit digital output. The following specifies a process that corresponds to one inverter. An inverter is a very simple process that has a one-bit digital input and one bit digital output. The following specifies a process that corresponds to one inverter.
-<code>+<code act>
 defproc inverter (bool? i; bool! o) defproc inverter (bool? i; bool! o)
  
Line 15: Line 15:
  
 Let's start with the statements Let's start with the statements
-<code>+<code act>
  i -> o-  i -> o-
 ~i -> o+ ~i -> o+
Line 33: Line 33:
 This is a combinational gate, which means either the pull-up or pull-down network is always conducting (alternatively, the OR of the Boolean expressions for the pull-up and pull-down is always true). In this case, the pull-up and pull-down networks are complements of each other, so you only need specify one. The ''=>'' arrow can be used so that one rule can be used to specify both the pull-up and pull-down network as follows: This is a combinational gate, which means either the pull-up or pull-down network is always conducting (alternatively, the OR of the Boolean expressions for the pull-up and pull-down is always true). In this case, the pull-up and pull-down networks are complements of each other, so you only need specify one. The ''=>'' arrow can be used so that one rule can be used to specify both the pull-up and pull-down network as follows:
  
-<code>+<code act>
 defproc inverter (bool? i; bool! o) defproc inverter (bool? i; bool! o)
  
Line 47: Line 47:
  
 This fragment of ACT simply defines a process named ''inverter''. To actually create an inverter, we have to instantiate the process. The ''defproc'' can be viewed as defining the inverter type. We can use ''inverter'' just like we used ''bool'', and create an inverter called ''inv'' using the following: This fragment of ACT simply defines a process named ''inverter''. To actually create an inverter, we have to instantiate the process. The ''defproc'' can be viewed as defining the inverter type. We can use ''inverter'' just like we used ''bool'', and create an inverter called ''inv'' using the following:
-<code>+<code act>
 inverter inv; inverter inv;
 </code> </code>
Line 57: Line 57:
 The complete example is: The complete example is:
  
-<code>+<code act>
 defproc inverter (bool? i; bool! o) defproc inverter (bool? i; bool! o)