For an ideal gas constant volume heat addition process, change of entropy equation is:
∆S= cv ln(T2/T1)+ R ln(v2/v1)= ∫dq/T+S(gen)$$\Delta S= c_v \ln\frac{T_2}{T_1}+ R \ln\frac{v_2}{v_1}= \int \frac{dq}{T}+S_{gen}$$
The term [R ln(v2/v1) ]$R \ln\frac{v_2}{v_1}$ equals zero, since it’s a constant volume process.
For ideal gas ∫dq/T =cv ln(T2/T1) $\int \frac{dq}{T} =c_v \ln\frac{T_2}{T_1}$ .
Then:
∆S= cv ln(T2/T1)= cv ln(T2/T1)+S(gen)$$\Delta S= c_v \ln\frac{T_2}{T_1}= c_v \ln\frac{T_2}{T_1}+S_{gen}$$
Therefore, the S(gen)$S_{gen}$ term equals zero and the process is reversible.
The question is: why does the S(gen)$S_{gen}$ term equal zero and the process is reversible when this is a heat addition through a finite temperature difference?
To give a numerical example, imagine that an ideal gas is put in a rigid tank of uniform temperature where its initial temperature is 400$400$ K, and a hot reservoir at 500$500$ K. then heat is transferred from the hot reservoir to the rigid tank until the temperature of the rigid tank is 430$430$ K.
referring to the expressions above T1 =400$T_1 =400$ K and T2 =430$T_2 =430$ K.