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

Subversion Repositories potato

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

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 45 skordal
#define SYSTEM_CLK_FREQ 50000000
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 61 skordal
#define SEG7_BASE       0x00006000
25 13 skordal
 
26
// IRQs:
27
#define EXTERNAL_IRQ    0
28
#define TIMER_IRQ       5
29
 
30
// GPIO register offsets:
31
#define GPIO_INPUT      0
32
#define GPIO_OUTPUT     4
33
#define GPIO_DIR        8
34
 
35
// UART register offsets:
36
#define UART_TX         0
37
#define UART_RX         4
38
#define UART_STATUS     8
39
 
40
// Timer register offsets:
41
#define TIMER_CTRL      0
42
#define TIMER_COMPARE   4
43
#define TIMER_COUNTER   8
44
 
45
// Timer control register bits:
46
#define TIMER_CTRL_RUN          0
47
#define TIMER_CTRL_CLEAR        1
48
 
49 61 skordal
// 7-Segment register offsets:
50
#define SEG7_ENABLE     0
51
#define SEG7_VALUE      4
52
 
53 13 skordal
#endif
54
 

powered by: WebSVN 2.1.0

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