| Tim Wawrzynczak | 605660b | 2022-06-08 12:48:19 -0600 | [diff] [blame] | 1 | -- |
| 2 | -- Copyright (C) 2022 Google, LLC |
| 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 | with HW.Debug; |
| 16 | with GNAT.Source_Info; |
| 17 | |
| 18 | package body HW.GFX.GMA.PLLs |
| 19 | with |
| 20 | Refined_State => (State => PLLs) |
| 21 | is |
| 22 | |
| 23 | type Count_Range is new Natural range 0 .. 2; |
| 24 | |
| 25 | type PLL_State is record |
| 26 | Use_Count : Count_Range; |
| 27 | end record; |
| 28 | |
| 29 | type PLL_State_Array is array (Configurable_DPLLs) of PLL_State; |
| Angel Pons | 17cfc92 | 2024-04-11 14:08:16 +0200 | [diff] [blame] | 30 | |
| 31 | pragma Warnings (Off, "unused variable ""PLLs""", |
| 32 | Reason => "Not yet implemented."); |
| 33 | pragma Warnings (Off, "variable ""PLLs"" is assigned but never read", |
| 34 | Reason => "Not yet implemented."); |
| Tim Wawrzynczak | 605660b | 2022-06-08 12:48:19 -0600 | [diff] [blame] | 35 | PLLs : PLL_State_Array; |
| Angel Pons | 17cfc92 | 2024-04-11 14:08:16 +0200 | [diff] [blame] | 36 | pragma Warnings (On, "variable ""PLLs"" is assigned but never read"); |
| 37 | pragma Warnings (On, "unused variable ""PLLs"""); |
| Tim Wawrzynczak | 605660b | 2022-06-08 12:48:19 -0600 | [diff] [blame] | 38 | |
| 39 | procedure Initialize is |
| 40 | begin |
| 41 | pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity)); |
| 42 | PLLs := |
| 43 | (Configurable_DPLLs => |
| 44 | (Use_Count => 0)); |
| 45 | end Initialize; |
| 46 | |
| 47 | procedure Alloc |
| 48 | (Port_Cfg : in Port_Config; |
| 49 | PLL : out T; |
| 50 | Success : out Boolean) |
| 51 | is |
| 52 | begin |
| 53 | pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity)); |
| 54 | PLL := Invalid_PLL; |
| 55 | Success := True; |
| 56 | end Alloc; |
| 57 | |
| 58 | procedure Free (PLL : T) is |
| 59 | begin |
| 60 | pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity)); |
| 61 | end Free; |
| 62 | |
| 63 | procedure All_Off is |
| 64 | begin |
| 65 | pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity)); |
| 66 | end All_Off; |
| 67 | |
| 68 | function Register_Value (PLL : T) return Word32 |
| 69 | is |
| 70 | begin |
| 71 | pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity)); |
| 72 | Return 0; |
| 73 | end Register_Value; |
| 74 | end HW.GFX.GMA.PLLs; |