32
32
*/
33
33
34
34
// --------------------------------------------------------
35
-
36
35
// * ver 2
37
36
// * title Bit-wise inverter
38
37
// * group unary
@@ -526,14 +525,12 @@ endgenerate
526
525
endmodule
527
526
528
527
// --------------------------------------------------------
529
-
530
528
// * ver 2
531
529
// * title Variable shifter
532
530
// * group binary
533
531
// - Performs a right logical shift if the second operand is positive (or
534
532
// - unsigned), and a left logical shift if it is negative.
535
533
// -
536
-
537
534
module \$shift (A, B, Y);
538
535
539
536
parameter A_SIGNED = 0 ;
@@ -565,14 +562,12 @@ endgenerate
565
562
endmodule
566
563
567
564
// --------------------------------------------------------
568
-
569
565
// * ver 2
570
566
// * title Indexed part-select
571
567
// * group binary
572
568
// * tags x-output
573
569
// - Same as the `$shift` cell, but fills with 'x'.
574
570
// -
575
-
576
571
module \$shiftx (A, B, Y);
577
572
578
573
parameter A_SIGNED = 0 ;
649
644
endmodule
650
645
651
646
// --------------------------------------------------------
652
-
653
647
// * ver 2
654
648
// * title Arithmetic logic unit
655
649
// * group arith
@@ -839,7 +833,6 @@ endgenerate
839
833
endmodule
840
834
841
835
// --------------------------------------------------------
842
-
843
836
// * ver 2
844
837
// * title Case equality
845
838
// * group binary
@@ -873,7 +866,6 @@ endgenerate
873
866
endmodule
874
867
875
868
// --------------------------------------------------------
876
-
877
869
// * ver 2
878
870
// * title Case inequality
879
871
// * group binary
@@ -1215,7 +1207,6 @@ end
1215
1207
endmodule
1216
1208
1217
1209
// --------------------------------------------------------
1218
-
1219
1210
// * ver 2
1220
1211
// * title Divider
1221
1212
// * group binary
@@ -1246,7 +1237,6 @@ endgenerate
1246
1237
endmodule
1247
1238
1248
1239
// --------------------------------------------------------
1249
-
1250
1240
// * ver 2
1251
1241
// * title Modulo
1252
1242
// * group binary
@@ -1544,8 +1534,12 @@ assign Y = S ? B : A;
1544
1534
endmodule
1545
1535
1546
1536
// --------------------------------------------------------
1537
+ // * ver 2
1538
+ // * title Binary-encoded multiplexer
1547
1539
// * group mux
1548
-
1540
+ // - Selects between 'slices' of A where each value of S corresponds to a unique
1541
+ // - slice.
1542
+ // -
1549
1543
module \$bmux (A, S, Y);
1550
1544
1551
1545
parameter WIDTH = 0 ;
@@ -1572,9 +1566,13 @@ endgenerate
1572
1566
endmodule
1573
1567
1574
1568
// --------------------------------------------------------
1569
+ // * ver 2
1570
+ // * title Priority-encoded multiplexer
1575
1571
// * group mux
1576
1572
// * tags x-output
1577
-
1573
+ // - Selects between 'slices' of B where each slice corresponds to a single bit
1574
+ // - of S. Outputs A when all bits of S are low.
1575
+ // -
1578
1576
module \$pmux (A, B, S, Y);
1579
1577
1580
1578
parameter WIDTH = 0 ;
@@ -1881,7 +1879,6 @@ endspecify
1881
1879
endmodule
1882
1880
1883
1881
// --------------------------------------------------------
1884
-
1885
1882
// * ver 2
1886
1883
// * title Bit-wise case equality
1887
1884
// * group binary
@@ -1905,7 +1902,11 @@ endgenerate
1905
1902
endmodule
1906
1903
1907
1904
// --------------------------------------------------------
1905
+ // * ver 2
1906
+ // * title Bit-wise multiplexer
1908
1907
// * group mux
1908
+ // - Equivalent to a series of 1-bit wide `$mux` cells.
1909
+ // -
1909
1910
module \$bwmux (A, B, S, Y);
1910
1911
1911
1912
parameter WIDTH = 0 ;
0 commit comments