Programmable logic Devices: Practical ,common applications of .

Discussion in 'Embedded Systems and Microcontrollers' started by Beetle_X, Nov 3, 2012.

  1. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    This is my first post at this forum so hi to everyone. I was reading about pla and pals and such and I can't think of reason why to use one with a system that is computerized . I can see them as a stepping stone to using them as a digital type of analog computer but that is it.

    Thanks in advance!:confused:
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Well, you should know that the PALs and PLAs are now considered an outdated technology, they were made in the 70s. The most common types of programmable logic these days are FPGAs and CPLDs.

    Like you said, there isn't much need for these devices anymore, since a smaller chip, with more capabilities, that can be run faster, that has more configurable logic, exists. From what I've seen, a PAL or PLA goes for more than a low-grade CPLD.
     
  3. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    Thanks for the reply. Acutally besides for simulating a hardwired system I don't understand the use of Programmable logic devices at all,ever .Where these used before CPU/microprocesors where in existance or practical and why? A processor does boolean algebra so why the need and a hard wired system has relays?:confused:
     
    Last edited: Nov 3, 2012
  4. Zazoo

    Member

    Jul 27, 2011
    114
    43

    Speed os one reason. Array logic allows for purely combinational logic and asynchronous sequential logic circuits. These types of circuits are limited only by propagation delay, not clock speeds as with clock based CPUs and microprocessors.
     
  5. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    Programmable logic allows you to implement just the logic you need and for you to implement many logic functions concurrently. Consider a system that has fifty inputs from various sensors (for simplicity, let's assume that all of the sensors have digital outputs) and the controller has to generate twenty digital control outputs, with each one being dependent in some different way upon some different combination of the fifty inputs. Some inputs only affect one or two outputs but other inputs affect most or even all outputs. With a computer, you have to read the inputs one at a time (or perhaps as a gang of inputs on a multi-bit port) and then you have to compute the new output states one at a time (you might get lucky and be able to compute a few of them simultaneously with bitwise operations, but don't count on it), and finally you have to output them one at a time (or, again, in gangs of outputs to multi-bit ports). Now increase the number of inputs or outputs involved and the amount of time between successive read/write cycles increases. With an FPGA, you can implement each function independently and all processing happens in parallel so all of the output ports update as fast as if the chip was implementing that output port alone, regardless of how many inputs and outputs there are (within reason - at some point you start running out of routing resources and everything starts slowing down as additional functions are shoe-horned in).
     
  6. panic mode

    Senior Member

    Oct 10, 2011
    1,318
    304
    there was a time when majority of circuits were designed for one function only. there was bunch of ICs with variety of different functions - just look at TTL and CMOS families of chips.

    to build even a simple project such as alarm clock, one needs bunch of such chips. today it is cheaper, more compact and consumes less power to do such product using single microcontroller.

    one big advantage is that actual use or function is not determined during design or manufacturing process of the IC - it is specified later by the person that designs around that component.

    you need 7400? well you can get 7400 or replace it with a microcontroller,
    you need 7447? well you can get 7447 or replace it with a microcontroller,
    you need variety of 74xx and 4000 chip? you can get them all or - replace them all with a microcontroller...

    found bug in a design? no problem, there is no need to make new PCB and move all parts to it or buy all parts again, simple program change can fix the problem.

    your computer is another programmable device. how would you like to have one just for writing texts, another one to play particular game, yet another one just to send and receive messages etc? things used to be that way (typewriter, early video games, fax).

    there is a reason they are obsolete now...

    even PCs are being replaced in many cases by tablets and smartphones. multifunctionality in a smaller more portable package. can you imagine the size of a system that is as complex as a smartphone if it was not using programmable devices? ok, that's unfair, lets suppose that this monster only need to run clock, calculator, digital camera and phone, no need to support any other functionality such as GPS, touch screen, messaging etc.
     
    Last edited: Nov 4, 2012
  7. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    I think the OP is focussing on "programmable logic" meaning stuff like FPGAs but NOT stuff like MCUs (what I've seen referred to as "configurable" logic to distinguish it from the more general "programmable" logic that includes devices doing nothing more than running sequential programs. I interpret his question to basically be, "Now that we have microprocessors (including MCUs), why do we need configurable logic?"
     
  8. Beetle_X

    Thread Starter New Member

    Nov 2, 2012
    9
    0
    :)

    Programmable logic devices look like a stand-alone logic function or a coder/decoder.
     
  9. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    In the 1980s the IBM XT, IBM AT etc. included PALs.
    The Apple Mac also included PALs.

    Later they started to use CPLDs.

    In principle, a CPLD is just a large PAL with some extra functionality. The purpose is the same.

    For instance MP3 or I2C- can be done in software, but often is implemented in hardware. They don't normally use an off-the-shelf CPLD for that (or PALs), but you could, if you really wanted to.
     
  10. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    An FPGA can implement a microcontroller, a microcontroller cannot implement a FPGA.

    A microcontroller has it's logic defined and the program makes the necessary inputs to the processor to implement a predefined function.
     
  11. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    It can- in software. Typically some kinds of softwares for instance also use small state machines, which are normally used as a starting point for FPGA. Also pseudo- program code is used (and in the end VHDL), but small state machines often only require a small number of gates.

    If you explicitely and directly implement configurable logic arrays in software, on a microcontroller, it would be much slower than using a hardware FPGA.

    You even have a direct equivalent to logic gates- the ALU, which can do all basic operations, like AND, OR, NOT, XOR.

    There are even microcontrollers which contain a so-called CLC (configureable logic cell). http://microcontroller.com/news/microchip_pic_clc.asp

    Such a CLC is of course nowhere near the complexity of a real FPGA.
     
  12. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    What I meant was that the method of performing the arithmetic is already defined in a microcontroller. Provided that your system was slow enough, you could perform operations which, as far as a slow system is concerned, appear to be concurrent, however, they are comprised of a series of operations.

    True, an FPGA will often incorporate state machines, I was speaking in absolutes. An multiplication on a microcontroller is a series of steps, on lower end ones, but on a FPGA, it could all be done in one clock cycle.

    So, in short, a microcontroller can only implement a FPGA's operation, not it's implementation, if the system speed is sufficiently slow.
     
  13. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    This is not true. The ALU is comprised of logic gates, defined at the RTL level in order to implement the desired function. The problem? This operation is synchronous, the results are not guaranteed until the end of the clock cycle(in a RISC processor)!
     
  14. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Most larger digital logic circuits are clocked too. Understanding how an MCU works is certainly helpful to understand a little about PLDs as well. Starting with PLDs, knowing nothing about MCUs, well you might be tempted actually to reinvent some kind of MCU. There are not so many people who actually have the equipment and knowledge to FLASH a CPU core to a FPGA board.

    People who don't intend actually to use real PLDs can also look up trivia on wikipedia.
     
  15. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Though they don't have to be... in the same sense a microcontroller is
     
  16. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    No. But you can actually program a controller, so it acts like a logic gate. Depends what is the function, you can archieve some MHz.

    Within these limits, it will act the same as a static circuit built from individual gates.

    FPGA of course is much faster. If you just want to play on breadboard with digital logic, you don't really need high speed.

    You can take a 16f59, 40 pins, and implement really large logic circuits, maybe help it a bit in the firmware for some of the bits (to use a software state machine).

    People don't do that very often. I never saw such a video on youtube. Is it lack of creativity? These circuits are not totally significant, but I saw quite a few on the internet.

    There is a difference if you produce some BASIC spaghetti code, or if you really use small state machines, and data tables/truth tables (in software). You don't have to take "state machine" literally with all the features found in literature. Just some kind of state machine...

    If you don't really know what all this will be good for, then your PLD or logic device, or MCU whatever really could be built using nearly any kind of technology. If you know what is the application, you'd choose the appreciate technology. For instance you want I2C, you'd normally use a controller with hardware I2C, or do it using a controller programmed with software I2C. You would not use a FPGA, or individual PALs, even if this is also possible.

    So first ask- what is the application. Then select the appreciate technology. If you want to know trivia facts, really use wikipedia.
     
  17. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    The problem is that this is a sequential operation. If you are using an 8-bit uC operating on, say 64-bit data, you need to acquire the data in 8-bit chunks, during this time, the data could change on any bit in the 64-bit data. Since a FPGA is programmable logic, it could be configured to operate on 64-bit data. No software manipulations. No additional clock cycles.

    Adding limitations means that it is not a 1:1 correspondence!;)

    True, but we are talking about programmable logice... like the OP's PALs, PEELs, GALs, PLAs, etc.

    With each operation, you slow your system down since the operations are done sequentially.

    Actually, I did this for a lab back in school and the professor told me to take advantage of the sequential nature of the microcontroller!:p

    ...though you should be aware of the drawbacks and advantages of each...then, when the system specs are better defined, it will(usually) narrow your choices...

    Not necessarily so, what if you are doing edge-detection in a FPGA and you have I2C as the camera interface? You wouldn't add another device to grab the data when the FPGA can do it itself. The hardware I2C you are talking about was probably tested on an FPGA, once the configuration of the device was finalized, it was burned into the chip.

    Agreed!:D
     
  18. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    Sometimes relay logic is used, or was used, because it is more rugged than silicon, can be repaired in-place, and does not need software or special tools.

    But recently (since the 1990s) cheap silicon has become available. Before 1990s, the only way to implement logic in hardware was to design, test and manufacture a custom ASIC. Very expensive!

    Some early PC mainboards really contained PLAs. They were used until the mid' 1990s, then disappeared from PCBs altogether. Except some oddball DELL mainboard (for Win2000), which contained many small 74xx chips, and maybe even some PLAs.

    So, the real classic PLAs (like PAL or GAL) are largely obsolete now. In addition, MCUs etc. also implement some kind of PLA functionality.

    Every programmer would use PLA- like thinking and design where appreciate.

    Hardware PLAs are used for faster execution. Today this means CPLD or FPGA.
     
  19. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    I think you mean to write PLD, a PLA is a very specific technology, where a PLD can be implemented using many types of technologies.

    A MCU has a specific architecture, not-programmable(you cannot exchange the 8-bit ALU with a 16-bit ALU), though it can be done in a PLD. The programming of the microcontroller is simply writing RTL opcodes in a certain location in memory in order to produce a desired output within an existing architecture.
    So, yes, it does implement a PLD functionality because it has only one implementation, which cannot be changed. Ever.

    At the risk of fanning the fire, you cannot program a PLD. You describe it in a HDL(Verilog, VHDL, etc.), and burn the configuration to the PLD(technology specific). No program runs on the PLD, it has a specific configuration which is created in the translation from HDL to implementation.
     
  20. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    If the OP is still around :rolleyes:, here is a link that you may find helpful...

    Though, you may need to take it with a grain of salt...:)
     
Loading...