Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc....

31
Verifying a Low Power Design Asif Jafri Verilab Inc.

Transcript of Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc....

Page 1: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

Verifying a Low Power Design

Asif Jafri

Verilab Inc.

Page 2: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

2

Asif Jafri

Agenda

• Introduction

• Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 3: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

3

Asif Jafri

Agenda

• Introduction

• Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 4: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

4

Asif Jafri

Introduction

• Simulation based verification tools exist but what

about low power verification

• Looking to start low power verification…

• Challenges created by some widely used low

power design techniques

• Discuss Unified Power Format

• Extending your existing testbench

• Is this design verified

Page 5: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

5

Asif Jafri

SoC

CLUSTER-1

CLUSTER-0

System Level

CPU CPU

Cluster 0 Domain

Cluster 1 Domain

SoC Domain

CLUSTER-0 CLUSTER-1 SoC

OFF OFF OFF

ON ON ON

OFF ON ON

ON OFF ON

Page 6: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

6

Asif Jafri

Agenda

• Introduction

• Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 7: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

7

Asif Jafri

Frequency Scaling

P = ACV2F

P: Power consumed

A: Activity factor

C: Switched capacitance

V: Supply voltage

F: Frequency

Clock-0

Clock-1

Clock-2

Clock-3

Clock- CPU

• Frequency control registers in SoC domain

• Directed tests used to test all frequencies

• Power Gating CLUSTER-0 CLUSTER-1 SoC

OFF OFF OFF

ON ON ON

OFF ON ON

ON OFF ON

Page 8: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

8

Asif Jafri

Agenda

• Introduction

• Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 9: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

9

Asif Jafri

big-LITTLE Switching

• Switching between high-end performance and energy efficiency

• Requires virtualizer software to be run

• Running in simulation would take multiple days

• Best tested in Emulation environment – Emulation used for OS bring up

– Extremely fast proof of concept

SoC

CLUSTER-1

CLUSTER-0

Application

Page 10: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

10

Asif Jafri

Agenda

• Introduction

• Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 11: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

11

Asif Jafri

Power Aware Simulations

• Unified Power Format (UPF)

– IEEE standard 1801-2009, based on Accellera’s

unified power format

– Describes low power intent of a design

– Input to multiple tools

• Simulation

• Formal Verification

• Synthesis

• Place-and-route

Page 12: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

12

Asif Jafri

• Supply Ports

– Main Supply to the

house

– Provides power state

and voltage value

– Power state (ON,

OFF)

– Voltage (0.8v 1.0v

etc.)

Unified Power Format

create_supply_port VDD_CLUSTER0

create_supply_port VSS_CLUSTER0

Main

Supply

Page 13: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

13

Asif Jafri

• Power Domains

– The various rooms are

the domains of the

house

Unified Power Format

create_power_domain TOP

create_power_domain CLUSTER0

create_power_domain CLUSTER1

SOC

CLUSTER-0

CLUSTER-1

Main

Supply

Page 14: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

14

Asif Jafri

–create_power_switch main_sw \

-domain CLUSTER0 \

-input_supply_port {in VDD_CLUSTER0} \

-output_supply_port {out VDD_O_CLUSTER0} \

-control_port {inst_on inst_on} \

-on_state {state2001 in {!list_on}}

• Power Switches

– Circuit breakers to

various rooms.

– They control various

components in the

room

Unified Power Format

SOC

-0

CLUSTER-0

-0

CLUSTER-1

Main

Supply

Page 15: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

15

Asif Jafri

• Supply Nets

– Wiring between main

supply and breaker

Unified Power Format

create_supply_net net_VDD_CLUSTER0 –domain CLUSTER0

connect_supply_net net_VDD_CLUSTER0 –ports VDD_CLUSTER0

Main

Supply

SOC

-0

CLUSTER-0

-0

CLUSTER-1

Page 16: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

16

Asif Jafri

set_isolation CLUSTER0_SIG –domain CLUSTER0

• Isolation

– Doors and blinds

Unified Power Format

SOC

-0

CLUSTER-0

-0

CLUSTER-1

Main

Supply

Page 17: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

17

Asif Jafri

SoC

CLUSTER-1

CLUSTER-0

Power Aware Testing

CPU CPU

ASYNC Bridge I/O I/O

Page 18: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

18

Asif Jafri

Unified Power Format

• Hierarchical scope for UPF files

• VCS Command Line (Native Low Power)

set_scope <PATH TO UPF FILE>

load_upf $env(DESIGN_ROOT)/upf/CLUSTER0.upf

-scope <path to cluster0 core>

vcs –upf <top level upf file>

-power_top <module scope for top level upf>

-sverilog –debug_all –f …

Page 19: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

19

Asif Jafri

Agenda

• Introduction

• Dynamic Voltage Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 20: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

20

Asif Jafri

import UPF::*;

task power_up();

power up sequence;

supply_on (“VDD_CLUSTER0”, 1.2);

endtask

task power_down();

power down sequence;

status_reg.READ();

supply_off(“VDD_CLUSTER0”);

endtask

Testbench

Test

Generator

Driver

SoC

REG

Model

Power Controller

• Used to control and monitor system from outside

• Used to switch OFF or switch ON power supply to supply ports

Page 21: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

21

Asif Jafri

• Save context

• Clear and Invalidate caches

– Prevent any new data cache snoops or data cache

operations from other processors

• Put CPU’s in standby mode

– The processor waits for all instructions in the

processor to complete before entering idle or low

power state

Power Down Sequence

Test

Test

Test

Page 22: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

22

Asif Jafri

• Power down async bridge

– Write to control register in SoC domain

• Assert reset to cluster

– Write to control register in SoC domain

• Isolate cluster being powered down

– Write to control register in SoC domain

• Remove power

– supply_off(“VDD_CLUSTER0”);

Controller

Power Down Sequence

Controller

Controller

Controller

Page 23: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

23

Asif Jafri

Power Up Sequence

• Enable power

– supply_on (“VDD_CLUSTER0”, 1.2);

• Supply clocks to cluster

– Write to control reg in SoC domain

• Remove isolation

– Write to control reg in SoC domain

• Remove reset

– Write to control reg in SoC domain

• Run boot code to restore context

Test

Controller

Controller

Controller

Controller

Page 24: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

24

Asif Jafri

Agenda

• Introduction

• Dynamic Voltage Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 25: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

25

Asif Jafri

Tests

• Power up and power down test for each cluster – Testing basic power down and power up sequences

• Power up and power down with context save and restore – System can indeed be brought back to state before power

down

• Random Power up and down – Testing async bridges

– Corner cases

CLUSTER-0 CLUSTER-1 SoC

OFF ✓ OFF ✓ OFF

ON ✓ ON ✓ ON ✓

OFF ✓ ON ✓ ON ✓

ON ✓ OFF ✓ ON ✓

Page 26: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

26

Asif Jafri

Agenda

• Introduction

• Dynamic Voltage Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 27: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

27

Asif Jafri

Check that …

• …clocks are switched off in powered down

cluster

• …resets are asserted in powered down cluster

property check_clk;

@(Cluster0_clk) (cluster0_pwr_ctrl === 1’b1);

endproperty

In SoC domain

property check_rst;

@(Cluster0_rst) (cluster0_pwr_ctrl === 1’b1);

endproperty

Page 28: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

28

Asif Jafri

Check

• All existing assertions in clusters were used

• Assertions in powered down cluster

automatically disabled

Page 29: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

29

Asif Jafri

Agenda

• Introduction

• Dynamic Voltage Frequency Scaling

• big.LITTLE switching

• Power Aware Simulations

– Unified Power Format

– Testbench

– Tests

– Checks

• Summary

Page 30: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

30

Asif Jafri

Summary

• Various techniques used to reduce power

consumption

• Power Aware Simulations useful for testing

isolation, power gating

• big-LITTLE processing best tested by emulation

• Re-use most of your existing testbench

• Make use of directed tests, assertions, functional

coverage and code coverage to prove

functionality

Page 31: Verifying a Low Power Design - · PDF fileVerifying a Low Power Design Asif Jafri Verilab Inc. 2 Asif Jafri Agenda •Introduction ... house –Provides power state and voltage value

31

Asif Jafri

Thank You

Q&A