1 //
2 // Copyright (c) 2010-2018 Antmicro
3 //
4 //  This file is licensed under the MIT License.
5 //  Full license text is available in 'licenses/MIT.txt'.
6 //
7 using System;
8 using Antmicro.Renode.Peripherals.Memory;
9 using Antmicro.Renode.Peripherals.Miscellaneous.SiLabs;
10 
11 namespace Antmicro.Renode.Peripherals.Miscellaneous
12 {
13     public class DeviceInformation
14     {
DeviceInformation(DeviceFamily deviceFamily, ushort deviceNumber, MappedMemory flashDevice, MappedMemory sramDevice, byte productRevision = 0)15         public DeviceInformation(DeviceFamily deviceFamily, ushort deviceNumber, MappedMemory flashDevice, MappedMemory sramDevice, byte productRevision = 0)
16         {
17             flashSize = checked((ushort)(flashDevice.Size / 1024));
18             sramSize = checked((ushort)(sramDevice.Size / 1024));
19             this.productRevision = productRevision;
20             this.deviceFamily = deviceFamily;
21             this.deviceNumber = deviceNumber;
22         }
23 
24         public ulong Unique { get; set; }
25 
26         protected readonly ushort flashSize;
27         protected readonly ushort sramSize;
28         protected readonly byte productRevision;
29         protected readonly DeviceFamily deviceFamily;
30         protected readonly ushort deviceNumber;
31     }
32 }
33