@modular-circuit/perc 0.0.54 → 0.0.57
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/build/erc/connect_graph_visitor/index.js +1 -17
- package/build/erc/connect_graph_visitor/visitor.js +0 -2
- package/build/erc/context/connection_graph_builder_ctx.js +0 -2
- package/build/erc/context/error_severity.js +2 -5
- package/build/erc/context/graph.js +0 -2
- package/build/erc/context/graph_converter.js +0 -2
- package/build/erc/context/index.js +5 -21
- package/build/erc/context/pin_to_pin_test_ctx.js +0 -2
- package/build/erc/index.js +4 -20
- package/build/erc/netlist/constraints.js +9 -12
- package/build/erc/netlist/index.js +2 -18
- package/build/erc/netlist/tester.js +54 -35
- package/build/erc/parameter_propagation/error_code.js +37 -39
- package/build/erc/parameter_propagation/index.js +2 -18
- package/build/erc/parameter_propagation/link_testers/index.js +1 -17
- package/build/erc/parameter_propagation/link_testers/link_tester_base.js +101 -33
- package/build/erc/parameter_propagation/link_testers/tester_impl.js +953 -511
- package/build/erc/parameter_propagation/tester.js +195 -131
- package/build/erc/pin_compatibility_matrix/erc_setting.js +80 -82
- package/build/erc/pin_compatibility_matrix/error_code.js +2 -5
- package/build/erc/pin_compatibility_matrix/index.js +4 -20
- package/build/erc/pin_compatibility_matrix/pin_error.js +2 -5
- package/build/erc/pin_compatibility_matrix/tester.js +18 -21
- package/build/graphics/index.js +2 -18
- package/build/graphics/maker/index.js +3 -19
- package/build/graphics/maker/maker_base.js +0 -2
- package/build/graphics/maker/maker_type.js +2 -5
- package/build/graphics/maker/sch_maker.js +0 -2
- package/build/graphics/sch_erc_item.js +0 -2
- package/build/index.js +5 -21
- package/build/report/erc_report.js +9 -12
- package/build/report/erc_reporter.js +68 -88
- package/build/report/index.js +2 -18
- package/build/rule_check_item/erc_item.js +0 -2
- package/build/rule_check_item/index.js +2 -18
- package/build/rule_check_item/rc_item.js +0 -2
- package/build/tester/erc_tester.js +61 -27
- package/build/tester/graph/connection_graphs_builder.js +167 -84
- package/build/tester/graph/graph_erc.js +61 -12
- package/build/tester/graph/index.js +3 -19
- package/build/tester/graph/ir_graph_converter.js +254 -117
- package/build/tester/index.js +2 -18
- package/build/utils/get_dependent_modules_definition.js +141 -17
- package/build/utils/index.js +1 -17
- package/package.json +4 -4
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./visitor"), exports);
|
|
1
|
+
export * from './visitor';
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SEVERITY = void 0;
|
|
4
1
|
// Note: On windows, SEVERITY_ERROR collides with a system declaration,
|
|
5
2
|
// so we used RPT_SEVERITY_xxx instead of SEVERITY_xxx
|
|
6
|
-
var SEVERITY;
|
|
3
|
+
export var SEVERITY;
|
|
7
4
|
(function (SEVERITY) {
|
|
8
5
|
SEVERITY[SEVERITY["RPT_SEVERITY_UNDEFINED"] = 1] = "RPT_SEVERITY_UNDEFINED";
|
|
9
6
|
SEVERITY[SEVERITY["RPT_SEVERITY_INFO"] = 2] = "RPT_SEVERITY_INFO";
|
|
@@ -13,4 +10,4 @@ var SEVERITY;
|
|
|
13
10
|
SEVERITY[SEVERITY["RPT_SEVERITY_ERROR"] = 32] = "RPT_SEVERITY_ERROR";
|
|
14
11
|
SEVERITY[SEVERITY["RPT_SEVERITY_IGNORE"] = 64] = "RPT_SEVERITY_IGNORE";
|
|
15
12
|
SEVERITY[SEVERITY["RPT_SEVERITY_DEBUG"] = 128] = "RPT_SEVERITY_DEBUG";
|
|
16
|
-
})(SEVERITY || (
|
|
13
|
+
})(SEVERITY || (SEVERITY = {}));
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./error_severity"), exports);
|
|
18
|
-
__exportStar(require("./pin_to_pin_test_ctx"), exports);
|
|
19
|
-
__exportStar(require("./graph"), exports);
|
|
20
|
-
__exportStar(require("./graph_converter"), exports);
|
|
21
|
-
__exportStar(require("./connection_graph_builder_ctx"), exports);
|
|
1
|
+
export * from './error_severity';
|
|
2
|
+
export * from './pin_to_pin_test_ctx';
|
|
3
|
+
export * from './graph';
|
|
4
|
+
export * from './graph_converter';
|
|
5
|
+
export * from './connection_graph_builder_ctx';
|
package/build/erc/index.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./context"), exports);
|
|
18
|
-
__exportStar(require("./parameter_propagation"), exports);
|
|
19
|
-
__exportStar(require("./pin_compatibility_matrix"), exports);
|
|
20
|
-
__exportStar(require("./netlist"), exports);
|
|
1
|
+
export * from './context';
|
|
2
|
+
export * from './parameter_propagation';
|
|
3
|
+
export * from './pin_compatibility_matrix';
|
|
4
|
+
export * from './netlist';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DrivenPinTypes = exports.PowerDrivingPinTypes = exports.DrivingPinTypes = void 0;
|
|
4
|
-
const electronics_model_1 = require("@modular-circuit/electronics-model");
|
|
1
|
+
import { ELECTRICAL_PINTYPE } from '@modular-circuit/electronics-model';
|
|
5
2
|
//NOTE https://gitlab.com/kicad/code/kicad/-/blob/8.0.6/eeschema/erc/erc.cpp
|
|
6
3
|
/* ERC tests :
|
|
7
4
|
* 1 - conflicts between connected pins ( example: 2 connected outputs )
|
|
@@ -18,16 +15,16 @@ const electronics_model_1 = require("@modular-circuit/electronics-model");
|
|
|
18
15
|
// List of pin types that are considered drivers for usual input pins
|
|
19
16
|
// i.e. pin type = ELECTRICAL_PINTYPE::PT_INPUT, but not PT_POWER_IN
|
|
20
17
|
// that need only a PT_POWER_OUT pin type to be driven
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
export var DrivingPinTypes = new Set([
|
|
19
|
+
ELECTRICAL_PINTYPE.PT_OUTPUT,
|
|
20
|
+
ELECTRICAL_PINTYPE.PT_POWER_OUT,
|
|
21
|
+
ELECTRICAL_PINTYPE.PT_PASSIVE,
|
|
22
|
+
ELECTRICAL_PINTYPE.PT_TRISTATE,
|
|
23
|
+
ELECTRICAL_PINTYPE.PT_BIDI,
|
|
27
24
|
]);
|
|
28
25
|
// List of pin types that are considered drivers for power pins
|
|
29
26
|
// In fact only a ELECTRICAL_PINTYPE::PT_POWER_OUT pin type can drive
|
|
30
27
|
// power input pins
|
|
31
|
-
|
|
28
|
+
export var PowerDrivingPinTypes = new Set([ELECTRICAL_PINTYPE.PT_POWER_OUT]);
|
|
32
29
|
// List of pin types that require a driver elsewhere on the net
|
|
33
|
-
|
|
30
|
+
export var DrivenPinTypes = new Set([ELECTRICAL_PINTYPE.PT_INPUT, ELECTRICAL_PINTYPE.PT_POWER_IN]);
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./constraints"), exports);
|
|
18
|
-
__exportStar(require("./tester"), exports);
|
|
1
|
+
export * from './constraints';
|
|
2
|
+
export * from './tester';
|
|
@@ -1,48 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
var __values = (this && this.__values) || function(o) {
|
|
2
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
3
|
+
if (m) return m.call(o);
|
|
4
|
+
if (o && typeof o.length === "number") return {
|
|
5
|
+
next: function () {
|
|
6
|
+
if (o && i >= o.length) o = void 0;
|
|
7
|
+
return { value: o && o[i++], done: !o };
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
11
|
+
};
|
|
12
|
+
import { ConnectionNodeType } from '@modular-circuit/electronics-model';
|
|
13
|
+
import { ERCE_DRIVER_CONFLICT, ERCE_PIN_NOT_CONNECTED } from '../../report';
|
|
14
|
+
var NetlistTester = /** @class */ (function () {
|
|
15
|
+
function NetlistTester(ctx) {
|
|
9
16
|
this.ctx = ctx;
|
|
10
17
|
}
|
|
11
|
-
visit_cc(cc) {
|
|
12
|
-
if (cc.nodes.length === 1 && cc.nodes[0].type ===
|
|
13
|
-
this.ctx.report.erc_errors.push(
|
|
18
|
+
NetlistTester.prototype.visit_cc = function (cc) {
|
|
19
|
+
if (cc.nodes.length === 1 && cc.nodes[0].type === ConnectionNodeType.Port) {
|
|
20
|
+
this.ctx.report.erc_errors.push(ERCE_PIN_NOT_CONNECTED(cc.nodes[0].uuid));
|
|
14
21
|
return;
|
|
15
22
|
}
|
|
16
23
|
this.ercCheckMultipleDrivers(cc);
|
|
17
|
-
}
|
|
18
|
-
ercCheckMultipleDrivers(cc) {
|
|
24
|
+
};
|
|
25
|
+
NetlistTester.prototype.ercCheckMultipleDrivers = function (cc) {
|
|
26
|
+
var e_1, _a;
|
|
19
27
|
if (!cc.net_drivers)
|
|
20
28
|
return;
|
|
21
|
-
|
|
29
|
+
var node_map = cc.nodes.reduce(function (map, node) {
|
|
22
30
|
map[node.uuid] = node;
|
|
23
31
|
return map;
|
|
24
32
|
}, {});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (net_name !== node.value) {
|
|
41
|
-
this.ctx.report.erc_errors.push((0, report_1.ERCE_DRIVER_CONFLICT)([cc.net_drivers.primary_driver, driver], cc.name, node.value));
|
|
33
|
+
try {
|
|
34
|
+
for (var _b = __values(cc.net_drivers.drivers), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
35
|
+
var driver = _c.value;
|
|
36
|
+
if (driver === cc.net_drivers.primary_driver)
|
|
37
|
+
continue;
|
|
38
|
+
var node = node_map[driver];
|
|
39
|
+
var net_name = cc.name;
|
|
40
|
+
switch (node.type) {
|
|
41
|
+
case ConnectionNodeType.Port:
|
|
42
|
+
case ConnectionNodeType.Graphics:
|
|
43
|
+
break;
|
|
44
|
+
case ConnectionNodeType.NetLabel:
|
|
45
|
+
if (net_name !== node.text) {
|
|
46
|
+
this.ctx.report.erc_errors.push(ERCE_DRIVER_CONFLICT([cc.net_drivers.primary_driver, driver], cc.name, node.text));
|
|
47
|
+
}
|
|
42
48
|
break;
|
|
43
|
-
|
|
49
|
+
case ConnectionNodeType.Power:
|
|
50
|
+
if (net_name !== node.value) {
|
|
51
|
+
this.ctx.report.erc_errors.push(ERCE_DRIVER_CONFLICT([cc.net_drivers.primary_driver, driver], cc.name, node.value));
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
44
55
|
}
|
|
45
56
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
58
|
+
finally {
|
|
59
|
+
try {
|
|
60
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
61
|
+
}
|
|
62
|
+
finally { if (e_1) throw e_1.error; }
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
return NetlistTester;
|
|
66
|
+
}());
|
|
67
|
+
export { NetlistTester };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* PolymorphicBlocks blocks error codes start here.
|
|
4
3
|
*
|
|
5
4
|
* See https://github.com/BerkeleyHCI/PolymorphicBlocks/blob/master/compiler/src/main/scala/edg/compiler/CompilerError.scala
|
|
6
5
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var PP_ERROR;
|
|
6
|
+
var _a;
|
|
7
|
+
import { SEVERITY } from '../context';
|
|
8
|
+
export var PP_ERROR;
|
|
11
9
|
(function (PP_ERROR) {
|
|
12
10
|
PP_ERROR["UN_COMPILED_BLOCK"] = "un_compiled_block";
|
|
13
11
|
PP_ERROR["UN_COMPILED_LINK"] = "un_compiled_link";
|
|
@@ -40,37 +38,37 @@ var PP_ERROR;
|
|
|
40
38
|
PP_ERROR["INCOMPATIBLE_DIGITAL_THRESHOLDS"] = "incompatible_digital_thresholds";
|
|
41
39
|
PP_ERROR["REQUIRES_CONNECTED_SOURCE_OR_BIDIR"] = "requires_connected_source_or_bidir";
|
|
42
40
|
PP_ERROR["ILLEGAL_CONNECTION"] = "Illegal_connection";
|
|
43
|
-
})(PP_ERROR || (
|
|
44
|
-
|
|
45
|
-
[PP_ERROR.UN_COMPILED_BLOCK]
|
|
46
|
-
[PP_ERROR.UN_COMPILED_LINK]
|
|
47
|
-
[PP_ERROR.UN_COMPILED_LINK_ARRAY]
|
|
48
|
-
[PP_ERROR.UN_COMPILED_PARAMETER]
|
|
49
|
-
[PP_ERROR.UN_COMPILED_INTERNAL_ELEMENT]
|
|
50
|
-
[PP_ERROR.UN_COMPILED_LIBRARY_ELEMENT]
|
|
51
|
-
[PP_ERROR.UNDEFINED_PORT_ARRAY]
|
|
52
|
-
[PP_ERROR.LIBRARY_ERROR]
|
|
53
|
-
[PP_ERROR.GENERATOR_ERROR]
|
|
54
|
-
[PP_ERROR.REFINEMENT_SUBCLASS_ERROR]
|
|
55
|
-
[PP_ERROR.OVER_ASSIGN]
|
|
56
|
-
[PP_ERROR.BAD_REFERENCE]
|
|
57
|
-
[PP_ERROR.ABSTRACT_BLOCK]
|
|
58
|
-
[PP_ERROR.FAILED_ASSERTION]
|
|
59
|
-
[PP_ERROR.UN_EVALUATED_ASSERTION]
|
|
60
|
-
[PP_ERROR.INCONSISTENT_LINK_ARRAY_ELEMENTS]
|
|
61
|
-
[PP_ERROR.PP_UNANNOTATED]
|
|
62
|
-
[PP_ERROR.PP_UNKNOWN_PORT_TYPE]
|
|
63
|
-
[PP_ERROR.INAPPROPRIATE_FUNC]
|
|
64
|
-
[PP_ERROR.NOT_DRIVEN]
|
|
65
|
-
[PP_ERROR.DUPLICATED_PWR_SOURCES]
|
|
66
|
-
[PP_ERROR.INSUFFICIENT_DRIVER]
|
|
67
|
-
[PP_ERROR.OVER_DRIVEN]
|
|
68
|
-
[PP_ERROR.IMPEDANCE_SIGNAL_INTEGRITY]
|
|
69
|
-
[PP_ERROR.INCOMPATIBLE_VOLTAGE_LEVELS]
|
|
70
|
-
[PP_ERROR.SIGNAL_LEVELS_NOT_CONTAINED_WITHIN_VOLTAGE]
|
|
71
|
-
[PP_ERROR.INCOMPATIBLE_SIGNAL_LEVELS]
|
|
72
|
-
[PP_ERROR.OVERCURRENT]
|
|
73
|
-
[PP_ERROR.INCOMPATIBLE_DIGITAL_THRESHOLDS]
|
|
74
|
-
[PP_ERROR.REQUIRES_CONNECTED_SOURCE_OR_BIDIR]
|
|
75
|
-
[PP_ERROR.ILLEGAL_CONNECTION]
|
|
76
|
-
|
|
41
|
+
})(PP_ERROR || (PP_ERROR = {}));
|
|
42
|
+
export var DEFAULT_PP_ERROR_SEVERITY = (_a = {},
|
|
43
|
+
_a[PP_ERROR.UN_COMPILED_BLOCK] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
44
|
+
_a[PP_ERROR.UN_COMPILED_LINK] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
45
|
+
_a[PP_ERROR.UN_COMPILED_LINK_ARRAY] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
46
|
+
_a[PP_ERROR.UN_COMPILED_PARAMETER] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
47
|
+
_a[PP_ERROR.UN_COMPILED_INTERNAL_ELEMENT] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
48
|
+
_a[PP_ERROR.UN_COMPILED_LIBRARY_ELEMENT] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
49
|
+
_a[PP_ERROR.UNDEFINED_PORT_ARRAY] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
50
|
+
_a[PP_ERROR.LIBRARY_ERROR] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
51
|
+
_a[PP_ERROR.GENERATOR_ERROR] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
52
|
+
_a[PP_ERROR.REFINEMENT_SUBCLASS_ERROR] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
53
|
+
_a[PP_ERROR.OVER_ASSIGN] = SEVERITY.RPT_SEVERITY_ERROR,
|
|
54
|
+
_a[PP_ERROR.BAD_REFERENCE] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
55
|
+
_a[PP_ERROR.ABSTRACT_BLOCK] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
56
|
+
_a[PP_ERROR.FAILED_ASSERTION] = SEVERITY.RPT_SEVERITY_ERROR,
|
|
57
|
+
_a[PP_ERROR.UN_EVALUATED_ASSERTION] = SEVERITY.RPT_SEVERITY_ERROR,
|
|
58
|
+
_a[PP_ERROR.INCONSISTENT_LINK_ARRAY_ELEMENTS] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
59
|
+
_a[PP_ERROR.PP_UNANNOTATED] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
60
|
+
_a[PP_ERROR.PP_UNKNOWN_PORT_TYPE] = SEVERITY.RPT_SEVERITY_ERROR,
|
|
61
|
+
_a[PP_ERROR.INAPPROPRIATE_FUNC] = SEVERITY.RPT_SEVERITY_ERROR,
|
|
62
|
+
_a[PP_ERROR.NOT_DRIVEN] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
63
|
+
_a[PP_ERROR.DUPLICATED_PWR_SOURCES] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
64
|
+
_a[PP_ERROR.INSUFFICIENT_DRIVER] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
65
|
+
_a[PP_ERROR.OVER_DRIVEN] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
66
|
+
_a[PP_ERROR.IMPEDANCE_SIGNAL_INTEGRITY] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
67
|
+
_a[PP_ERROR.INCOMPATIBLE_VOLTAGE_LEVELS] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
68
|
+
_a[PP_ERROR.SIGNAL_LEVELS_NOT_CONTAINED_WITHIN_VOLTAGE] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
69
|
+
_a[PP_ERROR.INCOMPATIBLE_SIGNAL_LEVELS] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
70
|
+
_a[PP_ERROR.OVERCURRENT] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
71
|
+
_a[PP_ERROR.INCOMPATIBLE_DIGITAL_THRESHOLDS] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
72
|
+
_a[PP_ERROR.REQUIRES_CONNECTED_SOURCE_OR_BIDIR] = SEVERITY.RPT_SEVERITY_WARNING,
|
|
73
|
+
_a[PP_ERROR.ILLEGAL_CONNECTION] = SEVERITY.RPT_SEVERITY_ERROR,
|
|
74
|
+
_a);
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./error_code"), exports);
|
|
18
|
-
__exportStar(require("./tester"), exports);
|
|
1
|
+
export * from './error_code';
|
|
2
|
+
export * from './tester';
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./tester_impl"), exports);
|
|
1
|
+
export * from './tester_impl';
|
|
@@ -1,44 +1,112 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __values = (this && this.__values) || function(o) {
|
|
17
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
18
|
+
if (m) return m.call(o);
|
|
19
|
+
if (o && typeof o.length === "number") return {
|
|
20
|
+
next: function () {
|
|
21
|
+
if (o && i >= o.length) o = void 0;
|
|
22
|
+
return { value: o && o[i++], done: !o };
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
26
|
+
};
|
|
27
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
28
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
29
|
+
if (!m) return o;
|
|
30
|
+
var i = m.call(o), r, ar = [], e;
|
|
31
|
+
try {
|
|
32
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
33
|
+
}
|
|
34
|
+
catch (error) { e = { error: error }; }
|
|
35
|
+
finally {
|
|
36
|
+
try {
|
|
37
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
38
|
+
}
|
|
39
|
+
finally { if (e) throw e.error; }
|
|
40
|
+
}
|
|
41
|
+
return ar;
|
|
42
|
+
};
|
|
43
|
+
import { LABEL_ASSOCIATED } from '@modular-circuit/electronics-model';
|
|
44
|
+
var LinkTesterBase = /** @class */ (function () {
|
|
45
|
+
function LinkTesterBase(ctx, ports) {
|
|
11
46
|
this.ctx = ctx;
|
|
12
47
|
this.ports = ports;
|
|
13
48
|
}
|
|
14
|
-
test() {
|
|
49
|
+
LinkTesterBase.prototype.test = function () {
|
|
15
50
|
if (!this.init_link())
|
|
16
51
|
return;
|
|
17
52
|
this.check_parameter_propagation();
|
|
53
|
+
};
|
|
54
|
+
Object.defineProperty(LinkTesterBase.prototype, "all_port_ids", {
|
|
55
|
+
get: function () {
|
|
56
|
+
var _this = this;
|
|
57
|
+
if (!this._all_port_ids)
|
|
58
|
+
this._all_port_ids = this.ports.map(function (v) { return _this.ctx.port_id.get(v); });
|
|
59
|
+
return this._all_port_ids;
|
|
60
|
+
},
|
|
61
|
+
enumerable: false,
|
|
62
|
+
configurable: true
|
|
63
|
+
});
|
|
64
|
+
return LinkTesterBase;
|
|
65
|
+
}());
|
|
66
|
+
export { LinkTesterBase };
|
|
67
|
+
var CompositePortLinkTesterBase = /** @class */ (function (_super) {
|
|
68
|
+
__extends(CompositePortLinkTesterBase, _super);
|
|
69
|
+
function CompositePortLinkTesterBase() {
|
|
70
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
18
71
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class CompositePortLinkTesterBase extends LinkTesterBase {
|
|
27
|
-
test() {
|
|
28
|
-
for (const port of this.ports) {
|
|
29
|
-
this.annot_composite_port(port, this.ctx.port_id.get(port));
|
|
72
|
+
CompositePortLinkTesterBase.prototype.test = function () {
|
|
73
|
+
var e_1, _a;
|
|
74
|
+
try {
|
|
75
|
+
for (var _b = __values(this.ports), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
76
|
+
var port = _c.value;
|
|
77
|
+
this.annot_composite_port(port, this.ctx.port_id.get(port));
|
|
78
|
+
}
|
|
30
79
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (k === electronics_model_1.LABEL_ASSOCIATED && typeof v === 'string') {
|
|
36
|
-
this.ctx.port_id.set(port, v);
|
|
80
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
+
finally {
|
|
82
|
+
try {
|
|
83
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
37
84
|
}
|
|
38
|
-
|
|
39
|
-
|
|
85
|
+
finally { if (e_1) throw e_1.error; }
|
|
86
|
+
}
|
|
87
|
+
_super.prototype.test.call(this);
|
|
88
|
+
};
|
|
89
|
+
CompositePortLinkTesterBase.prototype.annot_composite_port = function (port, uuid) {
|
|
90
|
+
var e_2, _a;
|
|
91
|
+
try {
|
|
92
|
+
for (var _b = __values(Object.entries(port)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
93
|
+
var _d = __read(_c.value, 2), k = _d[0], v = _d[1];
|
|
94
|
+
if (k === LABEL_ASSOCIATED && typeof v === 'string') {
|
|
95
|
+
this.ctx.port_id.set(port, v);
|
|
96
|
+
}
|
|
97
|
+
else if (typeof v === 'object' && !Array.isArray(v) && v !== null) {
|
|
98
|
+
this.annot_composite_port(v, uuid);
|
|
99
|
+
}
|
|
40
100
|
}
|
|
41
101
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
102
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
103
|
+
finally {
|
|
104
|
+
try {
|
|
105
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
106
|
+
}
|
|
107
|
+
finally { if (e_2) throw e_2.error; }
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
return CompositePortLinkTesterBase;
|
|
111
|
+
}(LinkTesterBase));
|
|
112
|
+
export { CompositePortLinkTesterBase };
|