Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| language:langs:prs [2020/12/02 06:00] – external edit 127.0.0.1 | language:langs:prs [2024/08/07 11:09] (current) – [Loops] rajit | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| The '' | The '' | ||
| - | < | + | < |
| a -> b- | a -> b- | ||
| ~a -> b+ | ~a -> b+ | ||
| Line 10: | Line 10: | ||
| The left-hand side of a production rule is a Boolean expression, and the right hand side specifies the action to be taken when the Boolean expression is true. A more complete example of an inverter in ACT would be: | The left-hand side of a production rule is a Boolean expression, and the right hand side specifies the action to be taken when the Boolean expression is true. A more complete example of an inverter in ACT would be: | ||
| - | < | + | < |
| bool a, b; | bool a, b; | ||
| prs { | prs { | ||
| Line 20: | Line 20: | ||
| A two-input NAND gate with inputs '' | A two-input NAND gate with inputs '' | ||
| - | < | + | < |
| prs { | prs { | ||
| a & b -> c- | a & b -> c- | ||
| Line 29: | Line 29: | ||
| A two-input inverting C-element would be: | A two-input inverting C-element would be: | ||
| - | < | + | < |
| prs { | prs { | ||
| a & b -> c- | a & b -> c- | ||
| Line 44: | Line 44: | ||
| The first common case is a combinational gate like an inverter or NAND. In a combinational gate, the Boolean expression for the pull-up is the complement of the Boolean expression for the pull-down. In this case we can simply specify one, and use the '' | The first common case is a combinational gate like an inverter or NAND. In a combinational gate, the Boolean expression for the pull-up is the complement of the Boolean expression for the pull-down. In this case we can simply specify one, and use the '' | ||
| - | < | + | < |
| prs { | prs { | ||
| a & b => c- | a & b => c- | ||
| Line 51: | Line 51: | ||
| Note that this is the same as specifying | Note that this is the same as specifying | ||
| - | < | + | < |
| prs { | prs { | ||
| ~a | ~b => c+ | ~a | ~b => c+ | ||
| Line 60: | Line 60: | ||
| The second common case is that of C-elements. To specify the two-input C-element above, you can also write | The second common case is that of C-elements. To specify the two-input C-element above, you can also write | ||
| - | < | + | < |
| prs { | prs { | ||
| a & b #> c- | a & b #> c- | ||
| Line 70: | Line 70: | ||
| When defining parameterized circuits, it is helpful to also have the corresponding parametrized production rules that implement the circuit. There are two loop constructs available that use the same " | When defining parameterized circuits, it is helpful to also have the corresponding parametrized production rules that implement the circuit. There are two loop constructs available that use the same " | ||
| - | < | + | < |
| bool x[5], y[5]; | bool x[5], y[5]; | ||
| Line 80: | Line 80: | ||
| The example above creates five inverters when the circuit is expanded. '' | The example above creates five inverters when the circuit is expanded. '' | ||
| - | < | + | < |
| bool x[5], y; | bool x[5], y; | ||
| Line 90: | Line 90: | ||
| The example above is a 5-input NAND gate. Here the replication construct is used with ''&'' | The example above is a 5-input NAND gate. Here the replication construct is used with ''&'' | ||
| - | < | + | < |
| ... | ... | ||
| prs { | prs { | ||
| Line 99: | Line 99: | ||
| Similarly, '' | Similarly, '' | ||
| - | < | + | < |
| prs { | prs { | ||
| en & (|i:5: x[i]) -> y- | en & (|i:5: x[i]) -> y- | ||
| Line 105: | Line 105: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | ==== Attributes ==== | ||
| + | |||
| + | Production rules can also be decorated with attributes that are used for a variety of purposes by ACT tools. The meaning of attributes is not pre-defined within the ACT language, but is a convention based on how these attributes are interpreted by various tools. Current attributes and their meanings is available in the section on [[language: | ||
| ==== CMOS implementation ==== | ==== CMOS implementation ==== | ||
| Line 115: | Line 119: | ||
| For a production rule to be // | For a production rule to be // | ||
| - | < | + | < |
| a & b -> c+ | a & b -> c+ | ||
| a & b -> d- | a & b -> d- | ||
| ~a | ~b -> e+ | ~a | ~b -> e+ | ||
| </ | </ | ||
| + | This is because '' | ||
| === Transistor sizing and flavors === | === Transistor sizing and flavors === | ||
| The width, length, flavor, and folding of a transistor can be specified as part of the syntax of production rules. The following examples illustrate the syntax. | The width, length, flavor, and folding of a transistor can be specified as part of the syntax of production rules. The following examples illustrate the syntax. | ||
| - | < | + | < |
| a <10> & b <10> -> c- | a <10> & b <10> -> c- | ||
| </ | </ | ||
| In this example, the widths of the transistor for '' | In this example, the widths of the transistor for '' | ||
| - | < | + | < |
| a < | a < | ||
| </ | </ | ||
| In this example, the transistor specified is one with a width of 20 units and length of 4 units. The default values of width and length for p-type and n-type devices are specified in the [[config: | In this example, the transistor specified is one with a width of 20 units and length of 4 units. The default values of width and length for p-type and n-type devices are specified in the [[config: | ||
| - | < | + | < |
| a < | a < | ||
| </ | </ | ||
| - | Transistors come in different //flavors// in a modern technology. The flavors supported by ACT are specified in the top-level ACT [[config: | + | Transistors come in different //flavors// in a modern technology. The flavors supported by ACT are specified in the top-level ACT [[config: |
| Finally, it is often the case that multiple transistors in an expression use the same sizing information. | Finally, it is often the case that multiple transistors in an expression use the same sizing information. | ||
| - | < | + | < |
| a <10> & b -> c- | a <10> & b -> c- | ||
| </ | </ | ||
| Line 148: | Line 153: | ||
| A rule of the form | A rule of the form | ||
| - | < | + | < |
| a & b -> c- | a & b -> c- | ||
| </ | </ | ||
| Line 158: | Line 163: | ||
| A multi-fingered transistor can be manually specified if necessary. The example | A multi-fingered transistor can be manually specified if necessary. The example | ||
| - | < | + | < |
| (a <10> | a< | (a <10> | a< | ||
| </ | </ | ||
| would have the effect of using two multi-fingered transistors, | would have the effect of using two multi-fingered transistors, | ||
| - | < | + | < |
| a< | a< | ||
| </ | </ | ||
| or, using the implicit sizing rules, as | or, using the implicit sizing rules, as | ||
| - | < | + | < |
| | | ||
| </ | </ | ||
| Line 172: | Line 177: | ||
| Some additional details of how you can control the circuit being generated from the production rules is described in the [[tools: | Some additional details of how you can control the circuit being generated from the production rules is described in the [[tools: | ||
| + | === Leakage adjustment === | ||
| + | The leakage adjustment [[config: | ||
| + | <code act> | ||
| + | prs * { | ||
| + | ... | ||
| + | } | ||
| + | </ | ||
| + | The '' | ||
| + | |||
| + | ==== Direct transistor specifications ==== | ||
| + | |||
| + | In case this syntax is not sufficient, the '' | ||
| + | <code act> | ||
| + | prs { | ||
| + | passp < | ||
| + | passn < | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Note that automatic staticizer (keeper) generation is only triggered when a production rule is specified. If part of your circuit for an output signal is described using production rules and part of it is described using transistors, | ||
| + | |||
| + | ==== Explicit capacitors ==== | ||
| + | |||
| + | The '' | ||
| + | <code act> | ||
| + | prs { | ||
| + | cap (node1, node2); /* explicit capacitor of one unit size between the two nodes */ | ||
| + | cap< | ||
| + | cap< | ||
| + | } | ||
| + | </ | ||
| + | The unit capacitor is specified in the netlist configuration file; if it is unspecified, | ||