1 FPGA - Flujo de Diseño UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
2 FPGA Field Programmable Gate ArrayUBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
3 FPGA - ¿Qué es? Arreglo de celdas básicas programables cuyasDefinición simplificada: Arreglo de celdas básicas programables cuyas interconexiones también son programables Arquitectura genérica de FPGA ? - A high capacity programmable logic device - An array of programmable basic logic cells surrounded by programmable interconnects - Can be configured (programmed) by end-users (field-programmable) to implement specific applications - Capacity up to multi-millions logic gates and speed up to 500MHz - Popular applications: prototyping, on-site hardware reconfiguration, DSP, logic emulation, network components, etc… UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
4 FPGA - Flujo de Diseño Flujo de diseño típico: Verificación EntradaSíntesis Lógica Place & Route Programación Lenguaje de descripción de Hardware: VHDL Verilog UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
5 FPGA - Flujo de Diseño Xilinx - CLB: Celdas lógicas programablesFlip-Flop Actel - VersaTiles VersaTiles Tecnología Flash. La programación de la celda no se pierde al quitar la alimentación FPGA - Flujo de Diseño Flujo de diseño típico: Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación LUT: Look-Up Table Bloque RAM 16 bits: 4 entradas – 1 salida ENTRADA SALIDA S0 S1 … … S15 Transformación a un nivel de abstracción MENOR Mapeo del diseño según la TECNOLOGÍA especificada Incluye optimizaciones: Mayor velocidad Menor área Optimización de lógica, de tiempos, etc ¡No todo código VHDL es sintetizable! a <= not(a) after 5.4 ns; UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
6 FPGA - Flujo de Diseño Síntesis - Xilinx: XST Verificación EntradaLógica Place & Route Programación UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
7 Síntesis - Actel: Symplify ProFPGA - Flujo de Diseño Síntesis - Actel: Symplify Pro Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación UBA - Sistemas Embebidos - FPGA – SoftCores
8 FPGA - Flujo de Diseño Flujo de diseño típico: Verificación EntradaSíntesis Lógica Place & Route Programación Elección de: celdas lógicas rutas de interconexionado bloques de memoria RAM/Flash, PLLs, etc. También posee opciones de optimización de tiempo. Retardos en las líneas de conexión más importantes que retardos en celdas lógicas. Los tiempos de retardos estimados en el proceso de síntesis no tienen en cuenta los retardos en las conexiones. Simulación Post-Place&Route: más exacta!!! UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
9 Place & Route – Xilinx: PlanAheadFPGA - Flujo de Diseño Place & Route – Xilinx: PlanAhead Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
10 Place & Route – Actel: DesignerFPGA - Flujo de Diseño Place & Route – Actel: Designer Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación Compile Performs design rule check on the input netlist. Compile also performs some optimizations on the design through logic combining and buffer tree modifications. Compile options vary by family. UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
11 FPGA - Flujo de Diseño Flujo de diseño típico: ComportamientoReq. de tiempos Req. de potencia Flujo de diseño típico: Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
12 Verificación: ModelSimFPGA - Flujo de Diseño Verificación: ModelSim Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
13 Verificación - Actel: SmartTimeFPGA - Flujo de Diseño Verificación - Actel: SmartTime Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación Q CE R D RETARDO UBA - Sistemas Embebidos - FPGA – SoftCores
14 Verificación - Actel: SmartPowerFPGA - Flujo de Diseño Verificación - Actel: SmartPower Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
15 Verificación - Xilinx: XPower AnalyzerFPGA - Flujo de Diseño Verificación - Xilinx: XPower Analyzer Verificación Entrada de Diseño Síntesis Lógica Place & Route Programación UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
16 Ejemplo: Circuito debouncingUBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
17 registro de desplazamiento lógica de generación de ‘salida’Ejemplo: Circuito debouncing Q D clk switch_in salida Q1 Q2 QN QN-1 La salida del circuito sólo será ‘1’ cuando: Q1 = Q2 = … = QN-1 = ‘1’ QN = ‘0’ Solución propuesta: registro de desplazamiento + lógica de generación de ‘salida’ UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
18 Ejemplo: Circuito debouncingQ D clk switch_in salida Q1 Q2 QN QN-1 VHDL – Entidad: entity switch_seguro is port( clk : IN std_logic; reset : IN std_logic; switch_in : IN std_logic; salida : OUT std_logic ); end switch_seguro; UBA - Sistemas Embebidos - FPGA – SoftCores
19 Ejemplo: Circuito debouncingVHDL – Arquitectura: architecture arch1 of switch_seguro is signal switch_buffer : std_logic_vector(7 downto 0); begin --Proceso: una gran sentencia concurrente! process(clk,reset) if reset = '1' then switch_buffer <= x"00"; elsif rising_edge(clk) then switch_buffer <= switch_buffer(6 downto 0) & switch_in; end if; end process; --Otra sentencia concurrente: salida <= '1' when switch_buffer = x"7F" else '0'; end arch1; Después de esta presentación mostrar el proyecto “uba_2010_presentacion_0” UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
20 Ejemplo: Circuito debouncingAgregado de Flip-Flop a la salida: --Otra sentencia concurrente: salida_d <= '1' when switch_buffer = x"7F" else '0'; --Proceso: Flip-Flop de salida. process(clk,reset) begin if reset = '1' then salida <= '0'; elsif rising_edge(clk) then salida <= salida_d; end if; end process; end arch2; UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
21 Flujo de Diseño FPGA + SoftCoreUBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
22 FPGA + SoftCore - Flujo de DiseñoVerificación Entrada de Diseño Simulación Código Compilación Síntesis Programación ¿Debug? Ruteo * Al trabajar con FPGA no es común disponer de un equivalente al proceso de Depuración o Debugging. Programación UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
23 Actel IDEs & ARM Cortex-M1UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
24 Actel IDEs Libero SoftConsoleAdministra el proceso de síntesis, place & route y programación de la FPGA - Herramienta gráfica. - Muestra el diseño en diagrama de bloques. - Útil para la interconexión de los bloques de un sist. que incluye un uP Basado en Eclipse - Compilador GNU C - Debugger GNU SmartDesign UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
25 Actel IDEs Libero SoftConsoleUBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
26 Actel IDEs: SmartDesignCatálogo: UARTs, FIFOs, RAM, Fash, PLL Cortex-M1, buses, controladores de RAM/Flash externas, etc. UBA - Sistemas Embebidos - FPGA – SoftCores
27 Catálogos de Cores - Cortex-M1 ver. 2.7Tightly Coupled Memory no implementado 1 única interrupción UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
28 Catálogos de Cores - Cortex-M1 ver. 3.0- ITCM: 8KB - DTCM: 4KB - 16 interrupciones - multiplicador 3 ciclos UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
29 Catálogos de Cores – Buses & PeriféricosÚtil para conexión del Cortex-M1 con otros proyectos en FPGA sin conexión AMBA. UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
30 Mapeo de componentes en MemoriaBus AHB Bus APB UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
31 Actel IDEs: SoftConsoleUBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
32 Actel IDEs: Firmware CatalogActel has a broad offering of proven and pre-implemented synthesizable IP building blocks that can be easily configured and used within Actel FPGA system-level designs. Software drivers for many Actel IP Cores are available within the Firmware Catalog. The drivers are free of charge and delivered as C source, so they can be easily compiled and linked into a user's program or executable. These drivers hide the implementation details of peripheral operations behind a driver application program interface (API), so the developer need only be concerned with the peripheral's function. Provee los Drivers de los IP Cores que interactúan con el uP. - Código disponible escrito en C. - Permite ocultar los detalles del funcionamiento de los periféricos UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
33 Actel IDEs: Firmware CatalogUART: void UART_init(UART_instance_t * this_uart, addr_t base_addr, uint8_t baud_value, uint8_t line_config); void UART_send(UART_instance_t * this_uart, const uint8_t * tx_buffer, size_t tx_size); size_t UART_get_rx(UART_instance_t * this_uart,uint8_t * rx_buffer, size_t buff_size); GPIO: Actel has a broad offering of proven and pre-implemented synthesizable IP building blocks that can be easily configured and used within Actel FPGA system-level designs. Software drivers for many Actel IP Cores are available within the Firmware Catalog. The drivers are free of charge and delivered as C source, so they can be easily compiled and linked into a user's program or executable. These drivers hide the implementation details of peripheral operations behind a driver application program interface (API), so the developer need only be concerned with the peripheral's function. void GPIO_init(gpio_instance_t * this_gpio, addr_t base_address, uint32_t initial_output); void GPIO_set_output(gpio_instance_t * this_gpio, uint32_t value); uint32_t GPIO_get_input(gpio_instance_t * this_gpio); UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
34 Actel IDEs: SoftConsoleMapeo de memoria en el Entorno de programación #ifndef __UBA_2010_PRESENTACION_1_H_ #define __UBA_2010_PRESENTACION_1_H_ /************************************************* * Peripheral Memory Map ************************************************/ #define COREAHBNVM_BASE_ADDR 0x UL #define EXT_SRAM_BASE_ADDR 0x UL #define COREAHBSRAM_BASE_ADDR 0x UL #define COREGPIO0_BASE_ADDR 0xC UL #define COREAI_BASE_ADDR 0xC UL #define CORETIMER0_BASE_ADDR 0xC UL #endif /* __UBA_2010_PRESENTACION_1_H_ */ Actel has a broad offering of proven and pre-implemented synthesizable IP building blocks that can be easily configured and used within Actel FPGA system-level designs. Software drivers for many Actel IP Cores are available within the Firmware Catalog. The drivers are free of charge and delivered as C source, so they can be easily compiled and linked into a user's program or executable. These drivers hide the implementation details of peripheral operations behind a driver application program interface (API), so the developer need only be concerned with the peripheral's function. UBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
35 Ejemplo: Implementación Cortex-M1 en Actel M1AFS-EMBEDDED KITUBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García
36 Actel M1AFS-EMBEDDED KITUBA - Sistemas Embebidos - FPGA – SoftCores – 2010 – Franco Ferrucci, Sebastián García FPGA Fusion M1AFS1500 350 MHz máx. FPGA basada en Flash 1MByte Flash interna ADC Ksps 30 Entradas analógicas: -10, Volt. Oscilador interno RC 100 MHz celdas lógicas 2 PLLs JTAG Precio: 1- U$S 250