Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
scratch:tutorial_1_-_a_simple_inverter [2020/11/02 07:05] ole |
scratch:tutorial_1_-_a_simple_inverter [2020/12/02 01:00] (current) |
||
---|---|---|---|
Line 31: | Line 31: | ||
</ | </ | ||
- | These statements are two // | + | These statements are two // |
* The left hand side is a Boolean expression | * The left hand side is a Boolean expression | ||
* The right hand side is a signal transition | * The right hand side is a signal transition | ||
Line 86: | Line 86: | ||
</ | </ | ||
- | the prsim simulator can only read pure production rule files, and not the hierarchical act files we use so to simulate we need to convert our definition. | + | the prsim simulator can only read pure production rule files, and not the hierarchical act files with embedded production rules we wrote before. So to simulate we need to convert our definition |
If the file above is called '' | If the file above is called '' | ||
Line 124: | Line 124: | ||
< | < | ||
(Prsim) status X | (Prsim) status X | ||
+ | --------------------------------------- | ||
inv.o inv.i | inv.o inv.i | ||
</ | </ | ||
Line 133: | Line 134: | ||
< | < | ||
(Prsim) cycle | (Prsim) cycle | ||
+ | --------------------------------------- | ||
0 inv.i : 0 | 0 inv.i : 0 | ||
10 inv.o : 1 [by inv.i:=0] | 10 inv.o : 1 [by inv.i:=0] | ||
Line 139: | Line 141: | ||
so the first line '' | so the first line '' | ||
the second line '' | the second line '' | ||
+ | |||
+ | the standard gate delay in prsim (from input to output of the inverter) is on default 10 steps thats why the steps advance by 10. | ||
lets also test the other direction: | lets also test the other direction: | ||
Line 145: | Line 149: | ||
(Prsim) set inv.i 1 | (Prsim) set inv.i 1 | ||
(Prsim) cycle | (Prsim) cycle | ||
- | | + | --------------------------------------- |
- | | + | 10 inv.i : 1 |
+ | 20 inv.o : 0 [by inv.i:=1] | ||
</ | </ | ||
so again the first line '' | so again the first line '' | ||
- | and the second line '' | + | and the second line '' |