Verified Commit ae2ee197 authored by Hatim Kanchwala's avatar Hatim Kanchwala
Browse files

Define register addresses and bits

parent f2877f05
Pipeline #290963 failed with stages
in 2 seconds
......@@ -29,13 +29,25 @@
/* Register offsets */
#define AUR_AXIS_SR_OFFSET 0x00 /**< Status Register (read-only). See AUR_AXIS_SR_* constant. */
#define AUR_AXIS_CR_OFFSET 0x04 /**< Control Register (read/write) */
#define AUR_AXIS_SR_OFFSET 0x00 /**< Status Register (read-only) */
#define AUR_AXIS_CR_OFFSET 0x04 /**< Control Register (read/write) */
#define AUR_AXIS_CNTR_IN_H_OFFSET 0x0C /**< Control Register (read/write) */
#define AUR_AXIS_CNTR_IN_L_OFFSET 0x08 /**< Control Register (read/write) */
#define AUR_AXIS_CNTR_OUT_H_OFFSET 0x18 /**< Control Register (read/write) */
#define AUR_AXIS_CNTR_OUT_L_OFFSET 0x1C /**< Control Register (read/write) */
/* Status register bits */
#define AUR_AXIS_SR_LOOPBACK (1 << 0)/**< ‘1’ when Aurora IP is in loopback mode. */
#define AUR_AXIS_SR_CHAN_UP (1 << 0)/**< 1-bit, asserted when channel initialisation is complete and is ready for data transfer */
#define AUR_AXIS_SR_LANE_UP (1 << 1)/**< 1-bit, asserted for each lane upon successful lane initialisation */
#define AUR_AXIS_SR_HARD_ERR (1 << 2)/**< 1-bit hard rror status */
#define AUR_AXIS_SR_SOFT_ERR (1 << 3)/**< 1-bit soft error status */
#define AUR_AXIS_SR_FRAME_ERR (1 << 4)/**< 1-bit frame error status */
#define AUR_AXIS_SR_HOT_PLUG (1 << 5)/**< 1-bit, assserted when hot-plug count expires */
/* Control register bits */
#define AUR_AXIS_CR_LOOPBACK (1 << 0)/**< 1-bit, assert to put Aurora IP in loopback mode. */
#define AUR_AXIS_CR_RST_CTRS (1 << 1)/**< 1-bit, assert to reset counters */
#define AUR_AXIS_CR_SEQ_MODE (1 << 2)/**< 2-bit, determines Sequence Number mode */
namespace villas {
namespace fpga {
......@@ -51,7 +63,12 @@ void Aurora::dump()
logger->info("Aurora-NovaCor AXI-Stream interface details:");
logger->info("Aurora status: {:#x}", sr);
logger->info(" Loopback mode: {}", sr & AUR_AXIS_SR_LOOPBACK ? CLR_GRN("yes") : CLR_RED("no"));
logger->info(" Channel up: {}", sr & AUR_AXIS_SR_CHAN_UP ? CLR_GRN("yes") : CLR_RED("no"));
logger->info(" Lane up: {}", sr & AUR_AXIS_SR_LANE_UP ? CLR_GRN("yes") : CLR_RED("no"));
logger->info(" Hard error: {}", sr & AUR_AXIS_SR_HARD_ERR ? CLR_GRN("yes") : CLR_RED("no"));
logger->info(" Soft error: {}", sr & AUR_AXIS_SR_SOFT_ERR ? CLR_GRN("yes") : CLR_RED("no"));
logger->info(" Frame error: {}", sr & AUR_AXIS_SR_FRAME_ERR ? CLR_GRN("yes") : CLR_RED("no"));
logger->info(" Hot-plug count: {}", sr & AUR_AXIS_SR_HOT_PLUG ? CLR_GRN("expired") : CLR_RED("not expired"));
}
AuroraFactory::AuroraFactory() :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment