how to add top module port to port list
In the module declaration, you need to specify the port-list that are input/output.
module ram_reg(data_out);
Along with the declaration saying a particular reg/wire is input/output , we also need to specify them in port list. When you instantiate this module in any module, it interacts with these ports.