for HUNT ENGINEERING HERON DSP Modules
Allowing your C program to correctly interface to the system hardware without needing to understand the details of the hardware.
- Manages the limited DMA resources of the C6000 to access all of the HERON-FIFOs
- Provides hardware abstraction for the DSP code through a simple, high-performance library
- Simple control of hardware resources
- Fast interprocessor or peripheral communications
- easily switch to another processor or processor module
- A component of the HERON Application Development Framework
- Supports all HUNT ENGINEERING HERON C6000 & FPGA modules
- What does it do for me?
HERON-API provides a standard interface to the hardware of a HERON module, and includes a highly-optimised mechanism for transferring data through the high-speed FIFOs of a HERON system. It does this using the processor, interrupts and DMA to implement the highest possible throughput as efficiently as possible.
HERON-API also provides abstraction from the hardware. Code written on one processor module may be easily ported to another processor module, even where that module uses a different processor or has different interfaces. This protects the users investment in software.
- When would I use it?
HERON-API is the only recommended method for accessing the facilities of HUNT ENGINEERING hardware from the DSP. It provides three facilities:
- Access to hardware facilities like the Config line or digital I/O
- High-speed transfer of data to or from real-time interfaces, like ADC, camera or DAC
- High-speed interprocessor communications between DSP & DSP, or DSP & host
- How is it structured?
HERON-API provides a simple access library for shared resources like digital I/O. This allows the developer to fully control the hardware facilities of the module.
The communications routines offer exclusive access to the FIFOs through use of the HeronOpenFifo functions. Once opened, a FIFO can be accessed using the HeronRead & HeronWrite functions. These functions are asynchronous - program execution will continue even if the I/O transfer has not completed. This allows the processor to perform other useful work while the transfer is in progress.
Several communications models are possible polled, using HeronTestIo / HeronWaitIo; or interrupt, using the SWI system provided by DSP/BIOS. Streaming I/O is also available, and offers the best performance for real-time devices like ADCs or DACs.
All modules supported by HERON-API offer the same facilities, even though the implementation may be very different. This makes it easy to port code from one module to another.
- How does the Host use HERON-API?
HERON-API is optimised for use on the DSP processor. It is not for use on the host, which has quite different requirements. Instead, the host uses Host-API, which is optimised for use on multitasking disk-based operating systems.
Example HERON-API Program:
/* Open three FIFOs */
handle_a = HeronOpenFifo(1, "r");
handle_b = HeronOpenFifo(2, "w");
handle_c = HeronOpenFifo(2, "r");
/* Start three transfers (two reads and one write) */
status_a = HeronRead(handle_a,buffer_a,size_a);
status_b = HeronWrite(handle_b,buffer_b,size_b);
status_c = HeronRead(handle_c,buffer_c,size_c);
/* Do some processing here */
/* Wait for each transfer to complete */
status_a = HeronWaitIo(handle_a);
status_b = HeronWaitIo(handle_b);
status_c = HeronWaitIo(handle_c);
Core HERON-API Functions:
(This is a typical list modules with additional hardware facilities may define specific functions. These are not listed here).
HeronOpenFifo, HeronSwiOpenFifo, HeronClose, HeronRead / Write, HeronRestartRead /
Write, HeronReadWord / WriteWord, HeronCancelIo, HeronCancelWithFlush, HeronTestIo,
HeronDmaClaim, HeronDmaFree, HeronInstallIsr
HeronConfigOff / On, HeronDigioOut / In, HeronUmi / In, HeronModId