| Arthur Heymans | 73ea032 | 2018-03-28 17:17:07 +0200 | [diff] [blame] | 1 | -- |
| 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; either version 2 of the License, or |
| 7 | -- (at your option) any later version. |
| 8 | -- |
| 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 | |
| 15 | private package HW.GFX.GMA.PLLs |
| 16 | with |
| 17 | Abstract_State => (State with Part_Of => GMA.State) |
| 18 | is |
| 19 | |
| 20 | -- XXX: Types should be private (but that triggers a bug in SPARK GPL 2016) |
| 21 | type T is (Invalid_PLL, DPLL_A, DPLL_B); |
| 22 | subtype DPLLs is T range DPLL_A .. DPLL_B; |
| 23 | Invalid : constant T := Invalid_PLL; |
| 24 | |
| 25 | procedure Initialize |
| 26 | with |
| 27 | Global => (Output => State); |
| 28 | |
| 29 | procedure Alloc |
| 30 | (Port_Cfg : in Port_Config; |
| 31 | PLL : out T; |
| 32 | Success : out Boolean); |
| 33 | |
| 34 | procedure Free (PLL : T); |
| 35 | |
| 36 | procedure All_Off; |
| 37 | |
| 38 | function Register_Value (PLL : T) return Word32; |
| 39 | |
| 40 | end HW.GFX.GMA.PLLs; |