Back to project
URL
https://opencores.org/ocsvn/altor32/altor32/trunk
[/ ] [altor32/ ] [trunk/ ] [or1k-sim/ ] [README.txt ] - Blame information for rev 45
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No.
Rev
Author
Line
1
28
ultra_embe
AltOR32 OpenRisc Simulator
2
--------------------------
3
4
Details
5
-------
6
7
- Simple simulator for OpenRisc instructions, where only the essentials have been implemented.
8
- Compiles under Linux (make) or Windows (VS2003+).
9
- Able to execute OpenRisc 1000 (ORBIS32) code compiled with the following options:
10
-msoft-div -msoft-float -msoft-mul -mno-ror -mno-cmov -mno-sext
11
12
Usage
13
-----
14
15
-f filename.bin = Executable to load (binary) [Required]
16
-t = Enable program trace [Optional]
17
-v 0xX = Trace Mask [Optional]
18
-b 0xnnnn = Memory base address [Optional]
19
-s 0xnnnn = Memory size [Optional]
20
-l 0xnnnn = Executable load address [Optional]
21
-c nnnn = Max instructions to execute [Optional]
22
23
Console Output
24
--------------
25
26
This simulator implements some of the basic l.nop extensions such as NOP_PUTC(4).
27
28
Example:
29
30
void putc(int c)
31
{
32
register char t1 asm ("r3") = c;
33
asm volatile ("\tl.nop\t%0" : : "K" (4), "r" (t1));
34
}
35
36
Implementing Peripherals
37
------------------------
38
39
Peripherals can be implemented by creating a new class which inherits from 'Peripheral' and overrides the following functions to provide memory mapped I/O extensions;
40
41
// Peripheral access
42
virtual void Reset(void)
43
virtual void Clock(void)
44
virtual TRegister Access(TAddress addr, TRegister data_in, TRegister wr, TRegister rd)
45
virtual bool Interrupt(void)
46
virtual TAddress GetStartAddress()
47
virtual TAddress GetStopAddress()
48
49
The new peripheral can then be attached to the simulator (using AttachPeripheral).
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.