In your example a and b are not initialized, but I assume you want a division with b := 0
somewhere, this answer is for FPGAs only:
From the numeric_std.vhd package:
-- NOTE: If second argument is zero for "/" operator, a severity
level -- of ERROR is issued.
-- Id: A.21 function "/" (L,R: UNSIGNED ) return UNSIGNED;
So in simulation this should crash. If it doesn't crash, you should find a better simulator.
In synthesis:
Vivado only supports division by powers of 2 in older versions and will try to infer a Divider LogiCORE unit for others, which doesn't support division by a constant 0 (so that's a synthesis error) and allows for optional error detection when trying to divide by a variable that might be 0. I haven't tried what happens if you turn this inference off in current editions, but I'd suspect it again only accepts powers of 2.
Current Quartus products try to infer a DSP divisor with extremely similar limitations as the Xilinx Divider. No idea what happens when you try to synthesize it in pure LUTs. I know division can be infered for non-binary powers and it's horrible.
Don't try to divide by zero.
c
- you must look into the circuit synthesized for the division operation. Of course registerc
must get some value, but it will not be correct. Depending on implementation it may also be metastable. \$\endgroup\$