File: README

package info (click to toggle)
systemc 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,768 kB
  • sloc: cpp: 181,958; sh: 4,925; asm: 2,700; perl: 1,980; ansic: 1,931; makefile: 1,761; fortran: 492; python: 482; awk: 157; csh: 50
file content (139 lines) | stat: -rw-r--r-- 6,269 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
///////////////////////////////////////////////////////////////
//  This code is written at SYNOPSYS, Inc.
///////////////////////////////////////////////////////////////
/***************************************************************************
 
   Copyright (c) 1998-1999 Synopsys, Inc.
   ALL RIGHTS RESERVED
 
*****************************************************************************/
//  Module   : README
//  Filename : $Source: /Users/acg/CVSROOT/systemc-2.3/examples/sysc/risc_cpu/README,v $
//  Author   : Martin Wang
//  Revision : $Revision: 1.1.1.1 $
//  Date     : $Date: 2006/12/15 20:20:04 $
//  Company  : SYNOPSYS, Inc.
//  Purpose  : This is a README file for risc_cpu using SystemC.
//             Instruction Set Architecure defined by Martin Wang.
//  Contact  : mwang@synopsys.com
///////////////////////////////////////////////////////////////
//  Modification History
//
//  $Log: README,v $
//  Revision 1.1.1.1  2006/12/15 20:20:04  acg
//  SystemC 2.3
//
//  Revision 1.1.1.1  2005/12/19 23:16:42  acg
//  First check in of SystemC 2.1 into its own archive.
//
//  Revision 1.2  2005/04/04 00:19:37  acg
//  Changes for directory name of sysc rather than systemc.
//
//  Revision 1.1.1.1  2003/10/01 21:50:43  acg
//  Initial use of CVS.
//
///////////////////////////////////////////////////////////////
//	This example demonstrates a simple RISC CPU design.
//      This is a simulation only example using Synopsys's
//	SystemC(TM) C++ class library.  This example
//	was tested on Solaris 2.5 using gcc.
//     
//      Several text files were used to initialize memory data
//	bios 	= system bios data
//	icache	= initial instruction cache
//	dcache	= initial data cache
//	register = initial register values
//	abc.asm	= a sample program
//
//	A simple assembler named assembler.pl which was written in PERL. 
//	Usage: assembler.pl <testname> -code > icache.img
//	Usage: assembler.pl <testname> > printout.img (for viewing only)
//
//	Steps:
//
//	NOTE: ALL COMMAND LISTED ARE UNIX COMMANDS.
//
//	1) set up the enviroment for SystemC.
//
//	2) based on abc.asm , write your own assembly language program, named <testname.asm>
//
//	3) assembler.pl abc.asm -code > icache.img
//
//	4) gmake
//	
//	5) run the executable demo.x
//
// Here is some details:
//
//First let me briefly describe the micro-architecture of this RISC CPU model.
//The CPU itself is modeled using SystemC.  The CPU reads in assembly program and
//execute it and write the result back to registers/data memory.  The instruction
//set is defined based on commercial RISC processor together with MMX-like 
//instruction for DSP program. It consists of >39 instructions (arithmetic, 
//logical, branch, floating point, SIMD(MMX-like)).
// 
//For Hardware/software partitioning, user can either write their algorithm
//in assembly program, or use YACC to convert it to this CPU's instruction
//set.  Then run it through the CPU, and you can measure how many cycles it
//takes and user can alter the memory latency or CPU behavior to be more
//realistic to get a better estimate.  Say, IDCT is the algorithm considered.
//User can then write a hardware IDCT model using SystemC, and determine
//what is the complexity and cost if IDCT is going to be implemented in hardware.
//Then maybe some part of IDCT can be hardware, some can be software. In either
//cases, SystemC is a useful tool in hardware/software partitioning.
// 
//Furthermore, this example can be also interpreted as ISS (instruction set 
//simulator), software developer can use this model to test their software
//early in the development cycle before the silicon chip come back from 
//fabrication/manufacturing. 
// 
//Finally, in order to compile the example you have to execute 'make'. Please
//note that the file Makefile.defs contains the location of the SystemC
//class library, which might be different for you, depending on your
//installation. Once the compilation is finished, you will find an
//executable 'demo.x'. 
// 
//The CPU example structure looks like this:
// 
//.____________________________________________________.
//| Hardware Side                                      |
//| ._______.  .________.     .___________________.    |   
//| |       |  |        |   +-|Integer Execution  |--  |
//| | Fetch |--| Decode |---| `-------------------' |  |
//| ._______.  .________.   | .___________________. |  |
//|     |          |        +-|Floating Point Exe |-+  |
//| .___|___.  .___|____.   | `-------------------' |  |
//| |       |  |        |   | ._________________.   |  |                      
//| |Icache |  | Dcache |   +-|MMXlike Execution|---+  |
//| ._______.  .________.     `-----------------'   |  |
//|     ^          |--------------------------------.  |
//._____|______________________________________________.
//      |
//      |
//      .---------------------------------.
//._______________________________________|____________.
//| Software Side (Develop for your market|segments)   |
//| ._________________________.           |            | 
//| | Assembly code:          |           |            |
//| |   lw       R5, R5, 1    |           .            |
//| |   addi     R5, R5       | %assembler.pl foo.asm >| 
//| |   fadd     R3, R11, R11 |  -code > icache        |
//| |   bne      R5, R6,  5   |                        |
//| |   mmxadds  R13, R11, R11|           ^            |
//| |   sw       R13, R0, 10  |           |            |
//| ._________________________. _ _ _ _ _>|            |
//.____________________________________________________.
// 
// 
//Hope this shows some concepts of using C++ for hardware modeling.
// 
//The materials on this directory(the "Example") are provided by Synopsys Inc.
//as a service to its customers and may be used for informational purposes only.  
//The work and intellectual property presented in this example is considered 
//propriety to Synopsys Inc. Synopsys Inc.'s trademarks maybe used publicly with 
//permission only from Synopsys Inc. Use of Synopsys's trademarks in advertising 
//and promotion of Synopsys products requires proper acknowledgement. 
//All other brands and names are property of their respective owners. 
//
///////////////////////////////////////////////////////////////