Steward
分享是一種喜悅、更是一種幸福
微處理器 - Lattice LCMXO2-1200HC-4SG32C - Verilog - Button
top.v
module main (
input btn,
output reg led
);
always @(btn) begin
led <= btn;
end
endmodule
top.lpf
LOCATE COMP "led" SITE "27"; LOCATE COMP "btn" SITE "21";
Makefile
all: yosys -p "synth_lattice -family xo2 -json top.json" top.v nextpnr-machxo2 --device LCMXO2-1200HC-4SG32C --lpf top.lpf --json top.json --textcfg top.txt ecppack --compress --jed-note "DESIGN NAME: top.ncd" --jed-note "DEVICE NAME: LCMXO2-1200HC-4QFN32" top.txt top.bit --jed top.jed clean: rm -rf top.txt top.bit top.json top.jed
編譯
$ make
插入開發板到PC後,會新增一個隨身碟,只要將top.jed複製到該隨身碟即可完成燒錄
