Ignore:
Timestamp:
Feb 12, 2015, 2:59:20 PM (10 years ago)
Author:
cfuguet
Message:

reconf: improve unitary tests for dspin_router

Location:
branches/reconfiguration/softs/drivers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/softs/drivers/xcu.c

    r887 r942  
    55 */
    66#include <xcu.h>
    7 #include <soclib/xicu.h>
    87#include <io.h>
    98#include <hard_config.h>
     
    1211#define XCUREG(func,idx) (SEG_XCU_BASE + (XICU_REG((func),(idx)) << 2))
    1312
    14 void xcu_set_config(int x, int y, int idx, uint32_t val)
     13void xcu_set_register(int x, int y, int func, int idx, uint32_t val)
    1514{
    16     iowrite32(CLUSTER_BASE(x,y) | XCUREG(XICU_CFG_REG, idx), val);
     15    iowrite32(CLUSTER_BASE(x,y) | XCUREG(func, idx), val);
    1716}
    1817
    19 uint32_t xcu_get_config(int x, int y, int idx)
     18uint32_t xcu_get_register(int x, int y, int func, int idx)
    2019{
    21     return ioread32(CLUSTER_BASE(x,y) | XCUREG(XICU_CFG_REG, idx));
     20    return ioread32(CLUSTER_BASE(x,y) | XCUREG(func, idx));
    2221}
    2322
  • branches/reconfiguration/softs/drivers/xcu.h

    r887 r942  
    77#define XCU_H
    88
     9#include <soclib/xicu.h>
    910#include <stdint.h>
    1011
    11 void xcu_set_config(int x, int y, int idx, uint32_t val);
    12 uint32_t xcu_get_config(int x, int y, int idx);
     12void xcu_set_register(int x, int y, int func, int idx, uint32_t val);
     13uint32_t xcu_get_register(int x, int y, int func, int idx);
    1314
    1415#endif
Note: See TracChangeset for help on using the changeset viewer.