URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 32 |
Rev 35 |
Line 32... |
Line 32... |
#include "abstract.h"
|
#include "abstract.h"
|
#include "arch.h"
|
#include "arch.h"
|
#include "trace.h"
|
#include "trace.h"
|
#include "execute.h"
|
#include "execute.h"
|
#include "sprs.h"
|
#include "sprs.h"
|
|
#include "stats.h"
|
#include "except.h"
|
#include "except.h"
|
|
|
extern unsigned long reg[];
|
extern unsigned long reg[];
|
|
|
/* This is an abstract+physical memory array rather than only physical
|
/* This is an abstract+physical memory array rather than only physical
|
Line 216... |
Line 217... |
unsigned long eval_mem32(unsigned long memaddr)
|
unsigned long eval_mem32(unsigned long memaddr)
|
{
|
{
|
unsigned long temp;
|
unsigned long temp;
|
struct dev_memarea *dev;
|
struct dev_memarea *dev;
|
|
|
|
slp_checkaccess(memaddr, SLP_MEMREAD);
|
memaddr = simulate_dc_mmu_load(memaddr);
|
memaddr = simulate_dc_mmu_load(memaddr);
|
|
|
if (memaddr < (MEMORY_START + MEMORY_LEN)) {
|
if (memaddr < (MEMORY_START + MEMORY_LEN)) {
|
temp = mem[memaddr].data << 24;
|
temp = mem[memaddr].data << 24;
|
temp += mem[memaddr + 1].data << 16;
|
temp += mem[memaddr + 1].data << 16;
|
Line 274... |
Line 276... |
|
|
void set_mem32(unsigned long memaddr, unsigned long value)
|
void set_mem32(unsigned long memaddr, unsigned long value)
|
{
|
{
|
struct dev_memarea *dev;
|
struct dev_memarea *dev;
|
|
|
|
slp_checkaccess(memaddr, SLP_MEMWRITE);
|
memaddr = simulate_dc_mmu_store(memaddr);
|
memaddr = simulate_dc_mmu_store(memaddr);
|
|
|
if (memaddr < (MEMORY_START + MEMORY_LEN)) {
|
if (memaddr < (MEMORY_START + MEMORY_LEN)) {
|
mem[memaddr].data = (value >> 24);
|
mem[memaddr].data = (value >> 24);
|
mem[memaddr + 1].data = (char)(value >> 16);
|
mem[memaddr + 1].data = (char)(value >> 16);
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.