FPGARelated.com
Forums

RS232 to access TX registers of Aurora

Started by Vivek Menon June 22, 2006
Hi,
I have implemented the Aurora protocol on the V2PRO FF672 FPGA. As part
of testing, I need  to access the TX data on the aurora links through
RS232 interface as well.
Now the problem I have is that the avbl project in XPS has a rx and tx
port (std_logic) and the data I need to send is atleast 16 bits. How do
I access or interface the register outputs from Aurora to RS232??
Thanks,
Vivek

>Now the problem I have is that the avbl project in XPS has a rx and tx >port (std_logic) and the data I need to send is atleast 16 bits. How do >I access or interface the register outputs from Aurora to RS232??
It's fairly easy to make a hack RS-232 transmitter. It's just a shift register preloaded with the data and start/stop bits. For 16 bits of data, I'd use a 20 bit shift register - 2 8-bit bytes with start and stop bits on each. You can probably sort out all the LSB/MSB first and inversions by reading the specs carefully enough. It's probably simpler to put a scope on the cable to your PC and make it send a known pattern. You (probably) don't need fancy RS-232 level shifters. Most RS-232 receivers will do the right thing if you feed them a 3V CMOS signal. -- The suespammers.org mail server is located in California. So are all my other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited commercial e-mail to my suespammers.org address or any of my other addresses. These are my opinions, not necessarily my employer's. I hate spam.
Hi,
I am not sure about this and hence the modified question:
After designing the Aurora protocol and implementing it, I want to
access the data values using my PC. For this purpose, I thought of
sending the tx values through the RS232 port of the PowerPC. However, I
am having a problem. I am not able to access the RS232 access ports.
The files are proprietary of XIlinx EDK and cannot be modified...( iam
talking abt "opb_uartlite.vhd" and it's rx and tx versions).
I also tried adding the system.xmp file to my ISE project but it's
useless as no ports are avbl for sending the tx data to the RS 232
block.

What is the easiest way to do accomplish this task?? I also gather that
if this can be figured out, I can in the future access different blocks
written in ISE using PPC and output values on RS232. The values inhaled
from RS232 can be used for further processing using Matlab, etc.

Thanks,
Vivek

Hal Murray wrote:
> >Now the problem I have is that the avbl project in XPS has a rx and tx > >port (std_logic) and the data I need to send is atleast 16 bits. How do > >I access or interface the register outputs from Aurora to RS232?? > > It's fairly easy to make a hack RS-232 transmitter. It's just > a shift register preloaded with the data and start/stop bits. > For 16 bits of data, I'd use a 20 bit shift register - 2 8-bit > bytes with start and stop bits on each. > > You can probably sort out all the LSB/MSB first and inversions > by reading the specs carefully enough. It's probably simpler to > put a scope on the cable to your PC and make it send a known pattern. > > You (probably) don't need fancy RS-232 level shifters. Most RS-232 > receivers will do the right thing if you feed them a 3V CMOS signal. > > -- > The suespammers.org mail server is located in California. So are all my > other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited > commercial e-mail to my suespammers.org address or any of my other addresses. > These are my opinions, not necessarily my employer's. I hate spam.
> After designing the Aurora protocol and implementing it, I want to > access the data values using my PC.
I am not really sure what you are trying to do. Are you trying to route the output of the transceiver to a RS232 UART? If so, even if you managed to do so, it wouldn't be very useful; there's no way multi-gigabit data rates can be sustained over RS232 (or multi-megabit, for that matter!). Are you trying to send data values to both the MGT and to the RS232 UART? If so, you will have to deal with the difference in speed between the two. However, if you can live with that that, coding a UART in HDL isn't too hard. - Nathan
actually I just need to transmit the values on RS232 UART core. I am
not too bothered about the speed. I just want the values on the PC.
most of the RS232 UART cores(atleast the one on the opencores.org site
and one referenced by the HERON IP ) do not tell how the data is
visible in the terminal program. I have now two VHDL projects of the
RS232 but they don't work at least I don't see any data on the terminal
window.
So I am now considering sending the data to the PPC that will in turn
send it to the RS232 UART core..
Lemme know if anyone has had similar problems.
Thanks,
Vivek


Nathan Bialke wrote:
> > After designing the Aurora protocol and implementing it, I want to > > access the data values using my PC. > > I am not really sure what you are trying to do. Are you trying to route > the output of the transceiver to a RS232 UART? If so, even if you > managed to do so, it wouldn't be very useful; there's no way > multi-gigabit data rates can be sustained over RS232 (or multi-megabit, > for that matter!). Are you trying to send data values to both the MGT > and to the RS232 UART? If so, you will have to deal with the difference > in speed between the two. However, if you can live with that that, > coding a UART in HDL isn't too hard. > > - Nathan
Vivek Menon wrote:
> actually I just need to transmit the values on RS232 UART core. I am > not too bothered about the speed. I just want the values on the PC. > most of the RS232 UART cores(atleast the one on the opencores.org site > and one referenced by the HERON IP ) do not tell how the data is > visible in the terminal program. I have now two VHDL projects of the > RS232 but they don't work at least I don't see any data on the terminal > window.
You likely will need to convert the data to ASCII, if you want it to show up on a terminal. That is quite easy to do.
No wonder the screen was blank..!!!
Duane Clark wrote:
> Vivek Menon wrote: > > actually I just need to transmit the values on RS232 UART core. I am > > not too bothered about the speed. I just want the values on the PC. > > most of the RS232 UART cores(atleast the one on the opencores.org site > > and one referenced by the HERON IP ) do not tell how the data is > > visible in the terminal program. I have now two VHDL projects of the > > RS232 but they don't work at least I don't see any data on the terminal > > window. > > You likely will need to convert the data to ASCII, if you want it to > show up on a terminal. That is quite easy to do.
does anybody have a function or package that converts data into ASCII??
Vivek Menon wrote:
> No wonder the screen was blank..!!! > Duane Clark wrote: > > Vivek Menon wrote: > > > actually I just need to transmit the values on RS232 UART core. I am > > > not too bothered about the speed. I just want the values on the PC. > > > most of the RS232 UART cores(atleast the one on the opencores.org site > > > and one referenced by the HERON IP ) do not tell how the data is > > > visible in the terminal program. I have now two VHDL projects of the > > > RS232 but they don't work at least I don't see any data on the terminal > > > window. > > > > You likely will need to convert the data to ASCII, if you want it to > > show up on a terminal. That is quite easy to do.
Vivek Menon wrote:
> does anybody have a function or package that converts data into ASCII??
You send one nibble (4 bits) at a time. If the nibble is between 0-9, then add 0x30 (hex 30). If between a-f, add 0x60. It should be easy to figure out how to do that in VHDL/Verilog. That will give you a hex display.
Thanks Duane.
I have 16-bit data that needs to be converted to ASCII.
SO I guess I will have to take a nibble and convert it into its ASCII
equivalent and then give a space or next line to differentiate the next
word.
Thanks for the tip.
Vivek
Duane Clark wrote:
> Vivek Menon wrote: > > does anybody have a function or package that converts data into ASCII?? > > You send one nibble (4 bits) at a time. If the nibble is between 0-9, > then add 0x30 (hex 30). If between a-f, add 0x60. It should be easy to > figure out how to do that in VHDL/Verilog. That will give you a hex display.