blob: bf58f5763f9214dcf76521bbe05c61cf04f78de3 [file] [log] [blame]
Tim Wawrzynczak605660b2022-06-08 12:48:19 -06001--
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
15with HW.Debug;
16with GNAT.Source_Info;
17
18package body HW.GFX.GMA.PLLs
19with
20 Refined_State => (State => PLLs)
21is
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;
30 PLLs : PLL_State_Array;
31
32 procedure Initialize is
33 begin
34 pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
35 PLLs :=
36 (Configurable_DPLLs =>
37 (Use_Count => 0));
38 end Initialize;
39
40 procedure Alloc
41 (Port_Cfg : in Port_Config;
42 PLL : out T;
43 Success : out Boolean)
44 is
45 begin
46 pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
47 PLL := Invalid_PLL;
48 Success := True;
49 end Alloc;
50
51 procedure Free (PLL : T) is
52 begin
53 pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
54 end Free;
55
56 procedure All_Off is
57 begin
58 pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
59 end All_Off;
60
61 function Register_Value (PLL : T) return Word32
62 is
63 begin
64 pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
65 Return 0;
66 end Register_Value;
67end HW.GFX.GMA.PLLs;