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:gates [2020/12/02 01:00]
127.0.0.1 external edit
intro_example:gates [2022/05/13 09:18]
rajit
Line 3: Line 3:
 The following specifies a number of combinational gates, where the process names correspond to the commonly used names for the gates. The following specifies a number of combinational gates, where the process names correspond to the commonly used names for the gates.
  
-<code>+<code act>
 defproc inverter (bool? i; bool! o) defproc inverter (bool? i; bool! o)
 { {
Line 30: Line 30:
 If we wanted to create a two-input and gate, we could simply write: If we wanted to create a two-input and gate, we could simply write:
  
-<code>+<code act>
 defproc and2 (bool? a, b; bool! c) defproc and2 (bool? a, b; bool! c)
 { {
Line 41: Line 41:
 This would be accepted by ACT, and the production rule simulator [[tools:prsim|prsim]] can simulate such rules without difficulty. However, a CMOS circuit designer would observe that one cannot implement this directly using a single pull-up and pull-down network in static CMOS. Instead, someone used to circuit design would write: This would be accepted by ACT, and the production rule simulator [[tools:prsim|prsim]] can simulate such rules without difficulty. However, a CMOS circuit designer would observe that one cannot implement this directly using a single pull-up and pull-down network in static CMOS. Instead, someone used to circuit design would write:
  
-<code>+<code act>
 defproc and2 (bool? a, b; bool! c) defproc and2 (bool? a, b; bool! c)
 { {
Line 56: Line 56:
 Since we already have defined ''nand2'' as well as ''inverter'', an alternative approach would be to re-use those circuits as follows: Since we already have defined ''nand2'' as well as ''inverter'', an alternative approach would be to re-use those circuits as follows:
  
-<code>+<code act
 defproc and2 (bool? a, b; bool! c) defproc and2 (bool? a, b; bool! c)
 { {
Line 71: Line 71:
 ACT provides a very flexible mechanism for connecting signals. The following are variants that correspond to the same connections. ACT provides a very flexible mechanism for connecting signals. The following are variants that correspond to the same connections.
  
-<code>+<code act>
 defproc and2 (bool? a, b; bool! c) defproc and2 (bool? a, b; bool! c)
 { {
Line 87: Line 87:
 The ''='' operator is used to connect two variables. Since connections correspond to //aliasing// (once two Booleans are connected, they are the same signal as far as the circuit is concerned). The ''='' operator is used to connect two variables. Since connections correspond to //aliasing// (once two Booleans are connected, they are the same signal as far as the circuit is concerned).
  
-<code>+<code act>
 defproc and2 (bool? a, b; bool! c) defproc and2 (bool? a, b; bool! c)
 { {
Line 103: Line 103:
 To simulate a circuit, you need a top-level instance. Here is a small self-contained example. To simulate a circuit, you need a top-level instance. Here is a small self-contained example.
  
-<code>+<code act>
 defproc inverter (bool? i; bool! o) defproc inverter (bool? i; bool! o)
 { {