Yes,you are right.
(ED) is common for men who have diabetes.Fifty percent of men with diabetes suffer from ED within 10 years of diagnosis.
The same elevated blood glucose levels that cause blood vessel and nerve damage
in other parts of the body can also lead to complications in blood flow and nerve damage to the penis.
You must also get checked for coronary artery disease also because ED is nine times as likely in men who suffer with both coronary artery disease (CAD) and diabetes, than men who have diabetes without the addition of CAD
The longer a man has had diabetes, the more likely he will suffer from ED. Also if blood glucose levels have not been well controlled throughout the illness, blood vessel and nerve damage will be greater.
Do the following
....Consult your doctor and get revised your prescription so that your sugar levels are controlled meticulously.Your goal should be HBA1c below 7.
....reduce your weight
....do regular exercises.
....avoid junk foods,sweets,colas and fried and fatty foods
Quit smoking and alcohol
Control your BP and cholesterol
Treatment for ED consists of medications,penile implants
You must consult a urologist
and explore the modality of treatment best suited for you.