A model of r&d spending

Dear Professor JPfeifer,
I would like to have such a setting in the model: the total factor productivity of an enterprise is endogenous, and if the productivity improves, the enterprise needs to use capital for research and development. I wonder if there is any literature on DSGE model, thank you

There should be a large literature out there, starting with Romer’s endogenous growth model.