One important advice when you are using a microcontroller/fpga to control a dc motor is DO NOT CONNECT THE MOTOR DIRECTLY TO THE MICROCONTROLLER/FPGA. You need to generate PWM signals using the microcontroller. Higher the duty cycle of the PWM signal, the faster the motor turns.
Use some kind of buffer/isolation. If you have to control the direction of the dc motor also, then you need to use a H-bridge L298.
When you are using feedback(PID controller) to control the position of a dc motor. You need to figure out whether just proportional controller is enough to control the position of dc motor or not. Rather than using all the proportional/integrator/derivative control parameters. In order to determine these constants, you need to do a lot of trials.
Hope this helped.