05-19-2012 09:12 PM
I am working on Spartan3E Starter Kit Board and picoblaze designs with KCPSM3. PicoBlaze reference designs authored by Kan Chapman are my starting point. I have tried to make the board as a digital voltmeter or as a frequency counter. All these reference designs end up to display the results on LCD Display on the board itself. My project requires the data created in the board to be transferred to my PC for further manipulation. I am wondering what is the best way to transfer a lot of data created within the picoblaze design back to PC. I have looked into the reference design "UART_real_time_clock". In this design the data (real-time) is transferred to PC. But the transferred data can only be displayed on hyper terminal and can't be easily saved in the PC. Other option might be save the data created in the board to some memory, either inside the FPGA or on other memory chips on the board. Then to find a way to read those data through serial port back to PC. Please give me some advise for this issue.
05-20-2012 03:56 PM
HyperTerminal should have options to save sessions to a text file on the fly. If not, every other serial comms program ever written will do this for you. You could also write a simple program on your PC that opens the serial port and logs data to disk.
05-21-2012 10:00 AM
As ‘joelby’ has indicated, HyperTerminal can transfer data in and out of files and you can see one example of this on page 10 of the documentation associated with another reference design for the Spartan-3E Starter Kit that you are using. Hopefully that will give you some idea how “to transfer a lot of data”...
There are questions that you need to answer when considering any form of communication...
Do you need a continuous flow of data and what rate does it need to be transferred?
In the case of a serial (UART) link operating at 115,200 baud then the maximum transfer rate is 11,520 bytes (or characters) per second so is that fast enough for a continuous flow of data?
If you ‘record’ data in local memory using PicoBlaze then how much data will you transfer in a 'block' and will the communication rate allow the transfer of that block to take place in a reasonable time?
Principal Engineer, Xilinx UK
05-25-2012 10:16 PM
I think the question was leading up to "How do I write a program to read the serial port to extract and store/manipulate the data stream?" No need to answer that here, with a Google bar hovering at the top of this very window.
(Hi, Ken. Great stuff, BTW. I always wanted to say thank you, and to Xilinx for helping you share your work. I haven't had so much fun since the 6502. I'm thinking to give the grandkids tiny Spartan6 kits as stocking stuffers this year.)
05-29-2012 03:22 AM
Thank you for your kind and encouraging words Mike. I’m always so pleased to hear when PicoBlaze has been used for educational purposes, especially when it made the learning experience fun along the way. That said, I’m not entirely sure it’s the sort of fun appropriate for Christmas morning.
I think you also spotted that I have to be a little reserved with how much direct assistance that I provide. With so many student projects being based on Xilinx Starter Kits and PicoBlaze reference designs it isn’t surprising that I have received numerous emails from university professors in which they politely ask me not to provide students with working solutions to exercises that they are setting.
For me, the arrival of ‘university project season’ each year is signified by an increase in the emails that I receive from students. I try when possible to provide pointers and advice rather than complete answers. However, I must admit to not providing any help to the few students each year that write to me late in the season attaching a copy of their project brief and saying something like “send design to do this ASAP”!
Principal Engineer, Xilinx UK