Connect with us

CPLD HDL?

Discussion in 'Electronic Design' started by Winston, Feb 9, 2012.

Scroll to continue with content
  1. Winston

    Winston Guest

    I want to put my latest idea in a PLD to save board space.
    Years ago I was comfortable working in PALASM, CUPL and ABEL.
    I also documented another guy's Verilog source.

    I see that Xilinx offers their ISE WebPACK suite for free
    but it is said to have 'limited' simulation ability.
    There are addon$ available that have complete simulation
    ability.

    My Question Without Intending To Start A Religious War:

    What modern HDL compiler and simulator package has:
    The ability to run on Linux
    A gentle learning curve
    Good user support
    Fast, easy use
    Efficient use of PLD resources
    Support for multiple part vendors
    Reasonable purchase price
    ..and all other characteristics of a superior product. :)

    Thanks!


    --Winston
     
  2. Winston

    Winston Guest


    OK. Thanks!

    --Winston
     
  3. Winston

    Winston Guest

    Thanks, Jon.

    Sounds like I ought to contemplate a microcontroller
    implementation instead. Then I could use assembly,
    which I find entertaining.

    --Winston
     
  4. Nico Coesel

    Nico Coesel Guest

    I use Xilinx' free webpack for their CPLDs. Their XC9500 series is
    pretty cheap. As a language I use VHDL because... I know VHDL. For
    simulation I use ghdl (ghdl.free.fr).
    Not on this world...
     
  5. Winston

    Winston Guest

    Tim > Oh, don't give up now, I was hoping to harvest ideas
    Tim > from this thread for a board that's already got four
    Tim > 74AHCxx parts on it, and seems to be acquiring more!!!

    Jon, Tim and I would very much like to know what package
    you use to capture a schematic and output (JEDEC?) for a
    CPLD or FPGA. Is the ghdl package Nico mentioned involved?

    Thanks

    --Winston
     
  6. Nico Coesel

    Nico Coesel Guest

    I guess a good book with actual examples, not just a language
    specification :) Just make sure it covers writing functions and so
    on. There is a lot of power in VHDL. In the past I've often designed
    pieces of logic which can be configured for different widths,
    channels, etc. That took some studying to get it right but it has paid
    off big time in several occasions. It helps if you have a programming
    background.

    There is also Verilog but I never understood Verilog. It makes me feel
    like I'm looking at a netlist output from a schematic.
     
  7. Mr.CRC

    Mr.CRC Guest


    I use Xilinx Webpack on Linux, and the Icarus Verilog simulator.

    Gentle learning curve just doesn't apply to Xilinx software.

    I suppose support is good if you use Xilinx or Altera, between the
    USENET and manufacturer forums. I rarely need support, and even when I
    do it's just to save some time rather than figure it out myself.

    I've never taxed any of my PLDs enough to care about very high efficiency.

    Support for multiple vendors? Well, that will only happen if you aren't
    using the software from one of the manufacturers. I don't go there, due
    to too high prices, which I prefer free.


    Good luck and have fun.
     
  8. Winston

    Winston Guest

    Mr.CRC wrote:

    (...)
    I see what you mean. I downloaded and installed just now.
    Holey Cannolli! In the Good Old Days, you just supplied a source
    file and told the compiler to get started. The tutorial
    has me doing all kinds of gyrations, referring to unlabeled
    windows and sending me on a goose chase to locate buttons that
    are not visible on the existing screen, all with no explanation
    of *why* these things need to be done. Wow!
    Thanks, Mr. CRC

    --Winston
     
  9. I have little trouble translating VHDL code in mind-images of logic
    circuitry, but I find its syntax clumsy and baroque. I can't
    seem to get used to "if signal = '1' then" as opposed to
    "if signal then", or "<=" rather than just "=", not to mention
    that "<=" means different things inside or outside of processes.
    And the inconsistency of "elsif" vs. "end if", or the difference
    between "if" and "when" statements, etc, etc.

    Also, I see many people, even those fluent in VHDL, draw little
    circuit diagrams before translating them into VHDL.

    I think VHDL is a crutch, just like the 1984 rectangular logic
    gate symbols were a crutch for immature plotting software.

    Jeroen Belleman
     
  10. Nico Coesel

    Nico Coesel Guest

    Actually you should treat it like a programming language and a design
    as a software problem. If you keep thinking in logic then you end up
    inputting a netlist with VHDL. VHDL gets very clumsy that way (lots of
    typing).

    For fun: use google to find a VHDL implementation of a priority
    encoder. 9 out of 10 people write an if statement for each output
    (which gets large quickly). Only one writes a clever three line
    function which works regardless the number of input bits.

    The problem students have is not with logic design but with the fact
    that VHDL describes a parallel process and that every line of code is
    executed simultaneously.
     
  11. Nico Coesel

    Nico Coesel Guest

    Thats part of getting experienced. Programmable logic manufacturers
    often have documents describing what is efficient for their devices
    and what is not.
    That is the purpose of a high level language. When I program in C I
    don't care how many instructions it uses. As long as the program works
    fast enough and fits in the flash it is OK.
     
  12. Winston

    Winston Guest

    MK wrote:

    (...)
    OK, thanks Michael. Now downloading Lattice's entry (*also* called 'diamond'!)

    --Winston
     
  13. Hi Phil,

    On microcontrollers what you often find is that a large chunk of the
    program size turns out to be consumed by a few large library
    functions. Sometimes ones you did not even realise you referenced.

    And the reason say the ARM compiler might beat gcc on size is that their
    libraries are better optimised, not because its detailed code generation
    is significantly improved.

    For smaller projects I find I am better off not using the traditional C
    library at all. It is more trouble than it is worth. An innocent
    "#assert" brings in a full floating point printf and all of stdio, and
    suddenly your 64k flash is full.

    Over time I have built up a library containing replacements for the very
    few C library functions that are any actual use (in a small embedded
    system context).
     
  14. Nico Coesel

    Nico Coesel Guest

    True, but ask yourself: are you going to tinker with assembler or make
    the algorithm more clever so it is faster or smaller?

    Sometimes there is a third option. With the ARM7TDMI controllers (the
    non-Cortex ones) you have a choice to use the thumb instruction set or
    the bigger ARM instruction set. For one project I had to cram a TCP/IP
    stack, DNS, DHCP, webserver and some other stuff into 32kB flash. I
    opted to use the thumb instruction set. That saved lots of memory at
    the expense of having to write some assembly to handle interrupts.

    And is the price of the MCU really the only driving parameter? Leaner
    programming often means spending more time (and the amount of time
    goes up exponentially). In my experience people often look too much to
    the price of the parts and forget about the time required to make the
    firmware. Once a product sells by thousands you can still do a
    redesign to cut the costs.
     
  15. Nico Coesel

    Nico Coesel Guest

    I like to stay Posix compliant so existing pieces of code can be used
    directly and other people can get up to speed quickly. The C library
    which comes with mspgcc is pretty compact and its easy to get it
    compiled for ARM. I have been using that library ever since I moved
    from MSP430 to ARM.

    If the printf from the mspgcc libc gets too big I rather create a
    minimal version of printf than writing my own non-standard printing
    routines.

    Here is an example of a minimal printf:
    http://users.powernet.co.uk/eton/kandr2/krx703.html

    In some space constrained projects of mine it just supports decimal
    and hex without any formatting.
     
  16. Winston

    Winston Guest

    It's easy after the first 25!

    :)

    --Winston
     
  17. Uh - that one seems to call printf so does not seem a great amount of
    use on it's own?! :)

    But yes I started out with a public-domain printf and added a few things
    to it (like support for "fixed-point" format specifiers).
     
  18. Nico Coesel

    Nico Coesel Guest

    Ofcourse you substitute those with functions that dump the contents to
    the console as chars :). There is a much better 'skeleton' but I
    can't find the link.
     
  19. Winston

    Winston Guest

    Thanks a lot for this info
    and that in your other post, Jon.
    I find it extremely valuable.

    --Winston
     
  20. Guest

    I had a pretty good one but someone swiped it (and I don't remember the name).
    :-(

    The subset of VHDL used for synthesis is pretty easy to pick up. The entire
    language, not so much. Learn it as you need it.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-