Skip to content

Commit 6dbe917

Browse files
committed
Add example of customising the iterative-deepening parameters
1 parent 67a04d9 commit 6dbe917

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

StackExample.bsv

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,25 @@ module [Module] testStackID ();
248248
blueCheckID(checkStackWithReset(r.new_rst), r);
249249
endmodule
250250

251+
// Iterative deepening version (with extra options)
252+
module [Module] testStackIDCustom ();
253+
Clock clk <- exposeCurrentClock;
254+
MakeResetIfc r <- mkReset(0, True, clk);
255+
256+
// Customise default BlueCheck parameters
257+
BlueCheck_Params params = bcParamsID(r);
258+
params.wedgeDetect = True;
259+
params.id.initialDepth = 3;
260+
function incr(x) = x+1;
261+
params.id.incDepth = incr;
262+
params.numIterations = 25;
263+
params.id.testsPerDepth = 100;
264+
265+
// Generate checker
266+
Stmt s <- mkModelChecker(checkStackWithReset(r.new_rst), params);
267+
mkAutoFSM(s);
268+
endmodule
269+
251270
// Iterative deepening version & classification
252271
module [Module] testStackIDClassify ();
253272
Clock clk <- exposeCurrentClock;

clean.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ rm -f *.cxx *.o *.h *.ba *.bo *.so
3838
rm -f State.txt
3939
rm -f testStack
4040
rm -f testStackID
41+
rm -f testStackIDCustom
4142
rm -f testStackAlg
4243
rm -f testStackAlgID
4344
rm -f testStackIDClassify

make.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ echo "(7) Stack(algebraic)"
5353
echo "(8) Stack(algebraic) + ID"
5454
echo "(9) Stack(synthesisable)"
5555
echo "(10) Stack(synthesisable) + ID"
56+
echo "(11) Stack + ID + custom parameters"
5657

5758
read OPTION
5859
case "$OPTION" in
@@ -88,6 +89,9 @@ case "$OPTION" in
8889
TOPMOD=testStackID
8990
SYNTH=1
9091
;;
92+
11) TOPFILE=StackExample.bsv
93+
TOPMOD=testStackIDCustom
94+
;;
9195
*) echo "Option not recognised"
9296
exit
9397
;;

0 commit comments

Comments
 (0)