07-16-2013 01:34 AM
Hello friends,
I am writing a uart code for transmission in verilog. I want to transmit 64bits of data from a simple adder program. However i can transmit only 11 bits. Why am i unable to transmit all 64bits of data?
Thanks in advance.
07-16-2013 04:09 AM
Hi,
just a guess:
Your first bit is stuck at 0 and the last one is stuck at 1, isn't it?
(Startbit, 8 databits, paritybit, stopbit = 11 bits, strange coincidence)
Some more details would be helpful.
Have you done some simulations?
Have a nice synthesis
Eilert
07-16-2013 08:22 AM
Hi,
Thank you for your quick reply. I have attached the simulation image. Initially I am trying for 16 bits as shown in example. Please let me know where am i going wrong?
Thanks in advance.
07-16-2013 05:53 PM
@sumimandal085 wrote:
Hi,
Thank you for your quick reply. I have attached the simulation image. Initially I am trying for 16 bits as shown in example. Please let me know where am i going wrong?
Thanks in advance.
The image is too small to be of use, but without knowing the details, I'll guess that you're not waiting for each byte to be shifted out before loading the next byte into the transmitter.
07-16-2013 10:56 PM
Hi,
you should properly initialize your testbench, so you hjave no 'U' signals in the beginning.
Maybe using the reset input would be a good idea.
Pulling the Load input low some time might be useful too.
Then there's this CS counting Vector. (or is it a state vector(CS=Current state)
It's conting decadic and not even going back to zero.
So how should there come out more than the standard 8N1 formatted UART bits.
Maybe you should try to understand the UART code better that you are going to adapt to your needs.
Do you know how a FSM works?
Have a nice synthesis
Eilert
07-16-2013 11:01 PM
Hi,
just another question:
Do you want to create a 16 (or later64) bit UART,
or do you wan't to transmit N Bytes (N=2 to 8) of data with a standard UART?
I just recognized the "select" signal.
Should you use this for selecting one of N input bytes from your dataword?
Have a nice synthesis
Eilert
07-17-2013 09:52 PM
07-18-2013 12:50 AM
Hi,
you didn't understand the point of the question.
Do you want to transmit 2^n Bits in one (big) frame?
or
Do you want to transmit m Bytes in m 8-Bit Frames?
(Keep in mid that 160 Bits are eqal to 20 Bytes.)
Two totally different approaches!
Have a nice synthesis
Eilert
07-18-2013 06:21 AM
07-18-2013 10:00 AM
@sumimandal085 wrote:
Hi,
I want to transmit m bytes in m 32-bit frames. I want to transmit 5 32-bits.
Thanks in advance
REMEMBER that the standard UART assumes 8-bit data words. Certainly you can modify it to transmit 32-bit words, but then you need a receiver which can handle that. And if you're going into a PC, that is not possible.
07-18-2013 10:27 PM
07-19-2013 12:51 AM
Hi,
are you making fun of us?
Whenever one implements some new transmitter for a newly "invented" protocoll, a compatible receiver is needed.
So if you want to communicate with a PC your interface has to fit the interfaces used on a PC.
As for now PC standard UARTs are limited to 8 Data bits. (sometimes 7 for teletype compatibility).
Do you know about some UART used in common PCs that can be configured to use more than one byte of data per frame?
What you need to do?
Well, I would recommend to stay with the standard UART frames, to acheive maximum compatibility and be able to use existing UART IPs in the FPGA.
Then you just need to break your 512 databits into 64bytes that can easily be sent to the PC with a simple UART using the common 8N1 format.
Since you now have some 64 byte block, you might consider taking precautions for the case that your transmission looses synchronisation.
e.g. If one byte goes missing for some reason all the following bytes cause the PC to display crap.
Have a nice synthesis
Eilert