You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 01_input.md
+57-57Lines changed: 57 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -184,58 +184,58 @@ python3 your_file.py gen
184
184
185
185
## Step 6: Run the formal verification engine for covers
186
186
187
-
Running your code with `gen` will have it output a file `toplevel.il`. This can be run through the SymbiYosys formal verification tool. It requires a `.sby` configuration file, which I've included in `answers/01_to_pennies.sby`.
187
+
Running your code with `gen` will have it output a file `toplevel.il`. This can be run through the SymbiYosys formal verification tool. It requires a `.sby` configuration file, which I've included in `answers/e01_to_pennies.sby`.
188
188
189
189
```
190
190
python3 your_class.py gen
191
-
sby -f answers/01_to_pennies.sby cover
191
+
sby -f answers/e01_to_pennies.sby cover
192
192
```
193
193
194
194
First, look for the cover conditions to be satisfied. These are the `Reached cover statement at...` lines below. And, if all your cover statements were satisfied, you'll get a `DONE (PASS, rc=0)` line.
The cover statements aren't found in the order you put them in your code!
234
234
235
235
Each cover statement found generates a trace where you can see the inputs and outputs, as well as some intermediate signals if they are there, using `gtkwave`:
In this case, the first trace came from the first cover statement in the exercise. The output shows `1DD`, or 477.
@@ -245,32 +245,32 @@ In this case, the first trace came from the first cover statement in the exercis
245
245
## Step 7: Run the formal verification engine for bounded model checking
246
246
247
247
```
248
-
sby -f answers/01_to_pennies.sby bmc
248
+
sby -f answers/e01_to_pennies.sby bmc
249
249
```
250
250
251
251
"BMC" stands for Bounded Model Checking. More on this later exercises. If all assertions succeed, then you'll get a `DONE (PASS, rc=0)` line at the end. If not, you'll get a trace that you can look at.
Copy file name to clipboardExpand all lines: 02_switch.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -107,11 +107,11 @@ As before, you will need to:
107
107
* Write the logic for the module in `elaborate`.
108
108
* Write your asserts in `formal`.
109
109
* Make sure it compiles with `python3 your_file.py gen`.
110
-
* Run formal verification in cover mode using `sby -f answers/02_next_day.sby cover`.
111
-
* Run formal verification in BMC mode using `sby -f answers/02_next_day.sby bmc`.
110
+
* Run formal verification in cover mode using `sby -f answers/e02_next_day.sby cover`.
111
+
* Run formal verification in BMC mode using `sby -f answers/e02_next_day.sby bmc`.
112
112
113
-
If you want, you can run all formal verification modes by leaving off the mode: `sby -f answers/02_next_day.sby`. This actually runs all the things specified in the `[tasks]` section in the sby file.
113
+
If you want, you can run all formal verification modes by leaving off the mode: `sby -f answers/e02_next_day.sby`. This actually runs all the things specified in the `[tasks]` section in the sby file.
114
114
115
115
## Stumped?
116
116
117
-
The answer to this exercise is in [`answers/02_next_day.py`](answers/02_next_day.py).
117
+
The answer to this exercise is in [`answers/e02_next_day.py`](answers/e02_next_day.py).
0 commit comments