-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathInternalCounterDef.cs
81 lines (73 loc) · 2.29 KB
/
InternalCounterDef.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// =====================================================================
// <copyright file="InternalCounterDef.cs" company="Advanced Micro Devices, Inc.">
// Copyright (c) 2011-2020 Advanced Micro Devices, Inc. All rights reserved.
// </copyright>
// <author>
// AMD Developer Tools Team
// </author>
// <summary>
// A class which contains information about an internal counter.
// </summary>
// =====================================================================
namespace PublicCounterCompiler
{
using System;
using System.Collections.Generic;
using System.Text;
/// <summary>
/// Contains the name and type of an internal counter
/// </summary>
public class InternalCounterDef : IEquatable<InternalCounterDef>
{
/// <summary>
/// Constructor
/// </summary>
public InternalCounterDef(int index, string name, string datatype, bool asicSpecific)
{
this.index = index;
this.name = name;
this.datatype = datatype;
isAsicSpecific = asicSpecific;
}
/// <summary>
/// Constructor
/// </summary>
public InternalCounterDef(InternalCounterDef other)
{
index = other.index;
name = other.name;
datatype = other.datatype;
isAsicSpecific = other.isAsicSpecific;
}
/// <summary>
/// Index of the internal counter.
/// </summary>
public int index { get; }
/// <summary>
/// Gets the name of the internal counter.
/// </summary>
public string name { get; }
/// <summary>
/// Gets the type of the internal counter.
/// </summary>
public string datatype { get; }
/// <summary>
/// Flag that indicates whether the internal counter is ASIC specific
/// </summary>
public bool isAsicSpecific { get; }
/// <summary>
/// ToString() representation of the internal counter.
/// </summary>
override public string ToString()
{
return name;
}
/// <summary>
/// Equality operator
/// </summary>
public bool Equals(InternalCounterDef other)
{
return name == other.name;
}
}
}