URL
https://opencores.org/ocsvn/csa/csa/trunk
Subversion Repositories csa
[/] [csa/] [trunk/] [sw_sim/] [misc.h] - Rev 37
Go to most recent revision | Compare with Previous | Blame | View Log
#if 0 #define READ_DATA(a,n) \ do{ \ int i; \ int c; \ memset(a ,0,sizeof a); \ for (i=n-1 ;i>=0;i--) \ { \ c=getchar(); \ if(c=='1') \ { \ a [i/8]|=(1<<(i%8));\ } \ } \ }while(0) #else #define READ_DATA(a,n) \ do{ \ memset(a ,0,sizeof a); \ fread(a,1,n,stdin); \ }while(0) #endif #define WRITE_DATA(a,n) \ do { \ fwrite(a,1,n,stdout); \ }while(0) #define DEBUG_OUTPUT_ARR( a , n ) \ do{ \ int i; \ fprintf(stderr,"%s:\n",#a); \ for(i=n-1;i>=0;i--) \ { \ fprintf(stderr,"%x ",(a)[i]);\ } \ fprintf(stderr,"\n"); \ }while(0) #define DEBUG_OUTPUT_VAL( a ) \ do{ \ fprintf(stderr," %s=%x ",#a,a); \ fprintf(stderr,"\n"); \ }while(0)
Go to most recent revision | Compare with Previous | Blame | View Log