묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
8-interrupt 질문
궁금한게 있습니다.교안에서 axi_gpio0를 all Input으로 설정하고 GPIO Width를 1로 설정했습니다.그리고 .xdc 역시 스위치 M20, 하나만 지정해서 입력을 넣구요. 그러면 6-4예제와 같이 k2버튼을 눌러서 로직이겠죠. 그런데 교안 156P를 보면 "K 1 버튼을 누르면 D0 가 Toggling 되고 K 2 버튼을 누르면 D1~D4 On, 떼면 O ff 됩니다 또한 터미널 창에 메시지가 나타납니다" 라고 되어있습니다. 어떻게 xdc와 system에서 입력 하나만을 설정했는데 K1버튼이 동작 로직에 추가되는거죠? vitis 소스코드 상에서는 IntGpioFlag가 k1버튼에 해당하는 로직 변수인거 같은데 이해가 안가서 질문드립니다.
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
P127~129 교안내용
6-4내용 교안에서함수 IntcInitFunction, InterruptSystemSetup에 대해서 정의를 안해줘서 코드가 안돌아갑니다.그리고 KeyIntrHandler 함수에서 if (keyVal == 0)으로 주면 버튼을 눌러야 off처리 되고 때면 on처리가 됩니다. 제 생각에는 if (keyVal)로 해야 교안 방향처럼 버튼을 누르면 on이 되고 떼면 off가 되는 로직이 되는거 같습니다. 맞나요?총 코드는 아래와 같이 작성했습니다. 그러니까 잘 동작하네요:) #include <stdio.h> #include "platform.h" #include "xparameters.h" #include "xscugic.h" #include "xil_exception.h" #include "xgpio.h" #include <unistd.h> #define INTC_DEVICE_ID XPAR_PS7_SCUGIC_0_DEVICE_ID #define KEY_DEVICE_ID XPAR_AXI_GPIO_0_DEVICE_ID #define LED_DEVICE_ID XPAR_AXI_GPIO_1_DEVICE_ID #define INTC_GPIO_INTERRUPT_ID XPAR_FABRIC_AXI_GPIO_0_IP2INTC_IRPT_INTR #define KEY_INT_MASK XGPIO_IR_CH1_MASK XGpio LEDInst; XGpio KEYInst; XScuGic INTCInst; u32 KeyIntRisingFlag = 0; u32 KeyIntFallingFlag = 0; static void KeyIntrHandler(void * InstancePtr); static int IntcInitFunction(u16 DeviceId, XGpio * GpioInstancePtr); static int InterruptSystemSetup(XScuGic * XScuGicInstancePtr); int main() { init_platform(); int status; status = XGpio_Initialize(&KEYInst, KEY_DEVICE_ID); // initial KEY if(status != XST_SUCCESS) return XST_FAILURE; status = XGpio_Initialize(&LEDInst, LED_DEVICE_ID); // initial LED if(status != XST_SUCCESS)return XST_FAILURE; XGpio_SetDataDirection(&KEYInst, 1, 0xFF); XGpio_SetDataDirection(&LEDInst, 1, 0); // set LED IO direction as out XGpio_DiscreteWrite(&LEDInst, 1, 0x00);// at initial, all LED turn off printf(">>Press PL KEY1, and check the PL LED1 \n"); status = IntcInitFunction(INTC_DEVICE_ID, &KEYInst); if(status != XST_SUCCESS)return XST_FAILURE; while (1) { if (KeyIntFallingFlag == 1) { KeyIntFallingFlag = 0; printf(" - interrupt falling occur, led on \r\n"); XGpio_DiscreteWrite(&LEDInst, 1, 0xFF); } if (KeyIntRisingFlag == 1) { KeyIntRisingFlag = 0; printf(" - interrupt rising occur, led off \r\n"); XGpio_DiscreteWrite(&LEDInst, 1, 0); } } cleanup_platform(); return 0; } static void KeyIntrHandler(void * InstancePtr) { u8 keyVal; usleep(10000); // 0.1s sleep, to debounce, in common, the meta-state will sustain no more than 20ms keyVal = XGpio_DiscreteRead(&KEYInst, 1) & 0x0f; if (keyval) KeyIntFallingFlag = 1; else KeyIntRisingFlag = 1; XGpio_InterruptClear(&KEYInst, KEY_INT_MASK); XGpio_InterruptEnable(&KEYInst, KEY_INT_MASK); // Enable GPIO interrupts } static int IntcInitFunction(u16 DeviceId, XGpio * GpioInstancePtr) { XScuGic_Config * IntcConfig; int status; // Interrupt controller initialization IntcConfig = XScuGic_LookupConfig(DeviceId); status = XScuGic_CfgInitialize(&INTCInst, IntcConfig, IntcConfig->CpuBaseAddress); if(status != XST_SUCCESS)return XST_FAILURE; // Call interrupt setup function status = InterruptSystemSetup(&INTCInst); if(status != XST_SUCCESS) return XST_FAILURE; // Register GPIO interrupt handler status = XScuGic_Connect(&INTCInst, INTC_GPIO_INTERRUPT_ID, (Xil_ExceptionHandler)KeyIntrHandler, (void*)GpioInstancePtr); if(status != XST_SUCCESS)return XST_FAILURE; // Enable GPIO interrupts XGpio_InterruptEnable(GpioInstancePtr, 1); XGpio_InterruptGlobalEnable(GpioInstancePtr); // Enable GPIO interrupts in the controller XScuGic_Enable(&INTCInst, INTC_GPIO_INTERRUPT_ID); return XST_SUCCESS; } //---------------------------------------------------------------------------- // Interrupt system setup //---------------------------------------------------------------------------- static int InterruptSystemSetup(XScuGic * XScuGicInstancePtr) { // Register GIC interrupt handler Xil_ExceptionRegisterHandler(XIL_EXCEPTION_ID_INT, (Xil_ExceptionHandler)XScuGic_InterruptHandler, XScuGicInstancePtr); Xil_ExceptionEnable(); return XST_SUCCESS; }
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
Zybo z7에서 실습을 진행할 수 있나요?
만약 할 수 없다면 돌아가게 하려면 어떤 작업을 해야하나요?
-
미해결Verilog FPGA Program 1 (Zynq mini 7020)
UART 구현 관련 질문
안녕하세요.오랜만에 인사드립니다. UART 구현에 대해 공부를 하고 있는데 대표님께서 구현하신거는 FIFO Generator IP를 적용하여 하셨는데 제가 조사한바로는 Uartlite 또는 Uart16550 IP가 있는데 FIFO로 구현하신 이유가 따로 있으신건지. 아니면 차이를 간단히 설명이 가능하실까요?
-
미해결Verilog FPGA Program 1 (Zynq mini 7020)
TOP 모듈 코딩 관련
28page 부터 보고 있습니다.보면서 궁금한 점이 강사님께서 예제소스를 올려주셔서 그걸로 업로드 하면 모든 소스가 나와 있어서 비교하며 따라가고는 있는데 만약에 제가 필드에서 처음부터 코딩을 한다고 하면 User Top (system wrapper) 도 코딩을 하여야 하는걸까요? LED TOP이야 제어하는 부분이니까 코딩을 하는게 맞는데 PS, PL을 포함하는 TOP 코딩은 뭔가 막막하네요...여기서의 System wrapper는 PS 영역이 맞는건가요? 뭔가 두서없이 질문을 드렸네요..
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
PYNQ보드로도 예제 실행이 가능한지요?
안녕하세요.인프런 예제 실행해보고 있는데... 자꾸 문제가 생겨 여쭙고자 연락드립니다.zynq mini 7020보드를 기준으로 설명해주셨는데, pynq z1보드에서 ch_05예제를 실행해보고자 합니다.예제 실행 시 오류는 발생하지 않으나 실행이 되지 않습니다.Zynq mini 7020보드와 pynq z1보드의 차이를 찾아보아도 설정 상(zynq코어, ddr 등) 큰 차이가 없어보이는데... 혹시 다른 문제가 있는건지요.계속 찾아보고 수정해보고 있지만 입문자라 잘 안 됩니다... 혹시 추가로 고려해야될 사항이 있을까요?감사합니다.
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
인프런 자료실이 어디에 있나요??
이제 막 41 page 학습 중인데 자료실을 찾으려니 보이지가 않습니다.
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
FSBL 관련
Vitis2024.1.0 사용 하고 있고, ZynqMini 7020 으로 공부하고 있습니다. 1, 정상적으로 Boot 이미지를 만들고, 2 ,정상적으로 Flash에 Download 한 것 같습니다.그런데.. 스위치 변경 하여 QSPI 모드로 다시 시작하는데 QSPI Boot로 동작 안되는 것 같습니다. 어디를 봐야 할까요??? vitis에서 zynqmin7020 물리고 jtag mode 에서는 run 또는 debug 동작은 잘 됩니다.
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
6.4.2 강의노트 125쪽 // 제조사 sample 코드관련
6.4.2 강의노트 125쪽에 제조사 sample 코드가 자료실에 있다고 나와있는데 아무리 찾아봐도 없는것 같습니다. 확인 한번만 부탁드립니다.
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
42p .elf 파일 저장위치
안녕하세요.Run As나 Debug As 의 Launch Hardware로 실행했을 때, .elf 파일이 저장되는 위치가 Zynq와 연결된 DDR에 저장이 되는 것인지 Zynq 칩 내부의 RAM이 따로 있는 것 인지 궁금합니다. 또 저장되는 번지수는 정해져 있는 건지도 궁금합니다. ps의 memory map이 따로 영역이 지정 되어있는 걸까요?
-
미해결Verilog ZYNQ Program 1 (Zynq mini 7020)
40page project build 관련하여 error가 있는데 해결을 못하고 있습니다.
강의안 40page 관련하여 질문이 있습니다.40page project build 관련하여 error가 있는데 해결을 못하고 있습니다.xsa 파일 불러와서 Hello World 예제 그대로 생성하였는데 저는 #include "xil_printf.h"가 제대로 링크되어 있지 않습니다.어떻게 해결해줘야할 지 모르겠습니다..15:19:55 **** Build of configuration Debug for project zcu_1226_App2 ****make all Building file: ../src/helloworld.cInvoking: ARM v8 32 Bit gcc compilerarm-none-eabi-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/helloworld.o" -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -I/home/jhsong/Desktop/zcu_1226/system_wrapper/export/system_wrapper/sw/system_wrapper/standalone_psu_cortexa53_0/bspinclude/include -MMD -MP -MF"src/helloworld.d" -MT"src/helloworld.o" -o "src/helloworld.o" "../src/helloworld.c"../src/helloworld.c:50:10: fatal error: xil_printf.h: No such file or directory 50 | #include "xil_printf.h" | ^~~~~~~~~~~~~~compilation terminated.make: *** [src/subdir.mk:26: src/helloworld.o] Error 115:19:56 Build Finished (took 660ms)분명 xil_printf.h 헤더파일은 프로젝트 파일 내부 폴더 안에 여러개 생성되어있는 것도 확인했습니다../system_wrapper/psu_cortexa53_0/standalone_psu_cortexa53_0/bsp/psu_cortexa53_0/libsrc/standalone_v7_3/src/common/xil_printf.h./system_wrapper/psu_cortexa53_0/standalone_psu_cortexa53_0/bsp/psu_cortexa53_0/libsrc/standalone_v7_3/src/xil_printf.h./system_wrapper/psu_cortexa53_0/standalone_psu_cortexa53_0/bsp/psu_cortexa53_0/include/xil_printf.h./system_wrapper/zynqmp_fsbl/zynqmp_fsbl_bsp/psu_cortexa53_0/libsrc/standalone_v7_3/src/common/xil_printf.h./system_wrapper/zynqmp_fsbl/zynqmp_fsbl_bsp/psu_cortexa53_0/libsrc/standalone_v7_3/src/xil_printf.h./system_wrapper/zynqmp_fsbl/zynqmp_fsbl_bsp/psu_cortexa53_0/include/xil_printf.h
-
미해결Verilog FPGA Program 1 (Zynq mini 7020)
Counter를 이용한 LED 제어 실습 부분 관련 문의 입니다
안녕하세요.강의노트가 Counter를 이용한 LED 제어 - 10은 78 페이지이고, Counter를 이용한 LED 제어 - 11는 106 페이지 입니다.Counter를 이용한 LED 제어 - 12는 80페이지 인데,79페이지는 누락된것 인가요?아니면 실습진행에 없어도 되는 페이지라서 106페이지로 대체를 하신건가요?그리고 Counter를 이용한 LED 제어 - 11에 나와있는 코드는 어떤 파일을 수정해서 작성 하는것인가요?
-
미해결Verilog FPGA Program 1 (Zynq mini 7020)
Counter를 이용한 LED 제어 실습 관련 문의
안녕하세요.Counter를 이용한 LED 제어 실습 중 마지막 부분에서LED 점등이 되지 않아 문의 드립니다.vitis에서 빌드까지는 성공 하였고,Run As 혹은 Debus As 실행 시 저는 강의노트에서 보이는것 처럼 보드에 점등이 되질 않네요.무엇이 문제인지 모르겠습니다.. Vitis Log를 보니, 에러 메시지는 아래와 같습니다.14:56:28 ERROR : Could not find ARM device on the board for connection 'Local'.Check if the target is in:1. Split JTAG - No operations are possible with ARM DAP.2. Non JTAG bootmode - Bootrom may need time to enable DAP.Please try again.Troubleshooting hints:1. Check whether board is connected to system properly.2. In case of zynq board, check whether Digilent/Xilinx cable switch settings are correct.3. If you are using Xilinx Platform Cable USB, ensure that status LED is green.
-
미해결Verilog FPGA Program 1 (Zynq mini 7020)
Zynq 보드 다운로드 - 32~33 부분 실행이 안됩니다.
Zynq 보드 다운로드 - 32~33 부분을 진행 중 입니다.그런데 아래와 같은 에러메시지가 나오면서 동작하질 않네요.. 저는 현재 Zybo-z7-10 보드를 사용 중입니다.