This project aims to replicate the functionality of Mesa FPGA boards (like 7i76 + 7i92) using custom hardware:
- Cinterion EHS6T LAN Module (Ethernet-to-RS232 modem)
- Googoltech GTS800 board (FPGA: Lattice MachXO2)
- LinuxCNC running on Debian 12
The core idea is to bridge Ethernet TCP over a specific port (1716) to RS232 UART, enabling real-time control via a custom LinuxCNC HAL (Hardware Abstraction Layer) module. This setup allows for a flexible and customizable CNC control solution without relying on proprietary Mesa hardware.
- Mesa-like Functionality: Emulate critical features such as Step/Direction generation, encoder feedback, and general-purpose I/O.
- Real-time Communication: Achieve near-real-time data exchange between the FPGA and LinuxCNC for precise machine control.
- Customizable Hardware: Utilize the GTS800 FPGA for fully customizable logic tailored to specific CNC needs.
- Robust & Stable System: Develop a reliable communication and control infrastructure on Debian 12.
- Open-Source Focused: Provide a framework that can be further developed and extended by the community.
.
├── docs/ # Comprehensive project documentation, setup guides, protocol specs
├── fpga_design/ # VHDL/Verilog source code for the GTS800 FPGA
│ ├── src/ # Core FPGA design files (.vhd, .v)
│ └── bitstreams/ # Compiled FPGA bitstream files (.bin, .sof, .bit)
├── hal_module/ # LinuxCNC HAL custom module source code
│ ├── src/ # C/C++ source for the HAL component (.c, .comp)
│ └── build/ # Build artifacts (e.g., compiled .so files)
├── scripts/ # Python, Bash, or other utility scripts for testing, setup, or automation
├── tools/ # Any specific tools or utilities (e.g., FT_PROG equivalents, custom flashers)
├── .gitignore # Specifies intentionally untracked files to ignore
└── README.md # Project overview and main documentation entry point
-
GTS800 FPGA to EHS6T LAN Module (UART):
- Connect GTS800 UART TX to EHS6T UART RX.
- Connect GTS800 UART RX to EHS6T UART TX.
- Ensure common ground (GND) is connected.
- Baud Rate: To be configured identically on both devices (e.g., 115200, 230400, 460800 Baud).
- Data Format: Typically 8N1 (8 data bits, no parity, 1 stop bit).
-
EHS6T LAN Module to LinuxCNC Host (Ethernet):
- Connect an Ethernet cable from the EHS6T LAN port to your LinuxCNC host PC's Ethernet port.
- Ensure the EHS6T module is powered on and its network interface is active. It is expected to be accessible at on TCP port .
- Verify Network Interface: Ensure your LinuxCNC host's Ethernet interface is properly configured and within the same subnet as the EHS6T (). Static IP configuration is recommended for stability.
- Example for (replace with your actual interface name):
auto eth0 iface eth0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 # Optional: if internet access is needed
- After modifying, restart network service:
- Example for (replace with your actual interface name):
- Test Connectivity:
You should receive replies.
ping 192.168.1.140
- FPGA Protocol Design: Define the UART communication protocol between FPGA and EHS6T, including commands for reading/writing registers, error handling, and checksums.
- FPGA Logic Implementation: Develop VHDL/Verilog code for the GTS800 to emulate Mesa registers and implement I/O logic.
- HAL Module Development: Create the custom LinuxCNC HAL module in C/C++ to handle TCP socket communication with EHS6T and protocol translation for the FPGA.
- Testing & Debugging: Develop Python scripts for initial testing of TCP/UART communication and use LinuxCNC's HAL tools for debugging.