|
| 1 | +/* |
| 2 | + * See LICENSE for more information about licensing |
| 3 | + * |
| 4 | + * Copyright 2023 |
| 5 | + * Author: Luis G. Leon-Vega <luis.leon@ieee.org> |
| 6 | + * Diego Arturo Avila Torres <diego.avila@uned.cr> |
| 7 | + * |
| 8 | + */ |
| 9 | +#pragma once |
| 10 | + |
| 11 | +namespace cynq { |
| 12 | +/** |
| 13 | + * @brief HardwareArchitecture |
| 14 | + * Defines the architecture of the Create method. This is used by classes |
| 15 | + * that implement the IHardware interface. |
| 16 | + */ |
| 17 | +enum class HardwareArchitecture { |
| 18 | + /** For ultra scale xilinx devices */ |
| 19 | + UltraScale |
| 20 | +} |
| 21 | + |
| 22 | +/** |
| 23 | + * @brief SyncType |
| 24 | + * Declares the orientation of data synchronization in the Sync method. |
| 25 | + * This is used by any class that implements the IMemory interface. |
| 26 | + */ |
| 27 | +enum class SyncType { |
| 28 | + /** Synchronization from host (CPU) to the device (FPGA) */ |
| 29 | + HostToDevice, |
| 30 | + /** Synchronization from device (FPGA) to the host (CPU) */ |
| 31 | + DeviceToHost, |
| 32 | +} |
| 33 | + |
| 34 | +/** |
| 35 | + * @brief StartMode |
| 36 | + * Mode for the Start method of IAccelerator. This is used by any class |
| 37 | + * that implements the IAcelerator interface. |
| 38 | + */ |
| 39 | +enum class StartMode { |
| 40 | + /** Mode is Once at initialiization */ |
| 41 | + Once, |
| 42 | + /** Mode is Continuos at initialization */ |
| 43 | + Continuos |
| 44 | +} |
| 45 | + |
| 46 | +/** |
| 47 | + * @brief ExecutionType |
| 48 | + * Style of execution for the API. This is used by any class that implements |
| 49 | + * the IDataMover interface. |
| 50 | + */ |
| 51 | +enum ExecutionType { |
| 52 | + /* Syncrhonous style of execution for IDataMover **/ |
| 53 | + Sync, |
| 54 | + /* Asyncrhonous style of execution for IDataMover **/ |
| 55 | + Async |
| 56 | +} |
| 57 | + |
| 58 | +/** |
| 59 | + * @brief DeviceStatus |
| 60 | + * Possible state flags used to determine state of the device, |
| 61 | + * these are used by any class that implements the IAccelerator |
| 62 | + * and IDataMover interfaces as the return of GetStatus(). |
| 63 | + */ |
| 64 | +enum class DeviceStatus { |
| 65 | + /** Uknown status for IAccelerator **/ |
| 66 | + Unknown, |
| 67 | + /** Done status for IAccelerator **/ |
| 68 | + Done, |
| 69 | + /** Idle status for IAccelerator **/ |
| 70 | + Idle, |
| 71 | + /** Running status for IAccelerator **/ |
| 72 | + Running, |
| 73 | + /** Error status for IAccelerator **/ |
| 74 | + Error |
| 75 | +} |
| 76 | + |
| 77 | +/** |
| 78 | + * @brief MemoryType |
| 79 | + * Types of memory for a IDataMover. This is used by any class that implements |
| 80 | + * IDataMover in the GetBuffer() method. |
| 81 | + */ |
| 82 | +enum class MemoryType { |
| 83 | + /** GetBuffer receives dual as memory type. */ |
| 84 | + Dual, |
| 85 | + /** GetBuffer receives cacheable as memory type. */ |
| 86 | + Cacheable, |
| 87 | + /** GetBuffer receives host as memory type. */ |
| 88 | + Host, |
| 89 | + /** GetBuffer receives device as memory type. */ |
| 90 | + Device |
| 91 | +} |
| 92 | +} // namespace cynq |
0 commit comments