3
0
Fork 0
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:
Clifford Wolf 2018-03-03 19:58:35 +01:00
parent 35a5fb94f1
commit 0f21d01460
3 changed files with 25 additions and 0 deletions

View 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