Microcontroller/fgpa language questions

  • Thread starter Thread starter bassplayer142
  • Start date Start date
  • Tags Tags
    Language
Click For Summary

Discussion Overview

The discussion revolves around the programming languages associated with FPGAs (Field-Programmable Gate Arrays) and microcontrollers. Participants explore various languages used for programming these devices, as well as compatibility issues related to specific hardware and software setups.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants mention that VHDL and Verilog are common languages for programming FPGAs, with others suggesting AHDL and C as alternatives.
  • For microcontrollers, C, Assembly, and BASIC are noted as common programming languages, with some participants suggesting that any language could be used if the algorithm is understood.
  • There is a discussion about the need for specific APIs when using premade C functions with microcontrollers, indicating that modifications may be necessary based on hardware specifics.
  • Some participants express confusion about using C for FPGAs, with varying opinions on its popularity and practicality for FPGA programming.
  • Participants discuss the geographical preferences for VHDL and Verilog, with some suggesting that VHDL is more popular on the West Coast and Verilog on the East Coast.
  • There are references to using schematic design as an alternative to HDL languages for FPGAs.
  • One participant mentions the availability of free software from Xilinx for FPGA design and expresses a preference for Xilinx tools over others.

Areas of Agreement / Disagreement

Participants express a range of views on the programming languages for FPGAs and microcontrollers, with no clear consensus on the best practices or preferred languages. The discussion remains unresolved regarding the effectiveness and practicality of using C for FPGA programming.

Contextual Notes

Some participants note that the use of C for FPGAs may involve additional complexity, and there are references to specific hardware and software dependencies that could affect the implementation of functions.

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

  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 17 ·
Replies
17
Views
25K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
13
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
6K