--- Quote Start ---
I think if change the -max/min into -late/early probably will become more understandable.
I can understand the set_input_delay very clearly, but the set_output_delay make no sense to me.
Here is the questions:# 1 the red marked tH never be used here, why?# 2 the red marked tco_min never be defined, why?# 3 why the set_output_delay -min is a negative value, what does this mean?
--- Quote End ---
You got a point. There are several ways delay figures are derived but remember no matter how you got them the tool only sees these figures and doesn't care about how you derived them.
Firstly, tH is used in set_input_delay above.
secondly, tCO_min is undeclared by mistake from editor.
using early/late margin(arrival) is excellent but TQ wants delay values.
The classic way is to use figures of tCO(min&max) of external device for input delay values and use tSU/-tH of output device for output values.
However, some vendors do not give such figures. For example they give values of required tSU/tH at fpga for their inputs to fpga or values of required tCO from fpga to their device. This creates a mirror concept, then you have to work out how to convert them to delay values. The best way is to think through early/late margin.
For input, delay values correspond directly to early/late arrival relative to launch edge:
early margin = min delay = min tCO = tH i.e. min delay = tH (margin should avoid previous latch edge)
late margin =max delay = max tCO = clock period - tSU, i.e. max delay = clock period - tSU (margin should avoid next latch edge)
for output, delays correspond as follows (notice it is not symmetrical with inputs value approach and they are relative to latch edge):
early arrival = -min delay, hence delay = - early arrival = - min tCO (explained below)
late arrival = clock period - max delay, hence delay = clock period - max tCO (explained below)
The negative tH is a consensus issue and is due to delay values being relative to latch edge(outside fpga), early margin is the one after latch edge and late margin is the one before latch edge while naturally early/late margins are relative to launch edge inside fpga and directly equal min/max tCO. very confusing and you should have never needed to use such approach but are imposed by some vendors.
Finally I think the valid output window is not right in above diagram