Home.Verilog.Digital Design.Digital Basics.Python.RF Basics.
Previous.
Next.
Custom Search

Legal Disclaimer

Chip Designing for ASIC/ FPGA Design engineers and Students
FULLCHIPDESIGN
Digital-logic Design...  Dream for many students… start learning front-end…

Legal Disclaimer

@TYH :- 4G LTE Long Term Evolution Tutorial, CloudComputing
PICS
Verilog Tutorial.
Get Noticed:- Submit your own content to be published on fullchipdesign.com

Send it to fullchip@gmail.com

Digital Basics Tutorial.
Verilog Constant propagation Synthesis.
Constant Propagation is an optimization technique employed by synthesis tools to minimize hardware implementation.  

This is achieved by optimizing away the logic for which parameters are configured to keep it disabled.  This technique is not limited to module boundaries and the hardware can be optimized away both inside and outside. This two way optimization depends on the output port  dependencies on the parameter configurations for the module.
In above code when parameter ENABLE is set to 0, all internal logic and outputs will get optimized away by the Synthesis tools. This is done to save area on the hardware. In order to better understand constant propagation during synthesis its important to have good knowledge of parameters in Verilog RTL. If you want to review parameter topics then refer following links.  
ICG cell Assertions Concise assert Assert levels Chandle defparam Parameters Parameters Pass Defparam stms Localparam Constant Pass Alias Array Functions always
~\Documents\fullchipdesign\verilog_code\const_prop.v.html
    module DUT (
    in1, in2, out1, out2);
    
    // parameter declaration
    parameter ENABLE = 0;
    // ports
    input in1, in2;
    output out1, out2;
    // wires
    wire w_gate1, w_gate2;
    
    // logic
    
    assign w_gate1 = (ENABLE == 1) ? in1 : 1'b0;
    assign w_gate2 = (ENABLE == 1) ? in2 : 1'b0;
    
    assign out1 = w_gate1 & w_gate2;
    assign out2 = w_gate1 ^ w_gate2;
    
    endmodule
    

Lets discuss it in more details with an example below.

Explanation of the above code is below.

Parameters passing, defparam & localparam

Parameters passing, defparam & localparam

LTE - Long Term Evolution topics from here
Interview Questions. Main, FPGA, Digital Fundamentals
Localparam.
Alias.