9 - Module Instantiation
9 - Module Instantiation
using
Module Instantiation
Prof. A. K. Swain
Asst. Prof., ECE Dept., NIT Rourkela
Unconnected ports in an instantiation can be specified by leaving the port expression blank.
DFF d1 (.Q(QS), . Qbar( ) , .Data(D), . Preset ( ), . Clock (CK)) ; //Byname.
DFF d2 (QS, , D, , CK) ; // By position.
// Output Qbar is not connected.
// Input Preset is open and hence set to value z.
In both the instantiations, ports Qbar and Preset are not connected.
Unconnected module inputs are driven to value z.
Unconnected module outputs are simply unused.
*Notation for specifying parameter values appears identical to that of a delay specified in a gate instantiation.
*No case for concern in a module instantiation since delays cannot be specified for a module
Module instantiation EC6203 Reconfigurable System Design
Module Parameter Values
Module Instance Parameter Value Assignment: Parameter values could also represent sizes.
Example-3:
module Multiplier (Opd_1 , Opd_2, Result);
parameter M = 4, N = 2; // Parameter is size.
input [M:1] Opd_l ; Defparam statement: No order dependency
input [N: 1] 0pd_2; Module instance parameter: Order dependent
output [M+N : 1] Result ;
assign Result = Opd_1 * Opd_2;
endmodule
website:
asic-world.com
www.xilinx.com