Illegal sequential statement right shift multiplier
You haven't told us what toolchain you are using, but the probable reason is that assignments using when are not supported within a process prior to VHDL-2008. Either activate 2008 mode in your tool, or use an if statement instead.