You have been heard of sudoku as a great puzzle where we have to place numbers in a square using the rules - like unique row, unique column, and unique sub-square...
What about solving it just like that? Yeah, you can now automate the sudoku using the hardware language - "SystemVerilog"...!
SystemVerilog is a hardware language to program the electronic circuits and to test them as well - The other hardware language are Verilog and VHDL (You can refer here a brief tabulated version of differences between all the three here)
SystemVerilog is like an updated version of Verilog; Hence, in industry VHDL or SystemVerilog are preferred to Verilog...
Okay, how SystemVerilog helps to solve Sudoku?
In the SystemVerilog, there is a feature to randomize the given values; but that's not yet - we can control the randomization with a feature called "Constraints"
Briefly, these constraints help the randomization stick to given conditions, like:-
1. The values should be in the given range;
2. The values should have the given distribution;
3. We can even make a set of randomized values unique...
So, yeah, we can use that "being unique" concept to solve our sudoku - but hey, it is not that direct..
Well, finally you can try to code this if you wanna feed a good puzzle to your brain... (In case if you want to learn the SystemVerilog, you can take some help here!)
Well, if you just want to solve the sudoku directly, you can click this and enter your given values and wait for the magic..!
(Note: EDA playground is an online based hardware language compiler and editor)
Thank you for reading..!
As always, you can absolutely mention your suggestions for the improvement of post through the comments section...
Do you also know some cool puzzles and the solutions to automate? We love to hear from you; share them with us and help us reach the 'Eternal Thing'...
Comments
Post a Comment