I think it was in one of Rick Hartley's videos that he talked about designing for analog vs digital. There are a bunch of points I remember, in no particular order:
- the frequency of your circuit, that you need to design for, is determined by the rise and fall time of your ICs, not your clock. (With your square wave, for example, it's impossible for it to actually be square; it has some finite rise and fall time that determines the frequency you need to design to).
- IC manufacturers almost never actually tell you the rise and fall time of their chips. Also, they might do a die shrink at any time, resulting in you having to redesign your circuit to accommodate the higher frequencies from smaller, faster transistors (even if it operates at exactly the same clock frequency as before). If you're lucky, they'll even tell you about the die shrink rather than just letting you find out when suddenly your design stops passing EMI testing.
- high-frequency can be easier than low-frequency; you really need to pay attention to impedance control, but so long as everything is well laid-out the fields will stay closely contained. The lower the frequency, the more the fields will spread and the greater the risk of having problems such as crosstalk.
- Digital is easier than analog. Digital can tolerate a lot of noise before a 0 becomes a 1 or vice versa. Whereas if you're sending a signal to a 24-bit ADC, you might have to go a bit crazy and use a PCB-embedded waveguide, or something, to give it the isolation it needs.
- Even if digital signals are quite resilient from a signal integrity standpoint, you still have to pay close attention to crosstalk because it takes very little common mode current to cause an EMI problem. And you have to pay attention to EMI if you actually want your design to pass emissions testing to be able to sell it.
- Even at high frequencies, anything at a length scale less than (wavelength of maximum frequency)/10 can be treated as a lumped element. So if it's possible to jam two high-frequency ICs right up against one another, with the pads pretty much touching, that's probably actually better than a carefully impedance-controlled transmission line connecting them. That's not really applicable to some monster BGA chip, but if you're designing a switched-mode power supply you can make the node between the inductor and MOSFET a lumped element by placing them as close as possible.