Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Combinational Loop In VHDL synthesis

  1. #11
    Join Date
    May 2013
    Posts
    436
    Rep Power
    1

    Default Re: Combinational Loop In VHDL synthesis

    Quote Originally Posted by Tricky View Post
    Yes - best case is the design matches your RTL simulation results. Worst case it takes a long time to simulate and doesnt tell you alot.
    Using the RTL only (using best practice) and good timing specs, I have never run a post synthesis simulation - as there has never been a need.
    The only real need these days is for an accurate power analysis using toggle info from the simulation.

  2. #12
    Join Date
    Nov 2016
    Posts
    56
    Rep Power
    1

    Default Re: Combinational Loop In VHDL synthesis

    The combinational loops are pretty clear. In your first assignment, PortL0 drives PortR0 and then in your third PortR0 drives PortL0. You of course intend the when clauses to make them mutually exclusive, but I doubt if the tools are that smart. You should use the proper VHDL constructs for mutually exclusive cases:

    Code:
    if(SW='0' and RW='0') then
      PortR0 <= ...
      PortR1 <= ...
      PortL0 <= ...
      PortL1 <= ...
    elsif(SW='0' and RW='1') then
      ...
    elsif(SW='1' and RW='0') then
     ...
    else
     ...
    end if;
    Or a case statement:

    Code:
    	
    	test_proc : process(RW, SW, PortR0, PortL0)
    		variable sel : std_logic_vector(1 downto 0);
    	begin
    	
    		sel := SW & RW;
    	
    		case sel is
    
    		when "00" =>
    			PortR0 <= PortL0;
    			PortL0 <= 'Z';
    		when "01" =>
    			PortL0 <= PortR0;
    			PortR0 <= 'Z';
    		when others =>
    			PortR0 <= 'Z';
    			PortL0 <= 'Z';
    		end case;
    	
    	end process;
    You could still run into trouble though with multiple drivers at a higher level.

    It's not entirely clear what you are trying to do, but inout's are best avoided.

  3. #13
    Join Date
    Apr 2017
    Posts
    6
    Rep Power
    1

    Default Re: Combinational Loop In VHDL synthesis

    Yeah. I had also seen this kind of implementation but I didn't know there were a preference for this. Thanks anyway. I will test it.
    As I mentioned in my former posts, I want to build a bidirectional interconnection network between some processors and some memories. This is just sample of my interconnection and I wanted to solve the combinational loop issue.

  4. #14
    Join Date
    Sep 2015
    Posts
    7
    Rep Power
    1

    Default Re: Combinational Loop In VHDL synthesis

    Project does have an ELF file. Please make sure project has been buil succcessfully

  5. #15
    Join Date
    Nov 2016
    Posts
    56
    Rep Power
    1

    Default Re: Combinational Loop In VHDL synthesis

    Quote Originally Posted by Reza M. Shahshahani View Post
    Yeah. I had also seen this kind of implementation but I didn't know there were a preference for this. Thanks anyway. I will test it.
    As I mentioned in my former posts, I want to build a bidirectional interconnection network between some processors and some memories. This is just sample of my interconnection and I wanted to solve the combinational loop issue.
    Point taken. Buses between chips is one of the few cases where bidirectional lines may make sense since it saves board traces. Of course, you lose the possibility of sending and receiving at the same time and will have all sort of coordination issues unless you have one master.

    I think the case statements (or if/else) actually make the code much more clear since it makes it obvious what the outputs are for a given set of inputs (SW and RW in your case).

Similar Threads

  1. vhdl for loop and synthesis
    By Binome in forum Quartus II and EDA Tools Discussion
    Replies: 1
    Last Post: September 21st, 2016, 02:32 AM
  2. Question about Combinational Loop Warning
    By rohslogic in forum General Altera Discussion
    Replies: 4
    Last Post: June 2nd, 2016, 02:58 AM
  3. Warning Combinational Loop
    By jrdesign in forum Quartus II and EDA Tools Discussion
    Replies: 5
    Last Post: July 17th, 2012, 05:01 AM
  4. [VHDL] Synthesis of 'if' loop(s)
    By Szymo in forum FPGA, Hardcopy, and CPLD Discussion
    Replies: 3
    Last Post: March 1st, 2011, 01:05 AM
  5. Combinational loop
    By bujosa in forum Quartus II and EDA Tools Discussion
    Replies: 10
    Last Post: December 28th, 2010, 05:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •