@modular-circuit/transpiler 0.0.103 → 0.0.105
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/converter/netlist_to_kicad/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAMvE,eAAO,MAAM,SAAS,QAAiB,CAAA;AAEvC,eAAO,MAAM,SAAS,QAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/converter/netlist_to_kicad/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAA;AAMvE,eAAO,MAAM,SAAS,QAAiB,CAAA;AAEvC,eAAO,MAAM,SAAS,QAAY,CAAA;AAiBlC,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM;;;EAE/C;AAED,eAAO,MAAM,aAAa,QAAgB,CAAA;AAE1C,eAAO,MAAM,mBAAmB,QAAgB,CAAA;AAKhD,eAAO,MAAM,YAAY,QAAY,CAAA;AAErC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,YAAY,CAAA;IACtB,KAAK,EAAE,YAAY,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,IAAI,CAAA;IACT,YAAY,EAAE,IAAI,CAAA;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAA;IACb,aAAa,EAAE,OAAO,CAAA;CACvB;AAED,qBAAa,MAAM;IACjB,OAAO,CAAC,SAAS,CAAgC;IAEjD,OAAO,CAAC,GAAG,CAAY;IAEhB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB;IAIzC,QAAQ;IAmDrB,OAAO,CAAC,eAAe;CA0BxB"}
|
|
@@ -69,8 +69,9 @@ export var FONT_SIZE = GRID_SIZE;
|
|
|
69
69
|
var POWER_START_Y = 30 * GRID_SIZE;
|
|
70
70
|
var POWER_START_X = (PAPER_SIZE.A4.height - 30) * GRID_SIZE;
|
|
71
71
|
var POWER_Y_STEP = 16 * GRID_SIZE;
|
|
72
|
-
var
|
|
73
|
-
var
|
|
72
|
+
var BLOCK_V_SPACE = 8 * GRID_SIZE;
|
|
73
|
+
var BLOCK_H_SPACE = 14 * GRID_SIZE - BLOCK_V_SPACE;
|
|
74
|
+
var PADDING = 10 * GRID_SIZE;
|
|
74
75
|
var PADDING_LEFT = 30 * GRID_SIZE;
|
|
75
76
|
var PADDING_TOP = 21 * GRID_SIZE;
|
|
76
77
|
export function get_power_pos(pwr_number) {
|
|
@@ -101,17 +102,18 @@ var Layout = /** @class */ (function () {
|
|
|
101
102
|
graph = {
|
|
102
103
|
id: 'root',
|
|
103
104
|
layoutOptions: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
'elk.
|
|
105
|
+
'elk.algorithm': 'rectpacking',
|
|
106
|
+
'elk.contentAlignment': 'V_TOP | H_LEFT',
|
|
107
|
+
'elk.rectpacking.orderBySize': 'true',
|
|
108
|
+
'elk.nodeSize.fixedGraphSize': 'true',
|
|
109
|
+
'org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation': 'true',
|
|
110
|
+
'elk.rectpacking.widthApproximation.optimizationGoal': 'ASPECT_RATIO_DRIVEN ',
|
|
111
|
+
'org.eclipse.elk.rectpacking.packing.compaction.iterations': '5',
|
|
112
|
+
'org.eclipse.elk.aspectRatio': '1.414',
|
|
113
|
+
'elk.spacing.nodeNode': "".concat(BLOCK_V_SPACE),
|
|
112
114
|
'elk.padding': "[top=".concat(PADDING_TOP, ",left=").concat(PADDING_LEFT, ",bottom=").concat(PADDING, ",right=").concat(PADDING, "]"),
|
|
113
|
-
'elk.childAreaWidth': "".concat(PAPER_SIZE.A4.
|
|
114
|
-
'elk.childAreaHeight': "".concat(PAPER_SIZE.A4.
|
|
115
|
+
'elk.childAreaWidth': "".concat(PAPER_SIZE.A4.height),
|
|
116
|
+
'elk.childAreaHeight': "".concat(PAPER_SIZE.A4.width),
|
|
115
117
|
},
|
|
116
118
|
children: [],
|
|
117
119
|
edges: [],
|
|
@@ -168,12 +170,7 @@ var Layout = /** @class */ (function () {
|
|
|
168
170
|
Layout.prototype.calc_block_size = function (factor) {
|
|
169
171
|
var block_height = Math.floor(factor.total_pin_num / 2) * BLOCK_PIN_GAP + 2 * BLOCK_PIN_TB_MARGIN;
|
|
170
172
|
var block_width = Math.max(MIN_BLOCK_WIDTH, factor.internal.l_side + factor.internal.r_side + INTERNAL_LABEL_MARGIN);
|
|
171
|
-
var block_bounding_width =
|
|
172
|
-
factor.internal.r_side +
|
|
173
|
-
factor.outer.l_side +
|
|
174
|
-
factor.outer.r_side +
|
|
175
|
-
// | txt | | txt |
|
|
176
|
-
WIRE_PADDING * 4);
|
|
173
|
+
var block_bounding_width = block_width + factor.outer.l_side + factor.outer.r_side + WIRE_PADDING * 4 + BLOCK_H_SPACE;
|
|
177
174
|
var size = {
|
|
178
175
|
x: block_width,
|
|
179
176
|
y: block_height,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modular-circuit/transpiler",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.105",
|
|
4
4
|
"description": "Intermediate representation of the modular circuit",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"files": [
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"js-base64": "^3.7.7",
|
|
29
29
|
"jszip": "^3.10.1",
|
|
30
30
|
"@modular-circuit/perc": "0.0.61",
|
|
31
|
-
"@modular-circuit/
|
|
31
|
+
"@modular-circuit/utils": "0.0.41",
|
|
32
32
|
"@modular-circuit/ir": "0.0.63",
|
|
33
|
-
"@modular-circuit/
|
|
33
|
+
"@modular-circuit/electronics-model": "0.0.54"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"clean": "rimraf build",
|