URL
https://opencores.org/ocsvn/sudoku/sudoku/trunk
Subversion Repositories sudoku
Compare Revisions
- This comparison shows the changes necessary to convert path
/sudoku
- from Rev 3 to Rev 4
- ↔ Reverse comparison
Rev 3 → Rev 4
/trunk/verif/run-all.sh
0,0 → 1,9
if [ ! -f ./simv ]; then |
make |
fi |
|
for f in puzzles/*.hex |
do |
./simv +puz=$f |
done |
|
trunk/verif/run-all.sh
Property changes :
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/verif/README
===================================================================
--- trunk/verif/README (nonexistent)
+++ trunk/verif/README (revision 4)
@@ -0,0 +1,3 @@
+If you have VCS installed, running the script "run-all.sh"
+will test the sudoku solver on all the puzzes in the puzzles
+directory.
\ No newline at end of file
Index: trunk/verif/makefile
===================================================================
--- trunk/verif/makefile (nonexistent)
+++ trunk/verif/makefile (revision 4)
@@ -0,0 +1,8 @@
+SRCS=../rtl/piece.v ../rtl/sudoku.v ../rtl/minPiece.v ../rtl/sudoku_search.v
+VSRCS=tb_search.v
+
+all:
+ vcs -full64 +v2k $(VSRCS) $(SRCS)
+
+clean:
+ rm -rf simv csrc simv.daidir ucli.key
\ No newline at end of file
Index: trunk/verif/tb_search.v
===================================================================
--- trunk/verif/tb_search.v (revision 3)
+++ trunk/verif/tb_search.v (revision 4)
@@ -3,7 +3,10 @@
reg rst;
reg start;
wire done;
-
+
+ reg [1023:0] puz_filename;
+ integer fh;
+
wire [728:0] outGrid;
wire [728:0] inGrid;
@@ -15,9 +18,16 @@
clk = 0;
rst = 1;
- $readmemh("puzzle_9.hex", mem);
- $display("mem[0] = %x, mem[80] = %x",
- mem[0], mem[80]);
+ if($value$plusargs("puz=%s", puz_filename))
+ begin
+ $readmemh(puz_filename, mem);
+ end
+ else
+ begin
+ $display("no puzzle filename, use +puz=!");
+ $finish();
+ end
+
#1000
rst = 0;
end