To prepare a module for use in a hierarchy, you need to decide which entities in the module get their values from other modules, and which entities in the module (if any) output the module's results. In most cases, you explicitly indicate which entities are module inputs and which are module outputs by defining module inputs and module outputs.
When you are ready to use the module in a hierarchy, you need to assign each module input to an actual entity. To make entities available for assigning to a module input, you first need to make explicit connections (with connectors) between the module and other modules, or between the module and an entity in the model. Once those connections are established, you can assign module inputs.
You can also use the Ghost tool to connect entities. Using the Ghost tool allows you to automatically assign module inputs and outputs as well as make connections between modules and other modules or entities.
Define entities as module inputs or module outputs