URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
Subversion Repositories neorv32
[/] [neorv32/] [trunk/] [docs/] [userguide/] [adding_custom_hw_modules.adoc] - Rev 69
Go to most recent revision | Compare with Previous | Blame | View Log
<<<:sectnums:== Adding Custom Hardware ModulesIn resemblance to the RISC-V ISA, the NEORV32 processor was designed to ease customization and _extensibility_.The processor provides several predefined options to add application-specific custom hardware modules and accelerators.=== Standard (_External_) InterfacesThe processor already provides a set of standard interfaces that are intended to connect _chip-external_ devices.However, these interfaces can also be used chip-internally. The most suitable interfaces arehttps://stnolting.github.io/neorv32/#_general_purpose_input_and_output_port_gpio[GPIO],https://stnolting.github.io/neorv32/#_primary_universal_asynchronous_receiver_and_transmitter_uart0[UART],https://stnolting.github.io/neorv32/#_serial_peripheral_interface_controller_spi[SPI] andhttps://stnolting.github.io/neorv32/#_two_wire_serial_interface_controller_twi[TWI].The SPI and (especially) the GPIO interfaces might be the most straightforward approaches since theyhave a minimal protocol overhead. Device-specific interrupt capabilities can be added using thehttps://stnolting.github.io/neorv32/#_external_interrupt_controller_xirq[External Interrupt Controller (XIRQ)].Beyond simplicity, these interface only provide a very limited bandwidth and require more sophisticatedsoftware handling ("bit-banging" for the GPIO).=== External Bus InterfaceThe https://stnolting.github.io/neorv32/#_processor_external_memory_interface_wishbone_axi4_lite[External Bus Interface]provides the classic approach to connect to custom IP. By default, the bus interface implements the widely adoptedWishbone interface standard. However, this project also includes wrappers to bridge to other protocol standards like ARM'sAXI4-Lite or Intel's Avalon. By using a full-featured bus protocol, complex SoC structures can be implemented (includingseveral modules and even multi-core architectures). Many FPGA EDA tools provide graphical editors to build and customizewhole SoC architectures and even include pre-defined IP libraries..Example AXI SoC using Xilinx Vivadoimage::neorv32_axi_soc.png[]The bus interface uses a memory-mapped approach. All data transfers are handled by simple load/store operations since theexternal bus interface is mapped into the processor's https://stnolting.github.io/neorv32/#_address_space[address space].This allows a very simple still high-bandwidth communications.=== Stream Link InterfaceThe NEORV32 https://stnolting.github.io/neorv32/#_stream_link_interface_slink[Stream Link Interface] providespoint-to-point, unidirectional and parallel data channels that can be used to transfer streaming data. Incontrast to the external bus interface, the streaming data does not provide any kind of "direction" control,so it can be seen as "constant address bursts". The stream link interface provides less protocol overheadand less latency than the bus interface. Furthermore, FIFOs can be be configured to each direction (RX/TX) toallow more CPU-independent operation.=== Custom Functions SubsystemThe NEORV32 https://stnolting.github.io/neorv32/#_custom_functions_subsystem_cfs[Custom Functions Subsystem] isan "empty" template for a processor-internal module. It provides 32 32-bit memory-mapped interfaceregisters that can be used to communicate with any arbitrary custom design logic. The intentions of thissubsystem is to provide a simple base, where the user can concentrate on implementing the actual design logicrather than taking care of the communication between the CPU/software and the design logic. The interfaceregisters are already allocated within the processor's address space and are supported by the software frameworkvia low-level hardware access mechanisms. Additionally, the CFS provides a direct pre-defined interrupt channel tothe CPU, which is also supported by the NEORV32 runtime environment.
Go to most recent revision | Compare with Previous | Blame | View Log
