Bil Herd made an article about Programmable Logic. In this article he explains how the PLA for the C64 was developed. The PLA in the C64 is used to create chip select signals from various other signals. These signals control which chip is connected to the data bus and is therefore responsible for the memory mapping of the C64.
Programmable Logic II - CPL