It is code which I wrote in VHDL to control trains and prevent collision.