I'm trying to generate a 5V TTL signal, and I have a function generator that can generate square waves. My question is can I generate a 2.5Vpp square wave and offset it by +2.5V to make it work like a TTL wavefom?
As Brian said, TTL levels go from 0 to 5V. Most function generators (at least all the ones I've used) do require the offset as their outputs are usually AC. Check the output of your generator before connecting it to your circuit. If you are clocking at a relatively slow rate, you can always use a single diode to "rectify" the output so you only get the positive side of the waveform.