You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The common ATCA driver is responsible for the following:

  • Connect to CPSW driver and establish communication with the registers of the firmware common structure and are
  • Provide API class, once instantiated using static function, the user is permitted to control the registers and create and read streams

ATCACommon API class

This class is responsible for DaqMux 0 and 1 configurations, JESD Top (AMC) 0 and 1, Waveform engine, Build information, and temperature information.


Driver class diagram


API Instantiation

The static function if the parent class ATCACommonFw allows the instantiation of API class. It seems to return an instantiation of the child class as follows:

Instantiation function
ATCACommonFw IATCACommonFw::create(Path p)
{
    return IEntryAdapt::check_interface<ATCACommonFwAdapt, DevImpl>(p);
}


The code to instantiate the API is as follows

Instantiation
atcaCommon = IATCACommonFw::create(p_atcaCommon);


Stream instantiation

The stream can be created using the createStream method in the API. Streams can be instantiated separately by calling the CPSW stream creation function directly as follows

Stream instantiation
    try {
        _stream[0] = IStream::create(p_root->findByName(stream0));
    } 
    catch (InvalidArgError &e) {
        // Don't print error if the stream name is empty, as the user didn't
        // want to create this channel anyway.
    }
    catch (CPSWError &e) {
        fprintf(stderr, "CPSW Error: %s, file: %s, line: %d\n", e.getInfo().c_str(), __FILE__, __LINE__);
    }


CrossbarControlYaml API class

This class is responsible for configuring the timing cross bar. The timing cross bar is nothing more than four multiplexers configuring four outputs choosing from four sources

  1. NC TPG timing
  2. Mini TPG
  3. Back plane
  4. SC TPG timing


CrossbarControlYaml Class

The functions available are simply to instantiate a crossbar, and to configure and read current configuration. 

Exception handling


CPSW throws CPSWError errors, but the driver does not. It does propagate however the exception CPSWError in some contexts and performs some prints to stderr. Upper layers should catch exceptions of type CPSWError.




  • No labels