mirror of
https://github.com/YosysHQ/sby.git
synced 2025-08-26 14:46:05 +00:00
Add primegen example
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
35a5fb94f1
commit
0f21d01460
3 changed files with 25 additions and 0 deletions
11
docs/examples/puzzles/primegen.v
Normal file
11
docs/examples/puzzles/primegen.v
Normal file
|
@ -0,0 +1,11 @@
|
|||
module primegen;
|
||||
wire [31:0] prime = $anyconst;
|
||||
wire [15:0] factor = $allconst;
|
||||
|
||||
always @* begin
|
||||
if (1 < factor && factor < prime)
|
||||
assume((prime % factor) != 0);
|
||||
assume(prime > 1000000000);
|
||||
cover(1);
|
||||
end
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue