Last change
on this file since 986 was
942,
checked in by cfuguet, 10 years ago
|
reconf: improve unitary tests for dspin_router
|
File size:
599 bytes
|
Rev | Line | |
---|
[887] | 1 | /* |
---|
| 2 | * \file xcu.c |
---|
| 3 | * \author Cesar Fuguet <cesar.fuguet-tortolero@lip6.fr> |
---|
| 4 | * \date November 12, 2014 |
---|
| 5 | */ |
---|
| 6 | #include <xcu.h> |
---|
| 7 | #include <io.h> |
---|
| 8 | #include <hard_config.h> |
---|
| 9 | #include <cpu.h> |
---|
| 10 | |
---|
| 11 | #define XCUREG(func,idx) (SEG_XCU_BASE + (XICU_REG((func),(idx)) << 2)) |
---|
| 12 | |
---|
[942] | 13 | void xcu_set_register(int x, int y, int func, int idx, uint32_t val) |
---|
[887] | 14 | { |
---|
[942] | 15 | iowrite32(CLUSTER_BASE(x,y) | XCUREG(func, idx), val); |
---|
[887] | 16 | } |
---|
| 17 | |
---|
[942] | 18 | uint32_t xcu_get_register(int x, int y, int func, int idx) |
---|
[887] | 19 | { |
---|
[942] | 20 | return ioread32(CLUSTER_BASE(x,y) | XCUREG(func, idx)); |
---|
[887] | 21 | } |
---|
| 22 | |
---|
| 23 | /* |
---|
| 24 | * vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab |
---|
| 25 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.