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!

Showing results for 
Search instead for 
Did you mean: 
Visitor cuhrw
Registered: ‎11-03-2015

Strange behaviour using elsif



I found very strange behaviour in the synthesis in Vivado 2015.03 vor the xc7a100tcsg324-1.


I tried to use an "elsif" statement and the result is crap.

So I changed it so an if statement which excludes the old if condition. In theory I think that should give the same result, but in the "if statement" case it works how expected and so completely different to the elsif case.


Is there something that I don't see at the moment, why there os this different behavior?


This ist the code of the process: I change the italic to the bold part (com1 to com2).


process(clk) -- write_screen
variable val_pos : integer range 0 to 255;
variable value : std_logic_vector(15 downto 0);
   if rising_edge(clk) then
      vga_r <= "0000";   -- Black if nothing different
      vga_g <= "0000";
      vga_b <= "0000";
      if (vga_x < 512) and (vga_y < 256) then -- Oszi Screen
         if screen_buf = bufa then
            value := buf_a(vga_x);
            value := buf_b(vga_x);
         end if;
         val_pos := 256 - to_integer(unsigned((not value(15)) & value(14 downto 8)));
         if val_pos = vga_y then
            vga_b <= "1111";
         end if; -- COM 2
         if (vga_y = 128) and (val_pos /= vga_y) then  -- COM 2
       --  elsif vga_y = 128 then   -- COM 1
            vga_g <= "1111";  
         end if;
      end if;
   end if;
end process;

0 Kudos
1 Reply
Registered: ‎07-21-2014

Re: Strange behaviour using elsif



Can you elaborate on the behavior? If you are validating results with testbench then share the testbench.


Search for documents/answer records related to your device and tool before posting query on forums.
Search related forums and make sure your query is not repeated.

Please mark the post as an answer "Accept as solution" in case it helps to resolve your query.
Helpful answer -> Give Kudos

0 Kudos