I have a block for 2's complement in Arithmetic module of a ALU. In the netlist synthesized by Synopsys Design compiler, I find that the 2's complement block output LSB is assigned to input LSB.
ie, assign y[0] = inp[0];
UCN -1 error due to multiple nets to inp. How can I rectify this?
Code Verilog - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
module twos_comp(inp,x,y);input[7:0] inp;input x;outputreg[7:0] y;always@(inp or x)beginif(x)
y =(~inp)+1'b1;else
y = inp;endendmodule