------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- This source file was automatically generated by Platypus -- see http://dossen.univ-brest.fr/apl -- -- Any modification of this file will be lost. -- Please see the "platypus" directory instead : it contains the Cheddar's -- model and its meta-model. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a free real time scheduling tool. -- This program provides services to automatically check temporal constraints -- of real time tasks. -- -- Copyright (C) 2002-2009 Frank Singhoff -- Cheddar is developed by the LAB-STICC Team, University of Brest -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : cheddar@listes.univ-brest.fr -- To post to this mailing list, you must be subscribed -- (see http//beru.univ-brest.fr/~singhoff/cheddar for details) -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Framework_Config; use Framework_Config; with id_generators; use id_generators; with Objects; use Objects; with standards_io; use standards_io; use standards_io.double_io; use standards_io.natural_io; with Convert_Strings; with Convert_Unbounded_Strings; with text_io; use text_io; with Ada.Finalization; with unbounded_strings; use unbounded_strings; use unbounded_strings.Unbounded_String_List_Package; with Unchecked_Deallocation; with Primitive_XML_Strings; use Primitive_XML_Strings; with Tables; with Ada.Numerics.Aux; use Ada.Numerics.Aux; Package Caches is type Cache_Addressing_Type is ( Virtual, Physical); procedure To_Cache_Addressing_Type is new Convert_Strings(Cache_Addressing_Type, Virtual); procedure To_Cache_Addressing_Type is new Convert_Unbounded_Strings(Cache_Addressing_Type, Virtual); function XML_String (obj : in Cache_Addressing_Type) return Unbounded_String; function XML_Ref_String (obj : in Cache_Addressing_Type) return Unbounded_String; package Cache_Addressing_Type_io is new text_io.enumeration_io(Cache_Addressing_Type); use Cache_Addressing_Type_io; type Cache_Type is ( Data_Cache_Type, Instruction_Cache_Type, Data_Instruction_Cache_Type); procedure To_Cache_Type is new Convert_Strings(Cache_Type, Data_Cache_Type); procedure To_Cache_Type is new Convert_Unbounded_Strings(Cache_Type, Data_Cache_Type); function XML_String (obj : in Cache_Type) return Unbounded_String; function XML_Ref_String (obj : in Cache_Type) return Unbounded_String; package Cache_Type_io is new text_io.enumeration_io(Cache_Type); use Cache_Type_io; type Cache_Coherence_Protocol_Type is ( Private_Cache_Protocol, Shared_Cache_Protocol, Private_Invalid_Cache_Protocol, Private_MSI_Cache_Protocol, Private_MESI_Cache_Protocol); procedure To_Cache_Coherence_Protocol_Type is new Convert_Strings(Cache_Coherence_Protocol_Type, Private_Cache_Protocol); procedure To_Cache_Coherence_Protocol_Type is new Convert_Unbounded_Strings(Cache_Coherence_Protocol_Type, Private_Cache_Protocol); function XML_String (obj : in Cache_Coherence_Protocol_Type) return Unbounded_String; function XML_Ref_String (obj : in Cache_Coherence_Protocol_Type) return Unbounded_String; package Cache_Coherence_Protocol_Type_io is new text_io.enumeration_io(Cache_Coherence_Protocol_Type); use Cache_Coherence_Protocol_Type_io; type Cache_Replacement_Type is ( Random, LRU, LRR, FIFO); procedure To_Cache_Replacement_Type is new Convert_Strings(Cache_Replacement_Type, Random); procedure To_Cache_Replacement_Type is new Convert_Unbounded_Strings(Cache_Replacement_Type, Random); function XML_String (obj : in Cache_Replacement_Type) return Unbounded_String; function XML_Ref_String (obj : in Cache_Replacement_Type) return Unbounded_String; package Cache_Replacement_Type_io is new text_io.enumeration_io(Cache_Replacement_Type); use Cache_Replacement_Type_io; type Write_Policy_Type is ( Copy_Back, Write_Through_with_Allocation, Write_Through_without_Allocation); procedure To_Write_Policy_Type is new Convert_Strings(Write_Policy_Type, Copy_Back); procedure To_Write_Policy_Type is new Convert_Unbounded_Strings(Write_Policy_Type, Copy_Back); function XML_String (obj : in Write_Policy_Type) return Unbounded_String; function XML_Ref_String (obj : in Write_Policy_Type) return Unbounded_String; package Write_Policy_Type_io is new text_io.enumeration_io(Write_Policy_Type); use Write_Policy_Type_io; -- --------= Generic_Cache =-------- type Generic_Cache; type Generic_Cache_Ptr is access all Generic_Cache'Class; type Generic_Cache is new Named_Object with record number_of_block : Natural; block_size : Natural; associativity : Natural; cache_replacement : Cache_Replacement_Type; hit_time : Double; miss_time : Double; miss_rate : Natural; cache_coherence_protocol : Cache_Coherence_Protocol_Type; cache_category : Cache_Type; end record; procedure Initialize(obj : in out Generic_Cache); procedure Put(obj : in Generic_Cache); procedure Put(obj : in Generic_Cache_Ptr); procedure Put_Name(obj : in Generic_Cache_Ptr); procedure Build_Attributes_XML_String(obj : in Generic_Cache; result : in out Unbounded_String); function XML_String(obj : in Generic_Cache) return Unbounded_String; function XML_String(obj : in Generic_Cache_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Generic_Cache) return Unbounded_String; function XML_Ref_String(obj : in Generic_Cache_Ptr) return Unbounded_String; function Get_Name (obj : in Generic_Cache) return Unbounded_String; function Get_Name (obj : in Generic_Cache_Ptr) return Unbounded_String; function Copy(obj : in Generic_Cache_Ptr) return Generic_Cache_Ptr; function Copy(obj : in Generic_Cache) return Generic_Cache_Ptr; function type_of(obj : in Generic_Cache) return unbounded_string_list; function type_of(obj : in Generic_Cache_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Generic_Cache'Class, Generic_Cache_Ptr); -- --------= Data_Cache =-------- type Data_Cache; type Data_Cache_Ptr is access all Data_Cache'Class; type Data_Cache is new Generic_Cache with record write_policy : Write_Policy_Type; end record; procedure Initialize(obj : in out Data_Cache); procedure Put(obj : in Data_Cache); procedure Put(obj : in Data_Cache_Ptr); procedure Put_Name(obj : in Data_Cache_Ptr); procedure Build_Attributes_XML_String(obj : in Data_Cache; result : in out Unbounded_String); function XML_String(obj : in Data_Cache) return Unbounded_String; function XML_String(obj : in Data_Cache_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Data_Cache) return Unbounded_String; function XML_Ref_String(obj : in Data_Cache_Ptr) return Unbounded_String; function Get_Name (obj : in Data_Cache) return Unbounded_String; function Get_Name (obj : in Data_Cache_Ptr) return Unbounded_String; function Copy(obj : in Data_Cache_Ptr) return Generic_Cache_Ptr; function Copy(obj : in Data_Cache) return Generic_Cache_Ptr; function type_of(obj : in Data_Cache) return unbounded_string_list; function type_of(obj : in Data_Cache_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Data_Cache'Class, Data_Cache_Ptr); -- --------= Instruction_Cache =-------- type Instruction_Cache; type Instruction_Cache_Ptr is access all Instruction_Cache'Class; type Instruction_Cache is new Generic_Cache with null record; procedure Initialize(obj : in out Instruction_Cache); procedure Put(obj : in Instruction_Cache); procedure Put(obj : in Instruction_Cache_Ptr); procedure Put_Name(obj : in Instruction_Cache_Ptr); procedure Build_Attributes_XML_String(obj : in Instruction_Cache; result : in out Unbounded_String); function XML_String(obj : in Instruction_Cache) return Unbounded_String; function XML_String(obj : in Instruction_Cache_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Instruction_Cache) return Unbounded_String; function XML_Ref_String(obj : in Instruction_Cache_Ptr) return Unbounded_String; function Get_Name (obj : in Instruction_Cache) return Unbounded_String; function Get_Name (obj : in Instruction_Cache_Ptr) return Unbounded_String; function Copy(obj : in Instruction_Cache_Ptr) return Generic_Cache_Ptr; function Copy(obj : in Instruction_Cache) return Generic_Cache_Ptr; function type_of(obj : in Instruction_Cache) return unbounded_string_list; function type_of(obj : in Instruction_Cache_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Instruction_Cache'Class, Instruction_Cache_Ptr); -- --------= Data_Instruction_Cache =-------- type Data_Instruction_Cache; type Data_Instruction_Cache_Ptr is access all Data_Instruction_Cache'Class; type Data_Instruction_Cache is new Generic_Cache with record write_policy : Write_Policy_Type; end record; procedure Initialize(obj : in out Data_Instruction_Cache); procedure Put(obj : in Data_Instruction_Cache); procedure Put(obj : in Data_Instruction_Cache_Ptr); procedure Put_Name(obj : in Data_Instruction_Cache_Ptr); procedure Build_Attributes_XML_String(obj : in Data_Instruction_Cache; result : in out Unbounded_String); function XML_String(obj : in Data_Instruction_Cache) return Unbounded_String; function XML_String(obj : in Data_Instruction_Cache_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Data_Instruction_Cache) return Unbounded_String; function XML_Ref_String(obj : in Data_Instruction_Cache_Ptr) return Unbounded_String; function Get_Name (obj : in Data_Instruction_Cache) return Unbounded_String; function Get_Name (obj : in Data_Instruction_Cache_Ptr) return Unbounded_String; function Copy(obj : in Data_Instruction_Cache_Ptr) return Generic_Cache_Ptr; function Copy(obj : in Data_Instruction_Cache) return Generic_Cache_Ptr; function type_of(obj : in Data_Instruction_Cache) return unbounded_string_list; function type_of(obj : in Data_Instruction_Cache_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Data_Instruction_Cache'Class, Data_Instruction_Cache_Ptr); package Caches_Table_Package is new Tables(Generic_Cache_Ptr, Framework_Config.Max_Caches, Put, XML_String, XML_Ref_String); use Caches_Table_Package; subtype Caches_Range is Caches_Table_Package.table_range; subtype Caches_Range_Ptr is Caches_Table_Package.table_range_Ptr; subtype Caches_Table is Caches_Table_Package.table; subtype Caches_Table_Ptr is Caches_Table_Package.table_Ptr; -- --------= Cache_System =-------- type Cache_System; type Cache_System_Ptr is access all Cache_System'Class; type Cache_System is new Named_Object with record caches : Caches_Table; end record; procedure Initialize(obj : in out Cache_System); procedure Put(obj : in Cache_System); procedure Put(obj : in Cache_System_Ptr); procedure Put_Name(obj : in Cache_System_Ptr); procedure Build_Attributes_XML_String(obj : in Cache_System; result : in out Unbounded_String); function XML_String(obj : in Cache_System) return Unbounded_String; function XML_String(obj : in Cache_System_Ptr) return Unbounded_String; function XML_Ref_String(obj : in Cache_System) return Unbounded_String; function XML_Ref_String(obj : in Cache_System_Ptr) return Unbounded_String; function Get_Name (obj : in Cache_System) return Unbounded_String; function Get_Name (obj : in Cache_System_Ptr) return Unbounded_String; function Copy(obj : in Cache_System_Ptr) return Cache_System_Ptr; function Copy(obj : in Cache_System) return Cache_System_Ptr; function type_of(obj : in Cache_System) return unbounded_string_list; function type_of(obj : in Cache_System_Ptr) return unbounded_string_list; procedure Free is new Unchecked_Deallocation (Cache_System'Class, Cache_System_Ptr); End Caches;