24 |
#include "circuit.h" |
#include "circuit.h" |
25 |
|
|
26 |
|
|
27 |
unsigned long circuit::get_in( int n ) |
bit_word circuit::get_in( int n ) |
28 |
{ |
{ |
29 |
if ( n < nin ) |
if ( n < nin ) |
30 |
return in[n]; |
return in[n]; |
32 |
throw ex<vmachine>("circuit::get_in: " |
throw ex<vmachine>("circuit::get_in: " |
33 |
"getting invalid input"); |
"getting invalid input"); |
34 |
} |
} |
35 |
void circuit::set_out_all( unsigned long val ) |
void circuit::set_out_all( bit_word val ) |
36 |
{ |
{ |
37 |
for( int i = 0 ; i < num_out() ; i++ ) |
for( int i = 0 ; i < num_out() ; i++ ) |
38 |
set_out( i, val ); |
set_out( i, val ); |
39 |
} |
} |
40 |
void circuit::set_out( int n, unsigned long val ) |
void circuit::set_out( int n, bit_word val ) |
41 |
{ |
{ |
42 |
if ( n < nout ) |
if ( n < nout ) |
43 |
*(out[n]) = val; |
*(out[n]) = val; |