accls/AES/AES-Synth/aes-rtl-uinst/verilatorInclude/verilated.h
// EMIT_RULE: VL_SHIFTR:  oclean=lclean; rclean==clean;
// Important: Unlike most other funcs, the shift might well be a computed
// expression.  Thus consider this when optimizing.  (And perhaps have 2 funcs?)
oclean=lclean; rclean==clean;
Important: Unlike most other funcs, the shift might well be a computed
expression.  Thus consider this when optimizing.  (And perhaps have 2 funcs?)
oclean = lclean ; rclean == clean ; Important : Unlike most other funcs the shift might well be a computed expression . Thus consider this when optimizing . ( And perhaps have 2 funcs? )
static inline WDataOutP VL_SHIFTR_WWI(int obits,int,int,WDataOutP owp,WDataInP lwp, IData rd) {
    int word_shift = VL_BITWORD_I(rd);  
    int bit_shift = VL_BITBIT_I(rd);
    if (rd >= (IData)obits) {  
	for (int i=0; i < VL_WORDS_I(obits); i++) owp[i] = 0;
    } else if (bit_shift==0) {  
	int copy_words = (VL_WORDS_I(obits)-word_shift);
	for (int i=0; i < copy_words; i++) owp[i] = lwp[i+word_shift];
	for (int i=copy_words; i < VL_WORDS_I(obits); i++) owp[i] = 0;
    } else {
	int loffset = rd & VL_SIZEBITS_I;
	int nbitsonright = 32-loffset;  
	int words = VL_WORDS_I(obits-rd);
	for (int i=0; i<words; i++) {
	    owp[i] = lwp[i+word_shift]>>loffset;
	    int upperword = i+word_shift+1;
	    if (upperword < VL_WORDS_I(obits)) {
		owp[i] |= lwp[upperword]<< nbitsonright;
	    }
	}
	for (int i=words; i<VL_WORDS_I(obits); i++) owp[i]=0;
    }
    return(owp);
}
static inline WDataOutP VL_SHIFTR_WWI ( int obits , int , int , WDataOutP owp , WDataInP lwp , IData rd ) { int word_shift = VL_BITWORD_I ( rd ) ; int bit_shift = VL_BITBIT_I ( rd ) ; if ( rd >= ( IData ) obits ) { for ( int i = 0 ; i < VL_WORDS_I ( obits ) ; i ++ ) owp [ i ] = 0 ; } else if ( bit_shift == 0 ) { int copy_words = ( VL_WORDS_I ( obits ) - word_shift ) ; for ( int i = 0 ; i < copy_words ; i ++ ) owp [ i ] = lwp [ i + word_shift ] ; for ( int i = copy_words ; i < VL_WORDS_I ( obits ) ; i ++ ) owp [ i ] = 0 ; } else { int loffset = rd & VL_SIZEBITS_I ; int nbitsonright = 32 - loffset ; int words = VL_WORDS_I ( obits - rd ) ; for ( int i = 0 ; i < words ; i ++ ) { owp [ i ] = lwp [ i + word_shift ] >> loffset ; int upperword = i + word_shift + 1 ; if ( upperword < VL_WORDS_I ( obits ) ) { owp [ i ] |= lwp [ upperword ] << nbitsonright ; } } for ( int i = words ; i < VL_WORDS_I ( obits ) ; i ++ ) owp [ i ] = 0 ; } return ( owp ) ; }
EMIT_RULE: VL_SHIFTR:  oclean=lclean; rclean==clean;
Important: Unlike most other funcs, the shift might well be a computed
expression.
EMIT_RULE : VL_SHIFTR : oclean = lclean ; rclean == clean ; Important : Unlike most other funcs the shift might well be a computed expression .
// Maybe 0 // rd may be huge with MSB set // Aligned word shift (>>0,>>32,>>64 etc) // bits that end up in lword (know loffset!=0) // Middle words