- Hardware & Machines
- Computers and Hardware
- LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
- MirkoCNC
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 2
07 Dec 2024 08:51 #316170
by MirkoCNC
Replied by MirkoCNC on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
One step forward and one backward:
The problem with the rio-generator has been solved in def generate(self, output_path=None, preview=False):
....
else:
os.system(f"{sys.executable} {generator_path} -p {self.config_file} {output_path}") # modified line
# old line os.system(f"{generator_path} {self.config_file} {output_path}")
self.check_status()
except Exception as error:
print(f"ERROR generating output: {error}")
There is another problem left in def check_status(self):
The compile button is not enabled after generating:
# checking generated config
path_config_json = os.path.join("Output", config_name, ".config.json")
if os.path.isfile(path_config_json):
ret = os.system(f"diff {self.config_file} {path_config_json} >/dev/null")
else:
ret = 1
if ret == 0:
self.info_generated.setChecked(True)
self.button_generate.setStyleSheet("background-color: green;")
self.button_compile.setEnabled(True)
else:
self.info_generated.setChecked(False)
self.button_generate.setStyleSheet("background-color: red;")
self.button_compile.setEnabled(False)
The problem seems to be in two paths that are compared. I am going to solve it next.
The problem with the rio-generator has been solved in def generate(self, output_path=None, preview=False):
....
else:
os.system(f"{sys.executable} {generator_path} -p {self.config_file} {output_path}") # modified line
# old line os.system(f"{generator_path} {self.config_file} {output_path}")
self.check_status()
except Exception as error:
print(f"ERROR generating output: {error}")
There is another problem left in def check_status(self):
The compile button is not enabled after generating:
# checking generated config
path_config_json = os.path.join("Output", config_name, ".config.json")
if os.path.isfile(path_config_json):
ret = os.system(f"diff {self.config_file} {path_config_json} >/dev/null")
else:
ret = 1
if ret == 0:
self.info_generated.setChecked(True)
self.button_generate.setStyleSheet("background-color: green;")
self.button_compile.setEnabled(True)
else:
self.info_generated.setChecked(False)
self.button_generate.setStyleSheet("background-color: red;")
self.button_compile.setEnabled(False)
The problem seems to be in two paths that are compared. I am going to solve it next.
The following user(s) said Thank You: meister
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 320
08 Dec 2024 08:47 - 08 Dec 2024 08:54 #316234
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
thanks MirkoCNC,
the -p stands for preview, which should be omitted when generating correctly (fixed in dev branch)
the diff command should be replaced, preferably with a python lib, as it does not exist under windows
EDIT: diff is now replaced with python code
the -p stands for preview, which should be omitted when generating correctly (fixed in dev branch)
the diff command should be replaced, preferably with a python lib, as it does not exist under windows
EDIT: diff is now replaced with python code
Last edit: 08 Dec 2024 08:54 by meister.
Please Log in or Create an account to join the conversation.
- MirkoCNC
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 2
08 Dec 2024 14:03 #316243
by MirkoCNC
Replied by MirkoCNC on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Thanks for solving the diff issue, it has given me a real headache.
The Compile button is enabled now and I am going to check, if it compiles etc.
By the way, Tangbob config.json contains a plugin "blink" mapped to pin10, which is not available on the Tangbob FPGA board (not wired on your PCB). Furthermore, pin10 belongs to the bank 3, which works with 1.8V (not 3.3V) causing an error when placing in the toolchain.
(I used the generated files from your program in the Windows Gowin IDE for running the whole process. It gives me more control what's going on during the processing)
The Compile button is enabled now and I am going to check, if it compiles etc.
By the way, Tangbob config.json contains a plugin "blink" mapped to pin10, which is not available on the Tangbob FPGA board (not wired on your PCB). Furthermore, pin10 belongs to the bank 3, which works with 1.8V (not 3.3V) causing an error when placing in the toolchain.
(I used the generated files from your program in the Windows Gowin IDE for running the whole process. It gives me more control what's going on during the processing)
Please Log in or Create an account to join the conversation.
- MirkoCNC
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 2
08 Dec 2024 14:15 #316245
by MirkoCNC
Replied by MirkoCNC on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I forgot to mention, in case of dual-purpose pins like the PINOUT_WLED1_DATA of the Tangbob board, it needs to be configured as regular I/O pin. (It is a dedicated SSPI pin.) In the IDE, it can be done under Place&Route -> Configuration by right mouse click.
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 320
08 Dec 2024 15:03 #316250
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
if you using the makefile, all should work with the gowin enviroment (WLED/1.8V).
pin 10 in one of the LED's on the Tangnano9k and the blink plugin is only to show that the gateware is flashed and running
pin 10 in one of the LED's on the Tangnano9k and the blink plugin is only to show that the gateware is flashed and running
Please Log in or Create an account to join the conversation.
- MirkoCNC
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 2
09 Dec 2024 08:16 #316310
by MirkoCNC
Replied by MirkoCNC on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I did not know about the LED on the FPGA board. Now it makes sense.
However, as the bank 3 of the FPGA is powered by 1.8V, the IO_TYPE should not be LVCMO33, which is in conflict with the power of bank 3 causing an error during place & route.
I have not tried the toolchain of the riocore, as Compile does not work with my Windows setup. I may look into it later as I can live with the Gowin IDE.
File pins.cst:
// ### blink3 ###
IO_LOC "PINOUT_BLINK3_LED" 10;
IO_PORT "PINOUT_BLINK3_LED" IO_TYPE=LVCMOS33 DRIVE=8;
IO_TYPE=LVCMOS18 solves the problem.
Pins of bank 3 are 3 to 11, 13 to 16 and 79 - 88 (some of the pins are used for the right sight of the board)
Just for the case that somebody else uses the IDE....
However, as the bank 3 of the FPGA is powered by 1.8V, the IO_TYPE should not be LVCMO33, which is in conflict with the power of bank 3 causing an error during place & route.
I have not tried the toolchain of the riocore, as Compile does not work with my Windows setup. I may look into it later as I can live with the Gowin IDE.
File pins.cst:
// ### blink3 ###
IO_LOC "PINOUT_BLINK3_LED" 10;
IO_PORT "PINOUT_BLINK3_LED" IO_TYPE=LVCMOS33 DRIVE=8;
IO_TYPE=LVCMOS18 solves the problem.
Pins of bank 3 are 3 to 11, 13 to 16 and 79 - 88 (some of the pins are used for the right sight of the board)
Just for the case that somebody else uses the IDE....
Please Log in or Create an account to join the conversation.
- MirkoCNC
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 2
09 Dec 2024 08:23 #316312
by MirkoCNC
Replied by MirkoCNC on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Ups, I have just seen the correct IO standard can be configured /edit in the plugin of the blink module in the riocore software. Hence, it is not necessary to do it manually in the pins.cst file.
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 320
09 Dec 2024 08:41 #316313
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
i have removed the IO_TYPE from the cst pinfile generation,
you need to checkout the newest dev branch and generate the files new
you need to checkout the newest dev branch and generate the files new
Please Log in or Create an account to join the conversation.
- meister
- Offline
- Platinum Member
-
Less
More
- Posts: 507
- Thank you received: 320
09 Dec 2024 12:17 - 09 Dec 2024 12:17 #316321
by meister
Replied by meister on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Now, after the first start of the generator, a file is created:
riocore/toolchains.json
there you can enter the paths to your toolchains, these are then transferred to the makefile.
under windows please note that backslashes must be double
so you do not need to add the toolchains to your enviroment variables
riocore/toolchains.json
there you can enter the paths to your toolchains, these are then transferred to the makefile.
under windows please note that backslashes must be double
so you do not need to add the toolchains to your enviroment variables
Attachments:
Last edit: 09 Dec 2024 12:17 by meister.
Please Log in or Create an account to join the conversation.
- MirkoCNC
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 2
09 Dec 2024 13:15 #316330
by MirkoCNC
Replied by MirkoCNC on topic LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
I pulled the dev branch.
It creates the toolchains.json file and I added:
{
"gowin": "C:\\Gowin\\Gowin_V1.9.10.03_Education_x64\\IDE",
"diamond": "",
"vivado": "",
"quartus": "",
"icestorm": "",
"ise": ""
}
However, it does not compile. It gives me following error:
Der Befehl "make" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Furthermore, the graphic in the tab Overview is completely gone.
It creates the toolchains.json file and I added:
{
"gowin": "C:\\Gowin\\Gowin_V1.9.10.03_Education_x64\\IDE",
"diamond": "",
"vivado": "",
"quartus": "",
"icestorm": "",
"ise": ""
}
However, it does not compile. It gives me following error:
Der Befehl "make" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Furthermore, the graphic in the tab Overview is completely gone.
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Computers and Hardware
- LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)
Time to create page: 0.113 seconds