Author Topic: FPGA toolchain for Linux  (Read 6395 times)

0 Members and 1 Guest are viewing this topic.

Offline baremetalTopic starter

  • Newbie
  • Posts: 5
  • Country: gb
FPGA toolchain for Linux
« on: December 08, 2018, 03:32:51 pm »
Hello everyone,

I would like to get recommendation on how to set up toolchain with Makefile on Linux distro for FPGA. I couldn't find any steps on how to set this up without some IDE.

Thanks,
 

Offline tsman

  • Frequent Contributor
  • **
  • Posts: 599
  • Country: gb
Re: FPGA toolchain for Linux
« Reply #1 on: December 08, 2018, 03:38:22 pm »
You couldn't find any guides because you're asking an extremely vague question. What FPGA manufacturer? What model? The short answer is install the manufacturer provided software suite such as Xilinx Vivado and pay lots of money if your part isn't in the freely available version.
« Last Edit: December 08, 2018, 04:18:03 pm by tsman »
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: FPGA toolchain for Linux
« Reply #2 on: December 08, 2018, 04:38:18 pm »
Did you Google for 'xilinx makefile example' or something similar?  There are lots of examples for the older toolchain 'ISE'.  You might change the search to 'xilinx vivado makefile example'.  The Makefile approach was fairly common with ISE back about 10 years ago.

There is a Linux centric toolchain, search for: 'linux fpga tools'

So, yes, it can be done.

The generic tools under Linux often can't synthesize.  They can simulate standard logic but not vendor specific primitives.

IceStorm is open source, maybe it can be driven with a Makefile.

 

Offline FlyingDutch

  • Regular Contributor
  • *
  • Posts: 144
  • Country: pl
Re: FPGA toolchain for Linux
« Reply #3 on: December 08, 2018, 05:08:54 pm »
Hello,
 if you use Xilinx FPGA it might be interesting for you to take a look into "Petalinux":

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842250/PetaLinux

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841618/PetaLinux+Getting+Started

Kind regards
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: FPGA toolchain for Linux
« Reply #4 on: December 08, 2018, 07:11:59 pm »
Why not just save a lot of time and trouble and use the vendor supplied IDE? I'm not aware of any viable alternative. ISE and Quartus are both available for Linux.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26895
  • Country: nl
    • NCT Developments
Re: FPGA toolchain for Linux
« Reply #5 on: December 08, 2018, 07:48:17 pm »
Why not just save a lot of time and trouble and use the vendor supplied IDE? I'm not aware of any viable alternative. ISE and Quartus are both available for Linux.
The tools can be used from Makefiles. There is also hdlmake which can be used to automate building FPGA projects. It is not quite finished yet but it helps to share large projects which share common modules. With bigger projects the IDEs starts to suck especially when you want to share code between various projects.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline dgtl

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ee
Re: FPGA toolchain for Linux
« Reply #6 on: December 08, 2018, 07:58:07 pm »
The vendor ides execute external binaries, these calls can be ported to makefile. Or alternatively, they support tcl scripts - ie Vivado can be run in batch mode given an tcl script. You can run that from your makefile. For our big projects, we generate tcl scripts from our build scripts and then run the tool in batch mode (no project files are stored in repositories, only system to resolve dependencies and generate tcl script to let Vivado generate its project depending on the configuration needed). This gives enough flexibility while being a single-step-make to reduce human errors to minimum.
There are some limitations, ie the components generated using their ip generation tools - afaik their configuration can not easily be modified with non-gui tools (parameters etc), so we need to store multiple variants and choose from them.
 

Online NorthGuy

  • Super Contributor
  • ***
  • Posts: 3142
  • Country: ca
Re: FPGA toolchain for Linux
« Reply #7 on: December 08, 2018, 08:03:28 pm »
Vivado is TCL based, so you can write your own scripts which can do practically anything - more than you could do in GUI. If you wish, you can use it as a TCL console, or you can invoke it to run a single TCL script - same as makefile. Of course, there's some learning curve involved.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: FPGA toolchain for Linux
« Reply #8 on: December 08, 2018, 08:07:08 pm »
I don't see points. What do you want to achieve?
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: FPGA toolchain for Linux
« Reply #9 on: December 08, 2018, 08:10:15 pm »
With bigger projects the IDEs starts to suck especially when you want to share code between various projects.

I have never had problems with that. And I share a lot of VHDL code. What's wrong exactly?
Here, when I create a project, I manually import VHDL files from my library under versioning (git) into a local folder. And that's all I need to do. If I modify a local file, git and Beyond Compare (on Linux you use "Meld") report what has changed.

For simulating large project I am using ModelSim, which is the best ever for this.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: FPGA toolchain for Linux
« Reply #10 on: December 08, 2018, 08:14:07 pm »
we generate tcl scripts from our build scripts and then run the tool in batch mode

what have these tcl scripts have to do, exactly?
 

Offline filssavi

  • Frequent Contributor
  • **
  • Posts: 433
Re: FPGA toolchain for Linux
« Reply #11 on: December 08, 2018, 08:27:42 pm »
Why not just save a lot of time and trouble and use the vendor supplied IDE? I'm not aware of any viable alternative. ISE and Quartus are both available for Linux.

There are various reasons:

1) FPGA IDE’s lag noticeably behind everything else on the planet (even VS code is significantly ahead of every fpga ide) in term of everything, especially dependency management
2) the integrated editor in fpga tools are almost at notepad level of sucking, using an external editor takes away the I in IDE and thus the things don’t make sense
3) altera hasn’t even managed to integrate a modelsim  front end and waveform viewer in the crappy mess they call An IDE
4) using VCS with gui projects is a nightmare, as the bloody things spread the settings and everything else among so many directories it isn’t even funny

And I could go on for hours

Thank god vivado has sane tcl scripting support from command line and I can create and delete projects on the fly as needed and check in only the tcl script
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: FPGA toolchain for Linux
« Reply #12 on: December 08, 2018, 08:35:42 pm »
Thank god vivado has sane tcl scripting support from command line and I can create and delete projects on the fly as needed and check in only the tcl script

Why do you need a TCL script to create a project? Exactly what do you need to do?
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: FPGA toolchain for Linux
« Reply #13 on: December 08, 2018, 09:18:23 pm »
I have not encountered these problems, ISE, Vivado and Quartus all have perfectly adequate text editors, it is a concept that has existed for decades, what more could one do to improve a text editor? Who cares if it's behind? With the current trend of software being constantly tinkered with, being in a constant state of flux like some perpetually half finished project car, chasing the latest UI fads which currently seems to involve hiding/removing frequently used features and inserting acres of useless white space to look "clean" or "uncluttered", being "behind" is something I've come to see as a benefit. I have 10+ year old software that is infinitely more usable than a lot of current stuff I encounter.
 

Online NorthGuy

  • Super Contributor
  • ***
  • Posts: 3142
  • Country: ca
Re: FPGA toolchain for Linux
« Reply #14 on: December 08, 2018, 09:46:27 pm »
I have not encountered these problems, ISE, Vivado and Quartus all have perfectly adequate text editors

Certainly not Vivado. Say, when you paste something, it automatically "improves" indentation, and then you need to fix it. I wish they had a simpler editor.

 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26895
  • Country: nl
    • NCT Developments
Re: FPGA toolchain for Linux
« Reply #15 on: December 08, 2018, 10:02:56 pm »
I have not encountered these problems, ISE, Vivado and Quartus all have perfectly adequate text editors, it is a concept that has existed for decades, what more could one do to improve a text editor?
OMG! Those text editors suck badly. Try Eclipse + veditor for starters or Sigasi if you want to get luxureous. Being able to search through your project, having realtime syntax checking, browsing through the project, etc. Seeing which signals and components are used in a file. The list goes on and on. If you have a reasonably big project then having a real code development tool instead of notepad saves you a ton of time because the development environment helps you to navigate through the project.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26895
  • Country: nl
    • NCT Developments
Re: FPGA toolchain for Linux
« Reply #16 on: December 08, 2018, 10:17:35 pm »
With bigger projects the IDEs starts to suck especially when you want to share code between various projects.
I have never had problems with that. And I share a lot of VHDL code. What's wrong exactly?
Here, when I create a project, I manually import VHDL files from my library under versioning (git) into a local folder. And that's all I need to do. If I modify a local file, git and Beyond Compare (on Linux you use "Meld") report what has changed.
Now try to share the same project using different IDEs from different vendors. The hdlmake I mentioned earlier can create project files for ISE, Vivado and Quartus from the same project for a specific build target. Also needing to import files manually into the IDE sucks especially if there are about 100 to 200 files and some conflict with eachother.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: FPGA toolchain for Linux
« Reply #17 on: December 08, 2018, 10:40:46 pm »
Now try to share the same project using different IDEs from different vendors.

I do without any problem, and I do it for a living.

Also needing to import files manually into the IDE sucks especially if there are about 100 to 200 files and some conflict with eachother.

100 files? here my projects (and I am talking about the largest one) have a max of 50 files. Importing them is no problem, neither with git nor for libraries. Files are hierarchically handled.

Which conflicts are you talking about?


Besides, I still have to understand WTF Makefile should have to do.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: FPGA toolchain for Linux
« Reply #18 on: December 08, 2018, 10:44:51 pm »
Sigasi if you want to get luxureous.

is it luxury or ... just envy?  ;D
 

Offline filssavi

  • Frequent Contributor
  • **
  • Posts: 433
Re: FPGA toolchain for Linux
« Reply #19 on: December 08, 2018, 11:22:54 pm »
The script creates the project, imports all the required dependencies, create and adds the block design etc.

This workflow has many advantages:
-Moving between machines is trivial as it only takes just 2 commands (git clone source make.tcl)
-everything is versioned through git, even the project settings, and my repository is not a mess of auto generated files Peppered across a massive directory structure
-code reuse and sharing between different modules is much easier, especially if interfaces between modules are not completely set in stone
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26895
  • Country: nl
    • NCT Developments
Re: FPGA toolchain for Linux
« Reply #20 on: December 08, 2018, 11:36:52 pm »
Sigasi if you want to get luxureous.

is it luxury or ... just envy?  ;D
If you want to pay for it (which I don't because I need software to have perpetual licenses) then Sigasi is a tool which helps a lot during Verilog and VHDL development. I tried the Sigasi Eclipse plugin for a while and it works great. Veditor is a good alternative but not as extensive.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: FPGA toolchain for Linux
« Reply #21 on: December 09, 2018, 12:41:24 am »
Certainly not Vivado. Say, when you paste something, it automatically "improves" indentation, and then you need to fix it. I wish they had a simpler editor.

I've only played with Vivado briefly, decided it was dog slow and that I'd rather spend my time making something than learning a different tool. I spend most of my time in Quartus and at least with that you can turn off the auto-formatting features. You can also edit the files in whatever editor you like and the IDE will offer to reload the modified file.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: us
Re: FPGA toolchain for Linux
« Reply #22 on: December 09, 2018, 01:26:34 am »
Besides, I still have to understand WTF Makefile should have to do.

Among other things, it could call up the C compiler to create a .hex file to be included in the image to initialize the contents of BRAM.  This occurs somewhere during synthesis.

There is another way to patch the image with new memory contents using Data2Mem and this is a LOT faster than rebuilding the project.  But, still, a Makefile could drive the C compiler and Data2Mem.

 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: FPGA toolchain for Linux
« Reply #23 on: December 09, 2018, 02:04:12 am »
I heard Altium is the one-stop-shop you are asking for regarding FPGA? Indeed, PCB layout should be a mere add-on afterthought optional extra.

Oh wait - I think that was when Dave worked there...  :-DD
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26895
  • Country: nl
    • NCT Developments
Re: FPGA toolchain for Linux
« Reply #24 on: December 09, 2018, 02:18:29 am »
Also needing to import files manually into the IDE sucks especially if there are about 100 to 200 files and some conflict with eachother.
100 files? here my projects (and I am talking about the largest one) have a max of 50 files. Importing them is no problem, neither with git nor for libraries. Files are hierarchically handled.

Which conflicts are you talking about?
Actually the project I'm working on every now and then has over 500 VHDL files and some provide the same functionality for a different platform / build target.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf