Microcontroller/fgpa language questions

  • Thread starter Thread starter bassplayer142
  • Start date Start date
  • Tags Tags
    Language
AI Thread Summary
FPGA programming primarily utilizes languages like VHDL and Verilog, with some users also employing C for specific tasks such as writing test benches. For microcontrollers, C, Assembly, and BASIC are common programming languages, and functions often need to be adapted to match the specific hardware configurations. The discussion highlights that while pre-made C functions can simplify tasks, they may require modifications when switching boards or setups. Additionally, there is a mention of using schematic design as an alternative to HDL languages for FPGAs. Overall, understanding the specific requirements of the hardware is crucial for effective programming.
bassplayer142
Messages
431
Reaction score
0
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.
 
Engineering news on Phys.org
bassplayer142 said:
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.

-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.
 
Thanks for the reply. It would be nice if everything was compatible!
 
bassplayer142 said:
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.

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.
 
likephysics said:
Some ppl also used C to program FPGAs.

Berkeman, I thought vhdl was used more in the west coast and verilog in the east coast.

At least in Si Valley, Verilog/RTL is the standard. How do you use C to write code for an FPGA?
 
berkeman said:
At least in Si Valley, Verilog/RTL is the standard. How do you use C to write code for an FPGA?

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.
 
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

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:
berkeman said:
It may be that he was using C to construct and output his testbench text files.
na, that sounds like too much work. Here's a link to C book for fpga -
https://www.amazon.com/dp/0131543180/?tag=pfamazon01-20

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. Verilot/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

As long as you have about a free GB on your hard disk, this is a vey good package to learn and use.

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 want to get xilinx kit or actel kit for myself.
 
Last edited by a moderator:

Similar threads

Back
Top