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

Subversion Repositories potato

[/] [potato/] [trunk/] [benchmarks/] [platform.h] - Blame information for rev 44

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 skordal
// The Potato Processor Benchmark Applications
2
// (c) Kristian Klomsten Skordal 2015 <kristian.skordal@wafflemail.net>
3
// Report bugs and issues on <http://opencores.org/project,potato,bugtracker>
4
 
5
// This file contains various platform details. The default defines in this file
6
// correspond to the "official" test platform, the Potato SoC for the Nexys4 board.
7
 
8
#ifndef PLATFORM_H
9
#define PLATFORM_H
10
 
11 20 skordal
// Clock frequency in Hz:
12 21 skordal
#define SYSTEM_CLK_FREQ 60000000
13 20 skordal
 
14 13 skordal
// Macro for using the addresses below in C code:
15
#define IO_ADDRESS(x)   ((volatile void *) x)
16
 
17
// Base addresses for the various peripherals in the system:
18
#define IMEM_BASE       0x00000000
19
#define DMEM_BASE       0x00002000
20
#define GPIO1_BASE      0x00004000 
21
#define GPIO2_BASE      0x00004800
22
#define UART_BASE       0x00005000
23
#define TIMER_BASE      0x00005800
24
 
25
// IRQs:
26
#define EXTERNAL_IRQ    0
27
#define TIMER_IRQ       5
28
 
29
// GPIO register offsets:
30
#define GPIO_INPUT      0
31
#define GPIO_OUTPUT     4
32
#define GPIO_DIR        8
33
 
34
// UART register offsets:
35
#define UART_TX         0
36
#define UART_RX         4
37
#define UART_STATUS     8
38
 
39
// Timer register offsets:
40
#define TIMER_CTRL      0
41
#define TIMER_COMPARE   4
42
#define TIMER_COUNTER   8
43
 
44
// Timer control register bits:
45
#define TIMER_CTRL_RUN          0
46
#define TIMER_CTRL_CLEAR        1
47
 
48
#endif
49
 

powered by: WebSVN 2.1.0

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