Skip to content

Commit f28c556

Browse files
committed
[ISSUE] Add #22
1 parent e1f4fc7 commit f28c556

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

issue/22/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include ${PSS_HOME}/issue/Make.vars
2+
3+
gentarget:
4+
$(PSSGEN) test.pss -o test.s -root pss_top::root_a || true
5+
6+
clean:
7+
rm -f test.s result.log

issue/22/test.pss

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*!
2+
@weakgroup issue
3+
@{
4+
@file
5+
@author Luther Lee
6+
@data 2024/07/03
7+
@brief Test issue 22.
8+
9+
10+
---------------------------------------------------------------------------------------------------
11+
12+
### Test Command
13+
@code{.unparsed}
14+
make
15+
@endcode
16+
17+
@cond
18+
*/
19+
component pss_top {
20+
action root_a {
21+
activity {
22+
do invertSingleBit with { val in [0]; };
23+
do invertSingleBit with { val in [1]; };
24+
}
25+
}
26+
27+
action invertSingleBit {
28+
rand bit val;
29+
bit val_n;
30+
31+
exec post_solve {
32+
val_n = ~val;
33+
}
34+
35+
exec body ASM = """invertSingleBit: {{val}} -> {{val_n}}""";
36+
}
37+
}
38+
39+
/**@}*/

issue/22/test.s.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
invertSingleBit: 0 -> 1
2+
invertSingleBit: 1 -> 0

0 commit comments

Comments
 (0)