yosys2digitaljs 0.7.0 → 0.9.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.
@@ -9,7 +9,7 @@ jobs:
9
9
 
10
10
  strategy:
11
11
  matrix:
12
- node-version: [12.x, 14.x, 16.x]
12
+ node-version: [18.x]
13
13
 
14
14
  steps:
15
15
  - uses: actions/checkout@v2
package/dist/core.d.ts ADDED
@@ -0,0 +1,138 @@
1
+ #!/usr/bin/env node
2
+ export declare namespace Digitaljs {
3
+ type FilePosition = {
4
+ line: number;
5
+ column: number;
6
+ };
7
+ type SourcePosition = {
8
+ name: string;
9
+ from: FilePosition;
10
+ to: FilePosition;
11
+ };
12
+ type MemReadPort = {
13
+ clock_polarity?: boolean;
14
+ enable_polarity?: boolean;
15
+ arst_polarity?: boolean;
16
+ srst_polarity?: boolean;
17
+ enable_srst?: boolean;
18
+ transparent?: boolean | boolean[];
19
+ collision?: boolean | boolean[];
20
+ init_value?: string;
21
+ arst_value?: string;
22
+ srst_value?: string;
23
+ };
24
+ type MemWritePort = {
25
+ clock_polarity?: boolean;
26
+ enable_polarity?: boolean;
27
+ no_bit_enable?: boolean;
28
+ };
29
+ type Device = {
30
+ type: string;
31
+ source_positions?: SourcePosition[];
32
+ [key: string]: any;
33
+ };
34
+ type Port = {
35
+ id: string;
36
+ port: string;
37
+ };
38
+ type Connector = {
39
+ from: Port;
40
+ to: Port;
41
+ name?: string;
42
+ source_positions?: SourcePosition[];
43
+ };
44
+ type Module = {
45
+ devices: {
46
+ [key: string]: Device;
47
+ };
48
+ connectors: Connector[];
49
+ };
50
+ type TopModule = Module & {
51
+ subcircuits: {
52
+ [key: string]: Module;
53
+ };
54
+ };
55
+ }
56
+ declare namespace Yosys {
57
+ const ConstChars: readonly ["0", "1", "x", "z"];
58
+ type BitChar = (typeof ConstChars)[number];
59
+ type Bit = number | BitChar;
60
+ type BitVector = Bit[];
61
+ type Port = {
62
+ direction: 'input' | 'output' | 'inout';
63
+ bits: any;
64
+ };
65
+ type Parameters = {
66
+ WIDTH?: JsonConstant;
67
+ A_WIDTH?: JsonConstant;
68
+ B_WIDTH?: JsonConstant;
69
+ S_WIDTH?: JsonConstant;
70
+ Y_WIDTH?: JsonConstant;
71
+ A_SIGNED?: JsonConstant;
72
+ B_SIGNED?: JsonConstant;
73
+ CLK_POLARITY?: JsonConstant;
74
+ EN_POLARITY?: JsonConstant;
75
+ ARST_POLARITY?: JsonConstant;
76
+ ARST_VALUE: JsonConstant;
77
+ CTRL_IN_WIDTH?: JsonConstant;
78
+ CTRL_OUT_WIDTH?: JsonConstant;
79
+ TRANS_NUM?: JsonConstant;
80
+ STATE_NUM?: JsonConstant;
81
+ STATE_NUM_LOG2?: JsonConstant;
82
+ STATE_RST?: JsonConstant;
83
+ RD_PORTS?: JsonConstant;
84
+ WR_PORTS?: JsonConstant;
85
+ RD_CLK_POLARITY?: JsonConstant;
86
+ RD_CLK_ENABLE?: JsonConstant;
87
+ RD_CLK_TRANSPARENT?: JsonConstant;
88
+ WR_CLK_POLARITY?: JsonConstant;
89
+ WR_CLK_ENABLE?: JsonConstant;
90
+ [key: string]: any;
91
+ };
92
+ type JsonConstant = number | string;
93
+ type Attributes = {
94
+ init: JsonConstant;
95
+ [key: string]: any;
96
+ };
97
+ type Cell = {
98
+ hide_name: 0 | 1;
99
+ type: string;
100
+ parameters: Parameters;
101
+ attributes: Attributes;
102
+ port_directions: {
103
+ [key: string]: 'input' | 'output';
104
+ };
105
+ connections: {
106
+ [key: string]: BitVector;
107
+ };
108
+ };
109
+ type Net = {
110
+ hide_name: 0 | 1;
111
+ bits: BitVector;
112
+ attributes: {
113
+ [key: string]: string;
114
+ };
115
+ };
116
+ type Module = {
117
+ ports: {
118
+ [key: string]: Port;
119
+ };
120
+ cells: {
121
+ [key: string]: Cell;
122
+ };
123
+ netnames: {
124
+ [key: string]: Net;
125
+ };
126
+ };
127
+ type Output = {
128
+ modules: {
129
+ [key: string]: Module;
130
+ };
131
+ };
132
+ }
133
+ export type ConvertOptions = {
134
+ propagation?: number;
135
+ };
136
+ export declare function yosys2digitaljs(obj: Yosys.Output, options?: ConvertOptions): Digitaljs.TopModule;
137
+ export declare function io_ui(output: Digitaljs.Module): void;
138
+ export {};