how to track down an optimised away signal

Using verilog and ISE 10.1.

I add a reg to modify the design's behaviour. It works and it works correctly. The change is intended to invert the carry logic for some op-codes.

However synthesis , using XST , gives the following warning message.

WARNING:Xst:646 - Signal is assigned but never used. This unconnected signal will be trimmed during the optimization process.

What I would like to do is to find out which lines are caing this warning and see if I have missed something or the synthesis tool has made a mistake.

All sixteen op-codes assign something to borrow. Sometimes true, sometimes inverse and sometimes 0.

I added a KEEP statement to the reg and of course everything was OK. When I added a KEEP statement to each line that assigned to the reg borrow I got the abover warning message.

Is there any synthesis qualifiers which say presevre the nets in this line only?

Thanks for any advice andy.

Reply to
Andy Botterill
Loading thread data ...

It is most likely a logical error in the code.

OK, but what xst is claiming is that no register is being assigned *to* by the "borrow" register.

In other words, "borrow" does not appear on the right side of any active assignment that affects a top port output..

-- Mike Treseler

Reply to
Mike Treseler

I agree with that I'm trying to figure out how to track it down.

(* KEEP = "TRUE" *){borrow, Rd_contents}=Rn_contents - shifter_operand; There are at least three occurences similar to above. Some are assigned to zero which may give the synthesis tool the idea that it could be optimised.

borrow does not go to a top level port but it is used in the carry logic which goes to a primary output.

Reply to
Andy Botterill

^ that's on the left side.

Borrow is being updated, not used, in that assignment.

It doesn't matter how many there are.

Unless there is an assignment like

my_top_port

Reply to
Mike Treseler

Hi Andy, Do you have a signal such as 'carry' which is the exact inverse of 'borrow'? I.e. borrow = not carry? If you do, the synthesis tool might optimise 'borrow' away and use carry throughout. HTH., Syms.

Reply to
Symon

What do you do with borrow? The synthesis tool is complaining that you don't use "borrow" not that you don't assign to it. You can store the borrow net's value in a register and use it in later instructions. That way it can not be optimized away. Are you sure borrow is being used ie, it is on the right side of an assignment? Also remember that if you're using borrow in combinational logic and it's a real inverse of carry, as someone else already pointed out, you may not need borrow at all. Investigate how borrow is used.

Reply to
Muzaffer Kal

I think I have figured it out.

I have 3 adders which use the MSB as a carry which is unchanged and assigned to COm.

I have 5 subtractors which use the MSB as a borrow out. CCOm is the inverse of borrow.

The other op-codes do not change borrow or carry. They haven'nt been finished yet.

I think that the inversion logic has been pushed inside the subtractor circuit. I tried to do this explicitly a bit like {~COm, Rd_contents}=Rn_contents - shifter_operand;

It's not legal syntax. Using the ! operator equally doesn't work.

I'll go away and have a think.

The simulation does exactly what I want.

Reply to
Andy Botterill

Since the sim is ok, and synthesis is error free, I would bet a tank of gas that synthesis got it right.

Rather than using brain cycles on manual synthesis, I would either

  1. Bring "carry" out to a testpoint pin and have a look at the rtl schematic to settle the question, or
  2. Assume synthesis is ok and finish the design.

-- Mike Treseler

Reply to
Mike Treseler

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.