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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [disk.h] - Blame information for rev 254

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

Line No. Rev Author Line
1 8 hellwig
/*
2
 * disk.h -- disk simulation
3
 */
4
 
5
 
6
#ifndef _DISK_H_
7
#define _DISK_H_
8
 
9
 
10
#define SECTOR_SIZE     512     /* sector size in bytes */
11
 
12
#define DISK_CTRL       0        /* control register */
13
#define DISK_CNT        4       /* sector count register */
14
#define DISK_SCT        8       /* disk sector register */
15
#define DISK_CAP        12      /* disk capacity register */
16
 
17
#define DISK_STRT       0x01    /* a 1 written here starts the disk command */
18
#define DISK_IEN        0x02    /* enable disk interrupt */
19
#define DISK_WRT        0x04    /* command type: 0 = read, 1 = write */
20
#define DISK_ERR        0x08    /* 0 = ok, 1 = error; valid when DONE = 1 */
21
#define DISK_DONE       0x10    /* 1 = disk has finished the command */
22
#define DISK_READY      0x20    /* 1 = capacity valid, disk accepts command */
23
 
24 25 hellwig
#define DISK_DELAY_USEC 10000   /* seek start/settle + rotational delay */
25
#define DISK_SEEK_USEC  50000   /* full disk seek time */
26
#define DISK_START_USEC 1000000 /* disk startup time (until DISK_READY) */
27 8 hellwig
 
28
 
29
Word diskRead(Word addr);
30
void diskWrite(Word addr, Word data);
31
 
32
void diskReset(void);
33
void diskInit(char *diskImageName);
34
void diskExit(void);
35
 
36
 
37
#endif /* _DISK_H_ */

powered by: WebSVN 2.1.0

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