• 0

Question

Hi

I have tried to execute the xadc demo code but keep getting the same error every time.Due to this error I'm unable to generate the bit file. 

Please help me solve this issue.

Regards

 

Capture.JPG

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

@Manas,

Your problem lies between your top level file and your .xdc file.  Basically, your top level file is trying to use pins that are not defined in your xadc file.  As a result, Xilinx is finding these pins at your top level undefined, and it is causing an error when you try to build.

So basically, the way to use XDC files is ...

  1. Download the master XDC file for your board from among the board support files.
  2. Comment out any pins you will not be using ('#' starts a comment, the comment continues to the end of the line)
  3. Rename any pins from your top level design file in the XDC file whose names don't match, so that the pin names do match between XDC and your top level.
  4. For the most part, you can name things in your top level to be anything you want--as long as you then match the names in the XDC file.
  5. (It is the XDC file that translates the names within your project to pins on the chip)
  6. Now, use that modified XDC file in your project.

Dan

Share this post


Link to post
Share on other sites
  • 0

Hi

Thanks for addressing the error. Now bit file is generated but when I fed input of 1V sine wave to the A18, the output is not shown in the  segment display nor the leds are blinking. 

Please help me.

Thanks.

Share this post


Link to post
Share on other sites
  • 0
On 10/24/2016 at 1:12 AM, Manas said:

I fed input of 1V sine wave to the A18

Hey Manas,

I think you don't have the correct analog channel. The demo is set up to run on the channel AD11 which would be pin column 4  on the XADC header, No lights or display is also weird since a floating value should not pass a straight zero. Does your seven segment display light up at all? (showing all zeros)

-Sam

Edited by sLowe
spelling errors

Share this post


Link to post
Share on other sites
  • 0

Hi Sam

Yes zeros light up when the board is switched on. But even after feeding the sine wave of 1V and providing 3.3V and grounding the source and GND ports , there is no response from the Nexys 4 artix 7 board. Is it wrong to feed the input at only one terminal i.e AD11P? Please help.

Thanks

Manas

Share this post


Link to post
Share on other sites
  • 0

Its ok to use them as single ended pins but AD11N needs to be wired to ground. But it seems like your not getting your signal tied to the xadc core. In your xdc make sure your uncommented xadc lines match the ones below. 

set_property -dict { PACKAGE_PIN A18   IOSTANDARD LVCMOS33     } [get_ports { vauxn11 }]; #IO_L10N_T1_AD11N_15 Sch=xa_n[4]
set_property -dict { PACKAGE_PIN B18   IOSTANDARD LVCMOS33     } [get_ports { vauxp11 }]; #IO_L10P_T1_AD11P_15 Sch=xa_p[4]

A quick check to see if the rest of the project is working is to make the "data" wire a reg and set it to a value not zero. This should cause the seven segment and leds to display something else upon startup. 

Ill try to build the project here shortly

-Sam

Share this post


Link to post
Share on other sites
  • 0

Hi Sam,

I have made the changes you suggested. When 1V amplitude sine sine wave fed to AD11P, the output in 7-segment display is "00.12". I have fed the sine wave using analog discovery kit. I was expecting output to be as 1V. I also tried changing the frequency of the wave but I keep getting output less than 1V.

Please suggest where to make changes to get the result.

Thanks

Manas 

Share this post


Link to post
Share on other sites
  • 0

Hey I think you are really close. Try using this .xdc in your project. My project is working now with this xdc. If you are getting .12 that seems to be the floating value. The project uses switches to select the channel. ad11 is connected to the display when sw0 and sw1 are both up. 

I will also reupload the project to the wiki. Thanks for the catch!

-Sam

# Clock signal
#Bank = 35, Pin name = IO_L12P_T1_MRCC_35,					Sch name = CLK100MHZ
set_property PACKAGE_PIN E3 [get_ports CLK100MHZ]							
	set_property IOSTANDARD LVCMOS33 [get_ports CLK100MHZ]
	create_clock -add -name sys_clk_pin -period 10.00 -waveform {0 5} [get_ports CLK100MHZ]
 
# Switches
#Bank = 34, Pin name = IO_L21P_T3_DQS_34,					Sch name = SW0
set_property PACKAGE_PIN U9 [get_ports {sw[0]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {sw[0]}]
#Bank = 34, Pin name = IO_25_34,							Sch name = SW1
set_property PACKAGE_PIN U8 [get_ports {sw[1]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {sw[1]}]

# LEDs
#Bank = 34, Pin name = IO_L24N_T3_34,						Sch name = LED0
set_property PACKAGE_PIN T8 [get_ports {led[0]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[0]}]
#Bank = 34, Pin name = IO_L21N_T3_DQS_34,					Sch name = LED1
set_property PACKAGE_PIN V9 [get_ports {led[1]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[1]}]
#Bank = 34, Pin name = IO_L24P_T3_34,						Sch name = LED2
set_property PACKAGE_PIN R8 [get_ports {led[2]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[2]}]
#Bank = 34, Pin name = IO_L23N_T3_34,						Sch name = LED3
set_property PACKAGE_PIN T6 [get_ports {led[3]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[3]}]
#Bank = 34, Pin name = IO_L12P_T1_MRCC_34,					Sch name = LED4
set_property PACKAGE_PIN T5 [get_ports {led[4]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[4]}]
#Bank = 34, Pin name = IO_L12N_T1_MRCC_34,					Sch	name = LED5
set_property PACKAGE_PIN T4 [get_ports {led[5]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[5]}]
#Bank = 34, Pin name = IO_L22P_T3_34,						Sch name = LED6
set_property PACKAGE_PIN U7 [get_ports {led[6]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[6]}]
#Bank = 34, Pin name = IO_L22N_T3_34,						Sch name = LED7
set_property PACKAGE_PIN U6 [get_ports {led[7]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[7]}]
#Bank = 34, Pin name = IO_L10N_T1_34,						Sch name = LED8
set_property PACKAGE_PIN V4 [get_ports {led[8]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[8]}]
#Bank = 34, Pin name = IO_L8N_T1_34,						Sch name = LED9
set_property PACKAGE_PIN U3 [get_ports {led[9]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[9]}]
#Bank = 34, Pin name = IO_L7N_T1_34,						Sch name = LED10
set_property PACKAGE_PIN V1 [get_ports {led[10]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[10]}]
#Bank = 34, Pin name = IO_L17P_T2_34,						Sch name = LED11
set_property PACKAGE_PIN R1 [get_ports {led[11]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[11]}]
#Bank = 34, Pin name = IO_L13N_T2_MRCC_34,					Sch name = LED12
set_property PACKAGE_PIN P5 [get_ports {led[12]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[12]}]
#Bank = 34, Pin name = IO_L7P_T1_34,						Sch name = LED13
set_property PACKAGE_PIN U1 [get_ports {led[13]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[13]}]
#Bank = 34, Pin name = IO_L15N_T2_DQS_34,					Sch name = LED14
set_property PACKAGE_PIN R2 [get_ports {led[14]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[14]}]
#Bank = 34, Pin name = IO_L15P_T2_DQS_34,					Sch name = LED15
set_property PACKAGE_PIN P2 [get_ports {led[15]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {led[15]}]
    
#7 segment display
#Bank = 34, Pin name = IO_L2N_T0_34,						Sch name = CA
set_property PACKAGE_PIN L3 [get_ports {seg[0]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {seg[0]}]
#Bank = 34, Pin name = IO_L3N_T0_DQS_34,					Sch name = CB
set_property PACKAGE_PIN N1 [get_ports {seg[1]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {seg[1]}]
#Bank = 34, Pin name = IO_L6N_T0_VREF_34,					Sch name = CC
set_property PACKAGE_PIN L5 [get_ports {seg[2]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {seg[2]}]
#Bank = 34, Pin name = IO_L5N_T0_34,						Sch name = CD
set_property PACKAGE_PIN L4 [get_ports {seg[3]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {seg[3]}]
#Bank = 34, Pin name = IO_L2P_T0_34,						Sch name = CE
set_property PACKAGE_PIN K3 [get_ports {seg[4]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {seg[4]}]
#Bank = 34, Pin name = IO_L4N_T0_34,						Sch name = CF
set_property PACKAGE_PIN M2 [get_ports {seg[5]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {seg[5]}]
#Bank = 34, Pin name = IO_L6P_T0_34,						Sch name = CG
set_property PACKAGE_PIN L6 [get_ports {seg[6]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {seg[6]}]

#Bank = 34, Pin name = IO_L16P_T2_34,						Sch name = DP
set_property PACKAGE_PIN M4 [get_ports dp]							
	set_property IOSTANDARD LVCMOS33 [get_ports dp]

#Bank = 34, Pin name = IO_L18N_T2_34,						Sch name = AN0
set_property PACKAGE_PIN N6 [get_ports {an[0]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {an[0]}]
#Bank = 34, Pin name = IO_L18P_T2_34,						Sch name = AN1
set_property PACKAGE_PIN M6 [get_ports {an[1]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {an[1]}]
#Bank = 34, Pin name = IO_L4P_T0_34,						Sch name = AN2
set_property PACKAGE_PIN M3 [get_ports {an[2]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {an[2]}]
#Bank = 34, Pin name = IO_L13_T2_MRCC_34,					Sch name = AN3
set_property PACKAGE_PIN N5 [get_ports {an[3]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {an[3]}]
#Bank = 34, Pin name = IO_L3P_T0_DQS_34,					Sch name = AN4
set_property PACKAGE_PIN N2 [get_ports {an[4]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {an[4]}]
#Bank = 34, Pin name = IO_L16N_T2_34,						Sch name = AN5
set_property PACKAGE_PIN N4 [get_ports {an[5]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {an[5]}]
#Bank = 34, Pin name = IO_L1P_T0_34,						Sch name = AN6
set_property PACKAGE_PIN L1 [get_ports {an[6]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {an[6]}]
#Bank = 34, Pin name = IO_L1N_T034,							Sch name = AN7
set_property PACKAGE_PIN M1 [get_ports {an[7]}]					
	set_property IOSTANDARD LVCMOS33 [get_ports {an[7]}]

#Pmod Header JXADC
#Bank = 15, Pin name = IO_L9P_T1_DQS_AD3P_15,				Sch name = XADC1_P -> XA1_P
set_property PACKAGE_PIN A13 [get_ports {vauxp3}]				
	set_property IOSTANDARD LVCMOS33 [get_ports {vauxp3}]
#Bank = 15, Pin name = IO_L8P_T1_AD10P_15,					Sch name = XADC2_P -> XA2_P
set_property PACKAGE_PIN A15 [get_ports {vauxp10}]				
	set_property IOSTANDARD LVCMOS33 [get_ports {vauxp10}]
#Bank = 15, Pin name = IO_L7P_T1_AD2P_15,					Sch name = XADC3_P -> XA3_P
set_property PACKAGE_PIN B16 [get_ports {vauxp2}]				
	set_property IOSTANDARD LVCMOS33 [get_ports {vauxp2}]
#Bank = 15, Pin name = IO_L10P_T1_AD11P_15,					Sch name = XADC4_P -> XA4_P
set_property PACKAGE_PIN B18 [get_ports {vauxp11}]				
	set_property IOSTANDARD LVCMOS33 [get_ports {vauxp11}]
#Bank = 15, Pin name = IO_L9N_T1_DQS_AD3N_15,				Sch name = XADC1_N -> XA1_N
set_property PACKAGE_PIN A14 [get_ports {vauxn3}]				
	set_property IOSTANDARD LVCMOS33 [get_ports {vauxn3}]
#Bank = 15, Pin name = IO_L8N_T1_AD10N_15,					Sch name = XADC2_N -> XA2_N
set_property PACKAGE_PIN A16 [get_ports {vauxn10}]				
	set_property IOSTANDARD LVCMOS33 [get_ports {vauxn10}]
#Bank = 15, Pin name = IO_L7N_T1_AD2N_15,					Sch name = XADC3_N -> XA3_N 
set_property PACKAGE_PIN B17 [get_ports {vauxn2}]				
	set_property IOSTANDARD LVCMOS33 [get_ports {vauxn2}]
#Bank = 15, Pin name = IO_L10N_T1_AD11N_15,					Sch name = XADC4_N -> XA4_N
set_property PACKAGE_PIN A18 [get_ports {vauxn11}]				
	set_property IOSTANDARD LVCMOS33 [get_ports {vauxn11}]

 

Edited by sLowe
added that I am reuploading it

Share this post


Link to post
Share on other sites
  • 0

Hi Sam

Is there a way to set up a threshold voltage to generate a alarm like in the case of onboard temperature sensor, we can access the the OT register to generate a alarm ?

Thanks

Regards

Manas

 

Share this post


Link to post
Share on other sites
  • 0

There is an alarms tab in the IP which may produce what you are looking for. 

You can set what value you want for the OT alarms and then that produces a signal coming out of the IP.

-Sam

 

 

Share this post


Link to post
Share on other sites
  • 0

Hi 

In IP catalog we can set for OT and VAUXP, using the individual register location by accessing the value using  daddr. In the same way I was thinking of setting a Voltage threshold in such a way that i can generate a warning by setting up a comparison from the reading given by the AD11P and AD11N pins.

Thanks

Regards

Manas

Share this post


Link to post
Share on other sites
  • 0

Hey Manas,

Looking at the register space in this guide on page 17

https://www.xilinx.com/support/documentation/ip_documentation/xadc_wiz/v3_0/pg091-xadc-wiz.pdf

I don't see a way to set up an alarm inside of the ip. You may have to externally read both values and subtract it on your own.

-Sam

Edited by sLowe
added page number

Share this post


Link to post
Share on other sites
  • 0

Hi Sam

The new upload of XADC demo is giving an error. The error snap is attached. Please suggest as how to correct this error. 

 Thanks 

Manas

Capture.JPG

Share this post


Link to post
Share on other sites
  • 0

This error has something to do with having different versions of Vivado. It may be a couple things. Have you tried resetting your implementation run and rebuilding? 

I forgot to actually add the github link to the wiki. I have now. It seems like it is not liking the simulation runs since I was using Vivado 2016.2 to generate the IPs. 

I would first try right clicking on the IP's and choosing regenerate output products. If your IPs are locked, you may need to take note of your IP settings and delete and re instantiate these IPs with the same settings as your project earlier. 

If you cant get this I can help you with getting a project going with your version of Vivado.

-Sam

 

Share this post


Link to post
Share on other sites
  • 0

Hi Sam

I'm not able to re instantiate the IPs with the same settings. I'm using Vivado 15.2 to regenerate the IPs. Could u please explain the the logic behind code as shown :

if(count == 20000000)begin
        
        decimal = data >> 4;
        //looks nicer if our max value is 1V instead of .999755
        if(decimal >= 4093)
        begin
            dig0 = 0;
            dig1 = 0;
            dig2 = 0;
            dig3 = 0;
            dig4 = 0;
            dig5 = 0;
            dig6 = 1;
            count = 0;
        end
        else 
        begin
            decimal = decimal * 250000;
            decimal = decimal >> 10;

I'm having difficulty understanding the last two lines of this code. Also can the decimal be not checked whether its greater than or equal to 4096?

Thanks 

Manas

Share this post


Link to post
Share on other sites
  • 0

Hi Sam

I keep getting same error as shown in attached file after generating the  XADC IP. I'm using vivado 2015.2. I have made necessary changes to the XADC IP still I'm getting the same error. Could you please help me out?

Regards

Manas

Capture.JPG

Share this post


Link to post
Share on other sites
  • 0

Hi Manas,

After generating the IP did you upgrade the IP in you design? If not to do that you select Tools -> Report -> Report IP Status menu option to generate a report and enable upgrade of the IP.

cheers,

Jon

 

Share this post


Link to post
Share on other sites
  • 0

Also I'm guessing you are getting that issue from not selecting channel 11 in the IP wizard under the channel sequencer tab. You need to make sure they are checked and under the basic tab you need to select Channel sequencer

 

Share this post


Link to post
Share on other sites
  • 0

Hi

I have found out that the binary data obtained from the VAUXP[11] can be converted to its corresponding voltage value using below equation..

Voltage = 12-bit_ADC_code/4096.

I'm interested in setting up a fixed voltage level to be compared with the data from VAUXP[11] so as to generate an external alarm. I have calculated with 0.2V and got the corresponding binary representation. I was wondering if its better to set up comparison between the XADC reading and fixed voltage level using the binary representation or the corresponding voltage value. Please help me out.

Regards

Manas 

Share this post


Link to post
Share on other sites
  • 0

Hi

Is there a way to solve this timing issue? Also when i give 0.5 V sine wave to ADXP11, i get all zeroes in the seven segment display. This problem i haven't been able to solve.

Thanks

Regard 

Manas

 

Capture.JPG

Share this post


Link to post
Share on other sites
  • 0

I would do your comparison in binary since you can use non floating point numbers. This will allow the tools to do a simple binary comparison which should be faster.

 I am pretty sure the timing error stems from the /10 %10 logic used to decipher the digits to send to the display. I didn't see the timing error as a huge issue since my eyes cant realize an error and nothing else is calculated off of those values.

 

I think you are getting zeroes because you instantiate voltage as a reg, any reading you get divided by 4096 = 0. You either need to pull some verilog trickiness to allow these decimal numbers or do what I did and only shift right 10 (/1024)  and multiplying it by 250000 gets you your  voltage = (12-bit_ADC_code/4096)*100000. This gave me the voltage in microvolts

Also your .5 sin wave should be biased at .5 V to start with. Your wave should still have a range of 0 to 1 with .5 being your virtual reference. I would expect that you would still see half of the wave(positive half) with this method though.

-Sam

Edited by sLowe
priorities changed

Share this post


Link to post
Share on other sites
  • 0

Hi Sam,

I have manually solved the math behind the conversion to get the voltage using your logic but I'm still unable to figure out the multiplication of 250000. Could you please share light on this? I took 0.2V for the calculation, 0.2V in decimal comes out to be (819)10. (819)10  = (00110110011)2.   After following your logic, I compared the voltage i got after using your logic and following the formula i.e. voltage = (12-bit_ADC_code)/4096 and it comes out be same. I

Thanks

Regards

Manas

 

Share this post


Link to post
Share on other sites
  • 0

@Manas,

Sam is trying to turn voltage = (12-bit-code)/4096 into microvolts = (1000)*(1000)*(12-bit-code)/4096, and he's trying to avoid division.  Rearranging:

1000*1000/4096 = 500*500/1024 (just by dropping common factors of two from both numerator and denominator)

Shifting right by ten is equivalent to dividing by 1024, and then he multiplies by 500*500.  Looks like it works alright.

I might be concerned personally about losing any precision in the divide by 1024 (i.e. shift right by 10), especially since it is being done before the multiply if I understand correctly--leaving you with only 2-bits of precision (did I read that right?).  Looking at the above, you might simplify it further into a shift right by 6, followed by a multiply of 15625.  To get here, all I did was cancel out any factors of two that were in both the numerator and denominator.  Then --- rearrange your order of operations, so the multiply is done first.  What makes this choice special is that 15625 can fit within an 18-bit multiplier.  Hence you can do:

A = 15625*(12-bit-voltage-code)

inside a DSP multiplier, and hence inside one clock.  The result of this multiply will be a 30-bit number.  If you ignore the bottom six bits, the 24-bit number that remains will be the number of microvolts that you are looking for.

Converting this to a decimal display might take some more work though.  ;)

Dan

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