Last change
on this file since 55 was
55,
checked in by meunier, 11 years ago
|
Tried to clean the test_regression directory:
- Code formatting
- Supressed warnings
- Made comprehensible outputs
- Factorized Makefiles
There's still a lot to do (many tests don't pass for either good or bad reasons)
|
File size:
787 bytes
|
Line | |
---|
1 | |
---|
2 | #include "systemc.h" |
---|
3 | |
---|
4 | #include "test.h" |
---|
5 | |
---|
6 | using namespace std; |
---|
7 | |
---|
8 | struct hard : sc_module { |
---|
9 | sc_in<bool> i; |
---|
10 | sc_out<bool> o; |
---|
11 | SC_HAS_PROCESS(hard); |
---|
12 | hard(sc_module_name) {} |
---|
13 | }; |
---|
14 | |
---|
15 | |
---|
16 | int sc_main (int argc, char ** argv) { |
---|
17 | sc_clock signal_clk("my_clock", sc_time(1, sc_core::SC_NS)); |
---|
18 | sc_signal<bool> s[5]; |
---|
19 | hard a("a"); |
---|
20 | hard b("b"); |
---|
21 | a.i(s[0]); |
---|
22 | a.o(s[1]); |
---|
23 | b.i(s[5]); // Wrong array index. This BUG should be detected. |
---|
24 | b.o(s[2]); |
---|
25 | |
---|
26 | sc_start(sc_time(0, sc_core::SC_NS)); |
---|
27 | |
---|
28 | sc_start(sc_time(1, sc_core::SC_NS)); |
---|
29 | |
---|
30 | return 0; |
---|
31 | } |
---|
32 | |
---|
33 | |
---|
34 | /* |
---|
35 | # Local Variables: |
---|
36 | # tab-width: 4; |
---|
37 | # c-basic-offset: 4; |
---|
38 | # c-file-offsets:((innamespace . 0)(inline-open . 0)); |
---|
39 | # indent-tabs-mode: nil; |
---|
40 | # End: |
---|
41 | # |
---|
42 | # vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
43 | */ |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.