yowasp-yosys 0.44.0.0.post760__py3-none-any.whl → 0.45.0.0.post775__py3-none-any.whl

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.
Files changed (35) hide show
  1. yowasp_yosys/share/gowin/cells_sim.v +52 -0
  2. yowasp_yosys/share/nanoxplore/arith_map.v +76 -0
  3. yowasp_yosys/share/nanoxplore/brams.txt +50 -0
  4. yowasp_yosys/share/nanoxplore/brams_init.vh +23 -0
  5. yowasp_yosys/share/nanoxplore/brams_map.v +84 -0
  6. yowasp_yosys/share/nanoxplore/cells_bb.v +127 -0
  7. yowasp_yosys/share/nanoxplore/cells_bb_l.v +2156 -0
  8. yowasp_yosys/share/nanoxplore/cells_bb_m.v +1527 -0
  9. yowasp_yosys/share/nanoxplore/cells_bb_u.v +2758 -0
  10. yowasp_yosys/share/nanoxplore/cells_map.v +95 -0
  11. yowasp_yosys/share/nanoxplore/cells_sim.v +421 -0
  12. yowasp_yosys/share/nanoxplore/cells_sim_l.v +0 -0
  13. yowasp_yosys/share/nanoxplore/cells_sim_m.v +0 -0
  14. yowasp_yosys/share/nanoxplore/cells_sim_u.v +306 -0
  15. yowasp_yosys/share/nanoxplore/cells_wrap.v +201 -0
  16. yowasp_yosys/share/nanoxplore/cells_wrap_l.v +1713 -0
  17. yowasp_yosys/share/nanoxplore/cells_wrap_m.v +1501 -0
  18. yowasp_yosys/share/nanoxplore/cells_wrap_u.v +3506 -0
  19. yowasp_yosys/share/nanoxplore/io_map.v +15 -0
  20. yowasp_yosys/share/nanoxplore/latches_map.v +11 -0
  21. yowasp_yosys/share/nanoxplore/rf_init.vh +17 -0
  22. yowasp_yosys/share/nanoxplore/rf_rams_l.txt +15 -0
  23. yowasp_yosys/share/nanoxplore/rf_rams_m.txt +15 -0
  24. yowasp_yosys/share/nanoxplore/rf_rams_map_l.v +30 -0
  25. yowasp_yosys/share/nanoxplore/rf_rams_map_m.v +30 -0
  26. yowasp_yosys/share/nanoxplore/rf_rams_map_u.v +345 -0
  27. yowasp_yosys/share/nanoxplore/rf_rams_u.txt +66 -0
  28. yowasp_yosys/share/quicklogic/qlf_k6n10f/bram_types_sim.v +1 -1
  29. yowasp_yosys/share/simlib.v +159 -0
  30. yowasp_yosys/yosys.wasm +0 -0
  31. {yowasp_yosys-0.44.0.0.post760.dist-info → yowasp_yosys-0.45.0.0.post775.dist-info}/METADATA +1 -1
  32. {yowasp_yosys-0.44.0.0.post760.dist-info → yowasp_yosys-0.45.0.0.post775.dist-info}/RECORD +35 -9
  33. {yowasp_yosys-0.44.0.0.post760.dist-info → yowasp_yosys-0.45.0.0.post775.dist-info}/WHEEL +0 -0
  34. {yowasp_yosys-0.44.0.0.post760.dist-info → yowasp_yosys-0.45.0.0.post775.dist-info}/entry_points.txt +0 -0
  35. {yowasp_yosys-0.44.0.0.post760.dist-info → yowasp_yosys-0.45.0.0.post775.dist-info}/top_level.txt +0 -0
@@ -618,6 +618,21 @@ module OSER4(D3, D2, D1, D0, TX1, TX0, FCLK, PCLK, RESET, Q1, Q0);
618
618
  parameter HWL = "false";
619
619
  endmodule
620
620
 
621
+ module OSER4_MEM (Q0, Q1, D0, D1, D2, D3, TX0, TX1, PCLK, FCLK, TCLK, RESET) ;
622
+ parameter GSREN = "";
623
+ parameter LSREN = "";
624
+ parameter HWL = "";
625
+ parameter TCLK_SOURCE = "";
626
+ parameter TXCLK_POL = "";
627
+
628
+ input D0, D1, D2, D3;
629
+ input TX0, TX1;
630
+ input PCLK, FCLK, TCLK, RESET;
631
+ output Q0, Q1;
632
+
633
+ parameter ID = "";
634
+ endmodule
635
+
621
636
  module OSER8(D7, D6, D5, D4, D3, D2, D1, D0, TX3, TX2, TX1, TX0, FCLK, PCLK, RESET, Q1, Q0);
622
637
  output Q1;
623
638
  output Q0;
@@ -729,6 +744,21 @@ RESET, CALIB, D);
729
744
  parameter LSREN = "true";
730
745
  endmodule
731
746
 
747
+ module IDES4_MEM (Q0, Q1, Q2, Q3, D, WADDR,
748
+ RADDR, CALIB, PCLK, FCLK, ICLK, RESET) ;
749
+ parameter GSREN = "";
750
+ parameter LSREN = "";
751
+
752
+ input D, ICLK, FCLK, PCLK;
753
+ input [2:0] WADDR;
754
+ input [2:0] RADDR;
755
+ input CALIB, RESET;
756
+
757
+ output Q0,Q1,Q2,Q3;
758
+
759
+ parameter ID = "";
760
+ endmodule
761
+
732
762
  module IDES8(Q7, Q6, Q5, Q4, Q3, Q2, Q1, Q0, FCLK, PCLK,
733
763
  RESET, CALIB, D);
734
764
  input D;
@@ -842,6 +872,28 @@ module IDDRC(D, CLK, CLEAR, Q0, Q1);
842
872
  parameter Q1_INIT = 1'b0;
843
873
  endmodule
844
874
 
875
+ module DQS(DQSR90, DQSW0, DQSW270, RPOINT, WPOINT, RVALID, RBURST, RFLAG,
876
+ WFLAG, DQSIN, DLLSTEP, WSTEP, READ, RLOADN, RMOVE, RDIR, WLOADN, WMOVE, WDIR,
877
+ HOLD, RCLKSEL, PCLK, FCLK, RESET) ;
878
+ input DQSIN,PCLK,FCLK,RESET;
879
+ input [3:0] READ;
880
+ input [2:0] RCLKSEL;
881
+ input [7:0] DLLSTEP;
882
+ input [7:0] WSTEP;
883
+ input RLOADN, RMOVE, RDIR, WLOADN, WMOVE, WDIR, HOLD;
884
+
885
+ output DQSR90, DQSW0, DQSW270;
886
+ output [2:0] RPOINT, WPOINT;
887
+ output RVALID,RBURST, RFLAG, WFLAG;
888
+
889
+ parameter FIFO_MODE_SEL = "";
890
+ parameter RD_PNTR = "";
891
+ parameter DQS_MODE = "";
892
+ parameter HWL = "";
893
+ parameter GSREN = "";
894
+ parameter ID = "";
895
+ endmodule
896
+
845
897
  (* blackbox *)
846
898
  module ODDR(D0, D1, TX, CLK, Q0, Q1);
847
899
  input D0;
@@ -0,0 +1,76 @@
1
+ /*
2
+ * yosys -- Yosys Open SYnthesis Suite
3
+ *
4
+ * Copyright (C) 2024 Miodrag Milanovic <micko@yosyshq.com>
5
+ *
6
+ * Permission to use, copy, modify, and/or distribute this software for any
7
+ * purpose with or without fee is hereby granted, provided that the above
8
+ * copyright notice and this permission notice appear in all copies.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+ *
18
+ */
19
+
20
+ (* techmap_celltype = "$alu" *)
21
+ module _80_nx_cy_alu (A, B, CI, BI, X, Y, CO);
22
+ parameter A_SIGNED = 0;
23
+ parameter B_SIGNED = 0;
24
+ parameter A_WIDTH = 1;
25
+ parameter B_WIDTH = 1;
26
+ parameter Y_WIDTH = 1;
27
+
28
+ (* force_downto *)
29
+ input [A_WIDTH-1:0] A;
30
+ (* force_downto *)
31
+ input [B_WIDTH-1:0] B;
32
+ (* force_downto *)
33
+ output [Y_WIDTH-1:0] X, Y;
34
+
35
+ input CI, BI;
36
+ (* force_downto *)
37
+ output [Y_WIDTH-1:0] CO;
38
+ (* force_downto *)
39
+ wire [Y_WIDTH-1:0] COx;
40
+
41
+ wire _TECHMAP_FAIL_ = Y_WIDTH <= 2;
42
+
43
+ (* force_downto *)
44
+ wire [Y_WIDTH-1:0] A_buf, B_buf;
45
+ \$pos #(.A_SIGNED(A_SIGNED), .A_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) A_conv (.A(A), .Y(A_buf));
46
+ \$pos #(.A_SIGNED(B_SIGNED), .A_WIDTH(B_WIDTH), .Y_WIDTH(Y_WIDTH)) B_conv (.A(B), .Y(B_buf));
47
+
48
+ (* force_downto *)
49
+ wire [Y_WIDTH-1:0] AA = A_buf;
50
+ (* force_downto *)
51
+ wire [Y_WIDTH-1:0] BB = BI ? ~B_buf : B_buf;
52
+
53
+ genvar i;
54
+ generate for (i = 0; i < Y_WIDTH; i = i + 1) begin: slice
55
+ NX_CY_1BIT #(.first(i==0))
56
+ alu_i (
57
+ .CI(i==0 ? CI : COx[i-1]),
58
+ .A(AA[i]),
59
+ .B(BB[i]),
60
+ .S(Y[i]),
61
+ .CO(COx[i])
62
+ );
63
+
64
+ end: slice
65
+ endgenerate
66
+
67
+ NX_CY_1BIT alu_cout(
68
+ .CI(COx[Y_WIDTH-1]),
69
+ .A(1'b0),
70
+ .B(1'b0),
71
+ .S(CO[Y_WIDTH-1])
72
+ );
73
+
74
+ /* End implementation */
75
+ assign X = AA ^ BB;
76
+ endmodule
@@ -0,0 +1,50 @@
1
+ ram block $__NX_RAM_ {
2
+ option "STD_MODE" "NOECC_48kx1" {
3
+ # only 32k used
4
+ abits 15;
5
+ widths 1 per_port;
6
+ }
7
+ option "STD_MODE" "NOECC_24kx2" {
8
+ # only 16k used
9
+ abits 14;
10
+ widths 2 per_port;
11
+ }
12
+ ifndef IS_NG_MEDIUM {
13
+ option "STD_MODE" "NOECC_16kx3" {
14
+ abits 14;
15
+ widths 3 per_port;
16
+ }
17
+ }
18
+ option "STD_MODE" "NOECC_12kx4" {
19
+ # only 8k used
20
+ abits 13;
21
+ widths 4 per_port;
22
+ }
23
+ ifndef IS_NG_MEDIUM {
24
+ option "STD_MODE" "NOECC_8kx6" {
25
+ abits 13;
26
+ widths 6 per_port;
27
+ }
28
+ }
29
+ option "STD_MODE" "NOECC_6kx8" {
30
+ # only 4k used
31
+ abits 12;
32
+ widths 8 per_port;
33
+ }
34
+ option "STD_MODE" "NOECC_4kx12" {
35
+ abits 12;
36
+ widths 12 per_port;
37
+ }
38
+ option "STD_MODE" "NOECC_2kx24" {
39
+ abits 11;
40
+ widths 24 per_port;
41
+ }
42
+ cost 64;
43
+ init no_undef;
44
+ port srsw "A" "B" {
45
+ clock anyedge;
46
+ clken;
47
+ rdwr no_change;
48
+ rdinit none;
49
+ }
50
+ }
@@ -0,0 +1,23 @@
1
+ function [409600-1:0] bram_init_to_string;
2
+ input [49152-1:0] array;
3
+ input integer blocks;
4
+ input integer width;
5
+ reg [409600-1:0] temp; // (49152+2048)*8 48K bit data + 2k commas
6
+ reg [24-1:0] temp2;
7
+ integer i;
8
+ integer j;
9
+ begin
10
+ temp = "";
11
+ for (i = 0; i < 2048; i = i + 1) begin
12
+ if (i != 0) begin
13
+ temp = {temp, ","};
14
+ end
15
+ temp2 = 24'b0;
16
+ for (j = 0; j < blocks; j = j + 1) begin
17
+ temp2[j*width +: width] = array[{j, i[10:0]}*width +: width];
18
+ end
19
+ temp = {temp, $sformatf("%b",temp2[23:0])};
20
+ end
21
+ bram_init_to_string = temp;
22
+ end
23
+ endfunction
@@ -0,0 +1,84 @@
1
+ module $__NX_RAM_ (...);
2
+
3
+ parameter INIT = 0;
4
+ parameter OPTION_STD_MODE = "NOECC_24kx2";
5
+
6
+ parameter PORT_A_WIDTH = 24;
7
+ parameter PORT_B_WIDTH = 24;
8
+
9
+ parameter PORT_A_CLK_POL = 1;
10
+
11
+ input PORT_A_CLK;
12
+ input PORT_A_CLK_EN;
13
+ input PORT_A_WR_EN;
14
+ input [15:0] PORT_A_ADDR;
15
+ input [PORT_A_WIDTH-1:0] PORT_A_WR_DATA;
16
+ wire [24-1:0] A_DATA;
17
+ output [PORT_A_WIDTH-1:0] PORT_A_RD_DATA;
18
+
19
+ parameter PORT_B_CLK_POL = 1;
20
+
21
+ input PORT_B_CLK;
22
+ input PORT_B_CLK_EN;
23
+ input PORT_B_WR_EN;
24
+ input [15:0] PORT_B_ADDR;
25
+ input [PORT_B_WIDTH-1:0] PORT_B_WR_DATA;
26
+ wire [24-1:0] B_DATA;
27
+ output [PORT_B_WIDTH-1:0] PORT_B_RD_DATA;
28
+
29
+ `include "brams_init.vh"
30
+
31
+ localparam raw_config1_val = OPTION_STD_MODE == "NOECC_48kx1" ? 16'b0000000000000000:
32
+ OPTION_STD_MODE == "NOECC_24kx2" ? 16'b0000001001001001:
33
+ OPTION_STD_MODE == "NOECC_16kx3" ? 16'b0000110110110110:
34
+ OPTION_STD_MODE == "NOECC_12kx4" ? 16'b0000010010010010:
35
+ OPTION_STD_MODE == "NOECC_8kx6" ? 16'b0000111111111111:
36
+ OPTION_STD_MODE == "NOECC_6kx8" ? 16'b0000011011011011:
37
+ OPTION_STD_MODE == "NOECC_4kx12" ? 16'b0000100100100100:
38
+ OPTION_STD_MODE == "NOECC_2kx24" ? 16'b0000101101101101:
39
+ 16'bx;
40
+
41
+ localparam A_REPEAT = 24 / PORT_A_WIDTH;
42
+ localparam B_REPEAT = 24 / PORT_B_WIDTH;
43
+
44
+ assign A_DATA = {A_REPEAT{PORT_A_WR_DATA[PORT_A_WIDTH-1:0]}};
45
+ assign B_DATA = {B_REPEAT{PORT_B_WR_DATA[PORT_B_WIDTH-1:0]}};
46
+
47
+ NX_RAM_WRAP #(
48
+ .std_mode(OPTION_STD_MODE),
49
+ .mcka_edge(PORT_A_CLK_POL == 1 ? 1'b0 : 1'b1),
50
+ .mckb_edge(PORT_B_CLK_POL == 1 ? 1'b0 : 1'b1),
51
+ .pcka_edge(PORT_A_CLK_POL == 1 ? 1'b0 : 1'b1),
52
+ .pckb_edge(PORT_B_CLK_POL == 1 ? 1'b0 : 1'b1),
53
+ .raw_config0(4'b0000),
54
+ .raw_config1(raw_config1_val[15:0]),
55
+ .mem_ctxt($sformatf("%s",bram_init_to_string(INIT,A_REPEAT,PORT_A_WIDTH))),
56
+ ) _TECHMAP_REPLACE_ (
57
+ .ACK(PORT_A_CLK),
58
+ //.ACKS(PORT_A_CLK),
59
+ //.ACKD(), // Not used in Non-ECC modes
60
+ //.ACKR(),
61
+ //.AR(),
62
+ //.ACOR(),
63
+ //.AERR(),
64
+ .ACS(PORT_A_CLK_EN),
65
+ .AWE(PORT_A_WR_EN),
66
+
67
+ .AA(PORT_A_ADDR),
68
+ .AI(A_DATA),
69
+ .AO(PORT_A_RD_DATA),
70
+
71
+ .BCK(PORT_B_CLK),
72
+ //.BCKC(PORT_B_CLK),
73
+ //.BCKD(), // Not used in Non-ECC modes
74
+ //.BCKR()
75
+ //.BR(),
76
+ //.BCOR(),
77
+ //.BERR(),
78
+ .BCS(PORT_B_CLK_EN),
79
+ .BWE(PORT_B_WR_EN),
80
+ .BA(PORT_B_ADDR),
81
+ .BI(B_DATA),
82
+ .BO(PORT_B_RD_DATA)
83
+ );
84
+ endmodule
@@ -0,0 +1,127 @@
1
+ // NX_RAM related
2
+ (* blackbox *)
3
+ module NX_ECC(CKD, CHK, COR, ERR);
4
+ input CHK;
5
+ input CKD;
6
+ output COR;
7
+ output ERR;
8
+ endmodule
9
+
10
+ //TODO
11
+ (* blackbox *)
12
+ module NX_IOM_BIN2GRP(GS, DS, GVON, GVIN, GVDN, PA, LA);
13
+ input [1:0] DS;
14
+ input GS;
15
+ output [2:0] GVDN;
16
+ output [2:0] GVIN;
17
+ output [2:0] GVON;
18
+ input [5:0] LA;
19
+ output [3:0] PA;
20
+ endmodule
21
+
22
+ //TODO
23
+ (* blackbox *)
24
+ module NX_SER(FCK, SCK, R, IO, DCK, DRL, I, DS, DRA, DRI, DRO, DID);
25
+ input DCK;
26
+ output [5:0] DID;
27
+ input [5:0] DRA;
28
+ input [5:0] DRI;
29
+ input DRL;
30
+ output [5:0] DRO;
31
+ input [1:0] DS;
32
+ input FCK;
33
+ input [4:0] I;
34
+ output IO;
35
+ input R;
36
+ input SCK;
37
+ parameter data_size = 5;
38
+ parameter differential = "";
39
+ parameter drive = "";
40
+ parameter location = "";
41
+ parameter locked = 1'b0;
42
+ parameter outputCapacity = "";
43
+ parameter outputDelayLine = "";
44
+ parameter slewRate = "";
45
+ parameter spath_dynamic = 1'b0;
46
+ parameter standard = "";
47
+ endmodule
48
+
49
+ //TODO
50
+ (* blackbox *)
51
+ module NX_DES(FCK, SCK, R, IO, DCK, DRL, DIG, FZ, FLD, FLG, O, DS, DRA, DRI, DRO, DID);
52
+ input DCK;
53
+ output [5:0] DID;
54
+ input DIG;
55
+ input [5:0] DRA;
56
+ input [5:0] DRI;
57
+ input DRL;
58
+ output [5:0] DRO;
59
+ input [1:0] DS;
60
+ input FCK;
61
+ output FLD;
62
+ output FLG;
63
+ input FZ;
64
+ input IO;
65
+ output [4:0] O;
66
+ input R;
67
+ input SCK;
68
+ parameter data_size = 5;
69
+ parameter differential = "";
70
+ parameter dpath_dynamic = 1'b0;
71
+ parameter drive = "";
72
+ parameter inputDelayLine = "";
73
+ parameter inputSignalSlope = "";
74
+ parameter location = "";
75
+ parameter locked = 1'b0;
76
+ parameter standard = "";
77
+ parameter termination = "";
78
+ parameter terminationReference = "";
79
+ parameter turbo = "";
80
+ parameter weakTermination = "";
81
+ endmodule
82
+
83
+ //TODO
84
+ (* blackbox *)
85
+ module NX_SERDES(FCK, SCK, RTX, RRX, CI, CCK, CL, CR, IO, DCK, DRL, DIG, FZ, FLD, FLG, I, O, DS, DRA, DRI, DRO
86
+ , DID);
87
+ input CCK;
88
+ input CI;
89
+ input CL;
90
+ input CR;
91
+ input DCK;
92
+ output [5:0] DID;
93
+ input DIG;
94
+ input [5:0] DRA;
95
+ input [5:0] DRI;
96
+ input DRL;
97
+ output [5:0] DRO;
98
+ input [1:0] DS;
99
+ input FCK;
100
+ output FLD;
101
+ output FLG;
102
+ input FZ;
103
+ input [4:0] I;
104
+ inout IO;
105
+ output [4:0] O;
106
+ input RRX;
107
+ input RTX;
108
+ input SCK;
109
+ parameter cpath_registered = 1'b0;
110
+ parameter data_size = 5;
111
+ parameter differential = "";
112
+ parameter dpath_dynamic = 1'b0;
113
+ parameter drive = "";
114
+ parameter inputDelayLine = "";
115
+ parameter inputSignalSlope = "";
116
+ parameter location = "";
117
+ parameter locked = 1'b0;
118
+ parameter outputCapacity = "";
119
+ parameter outputDelayLine = "";
120
+ parameter slewRate = "";
121
+ parameter spath_dynamic = 1'b0;
122
+ parameter standard = "";
123
+ parameter termination = "";
124
+ parameter terminationReference = "";
125
+ parameter turbo = "";
126
+ parameter weakTermination = "";
127
+ endmodule