Sunday, July 5, 2020

Difference between define parameter and localparam

Define has a global scope that would be accessed by tick(`).
Parameter's scope is local to the module, but it can change value when the module is instantiated.
localparam's scope is also local to the module and can not be changed from outside (i.e from where the module is instantiated)