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

Subversion Repositories sc2v

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

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
 
19
   sc_signal<sc_uint<2> > state,next_state;
20
   sc_signal< sc_uint<32> > array[12];
21
 
22
   SC_CTOR(fsm){
23
 
24
     SC_METHOD(regs);
25
     sensitive_pos(clk);
26
     sensitive_neg(rst);
27
 
28
     SC_METHOD(fsm_proc);
29
     sensitive(state);
30
     sensitive << input1;
31 24 jcastillo
     sensitive << array[3];
32 21 jcastillo
     sensitive(input2);
33
 
34
 }
35
};

powered by: WebSVN 2.1.0

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