blob: b975229ec61a9f2f6829edb6c8dc8a5d299f6834 [file] [log] [blame]
Nico Huber83693c82016-10-08 22:17:55 +02001--
2-- Copyright (C) 2015-2016 secunet Security Networks AG
3--
4-- This program is free software; you can redistribute it and/or modify
5-- it under the terms of the GNU General Public License as published by
Nico Huber125a29e2016-10-18 00:23:54 +02006-- the Free Software Foundation; either version 2 of the License, or
7-- (at your option) any later version.
Nico Huber83693c82016-10-08 22:17:55 +02008--
9-- This program is distributed in the hope that it will be useful,
10-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-- GNU General Public License for more details.
13--
14
15private package HW.GFX.GMA.PLLs
16with
17 Abstract_State => (State with Part_Of => GMA.State)
18is
19
20 -- NOTE: Order of DPLLs is twisted, as DPLL2 (WRPLL1)
21 -- should be selected as last choice.
22
23 -- XXX: Types should be private (but that triggers a bug in SPARK GPL 2016)
24 type T is (Invalid_PLL, DPLL0, DPLL1, DPLL3, DPLL2);
25 subtype Configurable_DPLLs is T range DPLL1 .. DPLL2;
26 Invalid : constant T := Invalid_PLL;
27
28 procedure Initialize
29 with
30 Global => (Output => State);
31
32 procedure Alloc
33 (Port_Cfg : in Port_Config;
34 PLL : out T;
35 Success : out Boolean);
36
37 procedure Free (PLL : T);
38
39 procedure All_Off;
40
41 function Register_Value (PLL : T) return Word32;
42
43end HW.GFX.GMA.PLLs;