accls/AES/AES-Synth/aes-rtl-uinst/verilatorInclude/verilated.h
// INTERNAL: Stuff large LHS bit 0++ into OUTPUT at specified offset
// lwp may be "dirty"
Stuff large LHS bit 0++ into OUTPUT at specified offset
lwp may be "dirty"
Stuff large LHS bit 0 ++ into OUTPUT at specified offset lwp may be " dirty "
static inline void _VL_INSERT_WW(int, WDataOutP owp, WDataInP lwp, int hbit, int lbit) {
    int hoffset = hbit & VL_SIZEBITS_I;
    int loffset = lbit & VL_SIZEBITS_I;
    int lword = VL_BITWORD_I(lbit);
    int words = VL_WORDS_I(hbit-lbit+1);
    if (hoffset==VL_SIZEBITS_I && loffset==0) {
	for (int i=0; i<words; i++) {
	    owp[lword+i] = lwp[i];
	}
    }
    else if (loffset==0) {
	for (int i=0; i<(words-1); i++) {
	    owp[lword+i] = lwp[i];
	}
	IData hinsmask = (VL_MASK_I(hoffset-0+1)); 
	owp[lword+words-1] = (owp[words+lword-1] & ~hinsmask) | (lwp[words-1] & hinsmask);
    }
    else {
	IData hinsmask = (VL_MASK_I(hoffset-0+1))<<0;
	IData linsmask = (VL_MASK_I(31-loffset+1))<<loffset;
	int nbitsonright = 32-loffset;  
	int hword = VL_BITWORD_I(hbit);
	for (int i=0; i<words; i++) {
	    {	
		int oword = lword+i;
		IData d = lwp[i]<<loffset;
		IData od = (owp[oword] & ~linsmask) | (d & linsmask);
		if (oword==hword) owp[oword] = (owp[oword] & ~hinsmask) | (od & hinsmask);
		else owp[oword] = od;
	    }
	    {   
		int oword = lword+i+1;
		if (oword <= hword) {
		    IData d = lwp[i]>>nbitsonright;
		    IData od = (d & ~linsmask) | (owp[oword] & linsmask);
		    if (oword==hword) owp[oword] = (owp[oword] & ~hinsmask) | (od & hinsmask);
		    else owp[oword] = od;
		}
	    }
	}
    }
}
static inline void _VL_INSERT_WW ( int , WDataOutP owp , WDataInP lwp , int hbit , int lbit ) { int hoffset = hbit & VL_SIZEBITS_I ; int loffset = lbit & VL_SIZEBITS_I ; int lword = VL_BITWORD_I ( lbit ) ; int words = VL_WORDS_I ( hbit - lbit + 1 ) ; if ( hoffset == VL_SIZEBITS_I && loffset == 0 ) { for ( int i = 0 ; i < words ; i ++ ) { owp [ lword + i ] = lwp [ i ] ; } } else if ( loffset == 0 ) { for ( int i = 0 ; i < ( words - 1 ) ; i ++ ) { owp [ lword + i ] = lwp [ i ] ; } IData hinsmask = ( VL_MASK_I ( hoffset - 0 + 1 ) ) ; owp [ lword + words - 1 ] = ( owp [ words + lword - 1 ] & ~ hinsmask ) | ( lwp [ words - 1 ] & hinsmask ) ; } else { IData hinsmask = ( VL_MASK_I ( hoffset - 0 + 1 ) ) << 0 ; IData linsmask = ( VL_MASK_I ( 31 - loffset + 1 ) ) << loffset ; int nbitsonright = 32 - loffset ; int hword = VL_BITWORD_I ( hbit ) ; for ( int i = 0 ; i < words ; i ++ ) { { int oword = lword + i ; IData d = lwp [ i ] << loffset ; IData od = ( owp [ oword ] & ~ linsmask ) | ( d & linsmask ) ; if ( oword == hword ) owp [ oword ] = ( owp [ oword ] & ~ hinsmask ) | ( od & hinsmask ) ; else owp [ oword ] = od ; } { int oword = lword + i + 1 ; if ( oword <= hword ) { IData d = lwp [ i ] >> nbitsonright ; IData od = ( d & ~ linsmask ) | ( owp [ oword ] & linsmask ) ; if ( oword == hword ) owp [ oword ] = ( owp [ oword ] & ~ hinsmask ) | ( od & hinsmask ) ; else owp [ oword ] = od ; } } } } }
INTERNAL: Stuff large LHS bit 0++ into OUTPUT at specified offset
lwp may be "dirty"
INTERNAL : Stuff large LHS bit 0 ++ into OUTPUT at specified offset lwp may be " dirty "
// Fast and common case, word based insertion // Non-32bit, but nicely aligned, so stuff all but the last word // Know it's not a full word as above fast case handled it // bits that end up in lword (know loffset!=0) // Middle words // Lower word // Upper word