UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer houssem1992
Observer
9,122 Views
Registered: ‎06-28-2015

Undifined values by Simuation in vivado.

Jump to solution

hi ,

 

I write  a testbensch for a created  IP block ( FIR filter ) .

 

i receive in all input and output signals an undifined value !  Please i need help .

 

the testbensch is written  in vhdl (see below ):

 

Unbenannt.jpg

 

----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 06.08.2015 22:24:23
-- Design Name:
-- Module Name: testbench - Behavioral
-- Project Name:
-- Target Devices:
-- Tool Versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------


LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.numeric_std.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx leaf cells in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity testbench is
--  Port ( );
end testbench;

architecture Behavioral of testbench is

component design_1 is
  port (
    S_AXIS_tdata : in STD_LOGIC_VECTOR ( 31 downto 0 );
    S_AXIS_tstrb : in STD_LOGIC_VECTOR ( 3 downto 0 );
    S_AXIS_tlast : in STD_LOGIC;
    S_AXIS_tvalid : in STD_LOGIC;
    S_AXIS_tready : out STD_LOGIC;
    M_AXIS_tdata : out STD_LOGIC_VECTOR ( 31 downto 0 );
    M_AXIS_tstrb : out STD_LOGIC_VECTOR ( 3 downto 0 );
    M_AXIS_tlast : out STD_LOGIC;
    M_AXIS_tvalid : out STD_LOGIC;
    M_AXIS_tready : in STD_LOGIC;
    s_axis_aclk : in STD_LOGIC;
    s_axis_aresetn : in STD_LOGIC
  );
  end component design_1;
 
  ----------------------------------------------------------------------------------------
  -- Signal declaration
 
 signal  CLK : std_logic :='0';
 signal  M_AXIS_tdata : STD_LOGIC_VECTOR (31 downto 0):= (others => '0');
 signal  S_AXIS_tdata :  STD_LOGIC_VECTOR (31 downto 0):= (others => '0');
 signal  S_AXIS_tstrb :STD_LOGIC_VECTOR   (3 downto 0):= (others => '0');
 signal  S_AXIS_tlast : std_logic :='0';
 signal  S_AXIS_tvalid : std_logic :='0';
 signal  S_AXIS_tready : std_logic :='0';
 signal  M_AXIS_tstrb :  STD_LOGIC_VECTOR (3 downto 0):= (others => '0');
 signal  M_AXIS_tlast : std_logic :='0';
 signal  M_AXIS_tvalid : std_logic :='0';
 signal  M_AXIS_tready : std_logic :='0';
 signal  s_axis_aresetn : std_logic :='0';
 signal  m_axis_aresetn : std_logic :='0';
 
 constant Clk_period : time := 10 ns;

begin

U1 : design_1 port map (
  S_AXIS_tdata => S_AXIS_tdata,
   S_AXIS_tstrb => S_AXIS_tstrb,
   S_AXIS_tlast => S_AXIS_tlast,
   S_AXIS_tvalid => S_AXIS_tvalid,
   S_AXIS_tready => S_AXIS_tready,
   M_AXIS_tdata => M_AXIS_tdata,
   M_AXIS_tstrb => M_AXIS_tstrb,
   M_AXIS_tlast=> M_AXIS_tlast,
   M_AXIS_tvalid => M_AXIS_tvalid,
   M_AXIS_tready => M_AXIS_tready,
   s_axis_aclk => CLK,
  s_axis_aresetn => s_axis_aresetn
);
 -- Clock process definitions
  Clk_process :process
  begin
       Clk <= '0';
       wait for Clk_period/2;
       Clk <= '1';
       wait for Clk_period/2;
  end process;
 
 
     -- Stimulus process
  stim_proc: process
  begin       
     wait for Clk_period*2;
       Xin <=X"A1278943" ; wait for clk_period*1;
       Xin <=X"A1232306" ; wait for clk_period*1;
       Xin <=X"1245A123" ; wait for clk_period*1;

      
     wait;
  end process;

 

end Behavioral;

 

 

 

thanks

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
16,929 Views
Registered: ‎10-24-2013

Re: Undifined values by Simuation in vivado.

Jump to solution

Hi,

 

From the sources window, select the correct topr file to get the things working fine.

 

Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.

View solution in original post

Capture.JPG
0 Kudos
6 Replies
Professor
Professor
9,021 Views
Registered: ‎08-14-2007

Re: Undifined values by Simuation in vivado.

Jump to solution

It looks like you are starting the simulation with the "design_1" entity as the top level rather than your test bench.  This usually occurs when you select the wrong source when starting the simulator from the GUI.

-- Gabor
0 Kudos
Xilinx Employee
Xilinx Employee
16,930 Views
Registered: ‎10-24-2013

Re: Undifined values by Simuation in vivado.

Jump to solution

Hi,

 

From the sources window, select the correct topr file to get the things working fine.

 

Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.

View solution in original post

Capture.JPG
0 Kudos
Observer houssem1992
Observer
8,928 Views
Registered: ‎06-28-2015

Re: Undifined values by Simuation in vivado.

Jump to solution

thank you   but when i set select my testbensch as Top , i receive this error message :

 

Unbenannt.png

 

0 Kudos
Xilinx Employee
Xilinx Employee
8,920 Views
Registered: ‎05-07-2015

Re: Undifined values by Simuation in vivado.

Jump to solution

Hi,

This error sometimes might come due to  language construct usage related errors Please check your test bench thoroughly for things like incomplete/wrong port-mapping etc.

General advice:

It is advised to use "wait for Clk_period" only in Clock generation process.

IN the stim_proc:
Use  "WAIT UNTIL rising_edge(Clk)"  instead of "wait for Clk_period".

 This practice ensures anticipated simulation results.


Thanks
Bharath
--------------------------------------------------​--------------------------------------------
Please mark the Answer as "Accept as solution" if information provided addresses your query/concern.
Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
Professor
Professor
8,906 Views
Registered: ‎08-14-2007

Re: Undifined values by Simuation in vivado.

Jump to solution

Looking at the hierarchy showing in the image, I see an entity called "test" where I would have expected one called "testbench" to match the code in the first post.  If you have not changed the entity name of the testbench, this seems to say that you have some other (possibly historical) file attached to the project rather than the testbench you are trying to use.  Make sure that the testbench you posted is actually included in the project.  You can double-click on the entity "test" in the hierarchy pane to open it in a text editor and see what is in it.

 

Also in the image I see an error:

 

s_axis_aresetn is not declared

 

However it is clearly declared in the code from the first post.  This seems to confirm that some other source is being used in the actual project.

-- Gabor
0 Kudos
Observer houssem1992
Observer
8,851 Views
Registered: ‎06-28-2015

Re: Undifined values by Simuation in vivado.

Jump to solution
thanks . it works now .
0 Kudos