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

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [examples/] [sc_ex1.cpp] - Diff between revs 28 and 36

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 28 Rev 36
#include "sc_ex1.h"       // the header for this
#include "sc_ex1.h"       // the header for this
 
 
#define ROT  0            // NB sc2v 4.2 macros buggy
#define ROT  0            // NB sc2v 4.2 macros buggy
#define POPX 1
#define POPX 1
 
 
 
 
void icu::decoder_io()    // runs once per clock - because .h
void icu::decoder_io()    // runs once per clock - because .h
{
{
  sc_uint<8> tmp;
  sc_uint<8> tmp;
 
 
  tmp = POPX;
  tmp = POPX;
  if( reset.read() == 1 )
  if( reset.read() == 1 )
  {
  {
    control_out.write( 0 );
    control_out.write( 0 );
  }
  }
  else
  else
  {
  {
    if (alu_ready == 1)
    if (alu_ready == 1)
    {
    {
      switch (instr_in)
      switch (instr_in)
      {
      {
        // this sort of works!    case (ROT):
        // this sort of works!    case (ROT):
      case ROT :                  // this does not work
      case ROT :                  // this does not work
        control_out.write (0x1);  // neither does this
        control_out.write (0x1);  // neither does this
        break;
        break;
      case 1 :
      case 1 :
        control_out.write (0x2);
        control_out.write (0x2);
        break;
        break;
      default:
      default:
      }
      }
    }
    }
    else  // needed?
    else  // needed?
    {
    {
    }
    }
  }
  }
}
}
 
 

powered by: WebSVN 2.1.0

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