1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-02-22 23:27:49 +00:00
Files
antonblanchard.microwatt/tests/xics/xics.h
Benjamin Herrenschmidt 573b6b4bc4 soc: Rework interconnect
This changes the SoC interconnect such that the main 64-bit wishbone out
of the processor is first split between only 3 slaves (BRAM, DRAM and a
general "IO" bus) instead of all the slaves in the SoC.

The IO bus leg is then latched and down-converted to 32 bits data width,
before going through a second address decoder for the various IO devices.

This significantly reduces routing and timing pressure on the main bus,
allowing to get rid of frequent timing violations when synthetizing on
small'ish FPGAs such as the Artix-7 35T found on the original Arty board.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-05-25 11:33:09 +10:00

30 lines
481 B
C

#include <stdint.h>
#include "microwatt_soc.h"
#include "io.h"
#define XICS_XIRR_POLL 0x0
#define XICS_XIRR 0x4
#define XICS_RESV 0x8
#define XICS_MFRR 0xC
uint8_t xics_read8(int offset)
{
return readb(XICS_BASE + offset);
}
void xics_write8(int offset, uint8_t val)
{
writeb(val, XICS_BASE + offset);
}
uint32_t xics_read32(int offset)
{
return readl(XICS_BASE + offset);
}
void xics_write32(int offset, uint32_t val)
{
writel(val, XICS_BASE + offset);
}