home *** CD-ROM | disk | FTP | other *** search
- GRAY CODE TO BINARY CONVERTER
-
- A Gray code to binary converter is a progressive array of exclusive-or
- gates judiciously interconnectely. Here such a converter is defined as a
- numerical map, forcing the PLD compiler to work out the detailed logic
- itself. The PLD compiler achieves exactly the same logic as the classical
- exclusive-or array. See Chapter 5 of the reference guide for a discussion
- of maps.
-
- |PAL16HD8 in:G[3..0], io:B[3..0]
- |
- | Map: G[3..0] -> B[3..0] { Gray(n) -> n }
-
- | Vectors:
- | { Display (G[3..0])d, " = ", G[3..0], " -> ", (B[3..0])d
- | Test G[3..0]
- | End }
-
-