cannot synthesize simple mux with design compiler

Status
Not open for further replies.

pavel47

Member level 4
Joined
Nov 8, 2005
Messages
68
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Switzerland
Activity points
1,790
Hello,

I have a problem when synthesizing multiplexer. This multiplexer has no inputs. Depending on control input it should output different constants. Something like this:

Code:
module MOD1 (S, OUT);
input S;
output [3:0] OUT;
assign OUT = (S == 1) ? 4'b0101 : 4'b1010;
endmodule

The result of synthesis is desastrous: everything is shorted.

Where is a problem ?

Thanks in advance.

Pavel.

P.S. employing always @(S) changes nothing
 

Try using this instead:
module MOD1 (S, OUT);
input S;
output [3:0] OUT;
wire [3:0] A;
wire [3:0] B;

assign A = 4'b0101;
assign B = 4'b1010;


assign OUT = (S) ?A : B;
endmodule

I simulated this way and it worked. Actually it should have worked with your code too. What program are you using?
 

Thank you for response,

Your code works in simulation as well as mine, but result of synthesis is the same.
For synthesis I use Synopsys Design Compiler 2008.
Maybe I must put some synopsys directive ...

In attachment I put schema - result of synthesis
 

Can you provide your synthesis report?
 

The problem was in tool optimization. Now it's Ok. Thanks.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…