by [TV] Using [Bwise] As an extension of the idea in [Bwise, a serial port tcl script and a Xilinx demo board] Spartan 3 board [http://www.xilinx.com/products/devkits/HW-SPAR3-SK-UNI-G.htm] Digilent Ethernet module [http://digilentinc.com/Products/Detail.cfm?Prod=NET1&Nav1=Products&Nav2=Accessory] Digilent Adept suite [http://www.digilentinc.com/Software/Adept.cfm?Nav1=Software&Nav2=Adept] newproc {} FPGA {i1 i2 i3 i4 i5 i6 i7 i8 i9 i10} {o1 o2 o3 o4 o5 o6 o7 o8 o9 o10} proc fpgablock {} { set in {} ; for {set i 1} {$i <= 10} {incr i} {append in "[uplevel #0 set FPGA.i$i] "} set r [exec ./relay.exe << $in] for {set i 1} {$i <= 10} {incr i} {uplevel #0 set FPGA.o$i [lindex $r [expr $i-1]]} } set FPGA.bfunc fpgablock [http://82.171.148.176/Bwise/fpgablock1.gif] [http://82.171.148.176/Bwise/fpgainfo1.gif] Needs: [http://www.theover.org/Bwise/relay.cpp] compiled with cygwin on windows XP (Pro in this case) because I donĀ“t know a Linux Adapt software version like this: gcc -mno-cygwin -o relay.exe -I ../Adept\ sdk\ files/ -L ../Adept\ sdk\ files/ relay.cpp -ldpcutil test with echo '00 00 00 00 00 00 00 00 00 00' | ./relay gives back the 10 register contents, after the 10 writable regs have been set according to the hex data fed to stdin. Speed: sub second easily but probably not very many invokations per second. (Connected over a giga ether switch network, actually at a Gb/s for the notebook driving the ethercard, which however is connected at 10(!)Mb/s, so fairly slow.) Current vhdl/schematic to fill the FPGA with is simply the example coming with the ethernet board, possibly with some small modifications (like I made a schematic symbol of the interface, for use (on the same notebook) with Xilinx ISE Webpack 8.2i) The possible speed of the interface is up to over 200 Kilo byte per second tested. The same ethernet connection, which for demonstration purposes can also be connected directly over a single ethernet cable, is used to program the fpga with the required bit file, which is reliable and fast (about a second). After the above has been installed/compiled/started up, the normally working Bwise block running on some not very old Tcl/Tk version with the executable to drive the hardware in the current directory effectively communicates its inputs when 'eval'-ed or 'fire'-ed as a blcok to the FPGA interface logic, which then can be connected to any fpga processing, and the result is fed back over the ethernet to become visible as the output of the FPGA bwise block, and can be used as (unsigned byte) decimal data in the bwise canvas, or as shown above seen in the info window associated with the block, and interactively used. See also [List computations in a FPGA, driven by Tcl] ---- !!!!!! %| enter categories here |% !!!!!!