
/* =====================================================================
 * Always include this header file when writing digital simulation !!!
 * ===================================================================== */
#include <iostream>
#include "Sim.h"

using namespace std;

void f( int &a, int b, const int c[], int d, int e[])
{
   cout << b << endl;
   cout << c[0] << endl;
   cout << c[1] << endl;
   cout << d << endl;
   cout << endl;

   e[0]=c[0];
   e[1]=c[1];
   return ;
}

void simnet()
{
  Sig(sw,2);

  Sig(out,2);		// Define out as a signal

  Switch ( "aa", sw[0], 'a', Zero );  
  Switch ( "ba", sw[1], 'b', One);  

  LogicBlock ( "ab", f, sw, out );   

  Probe ( "ac", out );              // Probe out
}
