Single division fix for munge_init

Single div_size value is passed as double and trying to index
it results in error. Fix from rurik.
shared bram fixing compile issues

Previous change was not compile tested. Convert blocks added back
and data type manipulated so that goes out Unsigned always (as before)
and gets Reinterpreted just before simulated memory block (to ensure
simulated values come out correctly) and on output (to ensure type is
correct).