jAER project on SourceForge

ch.unizh.ini.jaer.chip.cochlea
Class CochleaAMS1bHardwareInterface

java.lang.Object
  extended by net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2
      extended by net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2MonitorSequencer
          extended by ch.unizh.ini.jaer.chip.cochlea.CochleaAMS1bHardwareInterface
All Implemented Interfaces:
de.thesycon.usbio.PnPNotifyInterface, de.thesycon.usbio.UsbIoErrorCodes, AESoftMapper, AEMonitorInterface, AEMonitorSequencerInterface, AESequencerInterface, BiasgenHardwareInterface, HardwareInterface, HasUpdatableFirmware, ReaderBufferControl, USBInterface

public class CochleaAMS1bHardwareInterface
extends CypressFX2MonitorSequencer
implements BiasgenHardwareInterface

The hardware interface to CochleaAMS1b.

Author:
tobi

Nested Class Summary
 class CochleaAMS1bHardwareInterface.AEReader
          This reader understands the format of raw USB data and translates to the AEPacketRaw
 
Nested classes/interfaces inherited from class net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2MonitorSequencer
CypressFX2MonitorSequencer.AEWriter, CypressFX2MonitorSequencer.MonSeqAEReader
 
Nested classes/interfaces inherited from class net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2
CypressFX2.AEPacketRawPool, CypressFX2.AsyncStatusThread
 
Field Summary
static short PID
          The USB PID
 
Fields inherited from class net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2MonitorSequencer
aeWriter, CPLD_FIRMWARE_MONSEQ, log, VR_DISABLE_AE, VR_DISABLE_AE_OUT, VR_ENABLE_AE, VR_ENABLE_AE_OUT, VR_ENABLE_MISSED_EVENTS, VR_IS_TIMESTAMP_MASTER, VR_MISSED_EVENTS, VR_OPERATION_MODE
 
Fields inherited from class net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2
AE_BUFFER_SIZE, aeBufferSize, aePacketRawPool, aeReader, arrayResetEnabled, asyncStatusThread, BufDesc, chip, deviceDescriptor, DID_STEREOBOARD, EEPROM_SIZE, eventCounter, FIRMWARE_FILENAME_COCHLEAAMS_BIX, FIRMWARE_FILENAME_DVS128_IIC, FIRMWARE_FILENAME_MAPPER_IIC, FIRMWARE_FILENAME_MONITOR_SEQUENCER, FIRMWARE_FILENAME_MONITOR_SEQUENCER_HEX, FIRMWARE_FILENAME_MONITOR_SEQUENCER_IIC, FIRMWARE_FILENAME_MONITOR_SEQUENCER_JTAG_IIC, FIRMWARE_FILENAME_STEREO_IIC, FIRMWARE_FILENAME_TCVS320_BIX, FIRMWARE_FILENAME_TCVS320_HEX, FIRMWARE_FILENAME_TMPDIFF128_BIX, FIRMWARE_FILENAME_TMPDIFF128_HEX, gDevList, GUID, gUsbIo, inEndpointEnabled, interfaceNumber, isOpened, lastEventsAcquired, MAX_CONTROL_XFER_SIZE, NEW_EVENTS_PROPERTY_CHANGE, NO_AE_REOPEN_TIMEOUT, numberOfStringDescriptors, PID_BLANK, PID_COCHLEAAMS, PID_DVS128_REV0, PID_TCVS320_RETINA, PID_TMPDIFF128_RETINA, PID_USB2AERmapper, PID_USBAERmini2, PID_USBAERmini2_without_firmware, prefs, stringDescriptor1, stringDescriptor2, stringDescriptor3, TICK_US, VENDOR_REQUEST_DO_ARRAY_RESET, VENDOR_REQUEST_EARLY_TRANFER, VENDOR_REQUEST_FIRMWARE, VENDOR_REQUEST_FLASH_BIASES, VENDOR_REQUEST_POWERDOWN, VENDOR_REQUEST_RESET_TIMESTAMPS, VENDOR_REQUEST_SEND_BIAS_BYTES, VENDOR_REQUEST_SET_ARRAY_RESET, VENDOR_REQUEST_SET_LED, VENDOR_REQUEST_START_TRANSFER, VENDOR_REQUEST_STOP_TRANSFER, VID, VID_BLANK, VR_DOWNLOAD_FIRMWARE, VR_EEPROM, VR_RAM, VR_SET_DEVICE_NAME
 
Fields inherited from interface net.sf.jaer.hardwareinterface.usb.USBInterface
PID_THESYCON_END, PID_THESYCON_START, VID_THESYCON
 
Fields inherited from interface de.thesycon.usbio.UsbIoErrorCodes
USBIO_ERR_ADDITIONAL_EVENT_SIGNALLED, USBIO_ERR_ALREADY_BOUND, USBIO_ERR_ALREADY_CONFIGURED, USBIO_ERR_BABBLE_DETECTED, USBIO_ERR_BAD_START_FRAME, USBIO_ERR_BTSTUFF, USBIO_ERR_BUFFER_OVERRUN, USBIO_ERR_BUFFER_UNDERRUN, USBIO_ERR_BULK_RESTRICTION, USBIO_ERR_CANCELED, USBIO_ERR_CONTROL_NOT_SUPPORTED, USBIO_ERR_CONTROL_RESTRICTION, USBIO_ERR_CRC, USBIO_ERR_DATA_BUFFER_ERROR, USBIO_ERR_DATA_OVERRUN, USBIO_ERR_DATA_TOGGLE_MISMATCH, USBIO_ERR_DATA_UNDERRUN, USBIO_ERR_DEMO_EXPIRED, USBIO_ERR_DEV_NOT_RESPONDING, USBIO_ERR_DEVICE_GONE, USBIO_ERR_DEVICE_NOT_FOUND, USBIO_ERR_DEVICE_NOT_OPEN, USBIO_ERR_DEVICE_NOT_PRESENT, USBIO_ERR_ENDPOINT_HALTED, USBIO_ERR_EP0_RESTRICTION, USBIO_ERR_ERROR_BUSY, USBIO_ERR_ERROR_SHORT_TRANSFER, USBIO_ERR_FAILED, USBIO_ERR_FIFO, USBIO_ERR_FRAME_CONTROL_NOT_OWNED, USBIO_ERR_FRAME_CONTROL_OWNED, USBIO_ERR_INSUFFICIENT_RESOURCES, USBIO_ERR_INTERFACE_NOT_FOUND, USBIO_ERR_INTERNAL_HC_ERROR, USBIO_ERR_INTERRUPT_RESTRICTION, USBIO_ERR_INVALID_CONFIGURATION_DESCRIPTOR, USBIO_ERR_INVALID_DEVICE_STATE, USBIO_ERR_INVALID_DIRECTION, USBIO_ERR_INVALID_FUNCTION_PARAM, USBIO_ERR_INVALID_INBUFFER, USBIO_ERR_INVALID_IOCTL, USBIO_ERR_INVALID_ISO_PACKET, USBIO_ERR_INVALID_OUTBUFFER, USBIO_ERR_INVALID_PARAM, USBIO_ERR_INVALID_PARAMETER, USBIO_ERR_INVALID_PIPE_FLAGS, USBIO_ERR_INVALID_PIPE_HANDLE, USBIO_ERR_INVALID_POWER_STATE, USBIO_ERR_INVALID_RECIPIENT, USBIO_ERR_INVALID_TYPE, USBIO_ERR_INVALID_URB_FUNCTION, USBIO_ERR_ISO_NA_LATE_USBPORT, USBIO_ERR_ISO_NOT_ACCESSED_BY_HW, USBIO_ERR_ISO_NOT_ACCESSED_LATE, USBIO_ERR_ISO_RESTRICTION, USBIO_ERR_ISO_TD_ERROR, USBIO_ERR_ISOCH_REQUEST_FAILED, USBIO_ERR_LOAD_SETUP_API_FAILED, USBIO_ERR_NO_BANDWIDTH, USBIO_ERR_NO_MEMORY, USBIO_ERR_NO_SUCH_DEVICE_INSTANCE, USBIO_ERR_NOT_ACCESSED, USBIO_ERR_NOT_BOUND, USBIO_ERR_NOT_CONFIGURED, USBIO_ERR_NOT_SUPPORTED, USBIO_ERR_OPEN_PIPES, USBIO_ERR_OUT_OF_ADDRESS_SPACE, USBIO_ERR_OUT_OF_MEMORY, USBIO_ERR_PENDING_REQUESTS, USBIO_ERR_PID_CHECK_FAILURE, USBIO_ERR_PIPE_NOT_FOUND, USBIO_ERR_PIPE_RESTRICTION, USBIO_ERR_PIPE_SIZE_RESTRICTION, USBIO_ERR_POOL_EMPTY, USBIO_ERR_POWER_DOWN, USBIO_ERR_REQUEST_FAILED, USBIO_ERR_RESERVED1, USBIO_ERR_RESERVED2, USBIO_ERR_SET_CONFIG_FAILED, USBIO_ERR_SET_CONFIGURATION_FAILED, USBIO_ERR_STALL_PID, USBIO_ERR_STATUS_NOT_MAPPED, USBIO_ERR_SUCCESS, USBIO_ERR_TIMEOUT, USBIO_ERR_TOO_MUCH_ISO_PACKETS, USBIO_ERR_UNEXPECTED_PID, USBIO_ERR_USBD_BUFFER_TOO_SMALL, USBIO_ERR_USBD_INTERFACE_NOT_FOUND, USBIO_ERR_USBD_TIMEOUT, USBIO_ERR_VERSION_MISMATCH, USBIO_ERR_VID_RESTRICTION, USBIO_ERR_XACT_ERROR
 
Constructor Summary
CochleaAMS1bHardwareInterface(int n)
           
 
Method Summary
 void flashConfiguration(Biasgen biasgen)
          flashes the configuration in non-volatile storage so they will be reloaded on reset or powerup.
 byte[] formatConfigurationBytes(Biasgen biasgen)
          Formats and returns the bytes that should be sent to set a particular configuration.
 void sendConfiguration(Biasgen biasgen)
          Sends the configuration values to the hardware.
 void setPowerDown(boolean powerDown)
          sends the powerdown vendor request to power down the chip.
 void startAEReader()
          Starts reader buffer pool thread and enables in endpoints for AEs.
 
Methods inherited from class net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2MonitorSequencer
close, disableEventSequencing, enableMissedEvents, getAEMappers, getEstimatedOutEventRate, getNumEventsSent, getNumEventsToSend, getNumMissedEvents, getOperationMode, getTick, getTypeName, isEventSequencingEnabled, isLoopedSequencingEnabled, isOutEndpointEnabled, isTimestampMaster, offerPacketToSequencer, open, resetTimestamps, setLoopedSequencingEnabled, setOperationMode, startAEWriter, startDevice, startMonitoringSequencing, startMonitoringSequencing, startSequencing, stopAEWriter, stopMonitoringSequencing, stopSequencing, updateFirmware, writeMonitorSequencerFirmware, writeMonitorSequencerJTAGFirmware
 
Methods inherited from class net.sf.jaer.hardwareinterface.usb.cypressfx2.CypressFX2
acquireAvailableEventsFromDriver, acquireDevice, addAEListener, allocateAEBuffers, cyclePort, download8051RAM, downloadFirmwareBinary, downloadFirmwareHex, eraseEEPROM, getAEBufferSize, getAeReader, getChip, getDefaultFirmwareBixFileForBlankDevice, getDID, getEstimatedEventRate, getEvents, getFifoSize, getFirmwareFilenameBinaryFromVIDPID, getFirmwareFilenameHexFromVIDPID, getMaxCapacity, getNumberOfStringDescriptors, getNumBuffers, getNumEventsAcquired, getPID, getStringDescriptors, getSupport, getTimestampTickUs, getVID, getVIDPID, hasStringIdentifier, isEventAcquisitionEnabled, isInEndpointEnabled, isOpen, loadBinaryFirmwareFile, loadBinaryFirmwareFileSystemFile, onAdd, onRemove, openUsbIo_minimal, openUsbIo, overrunOccurred, readEEPROM, releaseDevice, removeAEListener, requestEarlyTransfer, resetPixelArray, resetUSB, sendVendorRequest, sendVendorRequest, sendVendorRequest, sendVendorRequest, set8051Reset, setAEBufferSize, setAeReader, setAEReaderFifoSize, setAEReaderNumBuffers, setChip, setDefaultFirmwareBixFileForBlankDevice, setEventAcquisitionEnabled, setFifoSize, setInEndpointEnabled, setLed, setNumBuffers, setSerialNumber, showFirmwareFilenameDialog, stopAEReader, toString, unconfigureDevice, writeC2Load, writeCPLDfirmware, writeEEPROM, writeHexFileToEEPROM, writeVIDPIDDID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.jaer.hardwareinterface.HardwareInterface
close, getTypeName, isOpen, open
 
Methods inherited from interface net.sf.jaer.aemonitor.AEMonitorInterface
acquireAvailableEventsFromDriver, addAEListener, getAEBufferSize, getChip, getEstimatedEventRate, getEvents, getMaxCapacity, getNumEventsAcquired, getTimestampTickUs, isEventAcquisitionEnabled, overrunOccurred, removeAEListener, setAEBufferSize, setChip, setEventAcquisitionEnabled
 
Methods inherited from interface net.sf.jaer.aesequencer.AESequencerInterface
getMaxCapacity, getTimestampTickUs
 
Methods inherited from interface net.sf.jaer.hardwareinterface.usb.USBInterface
getDID, getPID, getStringDescriptors, getVID, getVIDPID
 

Field Detail

PID

public static final short PID
The USB PID

See Also:
Constant Field Values
Constructor Detail

CochleaAMS1bHardwareInterface

public CochleaAMS1bHardwareInterface(int n)
Method Detail

setPowerDown

public void setPowerDown(boolean powerDown)
                  throws HardwareInterfaceException
Description copied from interface: BiasgenHardwareInterface
sends the powerdown vendor request to power down the chip.

Typically this method toggles the powerDown pin correctly to ensure on-chip biasgen is powered up. Chip may have been plugged in without being powered up. If powerdown is true, simply sets powerdown high. If powerdown is false, powerdown is toggled high and then low, to make sure a nagative transistion occurs. This transistion is necessary to ensure the startup circuit starts up the masterbias again.

Specified by:
setPowerDown in interface BiasgenHardwareInterface
Parameters:
powerDown - true to power OFF the biasgen, false to power on
Throws:
HardwareInterfaceException

sendConfiguration

public void sendConfiguration(Biasgen biasgen)
                       throws HardwareInterfaceException
Description copied from interface: BiasgenHardwareInterface
Sends the configuration values to the hardware. The configuration can include bias values (both for on- and off-chip sources), configuration bits, etc.

Specified by:
sendConfiguration in interface BiasgenHardwareInterface
Parameters:
biasgen - the object that holds the configuration.
Throws:
HardwareInterfaceException

flashConfiguration

public void flashConfiguration(Biasgen biasgen)
                        throws HardwareInterfaceException
Description copied from interface: BiasgenHardwareInterface
flashes the configuration in non-volatile storage so they will be reloaded on reset or powerup.

Specified by:
flashConfiguration in interface BiasgenHardwareInterface
Parameters:
biasgen - holds the configuration values
Throws:
HardwareInterfaceException

formatConfigurationBytes

public byte[] formatConfigurationBytes(Biasgen biasgen)
Description copied from interface: BiasgenHardwareInterface
Formats and returns the bytes that should be sent to set a particular configuration.

Specified by:
formatConfigurationBytes in interface BiasgenHardwareInterface
Parameters:
biasgen - the source of the configuration.
Returns:
the array to be sent.

startAEReader

public void startAEReader()
                   throws HardwareInterfaceException
Starts reader buffer pool thread and enables in endpoints for AEs. This method is overridden to construct our own reader with its translateEvents method

Overrides:
startAEReader in class CypressFX2MonitorSequencer
Throws:
HardwareInterfaceException

jAER project on SourceForge