Exemple #1
0
int main( void ) {
	
	s1.setParameters( 3,2 );
	
	WRITE(2,&qfin);
	WRITE(2,&qfin);
	WRITE(2,&qfin);
	WRITE(3,&qfin2);	

	READ(3,qfout); // No data available yet
	READ(4,qfout);
	DUMP();
	READ(4,qfout);
	READ(4,qfout);
	
	cout << "Value QFOUT: " << (*qfout) << endl;
	
	READ(5,qfout);
	
	cout << "Value QFOUT: " << (*qfout) << endl;

	WRITE(7,&qfin); // READ in  9
	WRITE(8,&qfin); // READ in 10
	
	//DUMP();


	cout << "Name: \"" << s1.getName() << "\"" << endl;
	cout << "Bandwidth: " << s1.getBandwidth() << endl;
	cout << "Latency: " << s1.getLatency() << endl;

	return 0;
}
void SETPARAMETERS( Signal& s, u32bit bw, u32bit lat )
{
	cout << "SETPARAMETERS(" << bw << "," << lat << ") - Signal's State: " <<
		( s.setParameters( bw, lat ) == 0 ? "NOT WELL-DEFINED" : "WELL-DEFINED" ) << endl;
}