To write your own VDHL-code you can use the ispLEVER Classic Software from Lattice (
You also need a programmer (e.g. HW-USBN-2A from Lattice) to deploy the VHDL-Code on your PLD.
After installing the software and the drivers for your programmer you can start a new project.
You can find a demo-project here:media:PLD-demo2.zip
You have to download the *.jed-File with the programmer to your PLD.