KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
speedtest.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <arch/dmac.h>
#include <arch/timer.h>
#include <arch/irq.h>
#include <dc/pvr.h>
#include <kos/genwait.h>

Macros

#define ARRAY_SIZE(x)
 
#define BUF_SIZE   (1024 * 1024)
 

Functions

static void dma_done (void *d)
 
static uint64_t do_dma_transfer (unsigned int test, pvr_ptr_t vram1, pvr_ptr_t vram2)
 
int main (int argc, char **argv)
 

Variables

static char buf1 [BUF_SIZE]
 
static char buf2 [BUF_SIZE]
 
static dma_config_t dma_cfg
 
static const char *const test_lbl []
 

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE ( x)
Value:
(sizeof(x) ? sizeof(x) / sizeof((x)[0]) : 0)
static GLint x
Definition scissor.c:38

Referenced by main().

◆ BUF_SIZE

#define BUF_SIZE   (1024 * 1024)

Referenced by do_dma_transfer(), and main().

Function Documentation

◆ dma_done()

static void dma_done ( void * d)
static

◆ do_dma_transfer()

◆ main()

int main ( int argc,
char ** argv )

Variable Documentation

◆ buf1

char buf1[BUF_SIZE]
static

Referenced by do_dma_transfer().

◆ buf2

char buf2[BUF_SIZE]
static

Referenced by do_dma_transfer().

◆ dma_cfg

dma_config_t dma_cfg
static
Initial value:
= {
.channel = 1,
.unit_size = DMA_UNITSIZE_32BYTE,
.transmit_mode = DMA_TRANSMITMODE_BURST,
.callback = dma_done,
}
static void dma_done(void *d)
Definition speedtest.c:23
@ DMA_REQUEST_AUTO_MEM_TO_MEM
Definition dmac.h:73
@ DMA_ADDRMODE_INCREMENT
The source/destination address is incremented.
Definition dmac.h:112
@ DMA_UNITSIZE_32BYTE
Definition dmac.h:100
@ DMA_TRANSMITMODE_BURST
Definition dmac.h:128

Referenced by do_dma_transfer().

◆ test_lbl

const char* const test_lbl[]
static
Initial value:
= {
"DMAC, RAM to RAM: ",
"DMAC, RAM to VRAM: ",
"DMAC, VRAM to RAM: ",
"DMAC, VRAM to VRAM: ",
"PVR SQs: ",
"PVR DMA, 64-bit: ",
"PVR DMA, 32-bit: ",
}

Referenced by main().