



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Hardware/Software Codesign
P. Schaumont, Virginia Tech 9/30/
Hardware/Software Codesign
unsigned char sqrt(unsigned int N, int x) { unsigned int x,j; for(j= 1<<7; j<>0; j>>=1) { x = x + j; if( x*x > N) x = x - j; } return x; }
reg a1, a2, a3 : ns(5); sig b1, b2, b3 : ns(5); always { b1 = IN + b3; b2 = a1 + a2; b3 = a3; a1 = IN; a2 = a1; a3 = b2; OUT = b1; }
Hardware/Software Codesign
unsigned rnstate; rnstate = (rnstate >> 1) ^ (-( signed int )(rnstate &1) & 0xd0000001u);
Hardware/Software Codesign