Shop OBEX P1 Docs P2 Docs Learn Events
Can parallax propeller be programed using VHDL? — Parallax Forums

Can parallax propeller be programed using VHDL?

stefaniecgstefaniecg Posts: 1
edited 2011-01-25 04:05 in Propeller 1
Can parallax propeller be programed using VHDL? Is there any relation from propeller to VHDL or FPGA?

Comments

  • MagIO2MagIO2 Posts: 2,243
    edited 2011-01-25 01:26
    No.

    VHDL is a hardware description language. You can not compare this with a usual programming language. VHDL describes how hardware should behave and it's massively parallel. In an FPGA or CPLD you really change the connections of the matrix. You can not change the hardware of a propeller.
    Even on a PC you can not easily write VHDL. It needs very complex simulation.

    Of couse you can use an FPGA to implement your own propeller. If I remember correctly someone already did - at least for one COG.
  • Heater.Heater. Posts: 21,230
    edited 2011-01-25 02:20
    MagicIO2,

    You are right but I have to comment on :
    Even on a PC you can not easily write VHDL. It needs very complex simulation.

    VHDL is actually a very big language, somewhat inspired by ADA. It is quite possible to use it as a general purpose programming language. One can very easily write VHDL and run it on a PC using the GHDL compiler and run time support. http://ghdl.free.fr/

    Anyone who wants to learn VHDL would be served well by GHDL in quickly trying out the language features without all the heavy weight of FPGA development software from Alter or Xylinx.

    This flexibility of VHDL has a downside in that it is easy to find oneself writing VHDL programs that won't synthesise into any FPGA. One has to be careful to keep to a subset of the language that will work with ones chosen hardware and tool chain.

    In the extreme, given that it is possible to use ADA on AVR mcus it would seem quite possible to use VHDL for the Prop, if anyone took the trouble to create the compiler that is:)
  • AleAle Posts: 2,363
    edited 2011-01-25 02:37
    Just a note: You can also use Verilog in a similar manner as VHDL via a simulator like icarus verilog. The downside as Heater said is that you may end with software that does not synthesize, not only because of using unsupported language features but because you can easily exhaust the resources available in your device. It seems that sometimes I forget that a register cannot be written from different always blocks when the clock is not the same. It bites me quite often :(. That's why I decided to use Xilinx' or Altera's suite at the same time I do simulation. Between the three you catch quite bit more errors than just with icarus./Off topic
  • Heater.Heater. Posts: 21,230
    edited 2011-01-25 02:48
    Thinking about what MagicIO 2 said a bit more:
    In an FPGA or CPLD you really change the connections of the matrix. You can not change the hardware of a propeller.

    That depends how you look at it. In an FPGA you have simple logic blocks, hooked up with a mass of configurable connections. The VHDL ends up specifying the connectivity to get the functionality you want.

    Now look at the Prop:
    1) Instead of logic blocks we have COGs.
    2) Instead of a mass of switchable connections we have HUB RAM through which to "connections" can be made.
    3) The COGs run in parallel as do logic blocks of an FPGA or whatever.

    Conclusion: VHDL would be an excellent language to program Props in.
  • AleAle Posts: 2,363
    edited 2011-01-25 03:41
    The point is someone still has to program a compiler :). But the result could be quite interesting. One caveat is the small number of fast IOs available (note that I said fast).
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-25 03:43
    heater said..."Conclusion: VHDL would be an excellent language to program Props in."

    stefaneicg: Welcome to the propeller forum. You will find us a friendly bunch here where you will get a lot of help.

    I am sorry, but in the context that the question you asked of VHDL (or Verilog for that matter), the short answer is No. The prop is not an FPGA nor a CPLD, although we can program the counters and I/O to do lots of functions via software, such as UARTs, I2C, VGA, TV, PS2, etc we cannot program the prop in VHDL.
  • Heater.Heater. Posts: 21,230
    edited 2011-01-25 04:05
    stefaneicg:

    Yes, welcome to the forum, I did not notice that was your first post.

    As you have already noticed we are prone to some wild speculation here occasionally. As Cluso points out, the short answer to your question is "no forget VHDL on the Prop".

    Whilst my ramblings on VHDL are indeed wild speculation it should be borne in mind that not long ago that the idea of programming the Prop in C was just a pipe dream. "It's just not suitable" they said. Now it happens every day.

    That said it would be even more pointless for someone to spend months and years creating VHDL for the Prop than some of the things I get up to:)
Sign In or Register to comment.