Why does my rectangle function on a FPGA look like this?
How long is the ground lead on your scope probe?


your scope probe should be in the X10 position and be properly compensated.
Remove the long ground lead that came with the scope probe and also remove the probe grabber hook from the front of the probe.
Grab some #22 or #24 bare wire and wrap 2 or 3 turns around the exposed metal ring at the front of the probe.  Tightly twist the ends of the wire loop together so as to make a stiff pigtail.
Solder that ground pigtail to a ground point that is as close as possible to the signal that you want to measure.  The ground pigtail should be as short as possible.
Touch the probe tip to the signal that you want to observe.


Now look at your scope waveform.  Chances are very good that it will look much better, without the ringing that you are seeing on the fast transistions.

In other words, this looks to be a measurement problem rather than something wrong with your circuit.