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

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [examples/] [dummy2.h] - Rev 36

Compare with Previous | Blame | View Log

/* 
This is a example code that does nothing but uses the new
features included in new versions
*/
 
 
#include "systemc.h"
 
SC_MODULE(fsm){
 
   sc_in<bool> clk;
   sc_in<bool> rst,
   sc_in<bool> input1, input2;
   sc_out<sc_uint<2> > a,b,w;
 
   void regs();
   void fsm_proc();
   void dummy_proc();
 
   sc_signal<sc_uint<2> > state,next_state;
   sc_signal< sc_uint<32> > array[12];
 
   SC_CTOR(fsm){
 
     SC_METHOD(regs);
     sensitive_pos(clk);
     sensitive_neg(rst);
 
     SC_METHOD(fsm_proc);
     sensitive(state);
     sensitive << input1;
     sensitive(input2);
 
     SC_METHOD(dummy_proc);
     sensitive << input1;
 
 }
};
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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