Академический Документы
Профессиональный Документы
Культура Документы
19730A1
PCT/US2007/01696.1
(75) Inventors:
371 (c)(1),
(2), (4) Date:
28, 2006.
Publication Classification
G06F H5/06)
VAST SYSTEMS
TECHNOLOGY
CORPORATION, SUNNYVALE,
CA (US)
(21) Appl. No.:
12/159,831
(2006.01)
Correspondence Address:
Jul. 1, 2008
ABSTRACT
VPM ISA
Module
Connect net
VPM
Pipeline
odule
800 _z,
VPM ISA
Module
Device Model
Device Model
US 2008/0319730 A1
Device Model
Device Model
Virtual Platform
Virtual Platform
Virtual
Virtual Platform 3
Processor
Model
|
Virtual Platform 4
Peripheral
Peripheral
Device Model 1
Device Model 2
Peripheral
Device Model 3
Virtual Platform 1
Virtual Platform 2
US 2008/0319730 A1
Virtual
Processor
Model (VPM)
Peripheral
Peripheral
Peripheral
Device Model
Device Model 1
Device Model 2
Virtual Platform
US 2008/0319730 A1
Virtual
Processor
Model
Configuration
-
Module
Analysis
Module
Peripheral
Device Model - 1
Peripheral
Device
Model 2
evice Model
Test Bench
Virtual Platform
VPM Module
Device
Module 1
Memory
Module
US 2008/0319730 A1
Platform Module 3
Device
Module 2
Platform Module 4
Platform Module 1
Platform Module 2
FIG. 4
US 2008/0319730 A1
* Top-level module
Platform Module 1
Platform Module 2
H
H
H
Platform Module 3
Platform Module 4
:
Platform Module 5
US 2008/0319730 A1
Platform Module
Platform Module
F|G. 6
SMS2,u| BO
uop ng
US 2008/0319730 A1
US 2008/0319730 A1
VPM
Control
Module
Ports
- VPM
80
VPM ISA
DeCoder
Module
7
s m =
Connect net
wo-"
VPM
Pipeline
VPM
RegBank
odule
Module
FIG. 8
dule Instances
MO
; * WpmIsavaSTSeed
;
;
3.
US 2008/0319730 A1
l Instance Ports
E-B ; ; Connect
i-?" Connect
H- Decoder_>905
D
H Instance Ports
l Connect
_/
WpmRegbankVaSTSeed
E}
H
Instance Ports
E- Connect
p
COnnect _/909
****
3.
911
-#| WomPipelineWasTseed
t
E} $ InstElTCE. Ports
-p Connect
c
Instance Ports
Vpm trl
O 3.
-ff clockin
-p Reset
-p DebuggerReset
-p Nm.
-ff Hwi
l-ff Busclock
[h-? Bus
E-p Controlbusclock
l-ff Controlbus
-ff connect
900 _z,
Lg Connect
FIG. 9
US 2008/0319730 A1
*o
100111 001,..... . . 01
Decoder
Module
Seed ISA .
Module
Nevy Instruction bit Pattern
11 111 1 001...... . . 01
transformed
decoder
Instruction (MOVs
|io 2.
kos
10 O11 1 001...... . . 01
Decoder _w
Module NA
FIG. 11
User iSA
Module
MOVb ( )
{
loo?
US 2008/0319730 A1
Configures
plpe?ine
Existing
pipeline
module
plus mods.
Pipeline names
Pipeline stages
Pipeline delays
Pipeline stalls
Defines
egisters
* **
;
a?
| 3o4
module
plus mods.
FIG. 13
Register names,
US 2008/0319730 A1
805
Decoder
Module
(Vpm
decoder
.dll)
Extract Function ()
Fetched binary
instruction passed
through to the
decoder module
11111100 1...... . . 01
Behaviour Function ()
?
1403
Control
Module
(Vpm Ctrl
.dll)
Timing Function ()
fetched
via
bus interface
or
cache, etc.
Mnemonic Function ()
FIG. 14
US 2008/0319730 A1
fatract. * opcode)
733;} //store required fields
Behaviour ( * Fields)
//use stored fields
)
- fining * Fields)
}
Mnemonic ( * Fields)
//use stored fields
Required Fields
Control
Module
(Vprinctrl
.dll)
US 2008/0319730 A1
1613
( Behaviour
Funct (* Fields)
{
// Use fields
}
US 2008/0319730 A1
809
Pipeline
time and provides look up tables for the definition of the pipeline.
module
Control
module
(VpmCtrl
.dll)
FIG. 17
US 2008/0319730 A1
Required Fields
Mnemonic (* Fields)
{
// Use fields
}
FIG. 18
10put
1903
Provided
Output
Build
1905
1909
US 2008/0319730 A1
1913
Decoder
Provided
generator
ipx
tool
1907
1917
Decoder.dll
1911
1915
1919
Compile
and build
lsa.dll
FIG. 19
2007.
2d 7.
Specification
Provided
3.
2do'
lax .
User
SOUTCG
functions
US 2008/0319730 A1
:
:
t
i
/~
Build
:
i!
ISA .dll
|SA.dll
:
i
i
:
t
:
Initialization
Decoder
.dll
Decoder
.dll
!
!
!
Pipeline
--
Pipeline
Control
;
RegRank
.dll
:
{
FIG. 20
.dll
RegBank
.dll
US 2008/0319730 A1
ADD
31
28 27 26 25 24 23 22 21 20 19
16 15
12 11
Where
S = CPSR Update
Rn = Register of First Operand
Rd = Destination Register
Shifter Operand = Specifies second operand for the addition
F|G. 21A
ADD #immd, Dn
15
ADD # u5, Dn
1 1 1
8 7
1 1 1 0. F. FF 1 0 iiii i?
where
* =a 1prefix
when instructition
last in a serially
grouped VLES,
or is in
grouped VLES.isOtherwise
* = 0
FIG. 21 B
US 2008/0319730 A1
E. g WpmL/serisa
- Instruction Sets
E-? VaSTSeed
l-? UserInstructionBlock
l-? Instructions
-?, MyMow
i E-3} Identifiers
i -j Behaviour
#-ft Mnemonic
f Timing
g Extract
i i-, Fields
-k?'i Patterns
--t 1100 mnn mmmm UQ10 0000 0000 0000 0000
e.-.MyBEQz
Identifiers
&
# Mnemonic
? ExtraCt
F|G. 22
US 2008/0319730 A1
Table 1
Field Name
Add Element
VpmuserIsa:
Instruction Sets:
Description
reflects the project name.
InstructionSet
VaSTSeed
InstructionSet
User|nstructionBlock | Block
Conceptual grouping of
logical' etc.
Instructions
Instructions
MyMov
Instruction
Identifiers
Identifiers
Behavior
Identifier
Mnemonic
Identifier
definition
Name of the mnemonic
namespace definition
Name of the timing function of
type timing that will be generated
into the namespace definition
Name of the extract function of
Identifier
Pattern
Pattern
US 2008/0319730 A1
Namespace InstSet_MyInst_v1.
{
struct s]?ields
{
enum e.VpmReg Rn;
enum eVpmReg Rd;
tRoolean. Cpsr;
tWord 16 So;
tWordl, Cond;
};
void tint22 extract (const void const primage, sIFields " const
prield)
{
const tword 32 * const plmage:32 = (tword 32 *) plmage;
plield->So = plmage 32 [0] & OxFFF;
plield->Rd = eVpmReg ( (plmage32 [0] --> 4) & 0xF) ;
prield->Rn = eVpmReg ( (plmage32 [0] --> 8) & 0xF) ;
plield->Cpsr = primage32 [0] & 0x00100000;
prield->Cond = (pimage32 [0] --> 28) & 0xF;
FIG. 24
US 2008/0319730 A1
User-defined
Generated File
classes
(Fields)
Instruction
association
InstSet_Instl vl
7.5 oz.
User-defined
mac ros
using Fields
using Extract
(Extract)
behaviour
timing
mnemonic
User-defined
InstSet_Inst2_v2
identifiers
(User Funcs.)
using Fields
using Extract
behaviour
timing
mnemonic
User-defined
instructions
(Patterns)
Build Phase
User source
implementation
7S 2.
FIG. 25
2s ob?
US 2008/0319730 A1
/=
20, o
Build ISA
tool
7.62o 2.
---- nnnn mmmm iiii
2004
{Inst1,
ExtractFunc1, Fields, Behave etc)
(Inst2, ExtractFunc2, Fields, Behave etc)
(Inst3, ExtractFunc2, Fields, Behave etc)
FIG. 26
Lin
r l
Inst2 > 2.60%
US 2008/0319730 A1
};
// extract Function definition
pVpmMnem->GetRegName (pfields->Rim) );
FIG. 27
US 2008/0319730 A1
Target Code
MOV R1, R2
SHL R1, 0x1
MOV R1, R2
Behaviour
New
translate
Execute and
translate new
Code
implementation
Execute
existing
translated
code
110 0 1 1 O
110 0 1 01
1 110 0 1 0
O 1 O 0 1 11
001 0010
Host translated
code
z & 14
US 2008/0319730 A1
struct spields
{
enum eVpmReg. Rim;
};
// Extract Function definition
prields)
}
// define the rest of the instruction function definitions
FIG. 29
US 2008/0319730 A1
{
struct slfields
{
enum eVpmReg Rn;
tlnts 2 PCOffset ;
};
//Extract Function definition
prields)
xIF (ccle:Q) ;
x-ENDIF;
FIG. 30
Target Binary
Ol 10010101.01
O010 01001110
CodeGenerator Behavior
Functions
Behavior
{
Generate Code
}
011 001 01 01 01
0 0 1 001001110
Behavior
{
Generate Code
101 11 1 00001.0
US 2008/0319730 A1
Behavior
{
Generate Code
}
Behavior
{
Generate Code
<!-Translate Time
FIG. 31
100 1 001010010
1 + 1 0 1 01 001001
US 2008/0319730 A1
Table 2
MOV Rn, Rm :
Register Number
Contents of Registers
Contents of Registers
Immediate Value
LW Rn, Cisp16(Rm)
Contents of Register Rm
Displacement
Contents of Registers
Address to Branch to
FIG. 32
:pT(Se1O28Q)!'8Y2
US 2008/0319730 A1
US 2008/0319730 A1
US 2008/0319730 A1
US 2008/0319730 A1
Instruction
Fetch
Read
FETCH
DECODE
Sat
WB
EXECUTE
MEMORY
WRITE
FIG. 36
//
O
JXepuXn#
o3x3//
{
!
US 2008/0319730 A1
US 2008/0319730 A1
US 2008/03.1973.0 A1
COIIll]1011.
line.
SUMMARY
new instruction.
US 2008/03.1973.0 A1
US 2008/03.1973.0 A1
US 2008/03.1973.0 A1
US 2008/03.1973.0 A1
US 2008/03.1973.0 A1
[0118] The ports that define the inputs and outputs of the
module.
US 2008/03.1973.0 A1
807, one pipeline module 809, and one or more register bank
modules 811. These modules are all in a virtual processor
model wrapper module 801 that defines the modules that
define the entire virtual processor model 800, and their inter
connection.
[0169]
[0170]
[0171]
[0172]
[0173]
Bus interfaces.
Cache subsystems.
MMU subsystem(s), including TLB(s).
Target code loading.
Control and interfacing to the simulation system
and infrastructure.
US 2008/03.1973.0 A1
ponents.
model.
Specifying/Defining Instructions
[0186] Associated with each target processor instruction
are a set of attributes that in one embodiment are implemented
as functions.
tion. In one embodiment, the user ISA module may have ports
and parameters associated with it.
[0198] With regard to the user transformable pipeline mod
ule that describes the target pipeline of the target processor,
the user has the ability to define the target pipeline in terms of
the instruction timing of the instruction. In conjunction and
during interaction with the ISAs, this forms the configuration
of the maintiming component of the virtual processor model.
US 2008/03.1973.0 A1
the instruction.
function body.
[0213] By using extract functions, the opcode of an instruc
tion can be changed but the fields to be extracted remain the
SIIl.
provided by the user, the user source used to build the user
ISA module(s). This function forms the generated host code
that is executed each time a target instruction is called within
the target binary image. FIG. 16 shows in simple diagram
matic form the interaction of the behavior function 1613
defined in the ISA module and the control module 803, using
the same example as used in FIG. 15.
[0217] The timing function specifies the timing for the
instruction. The timing for a particular instruction is typically
specified in terms of its interactions with the virtual processor
model pipeline module. The pipeline module configures the
control module 803 at initialization time and provides lookup
tables for the definition of the pipeline. The control module
803 calls this function. In one embodiment, a timing applica
tion programmers interface (API) is provided and used in
defining the timing function; API function calls are used to
interact with the control module from within the body of this
function. FIG. 17 shows the interaction of the timing function
US 2008/03.1973.0 A1
[0228) A user can then correct any errors by editing the isz
file 1909 or the idx files 1907. This may involve adding new
instructions to fill gaps or modifying existing instructions to
remove overlaps. A user, for example, may want to define
default functions to fill in the gaps. When the errors have been
addressed, one repeats the decoder generator tool step. This
cycle continues until there are no errors.
[0229] The decoder generator tool generates a decoder
module 1917, in the form of a .dll in one MS Windows
implementation.
[0230] A user supplies ISA modules, e.g., as ISA.dlls 1919
to implement the functions that model new or altered instruc
tions. The ISA .dlls 1919 are built from source data 1911
.dll can be developed in parallel once the user idz files 1907
are stable.
US 2008/03.1973.0 A1
and #Immed:
Rd
#Immed
pattern.
where R12 and R13 are encodings for R13 and R12.
[0271] The extract function thus extracts the fields for the
control module to pass to the behavior, timing and mnemonic
functions. In the simplest case, there is a single extract func
tion per instruction, and hence this extract function is con
tained within the same namespace as all other user functions.
[0272] In one example, the simplest and easiest approach
for a user when adding an instruction or replacing an instruc
tion which overrides an existing instruction in the seed virtual
processor model is to define the instruction in its entirety.
[0273] Thus, to specify an instruction, there is needed to be
specified a pattern, the timing function name, the behavior
function name, the mnemonic function name, the extract
function, the extract fields, the extract data structure, and so
where ---- is used to mask the rest of the opcode, nnnn is the
extract source register store-in structure, and mrnmm is the
extract destination register store-in structure.
[0283] FIG. 26 shows how a pool of extract functions and
fields can be declared and also shows how the virtual proces
sor model transformer tool automatically associates the
extract function with the instruction by means of pattern
matching and macro replacement during the build of an ISA.
The method pre-processes the idz file and generates the
namespace definitions for the user instructions.
[0284] Thus, when specifying instructions, in one embodi
ment, a user can explicitly specify an aspect such as the
extract pattern, e.g., by its predefined name, or, in one
embodiment, as an alternate, not specify the pattern, and the
virtual processor model transformer tool carries out a pattern
match to see if there is a matching extract pattern and pattern
name, and substitutes for the found extract pattern and name.
[0285) Having extract functions provide, for example, the
ability to easily specify different instructions that have the
same fields to be extracted. For example two instructions may
have different opcodes but the fields to be extracted could be
the same. Therefore the behavior/mnemonic/timing func
tions for these instructions are essentially independent of the
actual full opcode of the instruction. A user can declare func
tional blocks that can re-used and re-specified in terms of
common extract functions and fields. For large amounts of
instruction development it can be more convenient in design
I?e-USe.
US 2008/03.1973.0 A1
US 2008/03.1973.0 A1
US 2008/03.1973.0 A1
then have the contents written into R3 at the Write stage, with
the contents available at the end of Write.
resents available.
would be:
[0335] ... O 0 1 1 0 1 1
to indicate that the result is available after two ticks, but not
A plp
pipeline delavs
y arravy would then be as follows:
Exec
Memory
Write
Source
Exec
(when
needed)
Memory
Write
Exec 1A
Exec.1M
Exec2M
Stage
number
Exec
Memory
Write
Exec 1A
Exec2A
O
1
US 2008/03.1973.0 A1
-continued
Execution
Stage
number
Exec.1M
Exec2M
O
1
Execution
Stage
number
Exec
Mem
WB
Mult
Sat
RdSht
Link
O
1
2
1
O
2
1
target code.
[0346) One apparatus embodiment of the invention
includes a host processing system including one or more
processors, a memory subsystem, and a storage subsystem.
The memory and/or host subsystem includes software for
implementing one or more of the simulation methods
described herein, including code for describing the trans
formable virtual processor model, and softwarethe VPM
transformer toolfor transforming a provided, e.g., seed vir
tual processor model to a user defined model.
[0347] Thus has been described a method of transforming a
provided virtual processor model to a user virtual processor
model. Also described herein is a tool, e.g., as instructions for
operating in a host computer system for converting a provided
virtual processor model to a user virtual processor model.
Also presented here is a method of specifying one or more
characteristics of a target processor to transform a provided
virtual processor model to a user virtual processor model that
when operating in a c-simulation system, simulates the opera
tion of the target processor. For example, presented here is a
method of specifying one or more characteristics of instruc
tions to transform a provided virtual processor model to a user
virtual processor model.
[0348] It should be appreciated that although the invention
has been described in the context of software operating in an
MS Windows environment, and further, for operating on a
host computer system that includes a processor that has an
instruction set that includes instructions substantially con
forming to the Intel x86 instruction set, the invention is not
restricted to such a context, or such an operating system or
such a host processor. For example, many of the modules
described herein are in the form of .dlls. Other embodiments
US 2008/03.1973.0 A1
US 2008/03.1973.0 A1
direct contact with each other but yet still co-operate or inter
act with each other.
US 2008/03.1973.0 A1
timing function.
14. A method as recited in claim 10, wherein a pattern is
provided using a combination of a first and a second symbol
for bits that must be 0 and 1, respectively, and symbols for
other fields, including any extract fields.
15. A method as recited in claim 9, further including pro
viding one or more patterns to indicate one or more exception
patterns that describe exceptions to patterns.
16. A method as recited in claim 15, further comprising:
building a decoder from the pattern definitions that include
one or more exception patterns.
17. A method as recited in claim 6, wherein the description
of a user target pipeline includes one or more of the number of
execution stages, and the delays between when one instruc
tion needs register information, and when an earlier instruc
tion.