Reply by Vivek Menon June 29, 20062006-06-29
Hi
I am using Ken Chapman's UART cores described in xapp223.pdf from
Xilinx. I am having mapping errors.
Has anyone worked on this??
Thanks,
Vivek

Reply by Vivek Menon June 28, 20062006-06-28
Hi Duane,
Instead of the Heron Eng, I used tha xapp341.pdf file from Xilinx that
describes an implementation of a RS232 transmitter and receiver. I used
only the transmitter. The testbench simulates properly on Modelsim.
Now I used a baud generator suggested in this grp by Peter Hermannson
to divide the 100 MHz clock  by 325.5  to get 19200 baud rate and
provided it to the clk of the RS232 transmitter. This module has a
strobe signal. I assigned a push button to it and inverted the logic
levels so that it works similar to the test bench.
Still I don't see anything on the terminal..Any pointers??
Thanks,
Vivek
Duane Clark wrote:
> Vivek Menon wrote: > > New problem: > > When I send the 8-bit test data like for eg.X"31", it should appear on > > the screen as "01".However this is not taking place. The terminal has > > baud rate 19200, 8 data bits, 1 stop bit and no flow control. > > what do I have to specify as start and stop bits?? Moreover I am using > > the files obtained from Heron Engg...IF anyone has worked on this, > > I don't know what Heron Engg is. But X"31" will display as "1" not "01". > > Have you simulated it and seen what the output looks like? The output > should be high when not sending data, there is a single bit '0' as the > start bit, then the 8 bits of data LSB first, then a '1' stop bit. That > can be immediately followed by another start bit if more data is ready > to be sent, else the output remains at '1' until more data is ready to > be sent. Each bit should be 1/19200 seconds or approximately 52uS, but > that does not need to be exact; a few percent difference is tolerable. > > There should be an RS232 interface chip between the FPGA and your serial > cable.
Reply by Duane Clark June 28, 20062006-06-28
Vivek Menon wrote:
> New problem: > When I send the 8-bit test data like for eg.X"31", it should appear on > the screen as "01".However this is not taking place. The terminal has > baud rate 19200, 8 data bits, 1 stop bit and no flow control. > what do I have to specify as start and stop bits?? Moreover I am using > the files obtained from Heron Engg...IF anyone has worked on this,
I don't know what Heron Engg is. But X"31" will display as "1" not "01". Have you simulated it and seen what the output looks like? The output should be high when not sending data, there is a single bit '0' as the start bit, then the 8 bits of data LSB first, then a '1' stop bit. That can be immediately followed by another start bit if more data is ready to be sent, else the output remains at '1' until more data is ready to be sent. Each bit should be 1/19200 seconds or approximately 52uS, but that does not need to be exact; a few percent difference is tolerable. There should be an RS232 interface chip between the FPGA and your serial cable.
Reply by Vivek Menon June 28, 20062006-06-28
New problem:
When I send the 8-bit test data like for eg.X"31", it should appear on
the screen as "01".However this is not taking place. The terminal has
baud rate 19200, 8 data bits, 1 stop bit and no flow control.
what do I have to specify as start and stop bits?? Moreover I am using
the files obtained from Heron Engg...IF anyone has worked on this,
lemme know.
Thanks,
Vivek


Vivek Menon wrote:
> 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.
Reply by Vivek Menon June 28, 20062006-06-28
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.
Reply by Duane Clark June 27, 20062006-06-27
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.
Reply by Vivek Menon June 27, 20062006-06-27
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.
Reply by Vivek Menon June 27, 20062006-06-27
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.
Reply by Duane Clark June 27, 20062006-06-27
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.
Reply by Vivek Menon June 27, 20062006-06-27
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