Home > Community > Forums > Logic Design > Synthesizing 'x'

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Synthesizing 'x' 

Last post Mon, Jul 11 2011 6:24 AM by Tzachi Noy. 0 replies.
Started by Tzachi Noy 11 Jul 2011 06:24 AM. Topic has 0 replies and 2754 views
Page 1 of 1 (1 items)
Sort Posts:
  • Mon, Jul 11 2011 6:24 AM

    • Tzachi Noy
    • Not Ranked
    • Joined on Sun, Nov 9 2008
    • Raanana, 00-IL
    • Posts 7
    • Points 200
    Synthesizing 'x' Reply

    Hi,

    look at the following code:

    always @(*)

       begin

          o = 2'bxx;

          if (a) o = 2'd0;

          else if (b) o = 2'd1;

          else if (c) o = 2'd2;

          else if (d) o = 2'd3;

       end

     

    signal o is DC (don't care) if none of the inputs (a,b,c,d) is asserted. I used the 2'bxx value because (1) it's easier to debug when X is propagating and (2) don't care might help the synthesizer, because it can assign any value it wants in this case.

     

    But using HAL, I get an error *SYNTXZ - which warns me about this X assignment.

    My question is: Doesn't X assignment 'help' the synthesizer?

    If it is - why is the warning? or how can I avoid this warning?

    if not - is there a way to tell the synthesizer about Don't-Cares in a combinational logic?

    Filed under: , , ,
    • Post Points: 5
Page 1 of 1 (1 items)
Sort Posts:
Started by Tzachi Noy at 11 Jul 2011 06:24 AM. Topic has 0 replies.