Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
intro_example:inverter [2020/04/30 13:42] rajit [A simple inverter] |
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. | ||
- | < | + | < |
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 | ||
- | < | + | < |
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, | This is a combinational gate, which means either the pull-up or pull-down network is always conducting (alternatively, | ||
- | < | + | < |
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 '' | This fragment of ACT simply defines a process named '' | ||
- | < | + | < |
inverter inv; | inverter inv; | ||
</ | </ | ||
- | Next, we can simulate the inverter using a production-rule simulator. We have provided [[tools: | + | Next, we can simulate the inverter using a production-rule simulator. We have provided |
===== Simulating with prsim ===== | ===== Simulating with prsim ===== | ||
Line 57: | Line 57: | ||
The complete example is: | The complete example is: | ||
- | < | + | < |
defproc inverter (bool? i; bool! o) | defproc inverter (bool? i; bool! o) | ||
{ | { |