• 0

Arty S7 to A7, are positive/negative PMOD pins swapped?


Go to solution Solved by okonomiyonda,

Question

I recently moved my HDMI project from S7 to A7, and I am getting implementation warnings leading to bitstream errors.

On the S7, I had to following setup

// HDMI notes: we're using pmod JA.
// for the S7:
// 	top row is N14, M14, L18, L17
// 	bot row is N18, M18, M17, M16
// 	so TMDS1 is {L18, L17} = {hdmi_out_n[1], hdmi_out_p[1]} = green
// 	so TMDS0 is {N14, M14} = {hdmi_out_n[0], hdmi_out_p[0]} = blue
// 	so TMDS2 is {M17, M16} = {hdmi_out_n[2], hdmi_out_p[2]} = red
// 	so CLOCK is {N18, M18} = {hdmi_out_n[3], hdmi_out_p[3]}

where my constraints file has

## PMOD Header JA
set_property -dict {PACKAGE_PIN L17 IOSTANDARD TMDS_33} [get_ports {hdmi_out_p[1]}]
set_property -dict {PACKAGE_PIN L18 IOSTANDARD TMDS_33} [get_ports {hdmi_out_n[1]}]
set_property -dict {PACKAGE_PIN M14 IOSTANDARD TMDS_33} [get_ports {hdmi_out_p[0]}]
set_property -dict {PACKAGE_PIN N14 IOSTANDARD TMDS_33} [get_ports {hdmi_out_n[0]}]
set_property -dict {PACKAGE_PIN M16 IOSTANDARD TMDS_33} [get_ports {hdmi_out_p[2]}]
set_property -dict {PACKAGE_PIN M17 IOSTANDARD TMDS_33} [get_ports {hdmi_out_n[2]}]
set_property -dict {PACKAGE_PIN M18 IOSTANDARD TMDS_33} [get_ports {hdmi_out_p[3]}]
set_property -dict {PACKAGE_PIN N18 IOSTANDARD TMDS_33} [get_ports {hdmi_out_n[3]}]

This works great on S7. The problem comes in when trying to use my HDMI PMOD with my new Arty A7 board.  I looked up the PMOD pins, and got

// for the A7:
// 	top row is D12, A11, B11, G13
// 	bot row is K16, A18, B18, D13
// 	so TMDS1 is {B11, G13} = {hdmi_out_n[1], hdmi_out_p[1]} = green
// 	so TMDS0 is {D12, A11} = {hdmi_out_n[0], hdmi_out_p[0]} = blue
// 	so TMDS2 is {B18, D13} = {hdmi_out_n[2], hdmi_out_p[2]} = red
// 	so CLOCK is {K16, A18} = {hdmi_out_n[3], hdmi_out_p[3]}

and my constraints look like this

set_property -dict { PACKAGE_PIN G13   IOSTANDARD TMDS_33 } [get_ports { hdmi_out_p[1] }]; #IO_0_15 Sch=ja[1]
set_property -dict { PACKAGE_PIN B11   IOSTANDARD TMDS_33 } [get_ports { hdmi_out_n[1] }]; #IO_L4P_T0_15 Sch=ja[2]
set_property -dict { PACKAGE_PIN A11   IOSTANDARD TMDS_33 } [get_ports { hdmi_out_p[0] }]; #IO_L4N_T0_15 Sch=ja[3]
set_property -dict { PACKAGE_PIN D12   IOSTANDARD TMDS_33 } [get_ports { hdmi_out_n[0] }]; #IO_L6P_T0_15 Sch=ja[4]
set_property -dict { PACKAGE_PIN D13   IOSTANDARD TMDS_33 } [get_ports { hdmi_out_p[2] }]; #IO_L6N_T0_VREF_15 Sch=ja[7]
set_property -dict { PACKAGE_PIN B18   IOSTANDARD TMDS_33 } [get_ports { hdmi_out_n[2] }]; #IO_L10P_T1_AD11P_15 Sch=ja[8]
set_property -dict { PACKAGE_PIN A18   IOSTANDARD TMDS_33 } [get_ports { hdmi_out_p[3] }]; #IO_L10N_T1_AD11N_15 Sch=ja[9]
set_property -dict { PACKAGE_PIN K16   IOSTANDARD TMDS_33 } [get_ports { hdmi_out_n[3] }]; #IO_25_15 Sch=ja[10]

So as far as I can tell, I made sure that the same JA pins map to what the HDMI PMOD expects. All the RTL code is the same. But now I get these errors

Quote

[Vivado 12-1411] Cannot set LOC property of ports, Site IOB_X0Y149 is not part of a diff pair

[Vivado 12-1411] Cannot set LOC property of ports, the negative port (N-side) 'hdmi_out_n[1]' of a differential pair cannot be placed on a positive package pin 'B11' (IOBM)

[Vivado 12-1411] Cannot set LOC property of ports, the positive port (P-side) 'hdmi_out_p[0]' of a differential pair cannot be placed on a negative package pin 'A11' (IOBS)

[Vivado 12-1411] Cannot set LOC property of ports, the negative port (N-side) 'hdmi_out_n[0]' of a differential pair cannot be placed on a positive package pin 'D12' (IOBM)

[Vivado 12-1411] Cannot set LOC property of ports, the positive port (P-side) 'hdmi_out_p[2]' of a differential pair cannot be placed on a negative package pin 'D13' (IOBS)

[Vivado 12-1411] Cannot set LOC property of ports, the negative port (N-side) 'hdmi_out_n[2]' of a differential pair cannot be placed on a positive package pin 'B18' (IOBM)

[Vivado 12-1411] Cannot set LOC property of ports, the positive port (P-side) 'hdmi_out_p[3]' of a differential pair cannot be placed on a negative package pin 'A18' (IOBS)

[Vivado 12-1411] Cannot set LOC property of ports, Site IOB_X0Y100 is not part of a diff pair

 

Not sure if this is one error causing another, or two different errors. First of all, it seems like the PMOD negative and positive pins are somehow swapped. Or at least that's how I am interpreting ”the positive port (P-side) of a differential pair cannot be placed on a negative package pin”. The other mystery is site IOB_X0Y149 not being part of a differential pair. Any help is appreciated, since this is my first foray into worrying about pin polarity

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
  • Solution

new hypothesis. I'm not great with analog electronics, but decided to take a look at the schematic anyway

https://reference.digilentinc.com/_media/reference/programmable-logic/arty-a7/arty_a7_sch.pdf

Assuming the bit at the top is the PMOD headers, I notice that the JA and JD pins are labeled

{JA1, JA2, JA3, JA4, JA7, JA8, JA9, JA10}

{JD1, JD2, JD3, JD4, JD7, JD8, JD9, JD10}

But the B and C pins have positive and negative appended to their names

{JB1_P, JB1_N, JB2_P, JB2_N, JB3_P, JB3_N, JB4_P, JB4_N}

{JC1_P, JC1_N, JC2_P, JC2_N, JC3_P, JC3_N, JC4_P, JC4_N}

I am probably reading too much into this, but I wonder if this means JA isn't usable with TMDS on the A7. Aarrggh, if I look at the S7 schematics, it seems like its JA and JB that are compatible with P/N pairs. So maybe this is my problem, and switching to JB is all I need to do?

Link to post
Share on other sites
  • 0

Looking at this a little closer, it seems some boards have positive and negative swapped because of PCB routing considerations. If this is what's going on, what is the best way to deal with this for the HDMI data and clock? I currently have

	OBUFDS OBUFDS_red  (.I(TMDS_shift_red  [0]), .O(hdmi_out_p[2]), .OB(hdmi_out_n[2]));
	OBUFDS OBUFDS_green(.I(TMDS_shift_green[0]), .O(hdmi_out_p[1]), .OB(hdmi_out_n[1]));
	OBUFDS OBUFDS_blue (.I(TMDS_shift_blue [0]), .O(hdmi_out_p[0]), .OB(hdmi_out_n[0]));
	OBUFDS OBUFDS_clock(.I(clock_in_25MHz_pix),  .O(hdmi_out_p[3]), .OB(hdmi_out_n[3]));

So it would seem Vivado has some knowledge that O is meant to hook up to a positive pin and OB is meant to hook up to a negative pin. I almost wonder if I could swap the pin pairs in the constraint files, and invert the outputs from OBUFDS so the right signals still go to the right pins. What's the best way to do this, or is it a terrible idea?

Edited by okonomiyonda
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