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

Subversion Repositories sc2v

[/] [sc2v/] [trunk/] [examples/] [sc_ex1.cpp] - Blame information for rev 36

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 jcastillo
#include "sc_ex1.h"       // the header for this
2
 
3
#define ROT  0            // NB sc2v 4.2 macros buggy
4
#define POPX 1
5
 
6
 
7
void icu::decoder_io()    // runs once per clock - because .h
8
{
9
  sc_uint<8> tmp;
10
 
11
  tmp = POPX;
12
  if( reset.read() == 1 )
13
  {
14
    control_out.write( 0 );
15
  }
16
  else
17
  {
18
    if (alu_ready == 1)
19
    {
20
      switch (instr_in)
21
      {
22
        // this sort of works!    case (ROT):
23
      case ROT :                  // this does not work
24
        control_out.write (0x1);  // neither does this
25
        break;
26
      case 1 :
27
        control_out.write (0x2);
28
        break;
29
      default:
30
      }
31
    }
32
    else  // needed?
33
    {
34
    }
35
  }
36
}

powered by: WebSVN 2.1.0

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