File tree 2 files changed +58
-0
lines changed
2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include < cassert>
2
+ #include < stdint.h>
3
+ #include < stdbool.h>
4
+
5
+ #undef HOTFIX
6
+
7
+ typedef struct {
8
+ uint32_t value_31_0 : 32 ;
9
+ } signal32_t ;
10
+
11
+ typedef struct {
12
+ uint8_t value_0_0 : 1 ;
13
+ } signal1_t ;
14
+
15
+ static inline bool yosys_simplec_get_bit_25_of_32 (const signal32_t *sig)
16
+ {
17
+ return (sig->value_31_0 >> 25 ) & 1 ;
18
+ }
19
+
20
+ struct rvfi_insn_srai_state_t
21
+ {
22
+ signal32_t rvfi_insn;
23
+ signal32_t rvfi_rs1_rdata;
24
+ signal1_t _abc_1398_n364;
25
+ signal1_t _abc_1398_n363;
26
+ };
27
+
28
+ void test (rvfi_insn_srai_state_t state, bool valid)
29
+ {
30
+ #ifndef HOTFIX
31
+ state._abc_1398_n364 .value_0_0 = yosys_simplec_get_bit_25_of_32 (&state.rvfi_insn ) ?
32
+ yosys_simplec_get_bit_25_of_32 (&state.rvfi_rs1_rdata ) : state._abc_1398_n363 .value_0_0 ;
33
+ #else
34
+ state._abc_1398_n364 .value_0_0 = yosys_simplec_get_bit_25_of_32 (&state.rvfi_insn ) ?
35
+ yosys_simplec_get_bit_25_of_32 (&state.rvfi_rs1_rdata ) : (bool )state._abc_1398_n363 .value_0_0 ;
36
+ #endif
37
+
38
+ assert (valid);
39
+ }
40
+
41
+ int main (int argc, char * argv[])
42
+ {
43
+ rvfi_insn_srai_state_t state;
44
+ bool valid;
45
+ test (state, valid);
46
+ return 0 ;
47
+ }
Original file line number Diff line number Diff line change
1
+ KNOWNBUG
2
+ main.cpp
3
+
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ ^VERIFICATION SUCCESSFUL$
7
+ --
8
+ ^warning: ignoring
9
+ ^equality without matching types
10
+ --
11
+ This has been reported as #933.
You can’t perform that action at this time.
0 commit comments