@celox-sim/celox-napi 0.1.5 → 0.1.6
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/index.d.ts +39 -0
- package/package.json +28 -24
package/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export declare class NativeSimulationHandle {
|
|
|
10
10
|
get layoutJson(): string
|
|
11
11
|
/** Returns the event map as a JSON string. */
|
|
12
12
|
get eventsJson(): string
|
|
13
|
+
/** Returns the instance hierarchy as a JSON string. */
|
|
14
|
+
get hierarchyJson(): string
|
|
13
15
|
/** Returns the stable region size in bytes. */
|
|
14
16
|
get stableSize(): number
|
|
15
17
|
/** Returns the total memory size in bytes. */
|
|
@@ -24,6 +26,8 @@ export declare class NativeSimulationHandle {
|
|
|
24
26
|
step(): number | null
|
|
25
27
|
/** Returns the current simulation time. */
|
|
26
28
|
time(): number
|
|
29
|
+
/** Returns the time of the next scheduled event, or null if none. */
|
|
30
|
+
nextEventTime(): number | null
|
|
27
31
|
/** Evaluate combinational logic. */
|
|
28
32
|
evalComb(): void
|
|
29
33
|
/** Write VCD dump at the given timestamp. */
|
|
@@ -57,6 +61,8 @@ export declare class NativeSimulatorHandle {
|
|
|
57
61
|
get layoutJson(): string
|
|
58
62
|
/** Returns the event map as a JSON string. */
|
|
59
63
|
get eventsJson(): string
|
|
64
|
+
/** Returns the instance hierarchy as a JSON string. */
|
|
65
|
+
get hierarchyJson(): string
|
|
60
66
|
/** Returns the stable region size in bytes. */
|
|
61
67
|
get stableSize(): number
|
|
62
68
|
/** Returns the total memory size in bytes. */
|
|
@@ -85,7 +91,40 @@ export declare class NativeSimulatorHandle {
|
|
|
85
91
|
*/
|
|
86
92
|
export declare function genTs(projectPath: string): string
|
|
87
93
|
|
|
94
|
+
/** A false-loop declaration (combinational loop to ignore). */
|
|
95
|
+
export interface NapiFalseLoop {
|
|
96
|
+
from: NapiSignalPath
|
|
97
|
+
to: NapiSignalPath
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** A segment of a hierarchical instance path. */
|
|
101
|
+
export interface NapiInstanceSegment {
|
|
102
|
+
name: string
|
|
103
|
+
index: number
|
|
104
|
+
}
|
|
105
|
+
|
|
88
106
|
/** Options for creating a simulator/simulation handle. */
|
|
89
107
|
export interface NapiOptions {
|
|
90
108
|
fourState?: boolean
|
|
109
|
+
vcd?: string
|
|
110
|
+
optimize?: boolean
|
|
111
|
+
falseLoops?: Array<NapiFalseLoop>
|
|
112
|
+
trueLoops?: Array<NapiTrueLoop>
|
|
113
|
+
/** Clock polarity: "posedge" or "negedge". */
|
|
114
|
+
clockType?: string
|
|
115
|
+
/** Reset type: "async_high", "async_low", "sync_high", or "sync_low". */
|
|
116
|
+
resetType?: string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** A signal path consisting of an instance path and a variable path. */
|
|
120
|
+
export interface NapiSignalPath {
|
|
121
|
+
instancePath: Array<NapiInstanceSegment>
|
|
122
|
+
varPath: Array<string>
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** A true-loop declaration with a convergence iteration limit. */
|
|
126
|
+
export interface NapiTrueLoop {
|
|
127
|
+
from: NapiSignalPath
|
|
128
|
+
to: NapiSignalPath
|
|
129
|
+
maxIter: number
|
|
91
130
|
}
|
package/package.json
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celox-sim/celox-napi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Celox simulator NAPI bindings",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"napi": {
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"x86_64-pc-windows-msvc"
|
|
19
|
-
]
|
|
20
|
-
}
|
|
8
|
+
"binaryName": "celox",
|
|
9
|
+
"targets": [
|
|
10
|
+
"x86_64-unknown-linux-gnu",
|
|
11
|
+
"aarch64-unknown-linux-gnu",
|
|
12
|
+
"x86_64-unknown-linux-musl",
|
|
13
|
+
"aarch64-unknown-linux-musl",
|
|
14
|
+
"x86_64-apple-darwin",
|
|
15
|
+
"aarch64-apple-darwin",
|
|
16
|
+
"x86_64-pc-windows-msvc"
|
|
17
|
+
]
|
|
21
18
|
},
|
|
22
19
|
"scripts": {
|
|
20
|
+
"artifacts": "napi artifacts",
|
|
23
21
|
"build": "napi build --platform --release --manifest-path ../../Cargo.toml -p celox-napi",
|
|
24
|
-
"build:debug": "napi build --platform --manifest-path ../../Cargo.toml -p celox-napi"
|
|
22
|
+
"build:debug": "napi build --platform --manifest-path ../../Cargo.toml -p celox-napi",
|
|
23
|
+
"prepublishOnly": "napi prepublish -t npm",
|
|
24
|
+
"version": "napi version"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">= 18"
|
|
25
28
|
},
|
|
26
29
|
"files": [
|
|
27
30
|
"index.js",
|
|
28
31
|
"index.d.ts"
|
|
29
32
|
],
|
|
30
33
|
"devDependencies": {
|
|
31
|
-
"@napi-rs/cli": "^3.
|
|
34
|
+
"@napi-rs/cli": "^3.2.0"
|
|
32
35
|
},
|
|
33
36
|
"repository": {
|
|
34
37
|
"type": "git",
|
|
@@ -36,16 +39,17 @@
|
|
|
36
39
|
"directory": "crates/celox-napi"
|
|
37
40
|
},
|
|
38
41
|
"publishConfig": {
|
|
39
|
-
"access": "public"
|
|
42
|
+
"access": "public",
|
|
43
|
+
"registry": "https://registry.npmjs.org"
|
|
40
44
|
},
|
|
41
45
|
"license": "MIT OR Apache-2.0",
|
|
42
46
|
"optionalDependencies": {
|
|
43
|
-
"@celox-sim/celox-napi-linux-x64-gnu": "0.1.
|
|
44
|
-
"@celox-sim/celox-napi-linux-arm64-gnu": "0.1.
|
|
45
|
-
"@celox-sim/celox-napi-linux-x64-musl": "0.1.
|
|
46
|
-
"@celox-sim/celox-napi-linux-arm64-musl": "0.1.
|
|
47
|
-
"@celox-sim/celox-napi-darwin-x64": "0.1.
|
|
48
|
-
"@celox-sim/celox-napi-darwin-arm64": "0.1.
|
|
49
|
-
"@celox-sim/celox-napi-win32-x64-msvc": "0.1.
|
|
47
|
+
"@celox-sim/celox-napi-linux-x64-gnu": "0.1.6",
|
|
48
|
+
"@celox-sim/celox-napi-linux-arm64-gnu": "0.1.6",
|
|
49
|
+
"@celox-sim/celox-napi-linux-x64-musl": "0.1.6",
|
|
50
|
+
"@celox-sim/celox-napi-linux-arm64-musl": "0.1.6",
|
|
51
|
+
"@celox-sim/celox-napi-darwin-x64": "0.1.6",
|
|
52
|
+
"@celox-sim/celox-napi-darwin-arm64": "0.1.6",
|
|
53
|
+
"@celox-sim/celox-napi-win32-x64-msvc": "0.1.6"
|
|
50
54
|
}
|
|
51
55
|
}
|