cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
feurstein
Observer
Observer
8,217 Views
Registered: ‎09-24-2007

I don't understand this MIG generated code snippet

Hi, me again ;) , I am working with MIG trying to attach a DDR2 to our Virtex5. There is code in the phy init unit that does not make sense to me, maybe I don't understand xst well enough to get it.

 

When assigning the ddr address and bank outputs during physical initialization there are multiple if clauses and finally there is the else clause that reads:

 

 

-----

    else
        -- otherwise, cry me a river
         ddr_ba_r   <= (others => 'X');
         ddr_addr_r <= (others => 'X');
    end if;

-----

 

(I like nice comments :) ) 

Besides having nasty 'X's in my simulation I don't understand how the synthesis tool shall/will handle this assignment. To me it would make more sense to assign '-' since this would tell the tool that it can insert either value that could help during optimization.  Is this the behavior of xst or is there something else to it?

 

Regards

Matthias 

0 Kudos
2 Replies
feurstein
Observer
Observer
8,216 Views
Registered: ‎09-24-2007

Sorry, I forgot to mention that I'm using MIG version 2.0 from ISE 9.2.
0 Kudos
gszakacs
Instructor
Instructor
8,184 Views
Registered: ‎08-14-2007

This code allows the synthesizer to implement any value it wants in that case, presumably one that results in the least logic.  Generally you would only do this when you don't expect the conditions of the "else" clause to be met in operation, i.e. one of the non-else conditions should always be valid.
-- Gabor
0 Kudos