Hi Dario and all,
thanx for your reply
Please take a look at icoboard, they already made a open source toolchain for the lattice iCE 40HX8k FPGA,
may you can adapt something from it.
It´s not a good idea to use an FPGA along with "precoded" stuff only....i know nothing comming out of the blue.
But as time goes by more and more people are willing/wanting to do their own FPGA stuff.
May you need to develop your own "FastProGrAmino" FPGA envoirement...or alike. That´s why the guys behind the icoboard and the toolchain reverse engineered that iCE FPGA in order to set up their very own toolchain. As
lattice wheren´t willing to support the DIY scene.
I also think intel doesn´t want that (n)either.....
And i also don´t want to use proprietary tools, which require cloud usage and/or registration and a forced login, in order to use GB wasting local storrage space toolchains which also require online coding/logins. Which are ridiculus/unnessesarily complex and nearly unusable by newbies/hobbyists...... furthermore if the vendor decide to drop/end support for a specific FPGA you´re pretty much doomed, with a nice brick on your workbench....
I don´t know if processing is able to handle inline stuff....if so, you could just parse the FPGA code and hand it over to the FPGA toolchain.
Or another approach could be that you simply define tiny "bricks" for input, output and add, sub, or, xor and DSP "butterflies" for FFT...or even discrete cosine transform and implement some arduino IDE subset FGPA functions.
like:
setup
{
//the usual stuff
}
FGPA
{
//user includable predefined tiny brick functions like
FPGA_FFT (input , ouput (real_,complex*));
FPGA_MUL(input, ouput );
FPGA_sine(....);
FPGA_cosine(....);
FPGA_SQRT(....);
FPGA_AudioINSample(....);
}
loop
{
/
user code which also call
FPGA functions which retur
the result here
/
//my nice 255 bin realtime FFT using the FPGA*
//leaving the vidor 4000 MCU (mostly) idle_
for (byte i=0, i>254, i++)
{
FPGA_AudioINSample(sample(i)); // the HTML here doesn´t quite like rect brackets...
FPGA_FFT(sample(i),outputR(i),outputC(i));
FGPA_QMul(outputR_,outRQ*);
FPGA_QMul(outputC,outCQ);
array=FGPA_SQRT(outRQ,outCQ);
}
// now do some fancy GFX for a nice*
// visual FFT output, may with FastLed, or direct on a
// HDMI connected monitor._
this would be a nice "workaround" for not being able to code native FPGA stuff, until there is a way
someday....
Cheers,
TC