To more precisely answer the original question, if the engine is on the edge of detonation, then you do nothing else but increase manifold pressure, without changing temperature (yes I know it's near on impossible to actually do), you will get detonation.
Once the inlet valve is closed on the compression stroke, the chamber does not know how the gas got there, it just compresses what there is, which results in a pressure and temperature increase, Once this pressure/temperature increase exceeds a certain value for a given fuel, autoignition (detonation) will occur and cause knock.
Regards
pat pprimmer@acay.com.au
eng-tips, by professional engineers for professional engineers
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.