OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [or1ksim/] [peripheral/] [mc.c] - Diff between revs 997 and 1308

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 997 Rev 1308
Line 26... Line 26...
 
 
   Limitations:
   Limitations:
    - memory refresh is not simulated
    - memory refresh is not simulated
*/
*/
 
 
 
#include <string.h>
 
 
#include "mc.h"
#include "mc.h"
#include "abstract.h"
#include "abstract.h"
#include "sim-config.h"
#include "sim-config.h"
 
#include "debug.h"
 
 
extern struct dev_memarea *dev_list;
extern struct dev_memarea *dev_list;
 
 
static struct mc mc;
static struct mc mc;
 
 
Line 102... Line 105...
 
 
/* Read a specific MC register. */
/* Read a specific MC register. */
unsigned long mc_read_word(unsigned long addr)
unsigned long mc_read_word(unsigned long addr)
{
{
        unsigned long value = 0;
        unsigned long value = 0;
        int chipsel;
 
 
 
        debug(5, "mc_read_word(%x)", addr);
        debug(5, "mc_read_word(%x)", addr);
 
 
  addr -= config.mc.baseaddr;
  addr -= config.mc.baseaddr;
 
 
Line 176... Line 178...
 
 
void mc_status()
void mc_status()
{
{
    int i;
    int i;
 
 
    PRINTF( "\nMemory Controller at 0x%08X:\n", config.mc.baseaddr );
    PRINTF( "\nMemory Controller at 0x%08lX:\n", config.mc.baseaddr );
    PRINTF( "POC: 0x%08X\n", mc.poc );
    PRINTF( "POC: 0x%08lX\n", mc.poc );
    PRINTF( "BAS: 0x%08X\n", mc.ba_mask );
    PRINTF( "BAS: 0x%08lX\n", mc.ba_mask );
    PRINTF( "CSR: 0x%08X\n", mc.csr );
    PRINTF( "CSR: 0x%08lX\n", mc.csr );
 
 
    for (i=0; i<N_CE; i++) {
    for (i=0; i<N_CE; i++) {
        PRINTF( "CE %02d -  CSC: 0x%08X  TMS: 0x%08X\n", i, mc.csc[i], mc.tms[i]);
        PRINTF( "CE %02d -  CSC: 0x%08lX  TMS: 0x%08lX\n", i, mc.csc[i],
 
               mc.tms[i]);
    }
    }
}
}
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.