• 0
Niranjan

board to board (ZC706 to ZC706) communication

Question

Hello sir,

I want to do board to board (ZC706 to Zc706 FPGA) communication through PMOD USBUART board. I have read some stuff available on internet but not getting exact method how to do the same. will you please help me?

1. Can i do communication? If yes, can you please share some code or material related to that so that it will help me.

Thanks.

Niranjan Nimgaonkar

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Hi @Niranjan,

You should be able to use 2  Pmod USBUART as  communication between two ZC706 . You would use the Pmod Ports along with something like a micro usb to micro usb . In the block design use the Uartlite IP Core  or the second UART in the ZYNQ processor and make that UART bus external. You will need to constrain the UART pins in the wrapper in an xdc file.  After you generate a bitstream and launch SDK here is a polled SDK example that should be a good reference. 

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

@jpeyron

Use 2 Pmod USBYART modules to interface two FPGA boards?

Am I missing something here?  If you want to connect a PC to your FPGA board these might be fine (  your PC has a USB Controller chip) These PMODs use the FT232R which is a downstream USB device. Connecting two downstream devices through a USB cable is not a good idea.

Other thoughts:

Make sure that your FPGA PMOD supports 3.3V logic standards ( I haven't checked for the ZC706 board ).

If you want to connect two FPGA boards using a UART-like interface why not just use 3 wires ?

( TxAout --> RxBin, TxBout --> RxAin, GND )

You can probably do this using flying wires ( 6" or less ) and have almost any baud rate you desire.

If your boards are farther apart or you want to avoid interference issues you moght try to find a few cheap TTL-RS485 level converter modules.

Check out my Differential PMOD Challenge  in the Project Vault for some ideas.

To All: USB is NOT a peer-peer interface.

[Edit] I should have mentioned that since you are using the PMODs you will also be using the PL. I haven't looked for your device but it may be possible to route the ARM UART though the PL and not have to do any UART HDL design work. By far the quickest and easiest ( for me ) is to implement UARTs in the PL and just wire up the interface. Digilent makes PMOD cables to make the setup more mechanically stable.

Edited by zygot

Share this post


Link to post
Share on other sites
  • 0

Hi @Niranjan,

I agree with @zygot that there is better ways to accomplish communication between the two boards. 

1) Can you be more specific on your project needs and limitations.  

               a) What data rate are you looking to do between the two boards.

                b) What other peripherals are you using

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Just to be clear... what I'm saying is that connecting two USBUART PMODs together with a USB cable is a really BAD, BAD idea!

Share this post


Link to post
Share on other sites
  • 0

Hello all,

Some data will be generated in PS of one Board and it has to be transferred to PS as well as Pl of other board. It will be approx. of 10 to 20 bytes. Since the ethernet interface we are already using in this for other data transfer, i need to have some other method (like uart). 

Share this post


Link to post
Share on other sites
  • 0

@Niranjan

Well you say how large a chunk of data is but not how often you want to transfer a chunk of data. Assuming that your idea of a UART will suffice in performance I can only say what I'd do. The simplest approach involving the least effort would be to route an unused PS UART through the PL on both boards and connect the TX, RX lines using a PMOD cable. You might be able to use the control signals as well though I doubt that this is necessary. This approach requires no HDL whatsoever.

You will have to make the proper constraints assignments and provide for the new PL GPIO in the board design schematic.

As to how you do that... that's part of your workload...

There's also the CAN interface though you might have to provide your own PHY (check your board to see if it's already there). I know of at least one regular post submitter who would go that route.

Pretend that you're hearing this in the voice of Sir Alec: "Use the can Luke! Use the can!" He'd probably be saying "Use the Loo" but we'd know what he means. If you want advice on using CAN post a question here and you'll likely get a reply form that particular contributor.

Edited by zygot

Share this post


Link to post
Share on other sites
  • 0

Hello @zygot,

I have done the same thing i.e routing uart0 of zynq PS through pmod pins (tx,rx,and gnd).

Transmitter system :- 

I am using zc706 boards and want to do communication between them using uart0 of zynq PS. As shown in snapshot, i have taken tx and rx pin of uart0 of system 1 and assigned it to pmod pins (aj21 and ak21) . I ran the simple code of hello world. Instead of hello world i send the characters "ABC" and observed the output of tx pin on ILA as well as osciloscope. It is correct. I have attached snapshot to this post. 

 

Receiver system :-

In the same i made design for receiver system just cross connected wires tx to rx and rx to tx and assigned pmod pins on board 2. But i am not getting any output on those pmod pin(rx). While running programme on receiver system, I triggered ILA for rx pin i.e whenever it receives any data on rx pin , ila wil get triggered and we wil see the output. But ILA is not at all triggered. 

 

ILA clock- 50 MHz (fclok_out0) form zynq ps.

1. what must be the issue?

 

uart_tx.JPG

ABC.JPG

Share this post


Link to post
Share on other sites
  • 0

@Niranjan

It seems that you spent the time to figure this out ( I failed to mention that you needed to swap pin assignments for the two boards if you use a straight cable... ).

When things don't produce the expected results the first thing that I do is check the post bit generation pin report to confirm that all of the new pin assignments are indeed correct**. I'm not completely understanding your terminology.... a UART is a full duplex interface and you seem to use transmitter and receiver as references to the boards in your system... but if you're seeing the Tx data on one board's PMOD pin then you likely have the PS pin mux set up correctly. I always use the devide and conquer approach to debugging, I'd try to confirm that one board can talk to a known good UART or itself as a first step.

I always convert the board diagram into HDL and use a wrapper to instantiate that into my toplevel design source code so you might have to verify that the Uart GPIO direction assignments are correct.

I don't see any glaring issue with what you've already done from reading your last post.

** It's a good habit to check the pin report every time you assign IO pins new functionality.

Edited by zygot

Share this post


Link to post
Share on other sites
  • 0

hello @zygot,

I have checked everything in my code. Everything is correct. But i am not getting output on rx pin. What should i do now? 

How can i debug the code from now?

 

Share this post


Link to post
Share on other sites
  • 0
11 hours ago, Niranjan said:

Everything is correct

Welcome to debugging, where things get interesting and your work grades your design effort. Hopefully, you don't have too much confidence in any such assertions like the one above.

I find myself in your position more often than I'd like to admit. Sometimes it turns out to be something completely unexpected... usually it ends with a slap on the forehead and DOH! You idiot!... Fortunately, we're working in the PL so there are options, Hopefully you have a few spare IO pins. Just as a sanity check I'd bring out the TxD and RxD internal signals to new GPIO that I'd name dbg_xxx. These can be observed wiht a scope or since I always have a few TTL USB UART cables or modules lying around try to loop back communication to a second COM port in my PC. I'd certainly try getting the PC to talk to one of your boards directly through your current pin assignments.Pay careful attention to signal directionality and be sure to avoid two sources driving any pins which could be easy to do. I might use a mux in the PL controlled by a physical switch to help with that.  I never ask myself "DO I have to draw you a picture?" because usually the answer is yes... Your brain might be wired differently.

Have you verified that the current signal IO standards are correct? It might not hurt to revisit the Zynq documentation for moving PS UART pins to the PL... this isn't always totally straightforward.

[edit] Oh, and I forgot to mention that when things get really confusing I plod through all of the Synthesis and P&R messages. Sometimes Vivado and I aren't understanding each other the way that I assume we do. If I were smarter, I'd probably do this step after each bitstream production... but I want to keep moving...

Edited by zygot

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now