Synthesis warnings that matter
You will learn
How to read a yosys log, and the warnings that become bugs on silicon.
yosys tells you a lot, and most of it is fine. A few lines are not: a latch you did not mean, a wire nothing drives, two drivers on one net, a memory that became flip-flops. Each of those works in simulation and fails on the chip. Open one of the real logs from t27 specs, then paste a log of your own.
Try it
Open each real log and find the one that yosys refused, and why. In the spec frame, a cross-module pass counts what it cleaned up: find the three counters of CrossOptPass and the test where they add up to 17.

Paste or drop a yosys synth_xilinx log: latches, undriven wires, driver conflicts, memories turned into flip-flops, warnings and final cell counts, read in your browser.
specs/fpga/crossopt.t27
// SPDX-License-Identifier: Apache-2.0
// t27/specs/fpga/crossopt.t27
// T27 Cross-Module Optimization Specification
// Inter-module constant propagation, dead signal elimination, instance merging
// Uses flat arrays + count fields (parser-compatible)
// phi^2 + 1/phi^2 = 3 | TRINITY
module CrossOpt {
pub struct CrossOptPass {
name : &str,
num_modules : u32,
constants_propagated : u32,
dead_signals_removed : u32,
instances_merged : u32,
}
fn pass_zero() -> CrossOptPass {
return CrossOptPass{
.name = "empty",
.num_modules = 0,
.constants_propagated = 0,
.dead_signals_removed = 0,
.instances_merged = 0,
};
}
fn pass_result(name: &str, mods: u32, consts: u32, dead: u32, merged: u32) -> CrossOptPass {
return CrossOptPass{
.name = name,
.num_modules = mods,
.constants_propagated = consts,
.dead_signals_removed = dead,
.instances_merged = merged,
};
}
fn total_improvements(p: CrossOptPass) -> u32 {
return p.constants_propagated + p.dead_signals_removed + p.instances_merged;
}
fn has_improvements(p: CrossOptPass) -> bool {
return total_improvements(p) > 0;
}
fn improvement_density(p: CrossOptPass) -> u32 {
if p.num_modules == 0 {
return 0;
}
return total_improvements(p) / p.num_modules;
}
pub struct CrossOptReport {
total_passes : u32,
total_constants : u32,
total_dead : u32,
total_merged : u32,
total_modules : u32,
}
fn report_ok(passes: u32, consts: u32, dead: u32, merged: u32, mods: u32) -> CrossOptReport {
return CrossOptReport{
.total_passes = passes,
.total_constants = consts,
.total_dead = dead,
.total_merged = merged,
.total_modules = mods,
};
}
fn total_optimizations(r: CrossOptReport) -> u32 {
return r.total_constants + r.total_dead + r.total_merged;
}
fn is_effective(r: CrossOptReport) -> bool {
return total_optimizations(r) > 0;
}
// === Tests ===
test pass_zero
given p = pass_zero()
then p.num_modules == 0
and total_improvements(p) == 0
and has_improvements(p) == false
test pass_result_creation
given p = pass_result("const_prop", 3, 10, 5, 2)
then p.name == "const_prop"
and p.num_modules == 3
and total_improvements(p) == 17
and has_improvements(p) == true
test improvement_density
given p = pass_result("opt", 5, 20, 10, 5)
then improvement_density(p) == 7
test improvement_density_zero
given p = pass_zero()
then improvement_density(p) == 0
test report_creation
given r = report_ok(3, 30, 15, 5, 10)
then r.total_passes == 3
and total_optimizations(r) == 50
and is_effective(r) == true
test report_empty
given r = report_ok(0, 0, 0, 0, 0)
then is_effective(r) == false
invariant improvements_non_negative
given p = pass_zero()
assert total_improvements(p) >= 0
bench improvement_density_latency
measure: nanoseconds to improvement_density(pass_result("bench", 5, 20, 10, 5))
target: < 50ns
bench total_improvements_latency
measure: nanoseconds to total_improvements(pass_result("bench", 10, 50, 25, 10))
target: < 50ns
}
// phi^2 + 1/phi^2 = 3 | TRINITY
All lessons
Module 1 · The chip
What an FPGA is, which chip we use, and how its pins meet the board.
Module 2 · Numbers in hardware
Bits, trits and number formats, and what arithmetic costs in logic.
Module 3 · Your t27 program
Write a spec, test it, and see why compiling is not the same as being right.
Module 4 · Inside t27c
How the compiler reads a spec and what it writes, including the native t27b.
Module 5 · From spec to hardware
The Verilog t27c writes, the cells it becomes, and what one LUT does.
Module 6 · Reading synthesis
What yosys reports about your design, and which warnings matter.
Module 7 · Place, route, timing
Where the cells land on the die, and whether the clock is met.
Module 8 · The bitstream
How a routed design becomes the bits the chip loads, with no Vivado.
Module 9 · On the board
Ask the chip who it is, load the bits, and check them.