yosys2digitaljs 0.2.3 → 0.6.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/ChangeLog.md +33 -0
- package/README.md +4 -4
- package/dist/index.d.ts +164 -0
- package/dist/index.js +1132 -0
- package/package.json +12 -4
- package/process.js +13 -2
- package/src/index.ts +1284 -0
- package/tests/cycleadder.sv +1 -1
- package/tests/cycleadder_arst.sv +1 -1
- package/tests/dff_masterslave.sv +1 -1
- package/tests/dlatch_gate.sv +1 -1
- package/tests/fsm.sv +4 -3
- package/tsconfig.json +15 -0
- package/.travis.yml +0 -8
- package/index.js +0 -878
package/tests/cycleadder.sv
CHANGED
package/tests/cycleadder_arst.sv
CHANGED
package/tests/dff_masterslave.sv
CHANGED
package/tests/dlatch_gate.sv
CHANGED
package/tests/fsm.sv
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Write your modules here!
|
|
2
|
-
module fsm(input clk, rst, a, output b);
|
|
2
|
+
module fsm(input clk, rst, a, output logic b);
|
|
3
3
|
|
|
4
|
+
(* fsm_encoding = "auto" *)
|
|
4
5
|
logic [1:0] state;
|
|
5
6
|
|
|
6
7
|
localparam A = 2'b00;
|
|
@@ -10,7 +11,7 @@ module fsm(input clk, rst, a, output b);
|
|
|
10
11
|
|
|
11
12
|
always_ff @(posedge clk or posedge rst)
|
|
12
13
|
if (rst) state <= B;
|
|
13
|
-
else
|
|
14
|
+
else unique case(state)
|
|
14
15
|
A: state <= C;
|
|
15
16
|
B: state <= D;
|
|
16
17
|
C: if (a) state <= D; else state <= B;
|
|
@@ -19,7 +20,7 @@ module fsm(input clk, rst, a, output b);
|
|
|
19
20
|
|
|
20
21
|
always_comb begin
|
|
21
22
|
b = 1'bx;
|
|
22
|
-
case(state)
|
|
23
|
+
unique case(state)
|
|
23
24
|
A, D: b = 0;
|
|
24
25
|
B: b = 1;
|
|
25
26
|
C: if (a) b = 1; else b = 0;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"moduleResolution": "node",
|
|
4
|
+
"module": "es2015",
|
|
5
|
+
"target": "es2017",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"allowSyntheticDefaultImports": true,
|
|
8
|
+
"outDir": "./dist",
|
|
9
|
+
"lib": ["es2017"],
|
|
10
|
+
"types": ["node"]
|
|
11
|
+
},
|
|
12
|
+
"include": [
|
|
13
|
+
"src/**/*"
|
|
14
|
+
]
|
|
15
|
+
}
|