Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Microcontroller/fgpa language questions

  1. Mar 25, 2009 #1
    I get really confused about the languages associated with fpgas and microcontrollers. I'm not asking what the difference is between a ucontroller and an fgpa.

    1. What different languages can you use to program an fpga? I already know that you can use vhdl/verilog.

    2 What different languages can you use to program a microcontroller? I know that you can use C but what else?

    Also, we used an hcs12 microcontroller in class with a lot of premade c functions to do many tasks. Would I have to use the same board and setup software (codewarrior) to use these functions. I understand that some of the functions would have to be at least modified (clock frequency, pins, etc...)

    Thanks for any help.
     
  2. jcsd
  3. Mar 25, 2009 #2

    berkeman

    User Avatar

    Staff: Mentor

    -1- Yes, VHDL, Verilog, and other HDL languages like AHDL, etc. Verilog is very common here in Silicon Valley, but I've heard that VHDL is more popular other places. Don't know if that's true.

    -2- C, Assembly, and BASIC are probably the three most common.

    On the other questions, usually there will be an API (application program interface) with C functions that you can call to do lower-level hardware things. So yes, those actual functions would generally need to be written for the specific uC, to match the register and pin definitions, etc.
     
  4. Mar 25, 2009 #3
    Thanks for the reply. It would be nice if everything was compatible!
     
  5. Mar 27, 2009 #4
    Some ppl also used C to program FPGAs. I think C is still used to write test benches for testing FPGA designs. Its not popular though.
    You can also design by just using schematic. No need to learn vhdl or verilog.

    For uC just understand what the(algorithm) function is doing and you can implement it in any language you want.

    Berkeman, I thought vhdl was used more in the west coast and verilog in the east coast.
     
  6. Mar 27, 2009 #5

    berkeman

    User Avatar

    Staff: Mentor

    At least in Si Valley, Verilog/RTL is the standard. How do you use C to write code for an FPGA?
     
  7. Mar 27, 2009 #6
    Frankly, I have no idea. I am vhdl newbie myself. I was reading a book on writing testbenches, the author mentioned that he was writing testbenches in C like 10-15yrs ago.
     
  8. Mar 27, 2009 #7

    berkeman

    User Avatar

    Staff: Mentor

    It may be that he was using C to construct and output his testbench text files.

    FPGA/CPLD code is generally targeted at defining state machines and IO paths. There may be a way to morph C code into FPGA/CPLD HDL, but that would be a stretch for convenience, IMO. Verilog/RTL/HDL/VHDL would be the basic thing to learn for ASIC/FPGA/CPLD definition, I would think.

    Check out the free software at Xilinx's website for designing FPGA/CPLDs:

    http://www.xilinx.com/ise/logic_design_prod/webpack.htm [Broken]

    As long as you have about a free GB on your hard disk, this is a vey good package to learn and use.
     
    Last edited by a moderator: May 4, 2017
  9. Mar 27, 2009 #8
    na, that sounds like too much work. Here's a link to C book for fpga -
    https://www.amazon.com/Practical-Programming-Prentice-Modern-Semiconductor/dp/0131543180

    Thanks. I already have ISE and libero. I prefer ISE, but we use actel fpga. So I have to use libero. No synthesis in Libero.
    One advantage xilinx has is its forums. I can get help fast. I am still trying to decide if i wanna get xilinx kit or actel kit for myself.
     
    Last edited by a moderator: May 4, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Microcontroller/fgpa language questions
Loading...