ParaNut SystemC Model
A SystemC Model of the ParaNut architecture
Macros | Functions
memu.cpp File Reference
#include "memu.h"
#include "lfsr.h"
Include dependency graph for memu.cpp:

Macros

#define SINGLE_CPU   (CFG_NUT_CPU_CORES_LD==0)
 
#define IDX_OF_CPU_IN_PORT(cpu)   (CFG_MEMU_BANK_RAM_PORTS == 2 ? (cpu>>1) : cpu)
 
#define IDX_OF_CPU(cpu)   (CFG_MEMU_BANK_RAM_PORTS == 2 ? (cpu>>1)*3 : cpu*3)
 
#define IDX_RP(cpu)   (IDX_OF_CPU(cpu))
 
#define IDX_IP(cpu)   (IDX_OF_CPU(cpu) + 1)
 
#define IDX_WP(cpu)   (IDX_OF_CPU(cpu) + 2)
 
#define IDX_BUSIF   ((CFG_MEMU_RPORTS+CFG_MEMU_WPORTS+SINGLE_CPU) / CFG_MEMU_BANK_RAM_PORTS)
 
#define RAMPORT_BUSIF   (CFG_MEMU_BANK_RAM_PORTS - 1)
 
#define RAMPORT(idx)   ((idx) == IDX_BUSIF ? RAMPORT_BUSIF : ((idx) % CFG_NUT_CPU_CORES) % CFG_MEMU_BANK_RAM_PORTS)
 

Functions

ostream & operator<< (ostream &os, const SCacheTag &t)
 
void sc_trace (sc_trace_file *tf, const SCacheTag &t, const std::string &name)
 
ostream & operator<< (std::ostream &o, const SBusIfRegs &t)
 
void sc_trace (sc_trace_file *tf, const SBusIfRegs &t, const std::string &name)
 
ostream & operator<< (std::ostream &o, const SBusIfMmuRegs &t)
 
void sc_trace (sc_trace_file *tf, const SBusIfMmuRegs &t, const std::string &name)
 

Macro Definition Documentation

◆ IDX_BUSIF

◆ IDX_IP

#define IDX_IP (   cpu)    (IDX_OF_CPU(cpu) + 1)

◆ IDX_OF_CPU

#define IDX_OF_CPU (   cpu)    (CFG_MEMU_BANK_RAM_PORTS == 2 ? (cpu>>1)*3 : cpu*3)

◆ IDX_OF_CPU_IN_PORT

#define IDX_OF_CPU_IN_PORT (   cpu)    (CFG_MEMU_BANK_RAM_PORTS == 2 ? (cpu>>1) : cpu)

◆ IDX_RP

#define IDX_RP (   cpu)    (IDX_OF_CPU(cpu))

◆ IDX_WP

#define IDX_WP (   cpu)    (IDX_OF_CPU(cpu) + 2)

◆ RAMPORT

#define RAMPORT (   idx)    ((idx) == IDX_BUSIF ? RAMPORT_BUSIF : ((idx) % CFG_NUT_CPU_CORES) % CFG_MEMU_BANK_RAM_PORTS)

◆ RAMPORT_BUSIF

#define RAMPORT_BUSIF   (CFG_MEMU_BANK_RAM_PORTS - 1)

◆ SINGLE_CPU

#define SINGLE_CPU   (CFG_NUT_CPU_CORES_LD==0)

Function Documentation

◆ operator<<() [1/3]

ostream& operator<< ( ostream &  os,
const SCacheTag t 
)

◆ operator<<() [2/3]

ostream& operator<< ( std::ostream &  o,
const SBusIfMmuRegs t 
)

◆ operator<<() [3/3]

ostream& operator<< ( std::ostream &  o,
const SBusIfRegs t 
)

◆ sc_trace() [1/3]

void sc_trace ( sc_trace_file *  tf,
const SBusIfMmuRegs t,
const std::string &  name 
)

◆ sc_trace() [2/3]

void sc_trace ( sc_trace_file *  tf,
const SBusIfRegs t,
const std::string &  name 
)

◆ sc_trace() [3/3]

void sc_trace ( sc_trace_file *  tf,
const SCacheTag t,
const std::string &  name 
)