Author Topic: Programming Lattice FPGAs on a Mac?  (Read 11309 times)

0 Members and 1 Guest are viewing this topic.

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Programming Lattice FPGAs on a Mac?
« Reply #25 on: November 21, 2018, 05:42:48 pm »
Apple used to make it darn near impossible to develop software for their machines.  Back in the very beginning, if you wanted to write code for the brand new Mac 128k, you had to get their permission and buy a Lisa machine to do it.  And a Lisa cost $10,000 in those dollars.  So, a lot of us lost interest and have never came back.  To this day, I don't and won't own Apple products.

I don't know how software development for Apple is today.  I know it is a little awkward for iOS but it is possible to independently develop software.

You described the original Mac development environment from 1984!

With the release of Mac OS X 18 years ago, Apple offered a totally free (as in beer) set of development tools, Xcode, and that has continued to this day. There is no requirement that your Mac programs be distributed in their App Store. They do have a signing feature so users don't get the "unknown developer" complaints the first time a program is run.

I work with a lot of scientific research and academic types, and none of them use Linux ... it's all on the Mac. The "why" is clear: they like the wealth of open-source scientific software available but they hate wasting time fucking about with Linux.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Programming Lattice FPGAs on a Mac?
« Reply #26 on: November 21, 2018, 05:46:44 pm »
The Mac 128k came out nearly 35 years ago, it's a bit silly to compare current Apple products with that, the current offerings have nothing in common with the 68k generation. There is no particular challenge to developing software for OSX, it's BSD Unix under the skin afterall. I think the percentage of Linux desktops in the hardware design field is probably quite a bit higher than in elsewhere in tech though. Originally most of the FPGA software was written for Unix workstations and Linux started taking over that area before OSX was a thing. The software was ported to Windows because the vast number of Wintel machines out there made this an obvious choice.

Here's the hilarious thing, though. I remember back in the day when Xilinx XACT and the first versions of ISE ran on Windows and specific Unix variants -- IBM's and HP-UX. (I don't remember if Solaris was supported.) The users were clamoring for a Linux release, rightfully saying that it's all basically the same thing, right? Took forever, but finally Xilinx released Linux versions of ISE.

The point, of course, is that you're right, and building for macOS -- which is Unix -- should be painless. But the FPGA tools are all just big piles of shit, anyway.

Many of the microcontroller vendors have managed to release Windows, Mac and Linux versions of their tools -- Silicon Labs, for one. Sure, it's all Eclipse, but whatever, it all works.

Kicad runs well on the three platforms. EAGLE does, too. Autodesk Fusion 360 runs well on my Macs. A few of the pro-audio applications I use run on the Mac as well as on Windows.
« Last Edit: November 21, 2018, 05:50:42 pm by Bassman59 »
 

Offline mr_darkerTopic starter

  • Contributor
  • Posts: 14
  • Country: us
Re: Programming Lattice FPGAs on a Mac?
« Reply #27 on: November 21, 2018, 06:53:24 pm »
Quote
    There is no single chip that comes anywhere near the amount of hardware that I am aiming for.

Are you sure? 100 of MachXO3L will probably be covered by a single high-end Xilinx device.
The XO3 is just to make things easier at first thanks to its nonvolatile setup n stuff.  The ECP5 is the low cost one I aim to use once acquainted with the hardware.  It's true that 100 of these chips can be covered by some high end FPGAs, but that's significantly more expensive, and even the highest end FPGA, I'd need multiple units of.  100 units of MachXO3s was a guesstimate number at a module size, stackable modules, might end up with over 100 modules some day (100000 MachXO3s, tho id probably switch to the ECP5 at that point as that's lotsa money).  The ECP5 can be had at $1.20 per Thousand-CLBs, the only thing close to that is Intel's Cyclone VE at $1.80 (a new surprise I discovered, might be worth saved board space & simpler hardware management, tho costlier if broken and less surface area for heat if thats an issue).  After you get higher end than the CycloneVE, Price per thousand CLBs rapidly increases to prices up to $55 per 1000-Stuff like ram is irrelivant due to the amount that'll be needed never going to exist even in high end FPGAs.  Am I using the wrong spec?  I know from one of dave's videos its a bit hard to compare, and I don't believe all logic elements are created equal, so I figure digikey's Logic Blocks filter is what I should use to get a general comparison.

Quote
Realistically you can interconnect 6-8 high end FPGAs on a single boards, but they are already sold a finished products, and it is cheaper to buy one.

With a 100 chips you will go mad ensuring signal integrity and writing constraints files.
Those finished products you speak of are too small, no FPGA is big enough, there is never an end to power needed.
100 chips, the idea is to make one single module, get it going good, and make tons of those to just "plug in" to eachother.  Might be less per module might be more, we'll see.  Signal integrity in FPGAs isn't something I know much about, so there might be one of the unknowns I was looking for, but every problem has a solution.

Quote
   
Quote
Starting out i've selected a FPGA that has nonvolatile-instant-on-background-reconfigurable configuration memory, as this takes care of a lotta FPGA issues,


Like what?  The non-volatile chips tend to be small, the bigger chips all use some form of EEPROM storage for the bitstream.  In addition, the EEPROM can contain initial memory contents and, in some cases, multiple images.

I was imagining nonvolatile configuration eliminates the need to use a processor to program them all (save for the initial programming). 'instant on' in addition to the nonvolatile config, eliminates the need to really manage a lotta stuff like say power disconnects, no need to set it up to reload everything (configuration) from memory?  Like no boot screen n stuff, just bam your computers on & fully loaded lol.  More of a "wouldn't that be cool" kinda feature i'm hoping for with that.
Most importantly background reconfiguration, being able to reconfigure it as it's running, like say one FPGA is "running firefox" and we close firefox on the operating system.  Being able to background program n stuff, we can immediately just "stop firefox and load itunes", seamless transition to reconfigure (probably not 100% seamless), rather than a ton of middle work like powering that single fpga down, turning it on, going through some configuration process, my thinking is it makes it simpler (less on my plate initially) and takes less time to change what the FPGA is doing, and they'll all be changing what they do frequently, so that translates to clicking firefox and bam firefox is open.  Then again, I've never programmed an FPGA so I may be way off.

Quote
In my view, you are attributing capabilities to FPGAs and compilers that simply don't exist.  We can use C to describe hardware (I have never done it, I use VHDL) but when we want to start running application code, there needs to be some kind of processor to run it.  Unless the application can be fully described in hardware.  Maybe it can...

I imagine i'd have to make my own compiler.  Not really sure about it, but if it can't be helped, a software (or hardware) core can be used for compatibility with normal programs.  I believe it's doable though, like take every single command in C, then python, and all that, and translate it to VHDL.  https://en.wikipedia.org/wiki/C_to_HDL This link seems to suggest C to HDL stuff exists already.  It's not something I've given too much thought though, "we'll get there when we get there".  At worst, I gotta plop in a processor for compatibility.  I'm really just wanting it to be usable for normal everyday stuff, serious use of it would all be programs written specifically for the hardware/setup.  It'd be cool to have hardware that can do major things in the background without slowing anything else down, like some advanced AI programs that view your camera, and in the bacground save everyone's face, creates 3d maps of all the places it sees, listens to peoples' voices and gathers data to make deepfake profiles, cracks all the encryptions of every single wifi ssid it sees before you even think about connecting to one, bitmines, hosts a website, listens to all radio frequencies and analyzes and/or records all communications in plain text (then further filter out which ones aren't of interest to the user), does a detailed analysis of every single stock on the stockmarket and lets you know its best predictions (YOUR AI vs some service), controls a swarm of 500 drones as individual units (not just a single mass they all stick to), hacks into traffic cams as you drive along and makes you priority number one for green lights wherever you go, monitors your wife's data (vocal tone, wording, hormones if u got an olfactionmeter or something like that) along with input from AI built "rules of engagement" to help let you know what to do when shes angry, synthesizes AI made music according to your itunes library and what it thinks you'd like, hosts the matrix, watches what you are doing on the computer and how you react to each thing then predetermines how the rest of your life is gonna go after it's gathered enough data, hosts physics simulators detailed enough that one is built to simulate the human body's response to experimental surgeries and procedures.... allowing AI to come up with new medicine and find the way to upload our minds onto these FPGA supercomputers or them onto our brains,  stuff like that all in the background while not slowing down the loading of Club Penguin one bit.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11290
  • Country: us
    • Personal site
Re: Programming Lattice FPGAs on a Mac?
« Reply #28 on: November 21, 2018, 06:58:16 pm »
None of what you wrote above makes any technical sense. Seriously, start with one FPGA and see just how challenging it is to actually make it work. Then see if you can scale it up to even 6.

Like really, the post above reads like ramblings of an insane person. It has no roots in reality.
Alex
 
The following users thanked this post: Bassman59, james_s

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14555
  • Country: fr
Re: Programming Lattice FPGAs on a Mac?
« Reply #29 on: November 21, 2018, 07:02:29 pm »
But why stop at 100?

 :-DD
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11290
  • Country: us
    • Personal site
Re: Programming Lattice FPGAs on a Mac?
« Reply #30 on: November 21, 2018, 07:06:57 pm »
But why stop at 100?
Well, we found the end to "power needed".

Also, assuming you can actually put 100 chips on the board. Have you though about power supply? Just that alone is a technical challenge, which not a lot of people can adequately solve.
Alex
 

Offline asmi

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: Programming Lattice FPGAs on a Mac?
« Reply #31 on: November 21, 2018, 07:19:06 pm »
On actual topic - every FPGA manufacturer has a published specification on programming protocol (I know for sure for Lattice iCE40 and Xilinx 7 series), so you can write your own programmer using D2XX interface. These protocols are mainly designed for onboard MCU/CPUs for combo boards, but D2XX gives enough freedom to implement it provided all required connections are made in HW.

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3148
  • Country: ca
Re: Programming Lattice FPGAs on a Mac?
« Reply #32 on: November 21, 2018, 08:56:00 pm »
The point, of course, is that you're right, and building for macOS -- which is Unix -- should be painless. But the FPGA tools are all just big piles of shit, anyway.

Even though the underlying kernel is Unix, the GUI is dramatically different and is made of proprietary libraries (such as Cocoa) which are based on Objective-C/Swift.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Programming Lattice FPGAs on a Mac?
« Reply #33 on: November 21, 2018, 10:02:12 pm »
Apple used to make it darn near impossible to develop software for their machines.  Back in the very beginning, if you wanted to write code for the brand new Mac 128k, you had to get their permission and buy a Lisa machine to do it.  And a Lisa cost $10,000 in those dollars.  So, a lot of us lost interest and have never came back.  To this day, I don't and won't own Apple products.

I don't know how software development for Apple is today.  I know it is a little awkward for iOS but it is possible to independently develop software.

You described the original Mac development environment from 1984!


Yes, I did!  That's when I walked away from Apple and never looked back.  At the time I was pretty busy writing BIOS code to hang large hard drives on Apple IIs (large as in 5-10 MB) and I wanted to play in a graphical sandbox.  Alas, it wasn't allowed so that was the end of the line.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Programming Lattice FPGAs on a Mac?
« Reply #34 on: November 21, 2018, 10:21:25 pm »
But why stop at 100?
Well, we found the end to "power needed".

Also, assuming you can actually put 100 chips on the board. Have you though about power supply? Just that alone is a technical challenge, which not a lot of people can adequately solve.

I wonder if you can send signals from chip to chip without considering clock domain crossing.  If this is a problem, there will probably need to be a 2 clock delay on signals coming in.  If it matters...  When you are working with picosecond logic, nanosecond clock delays are a big deal.

In the end, would such a thing be faster than an equivalent zillion core I7 (or Xeon) board?  The Intel® Xeon® Processor E7-8894 v4 has 24 cores at 195Watts.  It's also about $9k...  Ten chips might be a nice space heater in Alaska.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11290
  • Country: us
    • Personal site
Re: Programming Lattice FPGAs on a Mac?
« Reply #35 on: November 21, 2018, 10:24:10 pm »
I wonder if you can send signals from chip to chip without considering clock domain crossing.
You can if they are in the same clock domain. But given pin delays, your maximum clock will go down rapidly. And also, you would still have to describe each pin in the constraints file. And obviously you would have to partition your design yourself, no tool will spread the design over multiple chips.
Alex
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Programming Lattice FPGAs on a Mac?
« Reply #36 on: November 21, 2018, 10:38:56 pm »
I wonder if you can send signals from chip to chip without considering clock domain crossing.
You can if they are in the same clock domain. But given pin delays, your maximum clock will go down rapidly. And also, you would still have to describe each pin in the constraints file. And obviously you would have to partition your design yourself, no tool will spread the design over multiple chips.
I guess I have been thinking about multiple instances of the same design - something massively parallel.  OTOH, it could be that each chip is doing something different and that should make board programming an interesting project.  I envision a really long JTAG chain...
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Programming Lattice FPGAs on a Mac?
« Reply #37 on: November 21, 2018, 10:41:09 pm »
Yup, mac = troubles for this things.

Besides, the hardware of Apple laptops is ... poop. My brother bought a professional MacBook/Pro (1900 euro for a Laptop), loaded a FEM program ... and ... the machine was not able to provide the proper air-cooling, therefore it died.

Specifically, the GPU overheated, the heater shield is shared with the CPU, and as result, they both died  :palm: :palm: :palm: :palm:
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Programming Lattice FPGAs on a Mac?
« Reply #38 on: November 21, 2018, 10:49:10 pm »
Yup, mac = troubles for this things.

Besides, the hardware of Apple laptops is ... poop. My brother bought a professional MacBook/Pro (1900 euro for a Laptop), loaded a FEM program ... and ... the machine was not able to provide the proper air-cooling, therefore it died.

Specifically, the GPU overheated, the heater shield is shared with the CPU, and as result, they both died  :palm: :palm: :palm: :palm:

While I don't use Apple Macs, I did buy a high end MacBook Pro for my stepdaughter.  Very expensive for a laptop.  In fact, seriously overpriced.  But she likes Macs.

If, during my grandson's college career, it seems reasonable to add a MacBook to the mix of desktops and tablets, so be it.  There's this store and if I give them money they will give him a MacBook.  Compared to tuition, laptops are a drop in the bucket.

 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Programming Lattice FPGAs on a Mac?
« Reply #39 on: November 21, 2018, 11:33:09 pm »
Well, during my Erasmus in the UK, I bought a PowerBook-G3, second hand because I was a student and I was literally washing dishes in a restaurant to pay the rent.

I found a nice shop with a second-hand laptop (they also had a lot of Acorn Computers, RISCPC and this stuff that is pretty British). I picked up one for 90 UKP, and I still believe it was a deal because even if in 2007 we had PowerBook G4 Aluminium with a PowerPC 74xx @ 1.6Ghz under the hood. Mine was a black laptop with a G3 @400Mhz, pretty obsolete for MacOSX so I loaded Linux, and it was decent enough for my daily needs: programming in C and Octave, writing my thesis in LaTex, and reading doc in PDF.

I still have this laptop, never overloaded by heavy computing tasks, whereas my brother has very special needs, like computing FEM analysis, which is very heavy .... but ... I can affirm the quality of Apple products has dropped: at least my black-Powebook-G3(1) comes with a decent heather shield, my brother's laptop does not.

Which is completely unacceptable because "pro" doesn't really mean "professional" ... it justs means "more money to pay for the marketing"


(1) The previous owner absolutely wanted to let me know that laptop was exactly the same model used in Sex&TheCity thanks to a sticker put on the front ...  :-DD
Ah, these Apple Fan Boys&Girls (probably she was a she), but ... hey? 90UK! A good deal! :D
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Programming Lattice FPGAs on a Mac?
« Reply #40 on: November 21, 2018, 11:38:07 pm »
A good friend of mine has been using Macs since the early 2000's, currently he has a Macbook Pro from I think 2008 as his daily driver, upgraded several times he has way more than gotten his money's worth out of that machine. He's stuck between a rock and a hard place though looking into the future. Like me, he won't consider buying a computer that has the RAM and storage soldered to the motherboard so he's considering the painful proposition of jumping ship to Windows. He likes Linux too, but he's a serious photography buff and relies on Adobe products which unfortunately means it's either Mac or Windows, neither a pleasant proposition.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Programming Lattice FPGAs on a Mac?
« Reply #41 on: November 22, 2018, 01:45:57 am »
The point, of course, is that you're right, and building for macOS -- which is Unix -- should be painless. But the FPGA tools are all just big piles of shit, anyway.

Even though the underlying kernel is Unix, the GUI is dramatically different and is made of proprietary libraries (such as Cocoa) which are based on Objective-C/Swift.

There are several cross-platform GUI platforms which allow developers to write basically platform-independent code. wxWidgets and QT are two that come to mind. They both seem to work well enough for large production use.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9056
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Programming Lattice FPGAs on a Mac?
« Reply #42 on: November 22, 2018, 04:51:18 am »
In the end, would such a thing be faster than an equivalent zillion core I7 (or Xeon) board?  The Intel® Xeon® Processor E7-8894 v4 has 24 cores at 195Watts.  It's also about $9k...  Ten chips might be a nice space heater in Alaska.
It wouldn't be too hard to make it get better performance per watt for some applications like certain cryptocurrency mining algorithms. What's difficult is getting competitive performance per dollar, not to mention having to compete against college students (in the dorms) who care almost nothing about performance per watt and mine with used servers that get very high performance per dollar.
A good friend of mine has been using Macs since the early 2000's, currently he has a Macbook Pro from I think 2008 as his daily driver, upgraded several times he has way more than gotten his money's worth out of that machine. He's stuck between a rock and a hard place though looking into the future. Like me, he won't consider buying a computer that has the RAM and storage soldered to the motherboard so he's considering the painful proposition of jumping ship to Windows. He likes Linux too, but he's a serious photography buff and relies on Adobe products which unfortunately means it's either Mac or Windows, neither a pleasant proposition.
Linux for regular use and a Windows or Hackintosh VM for the few apps that just don't work on Linux.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3148
  • Country: ca
Re: Programming Lattice FPGAs on a Mac?
« Reply #43 on: November 22, 2018, 04:57:53 am »
There are several cross-platform GUI platforms which allow developers to write basically platform-independent code. wxWidgets and QT are two that come to mind. They both seem to work well enough for large production use.

If your GUI doesn't currently use one of these, you still need to re-write all your GUI, or to write some sort of Mac stub.

And they don't work that well. They have problems with scaling, fonts etc. People have lots of problems on 4K display. If you bought Mac, you probably don't wouldn't want to see ugliness on your screen, would you?
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11290
  • Country: us
    • Personal site
Re: Programming Lattice FPGAs on a Mac?
« Reply #44 on: November 22, 2018, 05:02:59 am »
Xilinx, Altera and Lattice use Qt already. The bigger problem is supporting all the hardware debuggers and programmers.

And at least for Xilinx Linux (or UNIX, I guess) support was there first or at least from early on. Since some of the tools in ISE are still using Tk. But main tools all were converted to Qt.

And all of them support Linux for remote synthesis on servers anyway, so having UI supported is not a huge deal.
Alex
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Programming Lattice FPGAs on a Mac?
« Reply #45 on: November 22, 2018, 05:28:59 am »
Whatever the case, I'm sure the FPGA vendors know what they're doing. If producing a Mac version of the software was likely to have a significant economic return then they would have done so. As it stands, any company doing FPGA development can generally afford to buy whatever computer is required to run the software, and it's obvious they don't really care about hobbyist users. They had Unix first IIRC, then ported the stuff to Wintel because it was impossible to ignore the market dominance. What reason do they have to support yet another niche operating system? Especially when it's so easy to boot Linux or Windows on a mac or run it in a VM?
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13773
  • Country: gb
    • Mike's Electric Stuff
Re: Programming Lattice FPGAs on a Mac?
« Reply #46 on: November 22, 2018, 09:01:47 am »
Whatever the case, I'm sure the FPGA vendors know what they're doing. If producing a Mac version of the software was likely to have a significant economic return then they would have done so. As it stands, any company doing FPGA development can generally afford to buy whatever computer is required to run the software, and it's obvious they don't really care about hobbyist users.
Exactly. If you can't afford to buy a PC, you're not a customer that's going to be doing enough business for them to care about.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3148
  • Country: ca
Re: Programming Lattice FPGAs on a Mac?
« Reply #47 on: November 22, 2018, 03:05:51 pm »
Exactly. If you can't afford to buy a PC, you're not a customer that's going to be doing enough business for them to care about.

If you can afford to buy Mac, you can definitely afford to buy PC, however you may still prefer Mac.
 

Offline asmi

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: Programming Lattice FPGAs on a Mac?
« Reply #48 on: November 22, 2018, 03:19:02 pm »
If you can afford to buy Mac, you can definitely afford to buy PC, however you may still prefer Mac.
Sorry but this is not a teenagers' beauty contest. When it comes to professional workstations there is no such thing as "preference" - you buy what you need to get the job done - whether it's Linux machine, Windows or whatever else. And as things stands right now, Apple prefer to make stuff for teens (not by age, but by behavior) to impress each other, not to get job done.

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Programming Lattice FPGAs on a Mac?
« Reply #49 on: November 22, 2018, 06:02:21 pm »
all of them support Linux for remote synthesis on servers

Can you tell me more about this? It's interesting!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf