When I run the simulation on EDA Playground, the Aldec simulator you selected generates several warning messages:
# SLP: Warning: testbench.sv (9): Length of connection (16) does not match the length of port "decB" (1) on instance "/mul_test/DP".
# SLP: Warning: testbench.sv (9): Length of connection (1) does not match the length of port "data_in" (16) on instance "/mul_test/DP".
# SLP: Warning: design.sv (7): Length of connection (1) does not match the length of port "dout" (16) on instance "/mul_test/DP/A".
Sometimes the messages scroll by very quickly, and it is not easy to see them. However, you should always carefully inspect all the messages, especially when the simulation does not behave as you expect it to.
Also, some simulators generate messages which are more helpful than others. If you don't understand these messages, there are several other simulators on EDA Playground to choose from. For example, you can also try the Cadence simulator.
Since you specifically asked about the
y signal, I switched to the Cadence simulator, and I got this message related to the
mul_datapath module, which has the
xmelab: *W,CUVWSI : 1 input port was not connected:
Although this says
clk is not connected, and you clearly add
clk to the connection list, the problem is that you have too few signals in the list. This is a common error when using connection-by-order. A better method is to use connection-by-name. Although it is more verbose, it makes it easier to debug this common problem. For example, change:
mul_datapath dut (
This partially fixes the unknown
y at time 35ns. You should fix all other warning messages.