-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #581 from diffblue/array_functions1
Verilog: `$low`, `$high`, `$increment`, `$left`, `$right`
- Loading branch information
Showing
4 changed files
with
257 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CORE | ||
array_functions1.sv | ||
--module main --bound 0 | ||
^\[main\.pP0\] always 32 == 32 && 1 == 1: PROVED up to bound 0$ | ||
^\[main\.pP1\] always 0 == 0 && 31 == 31: PROVED up to bound 0$ | ||
^\[main\.pP2\] always 1 == 1 && 32 == 32: PROVED up to bound 0$ | ||
^\[main\.pP3\] always 0 == 0 && 31 == 31: PROVED up to bound 0$ | ||
^\[main\.pP4\] always 1 == 1: PROVED up to bound 0$ | ||
^\[main\.pP5\] always -1 == -1: PROVED up to bound 0$ | ||
^\[main\.pU0\] always 32 == 32 && 1 == 1: PROVED up to bound 0$ | ||
^\[main\.pU1\] always 0 == 0 && 31 == 31: PROVED up to bound 0$ | ||
^\[main\.pU2\] always 31 == 31 && 0 == 0: PROVED up to bound 0$ | ||
^\[main\.pU3\] always 1 == 1 && 32 == 32: PROVED up to bound 0$ | ||
^\[main\.pU4\] always 0 == 0 && 31 == 31: PROVED up to bound 0$ | ||
^\[main\.pU5\] always 0 == 0 && 31 == 31: PROVED up to bound 0$ | ||
^\[main\.pU6\] always 1 == 1: PROVED up to bound 0$ | ||
^\[main\.pU7\] always -1 == -1: PROVED up to bound 0$ | ||
^\[main\.pU8\] always 1 == 1: PROVED up to bound 0$ | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
-- | ||
^warning: ignoring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module main; | ||
|
||
wire [32:1] packed1; | ||
wire [0:31] packed2; | ||
|
||
wire unpacked1 [32:1]; | ||
wire unpacked2 [0:31]; | ||
wire unpacked3 [32]; | ||
|
||
pP0: assert property ($left(packed1) == 32 and $right(packed1) == 1); | ||
pP1: assert property ($left(packed2) == 0 and $right(packed2) == 31); | ||
pP2: assert property ($low(packed1) == 1 and $high(packed1) == 32); | ||
pP3: assert property ($low(packed2) == 0 and $high(packed2) == 31); | ||
pP4: assert property ($increment(packed1) == 1); | ||
pP5: assert property ($increment(packed2) == -1); | ||
|
||
pU0: assert property ($left(unpacked1) == 32 and $right(unpacked1) == 1); | ||
pU1: assert property ($left(unpacked2) == 0 and $right(unpacked2) == 31); | ||
pU2: assert property ($left(unpacked3) == 31 and $right(unpacked3) == 0); | ||
pU3: assert property ($low(unpacked1) == 1 and $high(unpacked1) == 32); | ||
pU4: assert property ($low(unpacked2) == 0 and $high(unpacked2) == 31); | ||
pU5: assert property ($low(unpacked3) == 0 and $high(unpacked3) == 31); | ||
pU6: assert property ($increment(unpacked1) == 1); | ||
pU7: assert property ($increment(unpacked2) == -1); | ||
pU8: assert property ($increment(unpacked3) == 1); | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters