Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| intro_example:inverter [2025/05/01 13:28] – [Simulating with prsim] rajit | intro_example:inverter [2025/05/01 13:32] (current) – [Simulating with prsim] rajit | ||
|---|---|---|---|
| Line 109: | Line 109: | ||
| After this command, all delays are randomized. This is a useful test to see if your production rules are stable and non-interfering. If '' | After this command, all delays are randomized. This is a useful test to see if your production rules are stable and non-interfering. If '' | ||
| - | ===== Simulating with prsim ===== | + | ===== Simulating with actsim |
| - | The complete example is: | + | ACTSIM is setup to simulate processes by default. We recommend having a top-level process that is used for testing purposes. In this setup, the complete example is: |
| <code act> | <code act> | ||
| Line 121: | Line 121: | ||
| } | } | ||
| - | inverter inv; | + | defproc test() |
| + | { | ||
| + | | ||
| + | } | ||
| </ | </ | ||
| - | + | If the file above is called '' | |
| - | If the file above is called '' | + | |
| < | < | ||
| - | % aflat test_inv.act | + | % actsim -p test |
| </ | </ | ||
| - | The output file is the following: | + | Note that we don't need to generate |
| < | < | ||
| - | " | + | actsim> watch inv.i |
| - | ~"inv.i"->"inv.out"+ | + | actsim> watch inv.o |
| - | </code> | + | actsim> status X |
| - | + | inv { o } | |
| - | Note that ACT uses '' | + | actsim> set inv.i 0 |
| - | + | [ 0] <[env]> inv.i := 0 | |
| - | If the file is saved as '' | + | actsim> cycle |
| - | + | [ 10] <inv> inv.o := 1 | |
| - | <code> | + | actsim> |
| - | % prsim test_inv.prs | + | [ 10] < |
| - | + | actsim> | |
| - | (Prsim) initialize | + | [ 20] < |
| - | (Prsim) watch inv.i | + | |
| - | (Prsim) watch inv.o | + | |
| - | (Prsim) status X | + | |
| - | (Prsim) | + | |
| - | (Prsim) cycle | + | |
| - | (Prsim) set inv.i 1 | + | |
| - | (Prsim) | + | |
| </ | </ | ||
| - | '' | + | '' |
| - | One of the useful features of '' | + | One of the useful features of '' |
| < | < | ||
| - | (Prsim) | + | actsim> |
| </ | </ | ||
| - | After this command, all delays are randomized. This is a useful test to see if your production rules are stable and non-interfering. If '' | + | After this command, all delays are randomized. This is a useful test to see if your production rules are stable and non-interfering. If '' |