Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
schmidtf
Posts: 31
Registered: ‎04-09-2012
0

Using kcuart_tx & kcuart_rx from KCPS3 in a Virtex-5

Hello,

 

I am using a Virtex-5 FX70T on the ML507 development board.  I downloaded the KCPS3_in_a_Virtex-5 zip file from the PicoBlaze lounge and have been attempting to use the uart_tx and uart_rx as standalone uart implementations, but I have not been successful.  I instantiate kcuart_tx and bbfifo16x8 under uart_tx and the equivalent under uart_rx.  The project synthesizes, implements, and generates correctly, with only warnings about using using the INIT attributes.  However, when I configure the Virtex-5, no signals are produced on the uart1_tx pin (one character should be transmitted per second in my implementation).  Is there something more that I need to include/change?  Or is there a more up-to-date version of the KCP uart modules for the Virtex-5?

 

Thanks,

Frank Schmidt

Xilinx Employee
chapman
Posts: 411
Registered: ‎09-05-2007
0

Re: Using kcuart_tx & kcuart_rx from KCPS3 in a Virtex-5

I have used the UART macros provided with KCPSM3 in a design that works on an ML507 board so there shouldn’t be any fundamental issues. My suggestion is to take a step back and check things as simple as your pin assignments. It’s generally best to start with a loopback design (i.e. just a ‘wire’ link from Rx pin to Tx pin) and then work up from there.

 

When using the macros then you need to make sure that the ‘en_16_x_baud’ is a synchronous enable pulse at the correct rate (some people have made the mistake of driving it with a square wave).

Ken Chapman
Principal Engineer, Xilinx UK
Regular Visitor
schmidtf
Posts: 31
Registered: ‎04-09-2012
0

Re: Using kcuart_tx & kcuart_rx from KCPS3 in a Virtex-5

Hi Ken,

 

Thank you for the quick response. I have pasted my code for the uart_tx module, as I believe I am producing the en_16_x_baud signal correctly, and I assign the tx output to pin AG20 on the Virtex-5.  This code works on a Spartan 3, but I cannot port it to the Virtex 5.  I appreciate your help.

 

Xilinx Employee
chapman
Posts: 411
Registered: ‎09-05-2007
0

Re: Using kcuart_tx & kcuart_rx from KCPS3 in a Virtex-5

It looks like you are doing everything with the ‘uart_tx’ correctly but when it comes to your 2Hz pulse generation I’m not sure how you even got your code through synthesis. You define a signal called ‘tx_count’ but never use it and yet you do use a signal called ‘tx_timer_count’ that is never defined.

 

So my guess is that you are never asking the UART to transmit anything and that’s why you are not seeing anything on pin AG20 which I’ve just checked is the correct pin on that board.

 

By the way, always be careful to provide an initial value (like zero) to an integer otherwise the default is maximum negative. I was caught by this years ago because it can take a long while to count up from there to the positive value at which you generate a first pulse.

 

I think we’re pushing the boundaries of what should be on the PicoBlaze forum here!

Ken Chapman
Principal Engineer, Xilinx UK
Regular Visitor
schmidtf
Posts: 31
Registered: ‎04-09-2012
0

Re: Using kcuart_tx & kcuart_rx from KCPS3 in a Virtex-5

Hi Ken,

 

I apologize for the errors in the above code--I did not remove commented lines correctly.  I have attached the version that does make it through synthesis below.

 

Which forum would you recommend for this question?

 

Thank you,

Frank

Xilinx Employee
chapman
Posts: 411
Registered: ‎09-05-2007
0

Re: Using kcuart_tx & kcuart_rx from KCPS3 in a Virtex-5

On the basis that we may now be back to looking at the UART macro that is supplied with PicoBlaze rather than how to define a counter in VHDL we can carry on here.  Otherwise Xilinx forums such as ‘General Technical discussion’, ‘Synthesis’ or ‘New Users Forum’ would probably be more appropriate.

 

If we assume for a now that you now have good code and it is being processed as we would expect by the tools then what else could be wrong? Your design only has two inputs and one output. So are you really connected to the 100MHz clock? What is your ‘reset’ input connected to and what is it’s polarity? You say “no signals are produced on the uart1_tx pin” but how do you actually observe that? Are you relying on a serial connection to a PC terminal or are you checking with an oscilloscope? Even if there is no activity, it is a ‘0’ or a ‘1’?

 

My suggestion is again to take a step back....

 

A simple design in which you route the ‘reset’ input to the ‘tx’ output via a clocked flip-flop. Do you see the ‘Tx’ signal change as you change the ‘reset’ input?

 

Then simplify even your test design by removing the reset from the UART transmitter (tie input Low) and remove your 2Hz counter and tie  ‘write_buffer’ permanently High. Do you see any activity at all? Do you see a continuous stream of ‘a’ characters?

 

Please take a pragmatic approach to debugging and come back to us with some results.

Ken Chapman
Principal Engineer, Xilinx UK