package Cache_Analysis_Example public with Cheddar_Multicore_Properties; with Cheddar_Transformation_Properties; with memory_units; ------------------------------------------------ processor CPU_01 end CPU_01; ------------------------------------------------ -- L1_Instruction_Cache = Cheddar_ADL.Cache.Name -- Number of cache blocks = Memory_Size / Line_Size (Cache block names can be generated randomly). -- Memory_Size = Chedar_ADL.Cache.Cache_Size -- Cache_Type = Chedar_ADL.Cache.Line_Size -- Line_Size = Chedar_ADL.Cache.Line_Size -- Cache_Level = Level 1 --> a cache is associated to a core. Level 2 --> a cache is associated to a processors -- Associativity = Chedar_ADL.Cache.Associativity -- -- If a property in Cheddar ADL is not specified here, the default value is used. ------------------------------------------------ processor implementation CPU_01.Core_01 subcomponents L1_Instruction_Cache : memory memory_units::Cache.impl { Memory_Size => 1024Bytes; Cheddar_Multicore_Properties::Line_Size => 16Bytes; Cheddar_Multicore_Properties::Cache_Type => Instruction_Cache; Cheddar_Multicore_Properties::Cache_Level => 1; Cheddar_Multicore_Properties::Associativity => 1; Cheddar_Multicore_Properties::Cache_Size => 1024; Cheddar_Multicore_Properties::Block_Reload_Time => 1 us .. 2 us; }; properties Scheduling_Protocol=>(POSIX_1003_HIGHEST_PRIORITY_FIRST_PROTOCOL); end CPU_01.Core_01; ------------------------------------------------ system Cache_benchmark end Cache_benchmark; system implementation Cache_benchmark.impl subcomponents Hard : processor CPU_01.Core_01; Soft : process Malardalen.impl; properties Actual_Processor_Binding => (reference (Hard)) applies to Soft; Cheddar_Transformation_Properties::Exported_Attribute_Time_Units => MicroSecond; end Cache_benchmark.impl; process Malardalen end Malardalen; process implementation Malardalen.impl subcomponents Bs : thread Task_Bs; Fac : thread Task_Fac; Fibcall : thread Task_Fibcall; InsertSort : thread Task_InsertSort; end Malardalen.impl; ------------------------------------------------- -- All attributes exist in Task model -- A CFG is stored in an external file with filename = cfg_name -- period = Cheddar_ADL.Task.Period (must be a periodic task) -- Dispatch_Protocol = Cheddar_ADL.Task.Task_Type -- Compute_Execution_Time = Cheddar_ADL.Task.Capacity -- Deadline = Cheddar_ADL.Task.Deadline -- CFG_Name = Cheddar_ADL.Task.CFG_Name -- CFG_Relocatable = Cheddar_ADL.Task.CFG_Relocatable -- Text_Memory_Start_Address = Cheddar_ADL.Task.Text_Memory_Start_Address -- -- If a property in Cheddar ADL is not specified here, the default value is used. ------------------------------------------------ thread Task_Bs properties period => 1000us; Dispatch_Protocol => Periodic; Compute_Execution_Time => 76us..76us; Deadline => 1000us; Cheddar_Multicore_Properties::CFG_Name => "CFG_bs"; Cheddar_Multicore_Properties::CFG_Relocatable => True; Cheddar_Multicore_Properties::Text_Memory_Start_Address => 0; end Task_Bs; thread Task_Fac properties period => 1500us; Dispatch_Protocol => Periodic; Compute_Execution_Time => 125us..125us; Deadline => 1500us; Cheddar_Multicore_Properties::CFG_Name => "CFG_fac"; Cheddar_Multicore_Properties::CFG_Relocatable => True; Cheddar_Multicore_Properties::Text_Memory_Start_Address => 0; end Task_Fac; thread Task_Fibcall properties period => 1500us; Dispatch_Protocol => Periodic; Compute_Execution_Time => 300us..300us; Deadline => 1500us; Cheddar_Multicore_Properties::CFG_Name => "CFG_fibcall"; Cheddar_Multicore_Properties::CFG_Relocatable => True; Cheddar_Multicore_Properties::Text_Memory_Start_Address => 0; end Task_Fibcall; thread Task_InsertSort properties period => 2000us; Dispatch_Protocol => Periodic; Compute_Execution_Time => 450us..450us; Deadline => 2000us; Cheddar_Multicore_Properties::CFG_Name => "CFG_insertsort"; Cheddar_Multicore_Properties::CFG_Relocatable => True; Cheddar_Multicore_Properties::Text_Memory_Start_Address => 0; end Task_InsertSort; end Cache_Analysis_Example;