Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Macros | Functions | Variables
cache.c File Reference
#include "testmod.h"
#include "leon3.h"
#include "cache.h"
#include "stdio.h"
#include "stdlib.h"
Include dependency graph for cache.c:

Macros

#define CCTRL_IFP   (1<<15)
 
#define CCTRL_DFP   (1<<14)
 
#define DDIAGMSK   ((1<<DTAGLOW)-1)
 
#define IDIAGMSK   ((1<<ITAGLOW)-1)
 
#define ICLOCK_BIT   6
 
#define DCLOCK_BIT   7
 
#define DIAGADDRMASK   ((1<<DTAGLOW)-1)
 

Functions

void flush (void)
 
int getitag (volatile int addr, volatile int set)
 
void setitag (volatile int addr, volatile int set, volatile int data)
 
void setidata (volatile int addr, volatile int set, volatile int data)
 
int getidata (volatile int addr, volatile int set)
 
int asmgetitag (volatile int addr)
 
void asmsetitag (volatile int addr, volatile int data)
 
int asmgetidata (volatile int addr)
 
void asmsetidata (volatile int addr, volatile int data)
 
void wsysreg (volatile int addr, volatile int data)
 
int rsysreg (volatile int addr)
 
void setdtag (volatile int addr, volatile int set, volatile int data)
 
void setddata (volatile int addr, volatile int set, volatile int data)
 
int chkdtag (volatile int addr)
 
int getdtag (volatile int addr, volatile int set)
 
int getddata (volatile int addr, volatile int set)
 
void dma (int addr, int len, int write)
 
int asmgetdtag (volatile int addr)
 
void asmsetdtag (volatile int addr, volatile int data)
 
int asmgetddata (volatile int addr)
 
void asmsetddata (volatile int addr, volatile int data)
 
void setudata (volatile int addr, volatile int data)
 
int getudata (volatile int addr)
 
int asmgetudata (volatile int addr)
 
int xgetpsr (void)
 
void setpsr (int psr)
 
void flushi (int addr, int data)
 
int cachetest (void)
 
long long int getdw (void *addr)
 

Variables

int icconf
 
int dcconf
 
int dsetsize
 
int isetsize
 
int dsetbits
 
int isetbits
 
int DSETS
 
int DTAGLOW
 
int DTAGAMSK
 
int ITAGAMSK
 
int ITAGLOW
 

Macro Definition Documentation

#define CCTRL_DFP   (1<<14)
#define CCTRL_IFP   (1<<15)
#define DCLOCK_BIT   7
#define DDIAGMSK   ((1<<DTAGLOW)-1)
#define DIAGADDRMASK   ((1<<DTAGLOW)-1)
#define ICLOCK_BIT   6
#define IDIAGMSK   ((1<<ITAGLOW)-1)

Referenced by getidata(), getitag(), setidata(), and setitag().

Function Documentation

int asmgetddata ( volatile int  addr)

References result.

Referenced by getddata().

int asmgetdtag ( volatile int  addr)

References result.

Referenced by chkdtag(), and getdtag().

int asmgetidata ( volatile int  addr)

References result.

Referenced by getidata().

int asmgetitag ( volatile int  addr)

References result.

Referenced by getitag().

int asmgetudata ( volatile int  addr)

References result.

Referenced by getudata().

void asmsetddata ( volatile int  addr,
volatile int  data 
)

Referenced by setddata().

void asmsetdtag ( volatile int  addr,
volatile int  data 
)

Referenced by setdtag().

void asmsetidata ( volatile int  addr,
volatile int  data 
)

Referenced by setidata().

void asmsetitag ( volatile int  addr,
volatile int  data 
)

Referenced by setitag().

int cachetest ( void  )

References wsysreg().

Referenced by leon3_test(), and main().

Here is the call graph for this function:

int chkdtag ( volatile int  addr)

References asmgetdtag(), DDIAGMSK, DSETS, and i.

Here is the call graph for this function:

void dma ( int  addr,
int  len,
int  write 
)
void flush ( void  )

Referenced by leon3_funclt_trap::LDSBA_reg::behavior(), leon3_funclt_trap::LDUH_imm::behavior(), leon3_funclt_trap::STA_reg::behavior(), leon3_funclt_trap::LDSHA_reg::behavior(), leon3_funclt_trap::STBA_reg::behavior(), leon3_funclt_trap::ST_imm::behavior(), leon3_funclt_trap::SWAPA_reg::behavior(), leon3_funclt_trap::STH_reg::behavior(), leon3_funclt_trap::LD_reg::behavior(), leon3_funclt_trap::ST_reg::behavior(), leon3_funclt_trap::LDD_reg::behavior(), leon3_funclt_trap::LDUH_reg::behavior(), leon3_funclt_trap::SAVE_imm::behavior(), leon3_funclt_trap::STD_imm::behavior(), leon3_funclt_trap::SWAP_imm::behavior(), leon3_funclt_trap::STH_imm::behavior(), leon3_funclt_trap::LDD_imm::behavior(), leon3_funclt_trap::LDUHA_reg::behavior(), leon3_funclt_trap::RETT_imm::behavior(), leon3_funclt_trap::RESTORE_reg::behavior(), leon3_funclt_trap::LDSH_reg::behavior(), leon3_funclt_trap::STD_reg::behavior(), leon3_funclt_trap::LDSH_imm::behavior(), leon3_funclt_trap::LDSTUBA_reg::behavior(), leon3_funclt_trap::BRANCH::behavior(), leon3_funclt_trap::SWAP_reg::behavior(), leon3_funclt_trap::STDA_reg::behavior(), leon3_funclt_trap::LDUBA_reg::behavior(), leon3_funclt_trap::LDA_reg::behavior(), leon3_funclt_trap::STHA_reg::behavior(), leon3_funclt_trap::LDDA_reg::behavior(), leon3_funclt_trap::RESTORE_imm::behavior(), leon3_funclt_trap::LD_imm::behavior(), leon3_funclt_trap::RETT_reg::behavior(), leon3_funclt_trap::SAVE_reg::behavior(), cramtest(), mmu_cache::exec_data(), mmu_cache::exec_instr(), mmu_cache_base::exec_instr(), leon3_funclt_trap::Instruction::RaiseException(), ramfill(), Leon3::read_byte(), leon3_funclt_trap::TLMMemory::read_byte(), leon3_funclt_trap::TLMMemory::read_dword(), Leon3::read_dword(), Leon3::read_half(), leon3_funclt_trap::TLMMemory::read_half(), Leon3::read_instr(), leon3_funclt_trap::TLMMemory::read_instr(), leon3_funclt_trap::TLMMemory::read_word(), Leon3::read_word(), Leon3::write_byte(), leon3_funclt_trap::TLMMemory::write_byte(), Leon3::write_dword(), leon3_funclt_trap::TLMMemory::write_dword(), Leon3::write_half(), leon3_funclt_trap::TLMMemory::write_half(), Leon3::write_word(), and leon3_funclt_trap::TLMMemory::write_word().

void flushi ( int  addr,
int  data 
)
int getddata ( volatile int  addr,
volatile int  set 
)

References asmgetddata(), and DDIAGMSK.

Here is the call graph for this function:

int getdtag ( volatile int  addr,
volatile int  set 
)

References asmgetdtag(), and DDIAGMSK.

Here is the call graph for this function:

long long int getdw ( void *  addr)
int getidata ( volatile int  addr,
volatile int  set 
)

References asmgetidata(), and IDIAGMSK.

Here is the call graph for this function:

int getitag ( volatile int  addr,
volatile int  set 
)

References asmgetitag(), and IDIAGMSK.

Here is the call graph for this function:

int getudata ( volatile int  addr)

References asmgetudata().

Here is the call graph for this function:

int rsysreg ( volatile int  addr)

References result.

Referenced by cramtest(), mmu_test(), ramfill(), and spw_test().

void setddata ( volatile int  addr,
volatile int  set,
volatile int  data 
)

References asmsetddata(), and DDIAGMSK.

Here is the call graph for this function:

void setdtag ( volatile int  addr,
volatile int  set,
volatile int  data 
)

References asmsetdtag(), and DDIAGMSK.

Here is the call graph for this function:

void setidata ( volatile int  addr,
volatile int  set,
volatile int  data 
)

References asmsetidata(), and IDIAGMSK.

Here is the call graph for this function:

void setitag ( volatile int  addr,
volatile int  set,
volatile int  data 
)

References asmsetitag(), and IDIAGMSK.

Here is the call graph for this function:

void setpsr ( int  psr)

References psr.

Referenced by fputest(), irqtest(), and l2irqtest().

void setudata ( volatile int  addr,
volatile int  data 
)
void wsysreg ( volatile int  addr,
volatile int  data 
)

Referenced by cachetest().

int xgetpsr ( void  )

References result.

Referenced by fputest(), irqtest(), and l2irqtest().

Variable Documentation

int dcconf

Referenced by cramtest(), and ramfill().

int dsetbits
int DSETS

Referenced by chkdtag().

int dsetsize
int DTAGAMSK
int DTAGLOW
int icconf

Referenced by cramtest(), and ramfill().

int isetbits
int isetsize
int ITAGAMSK
int ITAGLOW