Introduction - If you have any usage issues, please Google them yourself
With Lattice devices for example, it describes how to specify the pin function in Verilog (OE, RESET, IO CELL register, bi-directional IO, Latch IO, assign Pin number, synthesis properties, the output electrical specifications ...), using State Machine, and other advanced features of Verilog.