Your test bench results are consistent with what you posted, you just selected the bad / useless test cases.
For `DIN = 10 => 0b001010, we get:
Enb = DOUT[5] = DIN[5] = 0 DP = DOUT[0] = DIN[0] = 0 C = 0x7F since ENB=0
Similarly, for DIN=20=>0b010100 we get:
Enb = DOUT[5] = DIN[5] = 0 DP = DOUT[0] = DIN[0] = 0 C = 0x7F since ENB=0
Finally, for DIN=121 = 57 =>0b111001 (121-64=57) we get:
Enb = DOUT[5] = DIN[5] = 1 DP = DOUT[0] = DIN[0] = 1 C = 0x7F since DIN[4:1] = DOUT[4:1] = 0b1100 > 9 (default case)
I modified your testbench and added some more useful cases (see http://www.edaplayground.com/x/4NYd ). If you look at the results for the last four prints ( DIN = 33 to 39), you will see that the C values are what you would expect from this entry.
DOUT, E, C, DP 0, 0b11111110, 0b1111111, 0 10, 0b11111110, 0b1111111, 0 20, 0b11111110, 0b1111111, 0 57, 0b11111110, 0b1111111, 1 33, 0b11111110, 0b1111110, 1 35, 0b11111110, 0b0110000, 1 37, 0b11111110, 0b1101101, 1 39, 0b11111110, 0b1111001, 1