yosys2digitaljs 0.7.0 → 0.8.0
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/.github/workflows/nodejs.yml +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +34 -8
- package/package.json +1 -1
- package/src/index.ts +36 -11
- package/test.sv +31 -0
- package/test1.sv +19 -0
- package/test1.v +19 -0
- package/test2.v +19 -0
- package/test3.sv +63 -0
- package/test3.v +19 -0
- package/test4.sv +62 -0
- package/tests/z.sv +7 -0
- package/yosyss +4 -0
- package/result.json +0 -420
package/dist/index.d.ts
CHANGED
|
@@ -54,8 +54,9 @@ declare namespace Digitaljs {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
declare namespace Yosys {
|
|
57
|
-
|
|
58
|
-
type
|
|
57
|
+
const ConstChars: readonly ["0", "1", "x", "z"];
|
|
58
|
+
type BitChar = (typeof ConstChars)[number];
|
|
59
|
+
type Bit = number | BitChar;
|
|
59
60
|
type BitVector = Bit[];
|
|
60
61
|
type Port = {
|
|
61
62
|
direction: 'input' | 'output' | 'inout';
|
package/dist/index.js
CHANGED
|
@@ -115,6 +115,10 @@ const gate_negations = new Map([
|
|
|
115
115
|
['XnorReduce', 'XorReduce']
|
|
116
116
|
]);
|
|
117
117
|
;
|
|
118
|
+
var Yosys;
|
|
119
|
+
(function (Yosys) {
|
|
120
|
+
Yosys.ConstChars = ["0", "1", "x", "z"];
|
|
121
|
+
})(Yosys || (Yosys = {}));
|
|
118
122
|
;
|
|
119
123
|
function chunkArray(a, chunk_size) {
|
|
120
124
|
let results = [];
|
|
@@ -215,7 +219,7 @@ function yosys_to_digitaljs(data, portmaps, options = {}) {
|
|
|
215
219
|
}
|
|
216
220
|
function yosys_to_digitaljs_mod(name, mod, portmaps, options = {}) {
|
|
217
221
|
function constbit(bit) {
|
|
218
|
-
return bit
|
|
222
|
+
return Yosys.ConstChars.includes(bit.toString());
|
|
219
223
|
}
|
|
220
224
|
const nets = new HashMap();
|
|
221
225
|
const netnames = new HashMap();
|
|
@@ -246,8 +250,6 @@ function yosys_to_digitaljs_mod(name, mod, portmaps, options = {}) {
|
|
|
246
250
|
const net = get_net(k);
|
|
247
251
|
if (net.source !== undefined) {
|
|
248
252
|
// multiple sources driving one net, disallowed in digitaljs
|
|
249
|
-
console.log(k);
|
|
250
|
-
console.log(net);
|
|
251
253
|
throw Error('Multiple sources driving net: ' + net.name);
|
|
252
254
|
}
|
|
253
255
|
net.source = { id: d, port: p };
|
|
@@ -1017,14 +1019,37 @@ function yosys_to_digitaljs_mod(name, mod, portmaps, options = {}) {
|
|
|
1017
1019
|
}
|
|
1018
1020
|
return mout;
|
|
1019
1021
|
}
|
|
1020
|
-
function
|
|
1021
|
-
|
|
1022
|
+
function ansi_c_escape_contents(cmd) {
|
|
1023
|
+
function func(ch) {
|
|
1024
|
+
if (ch == '\t')
|
|
1025
|
+
return '\\t';
|
|
1026
|
+
if (ch == '\r')
|
|
1027
|
+
return '\\r';
|
|
1028
|
+
if (ch == '\n')
|
|
1029
|
+
return '\\n';
|
|
1030
|
+
return '\\x' + ch.charCodeAt(0).toString(16).padStart(2, '0');
|
|
1031
|
+
}
|
|
1032
|
+
return cmd.replace(/(["'\\])/g, '\\$1')
|
|
1033
|
+
.replace(/[\x00-\x1F\x7F-\x9F]/g, func);
|
|
1034
|
+
}
|
|
1035
|
+
function ansi_c_escape(cmd) {
|
|
1036
|
+
return '"' + ansi_c_escape_contents(cmd) + '"';
|
|
1037
|
+
}
|
|
1038
|
+
function shell_escape_contents(cmd) {
|
|
1039
|
+
return cmd.replace(/(["\r\n$`\\])/g, '\\$1');
|
|
1040
|
+
}
|
|
1041
|
+
function shell_escape(cmd) {
|
|
1042
|
+
return '"' + shell_escape_contents(cmd) + '"';
|
|
1043
|
+
}
|
|
1044
|
+
function process_filename(filename) {
|
|
1045
|
+
const flags = /\.sv$/.test(filename) ? " -sv" : "";
|
|
1046
|
+
return "read_verilog" + flags + " " + ansi_c_escape(filename);
|
|
1022
1047
|
}
|
|
1023
1048
|
const verilator_re = /^%(Warning|Error)[^:]*: ([^:]*):([0-9]+):([0-9]+): (.*)$/;
|
|
1024
1049
|
async function verilator_lint(filenames, dirname, options = {}) {
|
|
1025
1050
|
try {
|
|
1026
1051
|
const output = [];
|
|
1027
|
-
const verilator_result = await (0, util_1.promisify)(child_process.exec)('verilator -lint-only -Wall -Wno-DECLFILENAME -Wno-UNOPT -Wno-UNOPTFLAT ' + filenames.map(
|
|
1052
|
+
const verilator_result = await (0, util_1.promisify)(child_process.exec)('timeout -k10s 40s verilator -lint-only -Wall -Wno-DECLFILENAME -Wno-UNOPT -Wno-UNOPTFLAT ' + filenames.map(shell_escape).join(' '), { maxBuffer: 1000000, cwd: dirname || null, timeout: options.timeout || 60000 })
|
|
1028
1053
|
.catch(exc => exc);
|
|
1029
1054
|
for (const line of verilator_result.stderr.split('\n')) {
|
|
1030
1055
|
const result = line.match(verilator_re);
|
|
@@ -1066,8 +1091,9 @@ async function process(filenames, dirname, options = {}) {
|
|
|
1066
1091
|
: "";
|
|
1067
1092
|
const tmpjson = await tmp.tmpName({ postfix: '.json' });
|
|
1068
1093
|
let obj = undefined;
|
|
1069
|
-
const yosys_result = await (0, util_1.promisify)(child_process.exec)('yosys -p "
|
|
1070
|
-
|
|
1094
|
+
const yosys_result = await (0, util_1.promisify)(child_process.exec)('timeout -k10s 40s yosys -p "' + shell_escape_contents(filenames.map(process_filename).join('; ')) +
|
|
1095
|
+
'; hierarchy -auto-top; proc' + optimize_simp + fsmpass + '; memory -nomap; wreduce -memx' +
|
|
1096
|
+
optimize + '" -o "' + tmpjson + '"', { maxBuffer: 1000000, cwd: dirname || null, timeout: options.timeout || 60000 })
|
|
1071
1097
|
.catch(exc => exc);
|
|
1072
1098
|
try {
|
|
1073
1099
|
if (yosys_result instanceof Error) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -175,9 +175,11 @@ namespace Digitaljs {
|
|
|
175
175
|
|
|
176
176
|
namespace Yosys {
|
|
177
177
|
|
|
178
|
-
export
|
|
178
|
+
export const ConstChars = ["0", "1", "x", "z"] as const;
|
|
179
179
|
|
|
180
|
-
export type
|
|
180
|
+
export type BitChar = (typeof ConstChars)[number];
|
|
181
|
+
|
|
182
|
+
export type Bit = number | BitChar;
|
|
181
183
|
|
|
182
184
|
export type BitVector = Bit[];
|
|
183
185
|
|
|
@@ -404,7 +406,7 @@ function yosys_to_digitaljs(data: Yosys.Output, portmaps: Portmaps, options: Con
|
|
|
404
406
|
|
|
405
407
|
function yosys_to_digitaljs_mod(name: string, mod: Yosys.Module, portmaps: Portmaps, options: ConvertOptions = {}): Digitaljs.Module {
|
|
406
408
|
function constbit(bit: Bit) {
|
|
407
|
-
return
|
|
409
|
+
return (Yosys.ConstChars as readonly string[]).includes(bit.toString());
|
|
408
410
|
}
|
|
409
411
|
const nets = new HashMap<Net, NetInfo>();
|
|
410
412
|
const netnames = new HashMap<Net, string[]>();
|
|
@@ -434,8 +436,6 @@ function yosys_to_digitaljs_mod(name: string, mod: Yosys.Module, portmaps: Portm
|
|
|
434
436
|
const net = get_net(k);
|
|
435
437
|
if(net.source !== undefined) {
|
|
436
438
|
// multiple sources driving one net, disallowed in digitaljs
|
|
437
|
-
console.log(k);
|
|
438
|
-
console.log(net);
|
|
439
439
|
throw Error('Multiple sources driving net: ' + net.name);
|
|
440
440
|
}
|
|
441
441
|
net.source = { id: d, port: p };
|
|
@@ -1170,17 +1170,41 @@ function yosys_to_digitaljs_mod(name: string, mod: Yosys.Module, portmaps: Portm
|
|
|
1170
1170
|
return mout;
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
1173
|
-
function
|
|
1174
|
-
|
|
1173
|
+
function ansi_c_escape_contents(cmd: string): string {
|
|
1174
|
+
function func(ch: string) {
|
|
1175
|
+
if (ch == '\t') return '\\t';
|
|
1176
|
+
if (ch == '\r') return '\\r';
|
|
1177
|
+
if (ch == '\n') return '\\n';
|
|
1178
|
+
return '\\x' + ch.charCodeAt(0).toString(16).padStart(2, '0');
|
|
1179
|
+
}
|
|
1180
|
+
return cmd.replace(/(["'\\])/g,'\\$1')
|
|
1181
|
+
.replace(/[\x00-\x1F\x7F-\x9F]/g, func);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
function ansi_c_escape(cmd: string): string {
|
|
1185
|
+
return '"' + ansi_c_escape_contents(cmd) + '"';
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
function shell_escape_contents(cmd: string): string {
|
|
1189
|
+
return cmd.replace(/(["\r\n$`\\])/g,'\\$1');
|
|
1175
1190
|
}
|
|
1176
|
-
|
|
1191
|
+
|
|
1192
|
+
function shell_escape(cmd: string): string {
|
|
1193
|
+
return '"' + shell_escape_contents(cmd) + '"';
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
function process_filename(filename: string): string {
|
|
1197
|
+
const flags = /\.sv$/.test(filename) ? " -sv" : "";
|
|
1198
|
+
return "read_verilog" + flags + " " + ansi_c_escape(filename);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1177
1201
|
const verilator_re = /^%(Warning|Error)[^:]*: ([^:]*):([0-9]+):([0-9]+): (.*)$/;
|
|
1178
1202
|
|
|
1179
1203
|
export async function verilator_lint(filenames: string[], dirname?: string, options: Options = {}): Promise<LintMessage[]> {
|
|
1180
1204
|
try {
|
|
1181
1205
|
const output: LintMessage[] = [];
|
|
1182
1206
|
const verilator_result: {stdout: string, stderr: string} = await promisify(child_process.exec)(
|
|
1183
|
-
'verilator -lint-only -Wall -Wno-DECLFILENAME -Wno-UNOPT -Wno-UNOPTFLAT ' + filenames.map(
|
|
1207
|
+
'timeout -k10s 40s verilator -lint-only -Wall -Wno-DECLFILENAME -Wno-UNOPT -Wno-UNOPTFLAT ' + filenames.map(shell_escape).join(' '),
|
|
1184
1208
|
{maxBuffer: 1000000, cwd: dirname || null, timeout: options.timeout || 60000})
|
|
1185
1209
|
.catch(exc => exc);
|
|
1186
1210
|
for (const line of verilator_result.stderr.split('\n')) {
|
|
@@ -1222,8 +1246,9 @@ export async function process(filenames: string[], dirname?: string, options: Op
|
|
|
1222
1246
|
const tmpjson = await tmp.tmpName({ postfix: '.json' });
|
|
1223
1247
|
let obj = undefined;
|
|
1224
1248
|
const yosys_result: {stdout: string, stderr: string, killed?: boolean, code?: number} = await promisify(child_process.exec)(
|
|
1225
|
-
'yosys -p "
|
|
1226
|
-
|
|
1249
|
+
'timeout -k10s 40s yosys -p "' + shell_escape_contents(filenames.map(process_filename).join('; ')) +
|
|
1250
|
+
'; hierarchy -auto-top; proc' + optimize_simp + fsmpass + '; memory -nomap; wreduce -memx' +
|
|
1251
|
+
optimize + '" -o "' + tmpjson + '"',
|
|
1227
1252
|
{maxBuffer: 1000000, cwd: dirname || null, timeout: options.timeout || 60000})
|
|
1228
1253
|
.catch(exc => exc);
|
|
1229
1254
|
try {
|
package/test.sv
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
// Full adder
|
|
3
|
+
module fulladder(
|
|
4
|
+
input a,
|
|
5
|
+
input b,
|
|
6
|
+
input d,
|
|
7
|
+
output o,
|
|
8
|
+
output c
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
logic t, c1, c2;
|
|
12
|
+
|
|
13
|
+
halfadder ha1(a, b, t, c1);
|
|
14
|
+
halfadder ha2(t, d, o, c2);
|
|
15
|
+
|
|
16
|
+
assign c = c1 | c2;
|
|
17
|
+
|
|
18
|
+
endmodule
|
|
19
|
+
// Half adder
|
|
20
|
+
module halfadder(
|
|
21
|
+
input a,
|
|
22
|
+
input b,
|
|
23
|
+
output o,
|
|
24
|
+
output c
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
assign o = a ^ b;
|
|
28
|
+
assign c = a & b;
|
|
29
|
+
|
|
30
|
+
endmodule
|
|
31
|
+
|
package/test1.sv
ADDED
package/test1.v
ADDED
package/test2.v
ADDED
package/test3.sv
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Half adder
|
|
2
|
+
module halfadder(
|
|
3
|
+
input a,
|
|
4
|
+
input b,
|
|
5
|
+
output o,
|
|
6
|
+
output c
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
assign o = a ^ b;
|
|
10
|
+
assign c = a & b;
|
|
11
|
+
|
|
12
|
+
endmodule
|
|
13
|
+
|
|
14
|
+
// Full adder
|
|
15
|
+
module fulladder(
|
|
16
|
+
input a,
|
|
17
|
+
input b,
|
|
18
|
+
input d,
|
|
19
|
+
output o,
|
|
20
|
+
output c
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
logic t, c1, c2;
|
|
24
|
+
|
|
25
|
+
halfadder ha1(a, b, t, c1);
|
|
26
|
+
halfadder ha2(t, d, o, c2);
|
|
27
|
+
|
|
28
|
+
assign c = c1 | c2;
|
|
29
|
+
|
|
30
|
+
endmodule
|
|
31
|
+
|
|
32
|
+
// Multibit serial adder
|
|
33
|
+
module serialadder
|
|
34
|
+
#(parameter WIDTH = 4)(
|
|
35
|
+
input [WIDTH-1:0] a,
|
|
36
|
+
input [WIDTH-1:0] b,
|
|
37
|
+
output [WIDTH:0] o
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
logic [WIDTH:0] c;
|
|
41
|
+
logic [WIDTH-1:0] s;
|
|
42
|
+
|
|
43
|
+
assign c[0] = 1'b0;
|
|
44
|
+
|
|
45
|
+
genvar ii;
|
|
46
|
+
generate
|
|
47
|
+
for (ii=0; ii<WIDTH; ii=ii+1)
|
|
48
|
+
begin
|
|
49
|
+
fulladder fa(a[ii],b[ii],c[ii],s[ii],c[ii+1]);
|
|
50
|
+
end
|
|
51
|
+
endgenerate
|
|
52
|
+
|
|
53
|
+
assign o = {c[WIDTH], s};
|
|
54
|
+
|
|
55
|
+
endmodule
|
|
56
|
+
|
|
57
|
+
module zzz(
|
|
58
|
+
input [3:0] a,
|
|
59
|
+
input [3:0] b,
|
|
60
|
+
output [4:0] o
|
|
61
|
+
);
|
|
62
|
+
serialadder z(a,b,o);
|
|
63
|
+
endmodule
|
package/test3.v
ADDED
package/test4.sv
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Half adder
|
|
2
|
+
module halfadder(
|
|
3
|
+
input a,
|
|
4
|
+
input b,
|
|
5
|
+
output o,
|
|
6
|
+
output c
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
assign o = a ^ b;
|
|
10
|
+
assign c = a & b;
|
|
11
|
+
|
|
12
|
+
endmodule
|
|
13
|
+
|
|
14
|
+
// Full adder
|
|
15
|
+
module fulladder(
|
|
16
|
+
input a,
|
|
17
|
+
input b,
|
|
18
|
+
input d,
|
|
19
|
+
output o,
|
|
20
|
+
output c
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
logic t, c1, c2;
|
|
24
|
+
|
|
25
|
+
halfadder ha1(a, b, t, c1);
|
|
26
|
+
halfadder ha2(t, d, o, c2);
|
|
27
|
+
|
|
28
|
+
assign c = c1 | c2;
|
|
29
|
+
|
|
30
|
+
endmodule
|
|
31
|
+
|
|
32
|
+
// Multibit serial adder
|
|
33
|
+
module serialadder(
|
|
34
|
+
input [4-1:0] a,
|
|
35
|
+
input [4-1:0] b,
|
|
36
|
+
output [4:0] o
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
logic [4:0] c;
|
|
40
|
+
logic [4-1:0] s;
|
|
41
|
+
|
|
42
|
+
assign c[0] = 1'b0;
|
|
43
|
+
|
|
44
|
+
genvar ii;
|
|
45
|
+
generate
|
|
46
|
+
for (ii=0; ii<4; ii=ii+1)
|
|
47
|
+
begin
|
|
48
|
+
fulladder fa(a[ii],b[ii],c[ii],s[ii],c[ii+1]);
|
|
49
|
+
end
|
|
50
|
+
endgenerate
|
|
51
|
+
|
|
52
|
+
assign o = {c[4], s};
|
|
53
|
+
|
|
54
|
+
endmodule
|
|
55
|
+
|
|
56
|
+
module zzz(
|
|
57
|
+
input [3:0] a,
|
|
58
|
+
input [3:0] b,
|
|
59
|
+
output [4:0] o
|
|
60
|
+
);
|
|
61
|
+
serialadder z(a,b,o);
|
|
62
|
+
endmodule
|
package/tests/z.sv
ADDED
package/yosyss
ADDED
package/result.json
DELETED
|
@@ -1,420 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"creator": "Yosys 0.8 (git sha1 5706e90)",
|
|
3
|
-
"modules": {
|
|
4
|
-
"fsm": {
|
|
5
|
-
"attributes": {
|
|
6
|
-
"src": "tests/fsm.sv:1"
|
|
7
|
-
},
|
|
8
|
-
"ports": {
|
|
9
|
-
"clk": {
|
|
10
|
-
"direction": "input",
|
|
11
|
-
"bits": [ 2 ]
|
|
12
|
-
},
|
|
13
|
-
"rst": {
|
|
14
|
-
"direction": "input",
|
|
15
|
-
"bits": [ 3 ]
|
|
16
|
-
},
|
|
17
|
-
"a": {
|
|
18
|
-
"direction": "input",
|
|
19
|
-
"bits": [ 4 ]
|
|
20
|
-
},
|
|
21
|
-
"b": {
|
|
22
|
-
"direction": "output",
|
|
23
|
-
"bits": [ 5 ]
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"cells": {
|
|
27
|
-
"$auto$simplemap.cc:136:simplemap_reduce$41": {
|
|
28
|
-
"hide_name": 1,
|
|
29
|
-
"type": "$_OR_",
|
|
30
|
-
"parameters": {
|
|
31
|
-
},
|
|
32
|
-
"attributes": {
|
|
33
|
-
},
|
|
34
|
-
"port_directions": {
|
|
35
|
-
"A": "input",
|
|
36
|
-
"B": "input",
|
|
37
|
-
"Y": "output"
|
|
38
|
-
},
|
|
39
|
-
"connections": {
|
|
40
|
-
"A": [ 6 ],
|
|
41
|
-
"B": [ 7 ],
|
|
42
|
-
"Y": [ 8 ]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"$auto$simplemap.cc:136:simplemap_reduce$61": {
|
|
46
|
-
"hide_name": 1,
|
|
47
|
-
"type": "$_OR_",
|
|
48
|
-
"parameters": {
|
|
49
|
-
},
|
|
50
|
-
"attributes": {
|
|
51
|
-
"src": "tests/fsm.sv:16"
|
|
52
|
-
},
|
|
53
|
-
"port_directions": {
|
|
54
|
-
"A": "input",
|
|
55
|
-
"B": "input",
|
|
56
|
-
"Y": "output"
|
|
57
|
-
},
|
|
58
|
-
"connections": {
|
|
59
|
-
"A": [ 7 ],
|
|
60
|
-
"B": [ 9 ],
|
|
61
|
-
"Y": [ 10 ]
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"$auto$simplemap.cc:136:simplemap_reduce$63": {
|
|
65
|
-
"hide_name": 1,
|
|
66
|
-
"type": "$_OR_",
|
|
67
|
-
"parameters": {
|
|
68
|
-
},
|
|
69
|
-
"attributes": {
|
|
70
|
-
"src": "tests/fsm.sv:16"
|
|
71
|
-
},
|
|
72
|
-
"port_directions": {
|
|
73
|
-
"A": "input",
|
|
74
|
-
"B": "input",
|
|
75
|
-
"Y": "output"
|
|
76
|
-
},
|
|
77
|
-
"connections": {
|
|
78
|
-
"A": [ 6 ],
|
|
79
|
-
"B": [ 11 ],
|
|
80
|
-
"Y": [ 12 ]
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"$auto$simplemap.cc:206:simplemap_lognot$52": {
|
|
84
|
-
"hide_name": 1,
|
|
85
|
-
"type": "$_NOT_",
|
|
86
|
-
"parameters": {
|
|
87
|
-
},
|
|
88
|
-
"attributes": {
|
|
89
|
-
},
|
|
90
|
-
"port_directions": {
|
|
91
|
-
"A": "input",
|
|
92
|
-
"Y": "output"
|
|
93
|
-
},
|
|
94
|
-
"connections": {
|
|
95
|
-
"A": [ 13 ],
|
|
96
|
-
"Y": [ 14 ]
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"$auto$simplemap.cc:206:simplemap_lognot$59": {
|
|
100
|
-
"hide_name": 1,
|
|
101
|
-
"type": "$_NOT_",
|
|
102
|
-
"parameters": {
|
|
103
|
-
},
|
|
104
|
-
"attributes": {
|
|
105
|
-
},
|
|
106
|
-
"port_directions": {
|
|
107
|
-
"A": "input",
|
|
108
|
-
"Y": "output"
|
|
109
|
-
},
|
|
110
|
-
"connections": {
|
|
111
|
-
"A": [ 15 ],
|
|
112
|
-
"Y": [ 16 ]
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
"$auto$simplemap.cc:496:simplemap_adff$42": {
|
|
116
|
-
"hide_name": 1,
|
|
117
|
-
"type": "$_DFF_PP1_",
|
|
118
|
-
"parameters": {
|
|
119
|
-
},
|
|
120
|
-
"attributes": {
|
|
121
|
-
},
|
|
122
|
-
"port_directions": {
|
|
123
|
-
"C": "input",
|
|
124
|
-
"D": "input",
|
|
125
|
-
"Q": "output",
|
|
126
|
-
"R": "input"
|
|
127
|
-
},
|
|
128
|
-
"connections": {
|
|
129
|
-
"C": [ 2 ],
|
|
130
|
-
"D": [ 11 ],
|
|
131
|
-
"Q": [ 6 ],
|
|
132
|
-
"R": [ 3 ]
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"$auto$simplemap.cc:496:simplemap_adff$43": {
|
|
136
|
-
"hide_name": 1,
|
|
137
|
-
"type": "$_DFF_PP0_",
|
|
138
|
-
"parameters": {
|
|
139
|
-
},
|
|
140
|
-
"attributes": {
|
|
141
|
-
},
|
|
142
|
-
"port_directions": {
|
|
143
|
-
"C": "input",
|
|
144
|
-
"D": "input",
|
|
145
|
-
"Q": "output",
|
|
146
|
-
"R": "input"
|
|
147
|
-
},
|
|
148
|
-
"connections": {
|
|
149
|
-
"C": [ 2 ],
|
|
150
|
-
"D": [ 8 ],
|
|
151
|
-
"Q": [ 9 ],
|
|
152
|
-
"R": [ 3 ]
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
"$auto$simplemap.cc:496:simplemap_adff$44": {
|
|
156
|
-
"hide_name": 1,
|
|
157
|
-
"type": "$_DFF_PP0_",
|
|
158
|
-
"parameters": {
|
|
159
|
-
},
|
|
160
|
-
"attributes": {
|
|
161
|
-
},
|
|
162
|
-
"port_directions": {
|
|
163
|
-
"C": "input",
|
|
164
|
-
"D": "input",
|
|
165
|
-
"Q": "output",
|
|
166
|
-
"R": "input"
|
|
167
|
-
},
|
|
168
|
-
"connections": {
|
|
169
|
-
"C": [ 2 ],
|
|
170
|
-
"D": [ 17 ],
|
|
171
|
-
"Q": [ 7 ],
|
|
172
|
-
"R": [ 3 ]
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
"$auto$simplemap.cc:496:simplemap_adff$45": {
|
|
176
|
-
"hide_name": 1,
|
|
177
|
-
"type": "$_DFF_PP0_",
|
|
178
|
-
"parameters": {
|
|
179
|
-
},
|
|
180
|
-
"attributes": {
|
|
181
|
-
},
|
|
182
|
-
"port_directions": {
|
|
183
|
-
"C": "input",
|
|
184
|
-
"D": "input",
|
|
185
|
-
"Q": "output",
|
|
186
|
-
"R": "input"
|
|
187
|
-
},
|
|
188
|
-
"connections": {
|
|
189
|
-
"C": [ 2 ],
|
|
190
|
-
"D": [ 18 ],
|
|
191
|
-
"Q": [ 11 ],
|
|
192
|
-
"R": [ 3 ]
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"$auto$simplemap.cc:85:simplemap_bitop$38": {
|
|
196
|
-
"hide_name": 1,
|
|
197
|
-
"type": "$_AND_",
|
|
198
|
-
"parameters": {
|
|
199
|
-
},
|
|
200
|
-
"attributes": {
|
|
201
|
-
},
|
|
202
|
-
"port_directions": {
|
|
203
|
-
"A": "input",
|
|
204
|
-
"B": "input",
|
|
205
|
-
"Y": "output"
|
|
206
|
-
},
|
|
207
|
-
"connections": {
|
|
208
|
-
"A": [ 14 ],
|
|
209
|
-
"B": [ 9 ],
|
|
210
|
-
"Y": [ 17 ]
|
|
211
|
-
}
|
|
212
|
-
},
|
|
213
|
-
"$auto$simplemap.cc:85:simplemap_bitop$39": {
|
|
214
|
-
"hide_name": 1,
|
|
215
|
-
"type": "$_AND_",
|
|
216
|
-
"parameters": {
|
|
217
|
-
},
|
|
218
|
-
"attributes": {
|
|
219
|
-
},
|
|
220
|
-
"port_directions": {
|
|
221
|
-
"A": "input",
|
|
222
|
-
"B": "input",
|
|
223
|
-
"Y": "output"
|
|
224
|
-
},
|
|
225
|
-
"connections": {
|
|
226
|
-
"A": [ 16 ],
|
|
227
|
-
"B": [ 9 ],
|
|
228
|
-
"Y": [ 18 ]
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
"$auto$simplemap.cc:85:simplemap_bitop$48": {
|
|
232
|
-
"hide_name": 1,
|
|
233
|
-
"type": "$_XOR_",
|
|
234
|
-
"parameters": {
|
|
235
|
-
},
|
|
236
|
-
"attributes": {
|
|
237
|
-
},
|
|
238
|
-
"port_directions": {
|
|
239
|
-
"A": "input",
|
|
240
|
-
"B": "input",
|
|
241
|
-
"Y": "output"
|
|
242
|
-
},
|
|
243
|
-
"connections": {
|
|
244
|
-
"A": [ 4 ],
|
|
245
|
-
"B": [ "0" ],
|
|
246
|
-
"Y": [ 13 ]
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
"$auto$simplemap.cc:85:simplemap_bitop$55": {
|
|
250
|
-
"hide_name": 1,
|
|
251
|
-
"type": "$_XOR_",
|
|
252
|
-
"parameters": {
|
|
253
|
-
},
|
|
254
|
-
"attributes": {
|
|
255
|
-
},
|
|
256
|
-
"port_directions": {
|
|
257
|
-
"A": "input",
|
|
258
|
-
"B": "input",
|
|
259
|
-
"Y": "output"
|
|
260
|
-
},
|
|
261
|
-
"connections": {
|
|
262
|
-
"A": [ 4 ],
|
|
263
|
-
"B": [ "1" ],
|
|
264
|
-
"Y": [ 15 ]
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
"$procmux$3": {
|
|
268
|
-
"hide_name": 1,
|
|
269
|
-
"type": "$pmux",
|
|
270
|
-
"parameters": {
|
|
271
|
-
"S_WIDTH": 2,
|
|
272
|
-
"WIDTH": 1
|
|
273
|
-
},
|
|
274
|
-
"attributes": {
|
|
275
|
-
"src": "tests/fsm.sv:16"
|
|
276
|
-
},
|
|
277
|
-
"port_directions": {
|
|
278
|
-
"A": "input",
|
|
279
|
-
"B": "input",
|
|
280
|
-
"S": "input",
|
|
281
|
-
"Y": "output"
|
|
282
|
-
},
|
|
283
|
-
"connections": {
|
|
284
|
-
"A": [ "x" ],
|
|
285
|
-
"B": [ "1", "0" ],
|
|
286
|
-
"S": [ 10, 12 ],
|
|
287
|
-
"Y": [ 5 ]
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
"netnames": {
|
|
292
|
-
"$auto$fsm_map.cc:118:implement_pattern_cache$31": {
|
|
293
|
-
"hide_name": 1,
|
|
294
|
-
"bits": [ 17 ],
|
|
295
|
-
"attributes": {
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
"$auto$fsm_map.cc:118:implement_pattern_cache$35": {
|
|
299
|
-
"hide_name": 1,
|
|
300
|
-
"bits": [ 18 ],
|
|
301
|
-
"attributes": {
|
|
302
|
-
}
|
|
303
|
-
},
|
|
304
|
-
"$auto$fsm_map.cc:170:map_fsm$24": {
|
|
305
|
-
"hide_name": 1,
|
|
306
|
-
"bits": [ 19, 8 ],
|
|
307
|
-
"attributes": {
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
"$auto$fsm_map.cc:74:implement_pattern_cache$29": {
|
|
311
|
-
"hide_name": 1,
|
|
312
|
-
"bits": [ 14 ],
|
|
313
|
-
"attributes": {
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
"$auto$fsm_map.cc:74:implement_pattern_cache$33": {
|
|
317
|
-
"hide_name": 1,
|
|
318
|
-
"bits": [ 16 ],
|
|
319
|
-
"attributes": {
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
"$auto$simplemap.cc:127:simplemap_reduce$40": {
|
|
323
|
-
"hide_name": 1,
|
|
324
|
-
"bits": [ 20 ],
|
|
325
|
-
"attributes": {
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
"$auto$simplemap.cc:127:simplemap_reduce$60": {
|
|
329
|
-
"hide_name": 1,
|
|
330
|
-
"bits": [ 21 ],
|
|
331
|
-
"attributes": {
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
"$auto$simplemap.cc:127:simplemap_reduce$62": {
|
|
335
|
-
"hide_name": 1,
|
|
336
|
-
"bits": [ 22 ],
|
|
337
|
-
"attributes": {
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
"$auto$simplemap.cc:250:simplemap_eqne$46": {
|
|
341
|
-
"hide_name": 1,
|
|
342
|
-
"bits": [ 13 ],
|
|
343
|
-
"attributes": {
|
|
344
|
-
}
|
|
345
|
-
},
|
|
346
|
-
"$auto$simplemap.cc:250:simplemap_eqne$53": {
|
|
347
|
-
"hide_name": 1,
|
|
348
|
-
"bits": [ 15 ],
|
|
349
|
-
"attributes": {
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
"$auto$simplemap.cc:256:simplemap_eqne$49": {
|
|
353
|
-
"hide_name": 1,
|
|
354
|
-
"bits": [ 13 ],
|
|
355
|
-
"attributes": {
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
"$auto$simplemap.cc:256:simplemap_eqne$56": {
|
|
359
|
-
"hide_name": 1,
|
|
360
|
-
"bits": [ 15 ],
|
|
361
|
-
"attributes": {
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
"$auto$wreduce.cc:347:run$37": {
|
|
365
|
-
"hide_name": 1,
|
|
366
|
-
"bits": [ 19, 8, 23, 24 ],
|
|
367
|
-
"attributes": {
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
"$procmux$4_CTRL": {
|
|
371
|
-
"hide_name": 1,
|
|
372
|
-
"bits": [ 10 ],
|
|
373
|
-
"attributes": {
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
"$procmux$5_CTRL": {
|
|
377
|
-
"hide_name": 1,
|
|
378
|
-
"bits": [ 12 ],
|
|
379
|
-
"attributes": {
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
"a": {
|
|
383
|
-
"hide_name": 0,
|
|
384
|
-
"bits": [ 4 ],
|
|
385
|
-
"attributes": {
|
|
386
|
-
"src": "tests/fsm.sv:1"
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
"b": {
|
|
390
|
-
"hide_name": 0,
|
|
391
|
-
"bits": [ 5 ],
|
|
392
|
-
"attributes": {
|
|
393
|
-
"src": "tests/fsm.sv:1"
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
"clk": {
|
|
397
|
-
"hide_name": 0,
|
|
398
|
-
"bits": [ 2 ],
|
|
399
|
-
"attributes": {
|
|
400
|
-
"src": "tests/fsm.sv:1"
|
|
401
|
-
}
|
|
402
|
-
},
|
|
403
|
-
"rst": {
|
|
404
|
-
"hide_name": 0,
|
|
405
|
-
"bits": [ 3 ],
|
|
406
|
-
"attributes": {
|
|
407
|
-
"src": "tests/fsm.sv:1"
|
|
408
|
-
}
|
|
409
|
-
},
|
|
410
|
-
"state": {
|
|
411
|
-
"hide_name": 0,
|
|
412
|
-
"bits": [ 6, 9, 7, 11 ],
|
|
413
|
-
"attributes": {
|
|
414
|
-
"onehot": 1
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|