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