Last change
on this file since 1039 was
942,
checked in by cfuguet, 10 years ago
|
reconf: improve unitary tests for dspin_router
|
File size:
599 bytes
|
Line | |
---|
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 | |
---|
13 | void xcu_set_register(int x, int y, int func, int idx, uint32_t val) |
---|
14 | { |
---|
15 | iowrite32(CLUSTER_BASE(x,y) | XCUREG(func, idx), val); |
---|
16 | } |
---|
17 | |
---|
18 | uint32_t xcu_get_register(int x, int y, int func, int idx) |
---|
19 | { |
---|
20 | return ioread32(CLUSTER_BASE(x,y) | XCUREG(func, idx)); |
---|
21 | } |
---|
22 | |
---|
23 | /* |
---|
24 | * vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab |
---|
25 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.