i could you plz be more specific ?
i used if instead of when but i got this error :
Can't infer register for because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[0]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[1]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[2]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[3]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[4]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[5]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[6]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[7]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[8]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[9]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[10]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[11]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[12]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[13]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[14]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[15]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[16]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[17]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (10818): Can't infer register for "D[18]" at ppp.vhd(47) because it does not hold its value outside the clock edge
Error (12152): Can't elaborate user hierarchy "projetppp:inst|brake_var:ppp_inst"
Error: Quartus II 32-bit Analysis & Synthesis was unsuccessful. 20 errors, 7 warnings
Error: Peak virtual memory: 371 megabytes
Error: Processing ended: Sun May 25 19:59:59 2014
Error: Elapsed time: 00:00:10
Error: Total CPU time (on all processors): 00:00:10
Error (293001): Quartus II Full Compilation was unsuccessful. 22 errors, 7 warnings