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

Subversion Repositories sc2v

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

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

Rev 21 Rev 22
Line 1... Line 1...
#include "systemc.h"
#include "systemc.h"
 
 
#define HOLA 1
#define HOLA 1
#define CONCAT 1
#define CONCAT 1
 
 
sc_uint<2> fsm::func1(sc_uint<2> a, sc_uint<2> b){
sc_uint<2> dummy1::func1(sc_uint<2> a, sc_uint<2> b){
   sc_uint<2> c;
   sc_uint<2> c;
   c=a+b;
   c=a+b;
   return c+5;
   return c+5;
}
}
 
 
 
 
void
void
fsm::regs ()
dummy1::regs ()
{
{
  if (rst.read ())
  if (rst.read ())
    {
    {
      state.write (S0);
      state.write (S0);
    }
    }
  else
  else
    state.write (next_state);
    state.write (next_state);
}
}
 
 
void
void
fsm::fsm_proc ()
dummy1::fsm_proc ()
{
{
/*Verilog begin
/*Verilog begin
        cfsm_proc={a[1:0],b[1:0]};
        cfsm_proc={a[1:0],b[1:0]};
verilog end*/
verilog end*/
 
 

powered by: WebSVN 2.1.0

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