You had a sex 7 months back& You had a wound at the base of the penis which could be a simple boil There is no chance of ST as it normaly occurs on glans
or around the glans.You have not mentioned whether it is still ther or healed.if it has healed there it nothing to worry about.As regards your query about HIV if you are curious pl get your blood test
done to rule out the same.
You have developed a small lump at the top of the testis since 2 months which pains to much.You had a pain around thigh and knee.which ia referred pain
due to lump near Testicle.This could be a what is called as Cyst of epididymis
or could be a epididymitis(An infection of Epididymis) Pl take antibiotic Tab Monocef
500mg twice daily along with some noninflammatory drugs and pain killer for a week .It should subside