In order to test the working state of adaptive optics system, it is necessary to design an online sweep-frequency circuit module to test the frequency response of the adaptive system. Sweep-frequency signal generator based on Direct Digital frequency Synthesis (DDS) is one of the core components. But the classic DDS technology also has some drawbacks: the truncation error of phase, the truncation error of magnitude (caused by memory FWL) and high occupancy of ROM. These are also the optimization directions in this paper. This paper presents a FPGA-based DDS sweep-frequency signal generator suitable in adaptive optics. It has a low occupancy rate with ROM. And in the case of low-ROM, the paper reduces the noise generated by the truncation error of phase and the truncation error of magnitude of DDS sweepfrequency signal generator by method of linear interpolation. The results show that, when the reference frequency is 100 MHz, the frequency resolution can be as low as 0.025 Hz. It only takes up 0.5 KB ROM with the ROM compression ratio of 64:1 in the optimized scheme in the paper and has higher precision due to the method of linear interpolation than the unoptimized scheme, which can meet the engineering needs. Compared with other schemes, the scheme in the paper improves signal accuracy in the case of reducing the truncation error of phase, the truncation error of magnitude and the occupancy rate with ROM, but only adds a multiplication and division circuit, which is a practical solution.