Connect with us

Softcore in programmable logic?!

Discussion in 'Electronic Design' started by Tari, Sep 1, 2005.

Scroll to continue with content
  1. Tari

    Tari Guest

    Hi,

    I have question about softcores in programmable logic. I hope someone
    can help me with it...
    I read that it is possible to create a microprocessor by using a
    softcore (eg. NIOS or Microblaze) and doing some programming on an FPGA
    or CPLD. But can someone tell me why you should do something like that?
    What are the advantages (or disadvantages) between a classical
    microprocessor and such a softcore in programmable logic?
    I have searched several times on the internet and different newsgroups.
    However, I am not able to find any relevant information.

    Thanks in advance,
    Greetings,
    Tari
     
  2. Tim Wescott

    Tim Wescott Guest

    Here's my opinion only:

    Logic is good for simple things that need to go fast, the drawback is
    that the more complex you get the bigger the logic gets. Doing
    something complex and slow in logic means that you have a bunch of
    expensive registers sitting idle most of the time.

    Processors are a way to get compact the logic for complex slow things,
    because you take the complexity (the program) and you move it to to
    memory which is compact but has a significantly narrower access to the
    storage than registers, which are one bit to one wire.

    Processors are programmed by embedded software designers. While such
    folks aren't a dime a dozen they do know how to make complex slow
    systems work, and they can often be more cost effective at this task
    than having an FPGA guy design a great big state machine in logic. With
    a processor on the board your team will have fewer (and happier) FPGA
    guys sweating the fast stuff, and software people sweating the code.
    Everyone will be doing what they do well and to good effect for the cost.

    Putting a soft core microprocessor onto an FPGA gives you the physical
    advantages of a processor as long as the FPGA has lots of cheap memory
    (which they do nowadays), and the management advantages no matter what.
    Generally the soft core microprocessors run slower than their
    dedicated brethren and take up cells on the FPGA, but they don't require
    another package and they're tightly integrated.

    So if you're going to have one FPGA on a board and you need some light
    processing done using a softcore processor is probably a good idea.

    If you're going to have a hardware processor on the board no matter what
    then you almost certainly don't need a soft processor.

    If you're going to be doing heavy-duty processing then you should have a
    dedicated processor. This could be a hard core processor like Xilinx's
    Virtex PRO (I don't know if they're still pushing these) or it could be
    a separate processor.

    The two big drawbacks that I can see to the whole soft processor deal is
    expense and complications to in-field FPGA programmability. When you
    have a separate processor on a board you solve in-field programmability
    of the FPGA by having the processor load the FPGA; when you have a soft
    processor you have to grant the processor write access to the FPGA's
    configuration memory, and you have to do it in such a way that there are
    fail-safes against partial or corrupted downloads.
     
  3. Because you need a processor that doesn't exist on the FPGA?
    It can be done in the FPGA fabric itself. Recently Altera and Xilinx
    have been adding hard-core processors ;-) to their bigger FPGAs. Soft
    cores allow the user to customize the function needed and place it
    where it's needed (add multiple...). A microprocessor external to the
    FPGA uses valuable I/O pins, has performance implications, may add
    cost, etc.
     
  4. PeteS

    PeteS Guest

    As noted above, sometimes it's useful to have a processor core. The
    nice thing about picoblaze (as a for instance) is you get the source,
    so you can tweak the processor (even it's instruction set!) to
    specifically meet your needs.

    I instantiated 7 soft cores in a Virtex II (along with a rather large
    amount of fast logic) to take care of the somewhat slower things that
    needed a significant amount of processing. Amusingly, those 7 cores
    together took less space than just one of my bus controllers.

    Looking at a processor as a grab bag of logic that's configurable by
    instructions, it's a way to compact the design. In my case I was using
    the various cores to decipher what various events were happening (in a
    macro sense) and communicate between themselves what events had
    transpired. No space to go into all the gory details of just why that
    was :)

    It *is* more difficult to do this in a FPGA (because loading/setting
    the object code is not very easily automated when you have more than
    one core, for one thing) but when you have tasks that can be done best
    with a processor linked directly to things for which you need the speed
    of the FPGA, it makes a lot of sense to embed a soft core.

    I wouldn't make the core in the FPGA the primary processor in a system
    - I always used them as utility cores - co-processors, if you like.

    So - sometimes it makes sense to embed a coprocessor.

    Cheers

    PeteS
     
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

-