微處理器 - Lattice LCMXO2-1200HC-4SG32C - Lattice Diamond - Verilog - Button



main.v

module main (
    input btn,
    output reg led
);
  
initial begin
    led = 0;
end
    
always @(posedge btn) begin
    led <= ~led;
end
   
endmodule



完成