OpenCores
URL https://opencores.org/ocsvn/sc2v/sc2v/trunk

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [examples/] [dummy2.h] - Blame information for rev 38

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 jcastillo
/*
2
This is a example code that does nothing but uses the new
3
features included in new versions
4
*/
5
 
6
 
7
#include "systemc.h"
8
 
9
SC_MODULE(fsm){
10
 
11
   sc_in<bool> clk;
12
   sc_in<bool> rst,
13
   sc_in<bool> input1, input2;
14
   sc_out<sc_uint<2> > a,b,w;
15
 
16
   void regs();
17
   void fsm_proc();
18 25 jcastillo
   void dummy_proc();
19 21 jcastillo
 
20
   sc_signal<sc_uint<2> > state,next_state;
21
   sc_signal< sc_uint<32> > array[12];
22
 
23
   SC_CTOR(fsm){
24
 
25
     SC_METHOD(regs);
26
     sensitive_pos(clk);
27
     sensitive_neg(rst);
28
 
29
     SC_METHOD(fsm_proc);
30
     sensitive(state);
31
     sensitive << input1;
32
     sensitive(input2);
33 25 jcastillo
 
34
     SC_METHOD(dummy_proc);
35
     sensitive << input1;
36 21 jcastillo
 
37
 }
38
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.