본 데모에서는 인텔® Cyclone® 10 저전력 FPGA 평가 키트의 2x20핀 GPIO 헤더를 이용해 기본적인 카운터를 구현합니다.
인텔® Cyclone® 10 저전력 FPGA 평가 키트는 Cyclone® 10 저전력 FPGA 소자의 성능과 특성을 확인할 수 있는 사용이 간편한 저가의 플랫폼입니다. [이전 글]에서는 이 Cyclone® 10 저전력 FPGA 보드에 가상 JTAG 인터페이스를 구현하는 방법을 설명하였습니다.
이번 데모에서는 2x20핀 GPIO 헤더를 사용해 카운터의 신호를 출력합니다.
데모에 사용된 베릴로그 HDL 코드는 다음과 같습니다.
// Digikey Coffee Cup Counter for 2x20 GPIO header for Intel Cyclone 10 board
module counter (
input wire clk, // 50MHz input clock
output wire GPIO0, //GPIO0
output wire GPIO1, //GPIO1
output wire GPIO2, //GPIO2
output wire GPIO3, //GPIO3
output wire GPIO4, //GPIO4
output wire GPIO5, //GPIO5
output wire GPIO6, //GPIO6
output wire GPIO7, //GPIO7
output wire GPIO8, //GPIO8
output wire GPIO9 //GPIO9
);
reg [31:0] counter;
initial begin
counter = 0;
end
always @(posedge clk)
begin
counter <= counter + 1;
end
assign GPIO9 = counter[31];
assign GPIO8 = counter[30];
assign GPIO7 = counter[29];
assign GPIO6 = counter[28];
assign GPIO5 = counter[27];
assign GPIO4 = counter[26];
assign GPIO3 = counter[25];
assign GPIO2 = counter[24];
assign GPIO1 = counter[23];
assign GPIO0 = counter[22];
endmodule
모두가 알고 있듯이, 이번 데모의 목적은 아니지만 이 핀 할당 과정을 쉽게 할 수 있는 GUI 도구와 모범 예시들이 존재합니다. 하지만 시스템을 살펴보는 것은 좋은 습관이기 때문에 이번 데모에서는 수동으로 처리하고 있습니다. Cyclone® 10 저전력 FPGA 평가 키트의 2x20 GPIO 헤더 회로도는 아래와 같습니다.
이번 데모를 완성하기 위해 필요한 I/O 정의는 다음과 같습니다.
set_location_assignment PIN_L13 -to GPIO0
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO0
set_location_assignment PIN_L16 -to GPIO1
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO1
set_location_assignment PIN_L15 -to GPIO2
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO2
set_location_assignment PIN_K16 -to GPIO3
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO3
set_location_assignment PIN_P16 -to GPIO4
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO4
set_location_assignment PIN_R16 -to GPIO5
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO5
set_location_assignment PIN_N16 -to GPIO6
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO6
set_location_assignment PIN_N15 -to GPIO7
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO7
set_location_assignment PIN_N14 -to GPIO8
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO8
set_location_assignment PIN_P15 -to GPIO9
set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to GPIO9
다음 그림과 같이 2x20 GPIO 헤더의 신호를 검증하기 위해 SparkFun 로직 분석기를 연결하였습니다.
로직 분석기로 캡처한 아래 화면을 통해 데모가 정상적으로 동작함을 확인할 수 있습니다.
인텔® Cyclone® 10 저전력 FPGA 평가 키트는 다양한 애플리케이션을 개발할 수 있는 강력하고 우수한 플랫폼으로 디지키에서 구매할 수 있습니다.
좋은 하루 보내세요!
영문 원본: DigiKey Coffee Cup Counter Demo via 2x20pin GPIO Header on FPGA Cyclone 10 LP Evaluation Kit



