Add fault simulation
Fix gates levels bug
Fix persistent logic values bug