config.json, Field by Field
The previous article ran an automated flow. The flow derived its settings, clock constraints, and cell density targets from config.json. This article examines the configuration parameters field by field.
Configuration File Example
Here is a typical config.json configuration for the counter design:
{
"DESIGN_NAME": "my_first_design",
"VERILOG_FILES": "dir::src/*.v",
"CLOCK_PORT": "clk",
"CLOCK_PERIOD": 10,
"FP_CORE_UTIL": 40,
"PL_TARGET_DENSITY": 0.45
}
Each field controls a specific aspect of the implementation flow:
DESIGN_NAME: Specifies the top-level Verilog module name. This value must match the module header in the RTL source code.VERILOG_FILES: Specifies the paths to the RTL source files. The expressiondir::src/*.vincludes all Verilog files in the localsrc/directory.CLOCK_PORT: Identifies the primary input clock pin. Timing analysis and clock tree synthesis rely on this setting.CLOCK_PERIOD: Defines the clock period constraint in nanoseconds. A 10 ns period targets a clock frequency of 100 MHz.FP_CORE_UTIL: Defines the target core utilization percentage during floorplanning. Module 3 explores this parameter.PL_TARGET_DENSITY: Sets the target standard cell placement density. Module 4 covers this parameter.
Setting CLOCK_PERIOD accurately is essential. The timing engine checks every path between registers against this constraint.
Modifying the Clock Constraint
Consider reducing CLOCK_PERIOD from 10 ns to 5 ns. This change doubles the target operating frequency:
$$ f = \frac{1}{T} \implies \frac{1}{5\text{ ns}} = 200\text{ MHz}, \quad \text{versus } \frac{1}{10\text{ ns}} = 100\text{ MHz} $$
A shorter clock period imposes tighter timing constraints. Combinational logic paths have less time to settle between clock edges. Because an 8-bit counter contains few logic levels, the design closes timing at 200 MHz easily. Re-running the flow updates the static timing reports, which Module 7 analyzes in detail.
Timing closure involves an iterative workflow: adjust constraints, run the flow, and check worst-case slack. When timing failures occur, verify CLOCK_PERIOD first.
Practice Exercise
A configuration file specifies CLOCK_PORT: "clk", but the Verilog RTL names its clock input clock. What error occurs during the flow?
Solution
The flow fails to constrain the clock network. During synthesis, the SDC generation script searches for a top-level port named clk.
Because no matching port exists, the tool reports an error or processes the design without clock constraints. An unconstrained design produces misleading timing reports with zero reported violations despite violating timing. Always match CLOCK_PORT exactly to the RTL clock identifier.
The next article summarizes every OpenLane execution stage in sequential order.