URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1556 |
Rev 1557 |
Line 66... |
Line 66... |
return *(uint16_t *)(dat + (addr ^ 2));
|
return *(uint16_t *)(dat + (addr ^ 2));
|
}
|
}
|
|
|
uint8_t simmem_read8(oraddr_t addr, void *dat)
|
uint8_t simmem_read8(oraddr_t addr, void *dat)
|
{
|
{
|
return *(uint8_t *)(dat + ((addr & ~ADDR_C(3)) | (3 - addr & 3)));
|
return *(uint8_t *)(dat + ((addr & ~ADDR_C(3)) | (3 - (addr & 3))));
|
}
|
}
|
|
|
void simmem_write32(oraddr_t addr, uint32_t value, void *dat)
|
void simmem_write32(oraddr_t addr, uint32_t value, void *dat)
|
{
|
{
|
*(uint32_t *)(dat + addr) = value;
|
*(uint32_t *)(dat + addr) = value;
|
Line 81... |
Line 81... |
*(uint16_t *)(dat + (addr ^ 2)) = value;
|
*(uint16_t *)(dat + (addr ^ 2)) = value;
|
}
|
}
|
|
|
void simmem_write8(oraddr_t addr, uint8_t value, void *dat)
|
void simmem_write8(oraddr_t addr, uint8_t value, void *dat)
|
{
|
{
|
*(uint8_t *)(dat + ((addr & ~ADDR_C(3)) | (3 - addr & 3))) = value;
|
*(uint8_t *)(dat + ((addr & ~ADDR_C(3)) | (3 - (addr & 3)))) = value;
|
}
|
}
|
|
|
uint32_t simmem_read_zero32(oraddr_t addr, void *dat)
|
uint32_t simmem_read_zero32(oraddr_t addr, void *dat)
|
{
|
{
|
if (config.sim.verbose)
|
if (config.sim.verbose)
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.