--- Quote Start --- how can i write my vhdl code to avoid bounce? --- Quote End --- Draw a flowchart of the basic functionality, and then write a behavioural implementation of that.
Use a counter to generate a suitable interval at which to test the button's input signal. Test it a number of times to see if it persists. Once the signal has passed that test you can declare the button pressed (or released).I hope that's something you can attempt to code yourself... Cheers, Alex