Last change
on this file since 41 was
1,
checked in by buchmann, 17 years ago
|
Initial import from CVS repository
|
File size:
433 bytes
|
Line | |
---|
1 | #include <systemc.h> |
---|
2 | |
---|
3 | struct test : public sc_module |
---|
4 | { |
---|
5 | sc_in<bool> clk; |
---|
6 | sc_in<bool> resetn; |
---|
7 | sc_out<int> o; |
---|
8 | sc_in <int> i; |
---|
9 | sc_signal<int> reg; |
---|
10 | |
---|
11 | void transition (); |
---|
12 | void gen_moore (); |
---|
13 | void gen_mealy (); |
---|
14 | |
---|
15 | SC_CTOR(test) |
---|
16 | { |
---|
17 | SC_METHOD(transition); |
---|
18 | sensitive << clk.pos(); |
---|
19 | SC_METHOD(gen_moore); |
---|
20 | sensitive << clk.neg(); |
---|
21 | SC_METHOD(gen_mealy); |
---|
22 | sensitive << clk.neg() << i; |
---|
23 | } |
---|
24 | }; |
---|
25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.