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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sw/] [cc/] [simboard.hh] - Blame information for rev 141

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

Line No. Rev Author Line
1 141 sybreon
/* $Id: simboard.hh,v 1.5 2008-04-27 16:04:42 sybreon Exp $
2 113 sybreon
**
3
** AEMB Function Verification C++ Testbench
4
** Copyright (C) 2004-2008 Shawn Tan 
5
**
6
** This file is part of AEMB.
7
**
8
** AEMB is free software: you can redistribute it and/or modify it
9
** under the terms of the GNU General Public License as published by
10
** the Free Software Foundation, either version 3 of the License, or
11
** (at your option) any later version.
12
**
13
** AEMB is distributed in the hope that it will be useful, but WITHOUT
14
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
** or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16
** License for more details.
17
**
18
** You should have received a copy of the GNU General Public License
19
** along with AEMB.  If not, see .
20
*/
21
 
22
#include "aemb/msr.hh"
23 137 sybreon
#include 
24
#include 
25 113 sybreon
 
26
#ifndef SIMBOARD_HH
27
#define SIMBOARD_HH
28
 
29
#define CODE_FAIL 0xDEADBEEF
30
#define CODE_PASS 0xCAFEF00D
31
 
32
 
33
/*
34
INTERRUPT TESTS
35
*/
36
 
37 139 sybreon
#ifdef __cplusplus
38
using namespace aemb;
39
#endif
40
 
41 113 sybreon
/*
42
I/O FUNCTIONS
43
*/
44
void outbyte(char c)
45
{
46
  volatile char *COUT = (char *) 0xFFFFFFC0;
47
  *COUT = c;
48
}
49
 
50 137 sybreon
char inbyte()
51
{
52
  return 0;
53
}
54
 
55 125 sybreon
void outfloat(float f)
56
{
57
  volatile float *FOUT = (float *) 0xFFFFFFD0;
58
  *FOUT = f;
59
}
60
 
61 113 sybreon
void outword(long l)
62
{
63
  volatile long *DOUT = (long *) 0xFFFFFFD0;
64
  *DOUT = l;
65
}
66
 
67
void trap(long e)
68
{
69
  outword(e);
70
  outword(CODE_FAIL);
71
  // hang the machine
72 125 sybreon
  exit(e);
73 113 sybreon
}
74
 
75
#endif
76
 
77
/*
78
$Log: not supported by cvs2svn $
79 141 sybreon
Revision 1.4  2008/04/26 19:32:00  sybreon
80
Made headers C compatible.
81
 
82 139 sybreon
Revision 1.3  2008/04/26 18:07:19  sybreon
83
Minor cosmetic changes.
84
 
85 137 sybreon
Revision 1.2  2008/04/21 12:13:12  sybreon
86
Passes arithmetic tests with single thread.
87
 
88 125 sybreon
Revision 1.1  2008/04/11 15:32:28  sybreon
89
initial checkin
90
 
91 113 sybreon
*/

powered by: WebSVN 2.1.0

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