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

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [examples/] [dummy1.h] - Diff between revs 21 and 22

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 21 Rev 22
Line 4... Line 4...
*/
*/
 
 
 
 
#include "systemc.h"
#include "systemc.h"
 
 
SC_MODULE(fsm){
SC_MODULE(dummy1){
 
 
   sc_in<bool> clk;
   sc_in<bool> clk;
   sc_in<bool> rst,input1, input2;
   sc_in<bool> rst;
 
   sc_in<sc_uint<2> > input1, input2;
   sc_out< sc_uint<2> > a,b,w;
   sc_out< sc_uint<2> > a,b,w;
 
 
   enum state_t {S0,S1,S2};
   enum state_t {A,B};
   sc_signal<state_t> state,next_state;
   sc_signal<state_t> state,next_state;
 
 
   enum {AA,BB,CC,DD,EE} estado;
   enum {S0,S1,S2,S3,EE} estado;
   enum {AAA} est;
   enum {AAA} est;
 
 
 
 
   sc_signal<sc_uint<4> > temp;
   sc_signal<sc_uint<4> > temp;
 
   sc_signal<sc_uint<2>> b_a;
 
 
   void regs();
   void regs();
   void fsm_proc();
   void fsm_proc();
   sc_uint<2> func1 (sc_uint<2> a, sc_uint<2> b);
   sc_uint<2> func1 (sc_uint<2> a, sc_uint<2> b);
 
 
   moduleA *moda;
   moduleA *moda;
 
   moduleA *modb;
 
 
   SC_CTOR(fsm){
   SC_CTOR(dummy1){
 
 
     moda = new moduleA("MODA");
     moda = new moduleA("MODA");
 
 
     moda->m1_in(input1);
     moda->m1_in(b_a);
     moda->m1_out(w);
     moda->m1_out(w);
 
 
 
     modb = new moduleA("MODB");
 
 
 
     modb->m1_in(input2);
 
     modb->m1_out(b_a);
 
 
 
 
     SC_METHOD(regs);
     SC_METHOD(regs);
     sensitive_pos(clk);
     sensitive_pos(clk);
     sensitive_neg(rst);
     sensitive_neg(rst);
 
 
     SC_METHOD(fsm_proc);
     SC_METHOD(fsm_proc);

powered by: WebSVN 2.1.0

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