blob: 9407af06779cd2ecb30f3c93e09db1f77f9b63af [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
6-- the Free Software Foundation; version 2 of the License.
7--
8-- This program is distributed in the hope that it will be useful,
9-- but WITHOUT ANY WARRANTY; without even the implied warranty of
10-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11-- GNU General Public License for more details.
12--
13
14private package HW.GFX.GMA.PLLs
15with
16 Abstract_State => (State with Part_Of => GMA.State)
17is
18
19 -- NOTE: Order of DPLLs is twisted, as DPLL2 (WRPLL1)
20 -- should be selected as last choice.
21
22 -- XXX: Types should be private (but that triggers a bug in SPARK GPL 2016)
23 type T is (Invalid_PLL, DPLL0, DPLL1, DPLL3, DPLL2);
24 subtype Configurable_DPLLs is T range DPLL1 .. DPLL2;
25 Invalid : constant T := Invalid_PLL;
26
27 procedure Initialize
28 with
29 Global => (Output => State);
30
31 procedure Alloc
32 (Port_Cfg : in Port_Config;
33 PLL : out T;
34 Success : out Boolean);
35
36 procedure Free (PLL : T);
37
38 procedure All_Off;
39
40 function Register_Value (PLL : T) return Word32;
41
42end HW.GFX.GMA.PLLs;