multigcs / riocore

riocore
GNU General Public License v2.0
18 stars 7 forks source link

Compatibility Inquiry: ALTERA Cyclone II FPGA with LinuxCNC-RIO #24

Open Tpj-root opened 1 week ago

Tpj-root commented 1 week ago

Sir, I have an ALTERA FPGA Cyclone II EP2C5T144 board. Is it possible to use this with LinuxCNC-RIO for real-time I/O? If yes, could you provide any guidance or steps to make it work?

Thanks!

multigcs commented 1 week ago

not shure, the problem is that ‘Cyclone II’ is no longer supported by quartus and i don't know if rio works with the old version.

multigcs commented 1 week ago

in this zip-file i have a test gateware with makefile, if this runs with the old quartus than we can add support for this fpga: http://multixmedia.org/EP2C5T144.zip

multigcs commented 1 week ago

ok, i installed this version: https://www.intel.com/content/www/us/en/software-kit/711790/intel-quartus-ii-web-edition-design-software-version-13-0sp1-for-linux.html

and by removing some lines from pins.qdf (..IO_STANDARD..) i can build the bitfile.

so it looks good, but i can not test it.

multigcs commented 1 week ago

Ok, i have add support for this board :)

https://github.com/multigcs/riocore/commit/afc4bd855d440148068b1e432f1e019f482381ae https://github.com/multigcs/riocore/commit/2849eedc1c1d7464477d58fa2bb9e2861c62d59e

but please tell me if it realy works, the demo config is only for blinking the LED

riocore/configs/EP2C5T144/config.json

Tpj-root commented 1 week ago

Sir, thank you for the immediate response. Please give me a few days. The board is available in the hackerspace lab, and I have requested them to send it to me. After I receive the package, I will try to install it and report to you on how it works..

Tpj-root commented 5 days ago

2 faild

Sir, I finally received my package today and successfully compiled it, but I encountered an error. How can I fix this?

multigcs commented 4 days ago

hi, the flash command depends a lot on your hardware, you have to see how it is normally loaded on the fpga, maybe try OpenFPGAloader

Tpj-root commented 3 days ago

Sir,

I uploaded the .pof file using my friend's Windows machine, and it was uploaded successfully.

POF

After that, I tested it with an oscilloscope:

CH1and2

I think it’s working. Now, I am waiting for your response to confirm if it’s really working.

multigcs commented 3 days ago

is one of the LED's blinking (1Hz) ? then it's working

next step is setup something for the host connection (SPI / W5500), and create some IO's like StepDir or PWM outputs.

to flash, you can also try

cd Output/EP2C5T144/Gateware
make prog

this will use the 'quartus_pgm' command to load the bitstream

Tpj-root commented 3 days ago

sir, To test the LED blinking using a push button and a 1kΩ pull-up resistor. tesing_blinking

multigcs commented 3 days ago

the LED have to blink constantly with 1Hz after flashing, no SW / PullUp / ... needed.

multigcs commented 3 days ago

but not shure my test bitfile have the blinking LED part, you have to build and compile your own bitfile

riocore/configs/EP2C5T144/config.json

Tpj-root commented 3 days ago

Okay, sir, I will try my best.

I tried the command but it didn't work:

quartus_pgm -c 1 -m jtag -o "p;rio.sof"

The output error is:

Error (213019): Can't scan JTAG chain. Error code 86.

I also tried this command:

quartus_pgm -a


Info: Command: quartus_pgm -a Info (213045): Using programming cable "USB-Blaster [1-7]" 1) USB-Blaster [1-7] Unable to read device chain (Hardware not attached)

I also tried changing the permissions:

sudo usermod -aG dialout $USER
sudo chmod 666 /dev/bus/usb/001/009
multigcs commented 3 days ago

after 'usermod' you have to logout and re-login your user.

what programmer do you have ?

Tpj-root commented 3 days ago

sir, I have an Altera USB Blaster. USB-Blaster-ALTERA-CPLDFPGA-Programmer-1

multigcs commented 3 days ago

hmm, ok, normaly it should work

Tpj-root commented 3 days ago

Thank you for your guidance, sir. I will try it out.

Tpj-root commented 1 day ago

Sir, after using OpenFPGALoader to manually upload the .svf file, the changes are temporary. Now the LED is blinking. Could you please confirm if it worked?

3 2

led

multigcs commented 1 day ago

looks very good :) try to add '-f' option to your openFPGAloader command to write to flash

Tpj-root commented 12 hours ago

Sir, The -f command does not work. I think .sof and .svf files are not used for permanently programming the FPGA. I need to use a file format that writes to non-volatile memory, such as .pof

.sof vs .pof Both files show significant differences in their hex structure.

I believe the only way to permanently program the FPGA is by using the .pof file. It seems to be the only solution.

Sir, I need your guidance.

I want to continue with this setup: LinuxCNC_RIO with the .svf file. After learning RIO and all the fundamentals (config, modules, and plugins), I will jump into RIOctrl FPGAs.

Can I continue? Or which path is perfect for learning the fundamentals? Sir, Thank you for spending your precious time to answer my questions.

multigcs commented 12 hours ago

what do you mean by RIOctrl FPGAs ?

Tpj-root commented 12 hours ago

Sir, after that, I became familiar with RioCore. Is RIOctrl FPGAs suitable for advanced-level work in making CNC machines?

multigcs commented 12 hours ago

you mean this board !?!? https://github.com/festlv/rioctrl-hw

as far as i know, the basic parts are already working, but it's still in the test phase