@modular-circuit/perc 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -24
- package/dist/index.d.ts +3 -24
- package/dist/index.js +30 -50
- package/dist/index.mjs +30 -50
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -78,121 +78,101 @@ declare const ERCE_UNANNOTATED: (id: string) => {
|
|
|
78
78
|
error_code: ERCE_T;
|
|
79
79
|
error_message: string;
|
|
80
80
|
eda_item_ids: string[];
|
|
81
|
-
severity: SEVERITY;
|
|
82
81
|
};
|
|
83
82
|
declare const ERCE_PIN_TO_PIN_ERROR: (a: ELECTRICAL_NODE, b: ELECTRICAL_NODE) => {
|
|
84
83
|
error_code: ERCE_T;
|
|
85
84
|
error_message: string;
|
|
86
85
|
eda_item_ids: string[];
|
|
87
|
-
severity: SEVERITY;
|
|
88
86
|
};
|
|
89
87
|
declare const ERCE_PIN_NOT_CONNECTED: (id: string) => {
|
|
90
88
|
error_code: ERCE_T;
|
|
91
89
|
error_message: string;
|
|
92
90
|
eda_item_ids: string[];
|
|
93
|
-
severity: SEVERITY;
|
|
94
91
|
};
|
|
95
92
|
declare const ERCE_DRIVER_CONFLICT: (eda_item_ids: string[], primaryName: string, secondaryName: string) => {
|
|
96
93
|
error_code: PP_ERROR;
|
|
97
94
|
error_message: string;
|
|
98
95
|
eda_item_ids: string[];
|
|
99
|
-
severity: SEVERITY;
|
|
100
96
|
};
|
|
101
97
|
declare const PP_INAPPROPRIATE_FUNC: (eda_item_ids: string[]) => {
|
|
102
98
|
error_code: PP_ERROR;
|
|
103
99
|
error_message: string;
|
|
104
100
|
eda_item_ids: string[];
|
|
105
|
-
severity: SEVERITY;
|
|
106
101
|
};
|
|
107
102
|
declare const PP_NOT_DRIVEN: (eda_item_ids: string[]) => {
|
|
108
103
|
error_code: PP_ERROR;
|
|
109
104
|
error_message: string;
|
|
110
105
|
eda_item_ids: string[];
|
|
111
|
-
severity: SEVERITY;
|
|
112
106
|
};
|
|
113
107
|
declare const PP_DUPLICATED_SOURCES: (eda_item_ids: string[]) => {
|
|
114
108
|
error_code: PP_ERROR;
|
|
115
109
|
error_message: string;
|
|
116
110
|
eda_item_ids: string[];
|
|
117
|
-
severity: SEVERITY;
|
|
118
111
|
};
|
|
119
112
|
declare const PP_INSUFFICIENT_DRIVER: (eda_item_ids: string[], desc?: string) => {
|
|
120
113
|
error_code: PP_ERROR;
|
|
121
114
|
error_message: string;
|
|
122
115
|
eda_item_ids: string[];
|
|
123
|
-
severity: SEVERITY;
|
|
124
116
|
};
|
|
125
117
|
declare const PP_OVER_DRIVEN: (eda_item_ids: string[], desc?: string) => {
|
|
126
118
|
error_code: PP_ERROR;
|
|
127
119
|
error_message: string;
|
|
128
120
|
eda_item_ids: string[];
|
|
129
|
-
severity: SEVERITY;
|
|
130
121
|
};
|
|
131
122
|
declare const PP_IMPEDANCE_SIGNAL_INTEGRITY: (eda_item_ids: string[]) => {
|
|
132
123
|
error_code: PP_ERROR;
|
|
133
124
|
error_message: string;
|
|
134
125
|
eda_item_ids: string[];
|
|
135
|
-
severity: SEVERITY;
|
|
136
126
|
};
|
|
137
127
|
declare const PP_INCOMPATIBLE_VOLTAGE_LEVELS: (source: string) => {
|
|
138
128
|
error_code: PP_ERROR;
|
|
139
129
|
error_message: string;
|
|
140
130
|
eda_item_ids: string[];
|
|
141
|
-
severity: SEVERITY;
|
|
142
131
|
};
|
|
143
132
|
declare const PP_SIGNAL_LEVELS_NOT_CONTAINED_WITHIN_VOLTAGE: (source: string) => {
|
|
144
133
|
error_code: PP_ERROR;
|
|
145
134
|
error_message: string;
|
|
146
135
|
eda_item_ids: string[];
|
|
147
|
-
severity: SEVERITY;
|
|
148
136
|
};
|
|
149
137
|
declare const PP_INCOMPATIBLE_SIGNAL_LEVELS: (source: string) => {
|
|
150
138
|
error_code: PP_ERROR;
|
|
151
139
|
error_message: string;
|
|
152
140
|
eda_item_ids: string[];
|
|
153
|
-
severity: SEVERITY;
|
|
154
141
|
};
|
|
155
142
|
declare const PP_OVERCURRENT: (source: string) => {
|
|
156
143
|
error_code: PP_ERROR;
|
|
157
144
|
error_message: string;
|
|
158
145
|
eda_item_ids: string[];
|
|
159
|
-
severity: SEVERITY;
|
|
160
146
|
};
|
|
161
147
|
declare const PP_INCOMPATIBLE_DIGITAL_THRESHOLDS: (eda_item_ids: string[]) => {
|
|
162
148
|
error_code: PP_ERROR;
|
|
163
149
|
error_message: string;
|
|
164
150
|
eda_item_ids: string[];
|
|
165
|
-
severity: SEVERITY;
|
|
166
151
|
};
|
|
167
152
|
declare const PP_REQUIRES_CONNECTED_SOURCE_OR_BIDIR: (eda_item_ids: string[]) => {
|
|
168
153
|
error_code: PP_ERROR;
|
|
169
154
|
error_message: string;
|
|
170
155
|
eda_item_ids: string[];
|
|
171
|
-
severity: SEVERITY;
|
|
172
156
|
};
|
|
173
157
|
declare const PP_ILLEGAL_CONNECTION: (eda_item_ids: string[], detail: string) => {
|
|
174
158
|
error_code: PP_ERROR;
|
|
175
159
|
error_message: string;
|
|
176
160
|
eda_item_ids: string[];
|
|
177
|
-
severity: SEVERITY;
|
|
178
161
|
};
|
|
179
162
|
declare const CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT: (bundle_id: string) => {
|
|
180
163
|
error_code: PP_ERROR;
|
|
181
164
|
error_message: string;
|
|
182
165
|
eda_item_ids: string[];
|
|
183
|
-
severity: SEVERITY;
|
|
184
166
|
};
|
|
185
167
|
declare const INVALID_INPUT: (eda_item_ids: string[], error_message: unknown) => {
|
|
186
168
|
error_code: PP_ERROR;
|
|
187
169
|
error_message: unknown;
|
|
188
170
|
eda_item_ids: string[];
|
|
189
|
-
severity: SEVERITY;
|
|
190
171
|
};
|
|
191
172
|
declare const INVALID_PORT_ID_REFERENCED_IN_CONNECTION: (eda_item_ids: string[]) => {
|
|
192
173
|
error_code: PP_ERROR;
|
|
193
174
|
error_message: string;
|
|
194
175
|
eda_item_ids: string[];
|
|
195
|
-
severity: SEVERITY;
|
|
196
176
|
};
|
|
197
177
|
|
|
198
178
|
interface REPORT_ITEM {
|
|
@@ -204,7 +184,6 @@ interface REPORT_ITEM {
|
|
|
204
184
|
* A message describing the details of this specific error
|
|
205
185
|
*/
|
|
206
186
|
error_message: unknown;
|
|
207
|
-
severity?: SEVERITY;
|
|
208
187
|
}
|
|
209
188
|
|
|
210
189
|
/**Token from KiCAD
|
|
@@ -347,10 +326,10 @@ declare enum PP_ERROR {
|
|
|
347
326
|
FAILED_ASSERTION = "failed_assertion",
|
|
348
327
|
UN_EVALUATED_ASSERTION = "un_evaluated_assertion",
|
|
349
328
|
INCONSISTENT_LINK_ARRAY_ELEMENTS = "inconsistent_link_array_elements",
|
|
350
|
-
PP_UNANNOTATED = "
|
|
351
|
-
PP_UNKNOWN_PORT_TYPE = "
|
|
329
|
+
PP_UNANNOTATED = "unannotated",
|
|
330
|
+
PP_UNKNOWN_PORT_TYPE = "unknown_port_type",
|
|
352
331
|
INAPPROPRIATE_FUNC = "Functionally inappropriate link",
|
|
353
|
-
NOT_DRIVEN = "
|
|
332
|
+
NOT_DRIVEN = "not_driven",
|
|
354
333
|
DUPLICATED_PWR_SOURCES = "duplicated_pwr_sources",
|
|
355
334
|
INSUFFICIENT_DRIVER = "Insufficient_driver",
|
|
356
335
|
OVER_DRIVEN = "over_driven",
|
package/dist/index.d.ts
CHANGED
|
@@ -78,121 +78,101 @@ declare const ERCE_UNANNOTATED: (id: string) => {
|
|
|
78
78
|
error_code: ERCE_T;
|
|
79
79
|
error_message: string;
|
|
80
80
|
eda_item_ids: string[];
|
|
81
|
-
severity: SEVERITY;
|
|
82
81
|
};
|
|
83
82
|
declare const ERCE_PIN_TO_PIN_ERROR: (a: ELECTRICAL_NODE, b: ELECTRICAL_NODE) => {
|
|
84
83
|
error_code: ERCE_T;
|
|
85
84
|
error_message: string;
|
|
86
85
|
eda_item_ids: string[];
|
|
87
|
-
severity: SEVERITY;
|
|
88
86
|
};
|
|
89
87
|
declare const ERCE_PIN_NOT_CONNECTED: (id: string) => {
|
|
90
88
|
error_code: ERCE_T;
|
|
91
89
|
error_message: string;
|
|
92
90
|
eda_item_ids: string[];
|
|
93
|
-
severity: SEVERITY;
|
|
94
91
|
};
|
|
95
92
|
declare const ERCE_DRIVER_CONFLICT: (eda_item_ids: string[], primaryName: string, secondaryName: string) => {
|
|
96
93
|
error_code: PP_ERROR;
|
|
97
94
|
error_message: string;
|
|
98
95
|
eda_item_ids: string[];
|
|
99
|
-
severity: SEVERITY;
|
|
100
96
|
};
|
|
101
97
|
declare const PP_INAPPROPRIATE_FUNC: (eda_item_ids: string[]) => {
|
|
102
98
|
error_code: PP_ERROR;
|
|
103
99
|
error_message: string;
|
|
104
100
|
eda_item_ids: string[];
|
|
105
|
-
severity: SEVERITY;
|
|
106
101
|
};
|
|
107
102
|
declare const PP_NOT_DRIVEN: (eda_item_ids: string[]) => {
|
|
108
103
|
error_code: PP_ERROR;
|
|
109
104
|
error_message: string;
|
|
110
105
|
eda_item_ids: string[];
|
|
111
|
-
severity: SEVERITY;
|
|
112
106
|
};
|
|
113
107
|
declare const PP_DUPLICATED_SOURCES: (eda_item_ids: string[]) => {
|
|
114
108
|
error_code: PP_ERROR;
|
|
115
109
|
error_message: string;
|
|
116
110
|
eda_item_ids: string[];
|
|
117
|
-
severity: SEVERITY;
|
|
118
111
|
};
|
|
119
112
|
declare const PP_INSUFFICIENT_DRIVER: (eda_item_ids: string[], desc?: string) => {
|
|
120
113
|
error_code: PP_ERROR;
|
|
121
114
|
error_message: string;
|
|
122
115
|
eda_item_ids: string[];
|
|
123
|
-
severity: SEVERITY;
|
|
124
116
|
};
|
|
125
117
|
declare const PP_OVER_DRIVEN: (eda_item_ids: string[], desc?: string) => {
|
|
126
118
|
error_code: PP_ERROR;
|
|
127
119
|
error_message: string;
|
|
128
120
|
eda_item_ids: string[];
|
|
129
|
-
severity: SEVERITY;
|
|
130
121
|
};
|
|
131
122
|
declare const PP_IMPEDANCE_SIGNAL_INTEGRITY: (eda_item_ids: string[]) => {
|
|
132
123
|
error_code: PP_ERROR;
|
|
133
124
|
error_message: string;
|
|
134
125
|
eda_item_ids: string[];
|
|
135
|
-
severity: SEVERITY;
|
|
136
126
|
};
|
|
137
127
|
declare const PP_INCOMPATIBLE_VOLTAGE_LEVELS: (source: string) => {
|
|
138
128
|
error_code: PP_ERROR;
|
|
139
129
|
error_message: string;
|
|
140
130
|
eda_item_ids: string[];
|
|
141
|
-
severity: SEVERITY;
|
|
142
131
|
};
|
|
143
132
|
declare const PP_SIGNAL_LEVELS_NOT_CONTAINED_WITHIN_VOLTAGE: (source: string) => {
|
|
144
133
|
error_code: PP_ERROR;
|
|
145
134
|
error_message: string;
|
|
146
135
|
eda_item_ids: string[];
|
|
147
|
-
severity: SEVERITY;
|
|
148
136
|
};
|
|
149
137
|
declare const PP_INCOMPATIBLE_SIGNAL_LEVELS: (source: string) => {
|
|
150
138
|
error_code: PP_ERROR;
|
|
151
139
|
error_message: string;
|
|
152
140
|
eda_item_ids: string[];
|
|
153
|
-
severity: SEVERITY;
|
|
154
141
|
};
|
|
155
142
|
declare const PP_OVERCURRENT: (source: string) => {
|
|
156
143
|
error_code: PP_ERROR;
|
|
157
144
|
error_message: string;
|
|
158
145
|
eda_item_ids: string[];
|
|
159
|
-
severity: SEVERITY;
|
|
160
146
|
};
|
|
161
147
|
declare const PP_INCOMPATIBLE_DIGITAL_THRESHOLDS: (eda_item_ids: string[]) => {
|
|
162
148
|
error_code: PP_ERROR;
|
|
163
149
|
error_message: string;
|
|
164
150
|
eda_item_ids: string[];
|
|
165
|
-
severity: SEVERITY;
|
|
166
151
|
};
|
|
167
152
|
declare const PP_REQUIRES_CONNECTED_SOURCE_OR_BIDIR: (eda_item_ids: string[]) => {
|
|
168
153
|
error_code: PP_ERROR;
|
|
169
154
|
error_message: string;
|
|
170
155
|
eda_item_ids: string[];
|
|
171
|
-
severity: SEVERITY;
|
|
172
156
|
};
|
|
173
157
|
declare const PP_ILLEGAL_CONNECTION: (eda_item_ids: string[], detail: string) => {
|
|
174
158
|
error_code: PP_ERROR;
|
|
175
159
|
error_message: string;
|
|
176
160
|
eda_item_ids: string[];
|
|
177
|
-
severity: SEVERITY;
|
|
178
161
|
};
|
|
179
162
|
declare const CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT: (bundle_id: string) => {
|
|
180
163
|
error_code: PP_ERROR;
|
|
181
164
|
error_message: string;
|
|
182
165
|
eda_item_ids: string[];
|
|
183
|
-
severity: SEVERITY;
|
|
184
166
|
};
|
|
185
167
|
declare const INVALID_INPUT: (eda_item_ids: string[], error_message: unknown) => {
|
|
186
168
|
error_code: PP_ERROR;
|
|
187
169
|
error_message: unknown;
|
|
188
170
|
eda_item_ids: string[];
|
|
189
|
-
severity: SEVERITY;
|
|
190
171
|
};
|
|
191
172
|
declare const INVALID_PORT_ID_REFERENCED_IN_CONNECTION: (eda_item_ids: string[]) => {
|
|
192
173
|
error_code: PP_ERROR;
|
|
193
174
|
error_message: string;
|
|
194
175
|
eda_item_ids: string[];
|
|
195
|
-
severity: SEVERITY;
|
|
196
176
|
};
|
|
197
177
|
|
|
198
178
|
interface REPORT_ITEM {
|
|
@@ -204,7 +184,6 @@ interface REPORT_ITEM {
|
|
|
204
184
|
* A message describing the details of this specific error
|
|
205
185
|
*/
|
|
206
186
|
error_message: unknown;
|
|
207
|
-
severity?: SEVERITY;
|
|
208
187
|
}
|
|
209
188
|
|
|
210
189
|
/**Token from KiCAD
|
|
@@ -347,10 +326,10 @@ declare enum PP_ERROR {
|
|
|
347
326
|
FAILED_ASSERTION = "failed_assertion",
|
|
348
327
|
UN_EVALUATED_ASSERTION = "un_evaluated_assertion",
|
|
349
328
|
INCONSISTENT_LINK_ARRAY_ELEMENTS = "inconsistent_link_array_elements",
|
|
350
|
-
PP_UNANNOTATED = "
|
|
351
|
-
PP_UNKNOWN_PORT_TYPE = "
|
|
329
|
+
PP_UNANNOTATED = "unannotated",
|
|
330
|
+
PP_UNKNOWN_PORT_TYPE = "unknown_port_type",
|
|
352
331
|
INAPPROPRIATE_FUNC = "Functionally inappropriate link",
|
|
353
|
-
NOT_DRIVEN = "
|
|
332
|
+
NOT_DRIVEN = "not_driven",
|
|
354
333
|
DUPLICATED_PWR_SOURCES = "duplicated_pwr_sources",
|
|
355
334
|
INSUFFICIENT_DRIVER = "Insufficient_driver",
|
|
356
335
|
OVER_DRIVEN = "over_driven",
|
package/dist/index.js
CHANGED
|
@@ -119,10 +119,10 @@ var PP_ERROR = /* @__PURE__ */ ((PP_ERROR2) => {
|
|
|
119
119
|
PP_ERROR2["FAILED_ASSERTION"] = "failed_assertion";
|
|
120
120
|
PP_ERROR2["UN_EVALUATED_ASSERTION"] = "un_evaluated_assertion";
|
|
121
121
|
PP_ERROR2["INCONSISTENT_LINK_ARRAY_ELEMENTS"] = "inconsistent_link_array_elements";
|
|
122
|
-
PP_ERROR2["PP_UNANNOTATED"] = "
|
|
123
|
-
PP_ERROR2["PP_UNKNOWN_PORT_TYPE"] = "
|
|
122
|
+
PP_ERROR2["PP_UNANNOTATED"] = "unannotated";
|
|
123
|
+
PP_ERROR2["PP_UNKNOWN_PORT_TYPE"] = "unknown_port_type";
|
|
124
124
|
PP_ERROR2["INAPPROPRIATE_FUNC"] = "Functionally inappropriate link";
|
|
125
|
-
PP_ERROR2["NOT_DRIVEN"] = "
|
|
125
|
+
PP_ERROR2["NOT_DRIVEN"] = "not_driven";
|
|
126
126
|
PP_ERROR2["DUPLICATED_PWR_SOURCES"] = "duplicated_pwr_sources";
|
|
127
127
|
PP_ERROR2["INSUFFICIENT_DRIVER"] = "Insufficient_driver";
|
|
128
128
|
PP_ERROR2["OVER_DRIVEN"] = "over_driven";
|
|
@@ -156,10 +156,10 @@ var DEFAULT_PP_ERROR_SEVERITY = {
|
|
|
156
156
|
["failed_assertion" /* FAILED_ASSERTION */]: "error" /* RPT_SEVERITY_ERROR */,
|
|
157
157
|
["un_evaluated_assertion" /* UN_EVALUATED_ASSERTION */]: "error" /* RPT_SEVERITY_ERROR */,
|
|
158
158
|
["inconsistent_link_array_elements" /* INCONSISTENT_LINK_ARRAY_ELEMENTS */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
159
|
-
["
|
|
160
|
-
["
|
|
159
|
+
["unannotated" /* PP_UNANNOTATED */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
160
|
+
["unknown_port_type" /* PP_UNKNOWN_PORT_TYPE */]: "error" /* RPT_SEVERITY_ERROR */,
|
|
161
161
|
["Functionally inappropriate link" /* INAPPROPRIATE_FUNC */]: "error" /* RPT_SEVERITY_ERROR */,
|
|
162
|
-
["
|
|
162
|
+
["not_driven" /* NOT_DRIVEN */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
163
163
|
["duplicated_pwr_sources" /* DUPLICATED_PWR_SOURCES */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
164
164
|
["Insufficient_driver" /* INSUFFICIENT_DRIVER */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
165
165
|
["over_driven" /* OVER_DRIVEN */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
@@ -198,124 +198,104 @@ var import_electronics_model = require("@modular-circuit/electronics-model");
|
|
|
198
198
|
var ERCE_UNANNOTATED = (id) => ({
|
|
199
199
|
error_code: "unannotated" /* ERCE_UNANNOTATED */,
|
|
200
200
|
error_message: "Port has no electrical type specified.",
|
|
201
|
-
eda_item_ids: [id]
|
|
202
|
-
severity: "warning" /* RPT_SEVERITY_WARNING */
|
|
201
|
+
eda_item_ids: [id]
|
|
203
202
|
});
|
|
204
203
|
var ERCE_PIN_TO_PIN_ERROR = (a, b) => ({
|
|
205
204
|
error_code: "ERCE_PIN_TO_PIN_ERROR" /* ERCE_PIN_TO_PIN_ERROR */,
|
|
206
205
|
error_message: `Port ${(0, import_electronics_model.get_electrical_pin_type)(a)} and port ${(0, import_electronics_model.get_electrical_pin_type)(b)} are not compatible.`,
|
|
207
|
-
eda_item_ids: [a.uuid, b.uuid]
|
|
208
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
206
|
+
eda_item_ids: [a.uuid, b.uuid]
|
|
209
207
|
});
|
|
210
208
|
var ERCE_PIN_NOT_CONNECTED = (id) => ({
|
|
211
209
|
error_code: "pin_not_connected" /* ERCE_PIN_NOT_CONNECTED */,
|
|
212
210
|
error_message: "Port not connected.",
|
|
213
|
-
eda_item_ids: [id]
|
|
214
|
-
severity: "warning" /* RPT_SEVERITY_WARNING */
|
|
211
|
+
eda_item_ids: [id]
|
|
215
212
|
});
|
|
216
213
|
var ERCE_DRIVER_CONFLICT = (eda_item_ids, primaryName, secondaryName) => ({
|
|
217
214
|
error_code: "Functionally inappropriate link" /* INAPPROPRIATE_FUNC */,
|
|
218
215
|
error_message: `Both ${primaryName} and ${secondaryName} are attached to the same net.`,
|
|
219
|
-
eda_item_ids
|
|
220
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
216
|
+
eda_item_ids
|
|
221
217
|
});
|
|
222
218
|
var PP_INAPPROPRIATE_FUNC = (eda_item_ids) => ({
|
|
223
219
|
error_code: "Functionally inappropriate link" /* INAPPROPRIATE_FUNC */,
|
|
224
220
|
error_message: "Inappropriate ports functions.",
|
|
225
|
-
eda_item_ids
|
|
226
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
221
|
+
eda_item_ids
|
|
227
222
|
});
|
|
228
223
|
var PP_NOT_DRIVEN = (eda_item_ids) => ({
|
|
229
|
-
error_code: "
|
|
224
|
+
error_code: "not_driven" /* NOT_DRIVEN */,
|
|
230
225
|
error_message: "Net not driven.",
|
|
231
|
-
eda_item_ids
|
|
232
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
226
|
+
eda_item_ids
|
|
233
227
|
});
|
|
234
228
|
var PP_DUPLICATED_SOURCES = (eda_item_ids) => ({
|
|
235
229
|
error_code: "duplicated_pwr_sources" /* DUPLICATED_PWR_SOURCES */,
|
|
236
230
|
error_message: "Net connected to multiple power sources.",
|
|
237
|
-
eda_item_ids
|
|
238
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
231
|
+
eda_item_ids
|
|
239
232
|
});
|
|
240
233
|
var PP_INSUFFICIENT_DRIVER = (eda_item_ids, desc) => ({
|
|
241
234
|
error_code: "Insufficient_driver" /* INSUFFICIENT_DRIVER */,
|
|
242
235
|
error_message: `Insufficient ${desc} driver.`,
|
|
243
|
-
eda_item_ids
|
|
244
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
236
|
+
eda_item_ids
|
|
245
237
|
});
|
|
246
238
|
var PP_OVER_DRIVEN = (eda_item_ids, desc) => ({
|
|
247
239
|
error_code: "over_driven" /* OVER_DRIVEN */,
|
|
248
240
|
error_message: `${desc} over driven.`,
|
|
249
|
-
eda_item_ids
|
|
250
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
241
|
+
eda_item_ids
|
|
251
242
|
});
|
|
252
243
|
var PP_IMPEDANCE_SIGNAL_INTEGRITY = (eda_item_ids) => ({
|
|
253
244
|
error_code: "impedance_signal_integrity" /* IMPEDANCE_SIGNAL_INTEGRITY */,
|
|
254
245
|
error_message: "Source impedance shall be 10x lower than sink impedance for signal integrity.",
|
|
255
|
-
eda_item_ids
|
|
256
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
246
|
+
eda_item_ids
|
|
257
247
|
});
|
|
258
248
|
var PP_INCOMPATIBLE_VOLTAGE_LEVELS = (source) => ({
|
|
259
249
|
error_code: "impedance_signal_integrity" /* IMPEDANCE_SIGNAL_INTEGRITY */,
|
|
260
250
|
error_message: "Incompatible voltage levels.",
|
|
261
|
-
eda_item_ids: [source]
|
|
262
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
251
|
+
eda_item_ids: [source]
|
|
263
252
|
});
|
|
264
253
|
var PP_SIGNAL_LEVELS_NOT_CONTAINED_WITHIN_VOLTAGE = (source) => ({
|
|
265
254
|
error_code: "signal_levels_not_contained_within_voltage" /* SIGNAL_LEVELS_NOT_CONTAINED_WITHIN_VOLTAGE */,
|
|
266
255
|
error_message: "Signal levels not contained within voltage.",
|
|
267
|
-
eda_item_ids: [source]
|
|
268
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
256
|
+
eda_item_ids: [source]
|
|
269
257
|
});
|
|
270
258
|
var PP_INCOMPATIBLE_SIGNAL_LEVELS = (source) => ({
|
|
271
259
|
error_code: "incompatible_signal_levels" /* INCOMPATIBLE_SIGNAL_LEVELS */,
|
|
272
260
|
error_message: "Incompatible signal levels.",
|
|
273
|
-
eda_item_ids: [source]
|
|
274
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
261
|
+
eda_item_ids: [source]
|
|
275
262
|
});
|
|
276
263
|
var PP_OVERCURRENT = (source) => ({
|
|
277
264
|
error_code: "overcurrent" /* OVERCURRENT */,
|
|
278
265
|
error_message: "overcurrent.",
|
|
279
|
-
eda_item_ids: [source]
|
|
280
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
266
|
+
eda_item_ids: [source]
|
|
281
267
|
});
|
|
282
268
|
var PP_INCOMPATIBLE_DIGITAL_THRESHOLDS = (eda_item_ids) => ({
|
|
283
269
|
error_code: "incompatible_digital_thresholds" /* INCOMPATIBLE_DIGITAL_THRESHOLDS */,
|
|
284
270
|
error_message: "Incompatible digital thresholds.",
|
|
285
|
-
eda_item_ids
|
|
286
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
271
|
+
eda_item_ids
|
|
287
272
|
});
|
|
288
273
|
var PP_REQUIRES_CONNECTED_SOURCE_OR_BIDIR = (eda_item_ids) => ({
|
|
289
274
|
error_code: "requires_connected_source_or_bidir" /* REQUIRES_CONNECTED_SOURCE_OR_BIDIR */,
|
|
290
275
|
error_message: "Requires connected source or bidir.",
|
|
291
|
-
eda_item_ids
|
|
292
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
276
|
+
eda_item_ids
|
|
293
277
|
});
|
|
294
278
|
var PP_ILLEGAL_CONNECTION = (eda_item_ids, detail) => ({
|
|
295
279
|
error_code: "Illegal_connection" /* ILLEGAL_CONNECTION */,
|
|
296
280
|
error_message: `Illegal connection: ${detail}`,
|
|
297
|
-
eda_item_ids
|
|
298
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
281
|
+
eda_item_ids
|
|
299
282
|
});
|
|
300
283
|
var CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT = (bundle_id) => ({
|
|
301
284
|
error_code: "connection_count_exceeds_bundle_limit" /* CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT */,
|
|
302
285
|
error_message: "Connections count exceeds bundle limit.",
|
|
303
|
-
eda_item_ids: [bundle_id]
|
|
304
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
286
|
+
eda_item_ids: [bundle_id]
|
|
305
287
|
});
|
|
306
288
|
var INVALID_INPUT = (eda_item_ids, error_message) => {
|
|
307
289
|
return {
|
|
308
290
|
error_code: "Invalid input" /* INVALID_INPUT */,
|
|
309
291
|
error_message,
|
|
310
|
-
eda_item_ids
|
|
311
|
-
severity: "warning" /* RPT_SEVERITY_WARNING */
|
|
292
|
+
eda_item_ids
|
|
312
293
|
};
|
|
313
294
|
};
|
|
314
295
|
var INVALID_PORT_ID_REFERENCED_IN_CONNECTION = (eda_item_ids) => ({
|
|
315
296
|
error_code: "Invalid port id referenced in connection" /* INVALID_PORT_ID_REFERENCED_IN_CONNECTION */,
|
|
316
297
|
error_message: "Invalid port id referenced in connections.",
|
|
317
|
-
eda_item_ids
|
|
318
|
-
severity: "warning" /* RPT_SEVERITY_WARNING */
|
|
298
|
+
eda_item_ids
|
|
319
299
|
});
|
|
320
300
|
|
|
321
301
|
// src/erc/parameter_propagation/link_testers/tester_impl.ts
|
|
@@ -1224,7 +1204,8 @@ var ParameterPropagationTester = class {
|
|
|
1224
1204
|
if (!zod_schema) {
|
|
1225
1205
|
this.ctx.report.erc_errors.push(
|
|
1226
1206
|
INVALID_INPUT([p.uuid], {
|
|
1227
|
-
|
|
1207
|
+
message: "Unknown port type.",
|
|
1208
|
+
port
|
|
1228
1209
|
})
|
|
1229
1210
|
);
|
|
1230
1211
|
return;
|
|
@@ -1235,8 +1216,7 @@ var ParameterPropagationTester = class {
|
|
|
1235
1216
|
if (err instanceof z.ZodError) {
|
|
1236
1217
|
this.ctx.report.erc_errors.push(
|
|
1237
1218
|
INVALID_INPUT([p.uuid], {
|
|
1238
|
-
|
|
1239
|
-
issues: err.issues,
|
|
1219
|
+
message: err.issues,
|
|
1240
1220
|
port
|
|
1241
1221
|
})
|
|
1242
1222
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -41,10 +41,10 @@ var PP_ERROR = /* @__PURE__ */ ((PP_ERROR2) => {
|
|
|
41
41
|
PP_ERROR2["FAILED_ASSERTION"] = "failed_assertion";
|
|
42
42
|
PP_ERROR2["UN_EVALUATED_ASSERTION"] = "un_evaluated_assertion";
|
|
43
43
|
PP_ERROR2["INCONSISTENT_LINK_ARRAY_ELEMENTS"] = "inconsistent_link_array_elements";
|
|
44
|
-
PP_ERROR2["PP_UNANNOTATED"] = "
|
|
45
|
-
PP_ERROR2["PP_UNKNOWN_PORT_TYPE"] = "
|
|
44
|
+
PP_ERROR2["PP_UNANNOTATED"] = "unannotated";
|
|
45
|
+
PP_ERROR2["PP_UNKNOWN_PORT_TYPE"] = "unknown_port_type";
|
|
46
46
|
PP_ERROR2["INAPPROPRIATE_FUNC"] = "Functionally inappropriate link";
|
|
47
|
-
PP_ERROR2["NOT_DRIVEN"] = "
|
|
47
|
+
PP_ERROR2["NOT_DRIVEN"] = "not_driven";
|
|
48
48
|
PP_ERROR2["DUPLICATED_PWR_SOURCES"] = "duplicated_pwr_sources";
|
|
49
49
|
PP_ERROR2["INSUFFICIENT_DRIVER"] = "Insufficient_driver";
|
|
50
50
|
PP_ERROR2["OVER_DRIVEN"] = "over_driven";
|
|
@@ -78,10 +78,10 @@ var DEFAULT_PP_ERROR_SEVERITY = {
|
|
|
78
78
|
["failed_assertion" /* FAILED_ASSERTION */]: "error" /* RPT_SEVERITY_ERROR */,
|
|
79
79
|
["un_evaluated_assertion" /* UN_EVALUATED_ASSERTION */]: "error" /* RPT_SEVERITY_ERROR */,
|
|
80
80
|
["inconsistent_link_array_elements" /* INCONSISTENT_LINK_ARRAY_ELEMENTS */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
81
|
-
["
|
|
82
|
-
["
|
|
81
|
+
["unannotated" /* PP_UNANNOTATED */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
82
|
+
["unknown_port_type" /* PP_UNKNOWN_PORT_TYPE */]: "error" /* RPT_SEVERITY_ERROR */,
|
|
83
83
|
["Functionally inappropriate link" /* INAPPROPRIATE_FUNC */]: "error" /* RPT_SEVERITY_ERROR */,
|
|
84
|
-
["
|
|
84
|
+
["not_driven" /* NOT_DRIVEN */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
85
85
|
["duplicated_pwr_sources" /* DUPLICATED_PWR_SOURCES */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
86
86
|
["Insufficient_driver" /* INSUFFICIENT_DRIVER */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
87
87
|
["over_driven" /* OVER_DRIVEN */]: "warning" /* RPT_SEVERITY_WARNING */,
|
|
@@ -127,124 +127,104 @@ import { get_electrical_pin_type } from "@modular-circuit/electronics-model";
|
|
|
127
127
|
var ERCE_UNANNOTATED = (id) => ({
|
|
128
128
|
error_code: "unannotated" /* ERCE_UNANNOTATED */,
|
|
129
129
|
error_message: "Port has no electrical type specified.",
|
|
130
|
-
eda_item_ids: [id]
|
|
131
|
-
severity: "warning" /* RPT_SEVERITY_WARNING */
|
|
130
|
+
eda_item_ids: [id]
|
|
132
131
|
});
|
|
133
132
|
var ERCE_PIN_TO_PIN_ERROR = (a, b) => ({
|
|
134
133
|
error_code: "ERCE_PIN_TO_PIN_ERROR" /* ERCE_PIN_TO_PIN_ERROR */,
|
|
135
134
|
error_message: `Port ${get_electrical_pin_type(a)} and port ${get_electrical_pin_type(b)} are not compatible.`,
|
|
136
|
-
eda_item_ids: [a.uuid, b.uuid]
|
|
137
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
135
|
+
eda_item_ids: [a.uuid, b.uuid]
|
|
138
136
|
});
|
|
139
137
|
var ERCE_PIN_NOT_CONNECTED = (id) => ({
|
|
140
138
|
error_code: "pin_not_connected" /* ERCE_PIN_NOT_CONNECTED */,
|
|
141
139
|
error_message: "Port not connected.",
|
|
142
|
-
eda_item_ids: [id]
|
|
143
|
-
severity: "warning" /* RPT_SEVERITY_WARNING */
|
|
140
|
+
eda_item_ids: [id]
|
|
144
141
|
});
|
|
145
142
|
var ERCE_DRIVER_CONFLICT = (eda_item_ids, primaryName, secondaryName) => ({
|
|
146
143
|
error_code: "Functionally inappropriate link" /* INAPPROPRIATE_FUNC */,
|
|
147
144
|
error_message: `Both ${primaryName} and ${secondaryName} are attached to the same net.`,
|
|
148
|
-
eda_item_ids
|
|
149
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
145
|
+
eda_item_ids
|
|
150
146
|
});
|
|
151
147
|
var PP_INAPPROPRIATE_FUNC = (eda_item_ids) => ({
|
|
152
148
|
error_code: "Functionally inappropriate link" /* INAPPROPRIATE_FUNC */,
|
|
153
149
|
error_message: "Inappropriate ports functions.",
|
|
154
|
-
eda_item_ids
|
|
155
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
150
|
+
eda_item_ids
|
|
156
151
|
});
|
|
157
152
|
var PP_NOT_DRIVEN = (eda_item_ids) => ({
|
|
158
|
-
error_code: "
|
|
153
|
+
error_code: "not_driven" /* NOT_DRIVEN */,
|
|
159
154
|
error_message: "Net not driven.",
|
|
160
|
-
eda_item_ids
|
|
161
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
155
|
+
eda_item_ids
|
|
162
156
|
});
|
|
163
157
|
var PP_DUPLICATED_SOURCES = (eda_item_ids) => ({
|
|
164
158
|
error_code: "duplicated_pwr_sources" /* DUPLICATED_PWR_SOURCES */,
|
|
165
159
|
error_message: "Net connected to multiple power sources.",
|
|
166
|
-
eda_item_ids
|
|
167
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
160
|
+
eda_item_ids
|
|
168
161
|
});
|
|
169
162
|
var PP_INSUFFICIENT_DRIVER = (eda_item_ids, desc) => ({
|
|
170
163
|
error_code: "Insufficient_driver" /* INSUFFICIENT_DRIVER */,
|
|
171
164
|
error_message: `Insufficient ${desc} driver.`,
|
|
172
|
-
eda_item_ids
|
|
173
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
165
|
+
eda_item_ids
|
|
174
166
|
});
|
|
175
167
|
var PP_OVER_DRIVEN = (eda_item_ids, desc) => ({
|
|
176
168
|
error_code: "over_driven" /* OVER_DRIVEN */,
|
|
177
169
|
error_message: `${desc} over driven.`,
|
|
178
|
-
eda_item_ids
|
|
179
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
170
|
+
eda_item_ids
|
|
180
171
|
});
|
|
181
172
|
var PP_IMPEDANCE_SIGNAL_INTEGRITY = (eda_item_ids) => ({
|
|
182
173
|
error_code: "impedance_signal_integrity" /* IMPEDANCE_SIGNAL_INTEGRITY */,
|
|
183
174
|
error_message: "Source impedance shall be 10x lower than sink impedance for signal integrity.",
|
|
184
|
-
eda_item_ids
|
|
185
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
175
|
+
eda_item_ids
|
|
186
176
|
});
|
|
187
177
|
var PP_INCOMPATIBLE_VOLTAGE_LEVELS = (source) => ({
|
|
188
178
|
error_code: "impedance_signal_integrity" /* IMPEDANCE_SIGNAL_INTEGRITY */,
|
|
189
179
|
error_message: "Incompatible voltage levels.",
|
|
190
|
-
eda_item_ids: [source]
|
|
191
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
180
|
+
eda_item_ids: [source]
|
|
192
181
|
});
|
|
193
182
|
var PP_SIGNAL_LEVELS_NOT_CONTAINED_WITHIN_VOLTAGE = (source) => ({
|
|
194
183
|
error_code: "signal_levels_not_contained_within_voltage" /* SIGNAL_LEVELS_NOT_CONTAINED_WITHIN_VOLTAGE */,
|
|
195
184
|
error_message: "Signal levels not contained within voltage.",
|
|
196
|
-
eda_item_ids: [source]
|
|
197
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
185
|
+
eda_item_ids: [source]
|
|
198
186
|
});
|
|
199
187
|
var PP_INCOMPATIBLE_SIGNAL_LEVELS = (source) => ({
|
|
200
188
|
error_code: "incompatible_signal_levels" /* INCOMPATIBLE_SIGNAL_LEVELS */,
|
|
201
189
|
error_message: "Incompatible signal levels.",
|
|
202
|
-
eda_item_ids: [source]
|
|
203
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
190
|
+
eda_item_ids: [source]
|
|
204
191
|
});
|
|
205
192
|
var PP_OVERCURRENT = (source) => ({
|
|
206
193
|
error_code: "overcurrent" /* OVERCURRENT */,
|
|
207
194
|
error_message: "overcurrent.",
|
|
208
|
-
eda_item_ids: [source]
|
|
209
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
195
|
+
eda_item_ids: [source]
|
|
210
196
|
});
|
|
211
197
|
var PP_INCOMPATIBLE_DIGITAL_THRESHOLDS = (eda_item_ids) => ({
|
|
212
198
|
error_code: "incompatible_digital_thresholds" /* INCOMPATIBLE_DIGITAL_THRESHOLDS */,
|
|
213
199
|
error_message: "Incompatible digital thresholds.",
|
|
214
|
-
eda_item_ids
|
|
215
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
200
|
+
eda_item_ids
|
|
216
201
|
});
|
|
217
202
|
var PP_REQUIRES_CONNECTED_SOURCE_OR_BIDIR = (eda_item_ids) => ({
|
|
218
203
|
error_code: "requires_connected_source_or_bidir" /* REQUIRES_CONNECTED_SOURCE_OR_BIDIR */,
|
|
219
204
|
error_message: "Requires connected source or bidir.",
|
|
220
|
-
eda_item_ids
|
|
221
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
205
|
+
eda_item_ids
|
|
222
206
|
});
|
|
223
207
|
var PP_ILLEGAL_CONNECTION = (eda_item_ids, detail) => ({
|
|
224
208
|
error_code: "Illegal_connection" /* ILLEGAL_CONNECTION */,
|
|
225
209
|
error_message: `Illegal connection: ${detail}`,
|
|
226
|
-
eda_item_ids
|
|
227
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
210
|
+
eda_item_ids
|
|
228
211
|
});
|
|
229
212
|
var CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT = (bundle_id) => ({
|
|
230
213
|
error_code: "connection_count_exceeds_bundle_limit" /* CONNECTIONS_COUNT_EXCEEDS_BUNDLE_LIMIT */,
|
|
231
214
|
error_message: "Connections count exceeds bundle limit.",
|
|
232
|
-
eda_item_ids: [bundle_id]
|
|
233
|
-
severity: "error" /* RPT_SEVERITY_ERROR */
|
|
215
|
+
eda_item_ids: [bundle_id]
|
|
234
216
|
});
|
|
235
217
|
var INVALID_INPUT = (eda_item_ids, error_message) => {
|
|
236
218
|
return {
|
|
237
219
|
error_code: "Invalid input" /* INVALID_INPUT */,
|
|
238
220
|
error_message,
|
|
239
|
-
eda_item_ids
|
|
240
|
-
severity: "warning" /* RPT_SEVERITY_WARNING */
|
|
221
|
+
eda_item_ids
|
|
241
222
|
};
|
|
242
223
|
};
|
|
243
224
|
var INVALID_PORT_ID_REFERENCED_IN_CONNECTION = (eda_item_ids) => ({
|
|
244
225
|
error_code: "Invalid port id referenced in connection" /* INVALID_PORT_ID_REFERENCED_IN_CONNECTION */,
|
|
245
226
|
error_message: "Invalid port id referenced in connections.",
|
|
246
|
-
eda_item_ids
|
|
247
|
-
severity: "warning" /* RPT_SEVERITY_WARNING */
|
|
227
|
+
eda_item_ids
|
|
248
228
|
});
|
|
249
229
|
|
|
250
230
|
// src/erc/parameter_propagation/link_testers/tester_impl.ts
|
|
@@ -1164,7 +1144,8 @@ var ParameterPropagationTester = class {
|
|
|
1164
1144
|
if (!zod_schema) {
|
|
1165
1145
|
this.ctx.report.erc_errors.push(
|
|
1166
1146
|
INVALID_INPUT([p.uuid], {
|
|
1167
|
-
|
|
1147
|
+
message: "Unknown port type.",
|
|
1148
|
+
port
|
|
1168
1149
|
})
|
|
1169
1150
|
);
|
|
1170
1151
|
return;
|
|
@@ -1175,8 +1156,7 @@ var ParameterPropagationTester = class {
|
|
|
1175
1156
|
if (err instanceof z.ZodError) {
|
|
1176
1157
|
this.ctx.report.erc_errors.push(
|
|
1177
1158
|
INVALID_INPUT([p.uuid], {
|
|
1178
|
-
|
|
1179
|
-
issues: err.issues,
|
|
1159
|
+
message: err.issues,
|
|
1180
1160
|
port
|
|
1181
1161
|
})
|
|
1182
1162
|
);
|