Jump to content
  • 0

XADC vivado simulation


Newbiee

Question

I just found out that we can auto generate testbench using the 

tclapp::xilinx::designutils::write_ip_integrator_testbench -addToProject

I did successfully.

my block diagram is here

image.png.5429375658998f8d873cd8a67f6e2a66.png

But I have the  input given in form of analog sim file and its included in the simulation sources, but I see something like this 

 

 

image.thumb.png.863528978e39bf07243964ba9829813c.png

 

any inputs is appreciated.

 

 

Thanks.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Hi @jpeyron,

 

I just succeeded partly but still not sure its working right. I have attached the tb here. 

I can see the clock running now. But the eoc that is automatically sending high signal is not seen.. (i have seen ILA debugger that without actually giving inpts to vn vp there are eoc automatically coming out after equal interval, assuming the same here).

image.png.48ea7c20f399376b16eda9426a2c9224.png

XADC_test_tb.vhd

design_1_wrapper.vhd

Link to comment
Share on other sites

Hi @jpeyron ,

 

Here is my another attempt. 

library IEEE;
use ieee.numeric_std.all;
use IEEE.STD_LOGIC_1164.ALL;
use std.textio.all;

entity test_design_1 is 
end test_design_1;


architecture TB of test_design_1 is

component design_1 is
port (
  dclk_in : in STD_LOGIC;
  eoc_out : out STD_LOGIC;
  vn_in : in STD_LOGIC;
  vp_in : in STD_LOGIC
);
end component design_1;

signal dclk_in : STD_LOGIC;
signal eoc_out : STD_LOGIC;
signal vn_in : STD_LOGIC;
signal vp_in : STD_LOGIC;    
begin
DUT: component design_1 port map (
        dclk_in => dclk_in,
        eoc_out => eoc_out,
        vn_in => vn_in,
        vp_in => vp_in
        );    
process
variable value_SPACE : character;
variable read_col_from_input_buf : line;
variable value_TIME, value_VP, value_VN : integer;
file input_buf : text;

begin 
    file_open(input_buf, "design.txt", read_mode);
          while not endfile(input_buf) loop
            readline(input_buf, read_col_from_input_buf);
            read(read_col_from_input_buf, value_TIME);
            read(read_col_from_input_buf, value_SPACE);           -- read in the space character
            read(read_col_from_input_buf, value_VP);
            read(read_col_from_input_buf, value_SPACE);           -- read in the space character
            read(read_col_from_input_buf, value_VN); 
            dclk_in <= std_logic_vector(to_unsigned(value_TIME, dclk_in'LENGTH));
            vn_in <= std_logic_vector(to_unsigned(value_VN, vn_in'LENGTH));
            vp_in <= std_logic_vector(to_unsigned(value_VP, vp_in'LENGTH));
          end loop;
          end process;
end TB;

For the same block design but without the input for den just using eoc as output. Kindly help me.

Its been a while but I am still stuck at this spot.

Thanks in advance.

Link to comment
Share on other sites

Hi @Newbiee,

I do not have a lot of experience using the event driven mode in the XADC or the corresponding  XADC testbench. I do know that you can use the XADC IP example provided by xilinx. You'll need to highlight the XADC IP and right click on it, then select open ip example design. The example has a testbench as well.

thank you,

Jon

 

XADC_example_1.jpg

XADC_example_2.jpg

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...