Last change
on this file since 57 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:
603 bytes
|
Line | |
---|
1 | |
---|
2 | #ifndef _STRUCT_TEST_H_ |
---|
3 | #define _STRUCT_TEST_H_ |
---|
4 | |
---|
5 | #include "systemc.h" |
---|
6 | |
---|
7 | |
---|
8 | struct test : public sc_module { |
---|
9 | sc_in<bool> clk; |
---|
10 | sc_in<bool> resetn; |
---|
11 | sc_out<int> o; |
---|
12 | sc_in <int> i; |
---|
13 | sc_signal<int> reg; |
---|
14 | |
---|
15 | void transition(); |
---|
16 | void gen_moore(); |
---|
17 | void gen_mealy(); |
---|
18 | |
---|
19 | SC_CTOR(test) { |
---|
20 | SC_METHOD(transition); |
---|
21 | sensitive << clk.pos(); |
---|
22 | dont_initialize(); |
---|
23 | |
---|
24 | SC_METHOD(gen_moore); |
---|
25 | sensitive << clk.neg(); |
---|
26 | dont_initialize(); |
---|
27 | |
---|
28 | SC_METHOD(gen_mealy); |
---|
29 | sensitive << clk.neg() << i; |
---|
30 | dont_initialize(); |
---|
31 | } |
---|
32 | }; |
---|
33 | |
---|
34 | #endif |
---|
35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.