99
1010#include " ProjMgrWorker.h"
1111
12+ /* *
13+ * @brief ram type
14+ */
15+ struct RamType {
16+ unsigned long long start = 0 ;
17+ unsigned long long size = 0 ;
18+ std::string pname;
19+ };
20+
1221/* *
1322 * @brief programming algorithm types
1423 */
1524struct AlgorithmType {
1625 std::string algorithm;
1726 unsigned long long start = 0 ;
1827 unsigned long long size = 0 ;
19- unsigned long long ramStart = 0 ;
20- unsigned long long ramSize = 0 ;
21- bool bDefault = false ;
22- std::string pname;
28+ RamType ram;
2329};
2430
2531/* *
@@ -32,9 +38,6 @@ struct MemoryType {
3238 std::string fromPack;
3339 unsigned long long start = 0 ;
3440 unsigned long long size = 0 ;
35- bool bDefault = false ;
36- bool bStartup = false ;
37- bool bUninit = false ;
3841 std::string pname;
3942};
4043
@@ -65,7 +68,7 @@ struct DebugSequencesBlockType {
6568 std::string execute;
6669 std::string control_if;
6770 std::string control_while;
68- std::string timeout;
71+ std::optional< unsigned int > timeout;
6972 bool bAtomic = false ;
7073 std::vector<DebugSequencesBlockType> blocks;
7174};
@@ -93,11 +96,62 @@ struct DebugVarsType {
9396struct DebuggerType {
9497 std::string name;
9598 std::string info;
96- std::string port ;
99+ std::string protocol ;
97100 unsigned long long clock = 0 ;
98101 std::string dbgconf;
99102};
100103
104+ /* *
105+ * @brief punit type
106+ */
107+ struct PunitType {
108+ std::optional<unsigned int > punit;
109+ std::optional<unsigned long long > address;
110+ };
111+
112+ /* *
113+ * @brief processor type
114+ */
115+ struct ProcessorType {
116+ std::string pname;
117+ std::vector<PunitType> punits;
118+ std::optional<unsigned int > apid;
119+ std::string resetSequence;
120+ };
121+
122+ /* *
123+ * @brief access port type
124+ */
125+ struct AccessPortType {
126+ unsigned int apid;
127+ std::optional<unsigned int > index;
128+ std::optional<unsigned long long > address;
129+ std::optional<unsigned int > hprot;
130+ std::optional<unsigned int > sprot;
131+ std::vector<AccessPortType> accessPorts;
132+ };
133+
134+ /* *
135+ * @brief debug port type
136+ */
137+ struct DebugPortType {
138+ unsigned int dpid;
139+ std::optional<unsigned int > jtagTapIndex;
140+ std::optional<unsigned int > swdTargetSel;
141+ std::vector<AccessPortType> accessPorts;
142+ };
143+
144+ /* *
145+ * @brief debug topology type
146+ */
147+ struct DebugTopologyType {
148+ std::vector<DebugPortType> debugPorts;
149+ std::vector<ProcessorType> processors;
150+ std::optional<bool > swj;
151+ std::optional<bool > dormant;
152+ std::string sdf;
153+ };
154+
101155 /* *
102156 * @brief debug run manager types
103157 */
@@ -117,6 +171,7 @@ struct RunDebugType {
117171 std::vector<DebuggerType> debuggers;
118172 DebugVarsType debugVars;
119173 std::vector<DebugSequencesType> debugSequences;
174+ DebugTopologyType debugTopology;
120175};
121176
122177/* *
@@ -154,6 +209,9 @@ class ProjMgrRunDebug {
154209 const RteItem* item, const std::string pname);
155210 FilesType SetLoadFromOutput (const ContextItem* context, OutputType output, const std::string type);
156211 std::string GetAccessAttributes (const RteItem* mem);
212+ void SetAccessPorts (std::vector<AccessPortType>& parent, const std::map<unsigned int ,
213+ std::vector<AccessPortType>>& childrenMap);
214+ void SetProtNodes (const RteDeviceProperty* item, AccessPortType& ap);
157215};
158216
159217#endif // PROJMGRRUNDEBUG_H
0 commit comments