From e7e17f92db8b249aaf99eb93a2447937d78270d5 Mon Sep 17 00:00:00 2001 From: Akash Bagdia Date: Mon, 19 Aug 2013 03:52:28 -0400 Subject: power: Add voltage domains to the clock domains This patch adds the notion of voltage domains, and groups clock domains that operate under the same voltage (i.e. power supply) into domains. Each clock domain is required to be associated with a voltage domain, and the latter requires the voltage to be explicitly set. A voltage domain is an independently controllable voltage supply being provided to section of the design. Thus, if you wish to perform dynamic voltage scaling on a CPU, its clock domain should be associated with a separate voltage domain. The current implementation of the voltage domain does not take into consideration cases where there are derived voltage domains running at ratio of native voltage domains, as with the case where there can be on-chip buck/boost (charge pumps) voltage regulation logic. The regression and configuration scripts are updated with a generic voltage domain for the system, and one for the CPUs. --- configs/example/fs.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'configs/example/fs.py') diff --git a/configs/example/fs.py b/configs/example/fs.py index 037a54b75..ff59ca67d 100644 --- a/configs/example/fs.py +++ b/configs/example/fs.py @@ -116,11 +116,20 @@ elif buildEnv['TARGET_ISA'] == "arm": else: fatal("Incapable of building %s full system!", buildEnv['TARGET_ISA']) +# Create a top-level voltage domain +test_sys.voltage_domain = VoltageDomain(voltage = options.sys_voltage) + # Create a source clock for the system and set the clock period -test_sys.clk_domain = SrcClockDomain(clock = options.sys_clock) +test_sys.clk_domain = SrcClockDomain(clock = options.sys_clock, + voltage_domain = test_sys.voltage_domain) + +# Create a CPU voltage domain +test_sys.cpu_voltage_domain = VoltageDomain() # Create a source clock for the CPUs and set the clock period -test_sys.cpu_clk_domain = SrcClockDomain(clock = options.cpu_clock) +test_sys.cpu_clk_domain = SrcClockDomain(clock = options.cpu_clock, + voltage_domain = + test_sys.cpu_voltage_domain) if options.kernel is not None: test_sys.kernel = binary(options.kernel) @@ -182,11 +191,19 @@ if len(bm) == 2: elif buildEnv['TARGET_ISA'] == 'arm': drive_sys = makeArmSystem(drive_mem_mode, options.machine_type, bm[1]) + # Create a top-level voltage domain + drive_sys.voltage_domain = VoltageDomain(voltage = options.sys_voltage) + # Create a source clock for the system and set the clock period drive_sys.clk_domain = SrcClockDomain(clock = options.sys_clock) + # Create a CPU voltage domain + drive_sys.cpu_voltage_domain = VoltageDomain() + # Create a source clock for the CPUs and set the clock period - drive_sys.cpu_clk_domain = SrcClockDomain(clock = options.cpu_clock) + drive_sys.cpu_clk_domain = SrcClockDomain(clock = options.cpu_clock, + voltage_domain = + drive_sys.cpu_voltage_domain) drive_sys.cpu = DriveCPUClass(clk_domain=drive_sys.cpu_clk_domain, cpu_id=0) -- cgit v1.2.3