Skip to content
G

GREEN-V

A Dual-Path Autonomous Power Management Unit

Created on 8th March 2026

•

G

GREEN-V

A Dual-Path Autonomous Power Management Unit

The problem GREEN-V solves

GREEN-V PMU — Predictive Power Management Unit for RISC-V

Dual-path autonomous clock management unit in SystemVerilog RTL.
62% power saving. 0ns predictive latency. 37/37 tests passing.

🔴 Live Demo

👉 Live Simulation Dashboard


Problem

Processors waste 40-70% power at fixed maximum frequency.
Software governors react in milliseconds — too slow.
GREEN-V reacts in 2 nanoseconds — directly in hardware.


Architecture — 5 Modules

ModulePurpose
ibuf_monitor.svReactive buffer monitoring — 4-state FSM, 8-cycle hysteresis
clk_divider.svGlitch-free clock switching — 15.6MHz to 500MHz
dvfs_controller.svPriority arbitration — spike → reactive → predictive
lookahead_unit.svPredictive — 8 RISC-V instructions scanned in parallel
cmu_top.svTop level wrapper

Results

MetricValue
Power Saving62% on mixed workload
Predictive Latency0ns
Silicon Area<200 LUTs
Tests Passing37/37 ✅

Challenges we ran into

🐛 Bugs & Hurdles

1. Infinite Loop in clk_divider Testbench

Problem:
Used logic [2:0] loop variable to iterate 0→7.
At value 7, incrementing wraps back to 0 — loop never exits.
Simulation hung every time.

Fix:
Changed to int — does not wrap.

// BROKEN
logic [2:0] lvl;
for (lvl = 0; lvl <= 7; lvl++) // wraps 7→0, infinite

// FIXED
int lvl;
for (lvl = 0; lvl <= 7; lvl++) // stops at 7

2. Hysteresis Counter Not Resetting

Problem:
When occupancy dropped back below threshold mid-count,
counter kept old value.
Next crossing committed in fewer than 8 cycles.
FSM thrashing on noisy occupancy.

Fix:
Explicit counter reset when direction changes.

pending_state <= suggested_state;
hyst_count    <= 4'd1; // fresh start

3. Glitch on Clock Switch — Runt Pulse

Problem:
Early version switched ratio immediately on change_req —
mid-cycle, cutting HIGH pulse short.
Downstream flip-flops latched wrong data.

Fix:
Switch only on falling edge — HIGH period always completes.

if (clk_reg) begin
    // FALLING EDGE — safe to switch
    if (switch_pending) begin
        active_div <= pending_div;
        change_ack <= 1'b1;
    end
end

4. div1 Passthrough — Counter Deadlock

Problem:
At div1 the counter was still running.
half_target = 0 caused deadlock —
change_ack never fired.
System stuck permanently at div1.

Fix:
div1 bypasses counter entirely via continuous assign.

assign clk_out = (active_div == 6'd1) ? clk_in : clk_reg;

Discussion

Builders also viewed

See more projects on Devfolio