URL
https://opencores.org/ocsvn/aemb/aemb/trunk
[/] [aemb/] [trunk/] [sw/] [iss/] [iss.cc] - Blame information for rev 199
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
198 |
sybreon |
/*!
|
2 |
|
|
AEMB INSTRUCTION SET SIMULATOR
|
3 |
|
|
Copyright (C) 2009 Shawn Tan <shawn.tan@aeste.net>
|
4 |
|
|
|
5 |
|
|
This program is free software: you can redistribute it and/or modify
|
6 |
|
|
it under the terms of the GNU General Public License as published by
|
7 |
|
|
the Free Software Foundation, either version 3 of the License, or
|
8 |
|
|
(at your option) any later version.
|
9 |
|
|
|
10 |
|
|
This program is distributed in the hope that it will be useful, but
|
11 |
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13 |
|
|
General Public License for more details.
|
14 |
|
|
|
15 |
|
|
You should have received a copy of the GNU General Public License
|
16 |
|
|
along with this program. If not, see
|
17 |
|
|
<http://www.gnu.org/licenses/>.
|
18 |
|
|
*/
|
19 |
|
|
|
20 |
199 |
sybreon |
#include "mem/InstMemory.hh"
|
21 |
|
|
#include "cpu/FetchUnit.hh"
|
22 |
198 |
sybreon |
|
23 |
|
|
#include <stdio.h>
|
24 |
|
|
|
25 |
|
|
using namespace std;
|
26 |
199 |
sybreon |
using namespace aemb;
|
27 |
198 |
sybreon |
|
28 |
|
|
int main(int argc, char *argv[])
|
29 |
|
|
{
|
30 |
|
|
|
31 |
|
|
printf("AEMB-ISS Copyright (C) 2009 Shawn Tan <shawn.tan@aeste.net>\n");
|
32 |
|
|
printf("This program comes with ABSOLUTELY NO WARRANTY.\n");
|
33 |
|
|
printf("This is free software, and you are welcome to redistribute it under certain conditions.\n");
|
34 |
|
|
|
35 |
199 |
sybreon |
InstMemory imem;
|
36 |
|
|
FetchUnit inst;
|
37 |
|
|
|
38 |
|
|
imem.readVmem();
|
39 |
|
|
//imem.dumpMem();
|
40 |
|
|
|
41 |
|
|
InstFormat i;
|
42 |
|
|
|
43 |
|
|
for (int j=0x100; j<512; j += 4) {
|
44 |
|
|
i = inst.tokInst(imem.getInst(j)); //inst.getDecoded(imem.getInst(0));
|
45 |
|
|
printf("\nOPC:%.2o RD:%.2d RA:%.2d RB:%.2d", i.r.op, i.r.rd, i.r.ra, i.r.rb);
|
46 |
|
|
printf("\nOPC:%.2o RD:%.2d RA:%.2d IMM:%.8x", i.i.op, i.i.rd, i.i.ra, i.i.im);
|
47 |
|
|
}
|
48 |
198 |
sybreon |
return 0;
|
49 |
|
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.