본문 바로가기

분류 전체보기

(142)
Avalon Memory-Mapped Interfaces - pwm. avalon_model Test-Bench avalon_pwm Quartus II project - Avalon pwm. PWM : Pulse Width Modulation. Required Register : 8 bit duty, 8 bit div(period) Why 8 Bit? : Computer Architecture 에서 8bit CPU라고 하면 ALU, 레지스터, 데이터 버스 등의 처리 단위가 8비트로 된 CPU를 말한다. Imbedded System 과 lrsfe.tistory.com Simulation waveform Board Verificaton > niosII.qsys Pin Planner Eclipse Level 1,2 Intensity Level 3,4 Intensity
Avalon Memory-Mapped Interfaces - Register. Master > Slave Slave > Master My_reg mp_addr mp_bEn mp_rD mp_wR mp_wData mp_rData mp_waitR addr bEn rD wR wData waitR rData rMy_reg My_reg Implementation. avalon_model Test-Bench Tcl Simulation waveform mp_writedata > my_reg > mp_readdata = rData Board Verification > niosII.qsys My_reg_0 Base address : 0x0000_1088 Nios II Console
Avalon Memory-Mapped Interfaces. Avalon MM Interface 1. IP 블록 및 peripherals 간 데이터 교환 단순화 / 호환성 2. Burst transfer 데이터 연속 전송(처리량 최적화) 3. FPGA, SoC에 통합하여 시스템 구축 4. 실시간 응답, 동기화를 제공하여 IP 블록 간 안정적인 데이터 전송 가능 > 데이터 전송 간소화 및 데이터 흐름의 효율적인 관리 > Design complexity와 개발 프로세스의 단순화 Avalon Data-Bus 데이터를 효과적으로 처리 Using Data-Bu..
Avalon - Nios II processor : GPIO API function. alt_iic_isr_register( KEY_IRQ_INTERRUPT_CONTROLLER_ID , KEY_IRQ , (void *)key_isr , (void *)&button_val , 0x0); interrupt signal 이 발생하면 key_isr function을 불러온다. 인터럽트 발생 시 ISR에서는 관련 데이터를 저장 또는 처리 후 인터럽트 클리어를 해줘야함. - printf, uart 통신 등 다른 동작은 불가. interrupt enable. IOWR_ALTERA_AVALON_PIO_IRQ_MASK(KEY_BASE, 0x7); // 0x4|0x2|0x1 IOWR_ALTERA_AVALON_PIO_EDGE_CAP(KEY_BASE, (0x4 | 0x2 | 0x1))..
Quartus II project - Nios II(Avalon Model) Avalon_Model, r/w `timescale 1ns/1ns // Avalon Bus Model for Simulation module avalon_model ( input clk, input rst, // avalon Bus output reg [31:0] mp_addr, output reg [ 3:0] mp_bEn, output reg mp_rD, output reg mp_wR, input mp_waitR, input [31:0] mp_rData, output reg [31:0] mp_wData ); parameter FF = 1; // delay initial begin mp_addr = 32'hx; mp_bEn = 4'bx; mp_rD = 1'b0; mp_wR = 1'b0; mp_wData ..
Visual Studio, C8 8-1. array, base address #include #define ARRAY #if defined ARRAY int main(void) { int ary[5]; ary[0] = 10; ary[1] = 20; ary[2] = ary[0] + ary[1]; int data = 555; for (int i = 0; i < 5; i++) { printf("ary[%d] = [%d] \n", i, ary[i]); } return 0; } #endif #elif defined ARRAY int main() { int ary[5]; // index, offset ary[0] = 10; ary[1] = 20; ary[2] = ary[0] + ary[1]; //scanf_s("%d", &ary[3]); // &..
Visual Studio, C7 7-1. function add source file named xinadist.c int xinadist(int x, int y) { return (x * y); } add header file named xinadist.h extern int xinadist(int x, int y); main code #include #include "xinadist.h" #define FUNC1 #if defined FUNC1 int main(void) { int a, b; int result; a = 10; b = 20; result = xinadist(a, b); printf("********** include xinadist.h **********\n"); printf("*********************..
Visual Studio, C6 6-1. ex while #include #define EX_WHILE #if defined EX_WHILE int main(void) { unsigned char a = 0; while (a < 320 * 240) { printf("a = [%d] \t", a); a++; } printf("\n"); printf("result = [%d]\n", a); return 0; } #endif while 문 조건이 a