I am trying to create a simple design that reads an analog waveform from the XADC. Can some explain how exactly to do this? I'm a bit confused about how the interface works. I've read through the XADC and XADC wizard documents from Xilinx. I set up my project with the XADC wizard and created a test bench shown below. When I run the sim, it says
"Warning: The analog data file design.txt for XADC instance tb.xadc.inst was not found." I configured the XADC wizard to generate a sine wave for sim (also see below for the XADC settings that the wizard generated).The Xilinx XADC wizard document shows the analog waveform being displayed in the sim, but doesn't explain how to set that up (https://www.xilinx.com/support/documentation/ip_documentation/xadc_wiz/v3_0/pg091-xadc-wiz.pdf page 44). The simulation shows the XADC digital output always being 0. I'm not sure if it's a problem with the design.txt or the way I'm interfacing with the DRP port. I read on another forum that the enable port needs to be periodically enabled, but that doesn't really make much sense to me. My understanding is that the DRP port is for writing to the XADC internal registers that change its configuration. Is that correct? How do I need to interact with the DRP port in order for it to sample data? Clearly I'm missing something simple here.
Thanks!
module tb();
localparam T=10;
reg clk;
always begin
clk =1'b1;#(T/2);
clk =1'b0;#(T/2);
end
reg enable;
always begin
enable =1'b1;#T;
enable =1'b0;#(15*T);
end
wire data_ready;
wire [15:0] xadc_data_out;
reg [11:0] xadc_data;
wire eoc;
xadc_wiz_0 xadc (.daddr_in(),.den_in(enable),.dwe_in(),.di_in(),.busy_out(),.drdy_out(data_ready),.do_out(xadc_data_out),.dclk_in(clk),.reset_in(rst),.vp_in(),.vn_in(),.vauxp6(),.vauxn6(),.channel_out(),.eoc_out(eoc),.alarm_out(),.eos_out());
always @(posedge data_ready) begin
xadc_data <= xadc_data_out[11:0];
end
endmodule
Question
jacobfeder
I am trying to create a simple design that reads an analog waveform from the XADC. Can some explain how exactly to do this? I'm a bit confused about how the interface works. I've read through the XADC and XADC wizard documents from Xilinx. I set up my project with the XADC wizard and created a test bench shown below. When I run the sim, it says
"Warning: The analog data file design.txt for XADC instance tb.xadc.inst was not found." I configured the XADC wizard to generate a sine wave for sim (also see below for the XADC settings that the wizard generated).The Xilinx XADC wizard document shows the analog waveform being displayed in the sim, but doesn't explain how to set that up (https://www.xilinx.com/support/documentation/ip_documentation/xadc_wiz/v3_0/pg091-xadc-wiz.pdf page 44). The simulation shows the XADC digital output always being 0. I'm not sure if it's a problem with the design.txt or the way I'm interfacing with the DRP port. I read on another forum that the enable port needs to be periodically enabled, but that doesn't really make much sense to me. My understanding is that the DRP port is for writing to the XADC internal registers that change its configuration. Is that correct? How do I need to interact with the DRP port in order for it to sample data? Clearly I'm missing something simple here.
Thanks!
Link to comment
Share on other sites
14 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.