I am learning VHDL and I am using the Lattice boards. I want to know how to declare a GPIO. I found the following block of code in the diamond software folder example. It is ".lpf" file and I guess it is the place where the pin are declare. Can anyone explain simply what the lines mean:
BLOCK RESETPATHS ;
BLOCK ASYNCPATHS ;
BLOCK JTAGPATHS ;
IOBUF ALLPORTS IO_TYPE=LVCMOS33 ;
LOCATE COMP "seg_1" SITE "V6" ;
LOCATE COMP "seg_2" SITE "U7" ;
LOCATE COMP "seg_3" SITE "Y6" ;
LOCATE COMP "seg_4" SITE "AA6" ;
LOCATE COMP "seg_5" SITE "U8" ;
LOCATE COMP "seg_6" SITE "T8" ;
LOCATE COMP "seg_7" SITE "AA5" ;
LOCATE COMP "seg_8" SITE "AB4" ;
LOCATE COMP "clk" SITE "L5" ;
IOBUF PORT "seg_1" IO_TYPE=LVCMOS33 TERMINATEVTT=OFF ;
LOCATE COMP "reset" SITE "J7" ;
IOBUF PORT "reset" IO_TYPE=LVCMOS33 ;
LOCATE COMP "direction" SITE "J6" ;
LOCATE COMP "LOCK" SITE "W5" ;
LOCATE COMP "seg_9" SITE "Y20" ;
LOCATE COMP "seg_10" SITE "AA21" ;
LOCATE COMP "seg_11" SITE "U18" ;
LOCATE COMP "seg_12" SITE "U19" ;
LOCATE COMP "seg_13" SITE "W19" ;
LOCATE COMP "seg_14" SITE "V19" ;
LOCATE COMP "seg_15" SITE "AB20" ;
LOCATE COMP "seg_16" SITE "AA20" ;
Correct me if I am wrong, so The first 3 lines block the user to use Pins that are used in JTAG & Reset?
A line like this:
LOCATE COMP "seg_16" SITE "AA20" ;
mean to the synthetizer that the variable seg_16 from the VHDL files is linked to the "real" pin of the board.
Finaly, I got no idea what the IOBUF keyword mean. So Did I get something right or I am plain wrong?