Module instantiation from within a for-gen block, value of input port is not updating

In reply to Kumar Saurabh:

Change your $display to a $strobe. Then look up what $strobe does.