DE102004005123A1 - Virtual program command conversion arrangement, e.g. for an embedded system, in which two command memories are directly linked by an address bus so that a first memory can access machine code sequences in the second memory - Google Patents
Virtual program command conversion arrangement, e.g. for an embedded system, in which two command memories are directly linked by an address bus so that a first memory can access machine code sequences in the second memory Download PDFInfo
- Publication number
- DE102004005123A1 DE102004005123A1 DE200410005123 DE102004005123A DE102004005123A1 DE 102004005123 A1 DE102004005123 A1 DE 102004005123A1 DE 200410005123 DE200410005123 DE 200410005123 DE 102004005123 A DE102004005123 A DE 102004005123A DE 102004005123 A1 DE102004005123 A1 DE 102004005123A1
- Authority
- DE
- Germany
- Prior art keywords
- memory
- address
- instruction
- virtual
- command
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline, look ahead
- G06F9/3802—Instruction prefetching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/3017—Runtime instruction translation, e.g. macros
- G06F9/30174—Runtime instruction translation, e.g. macros for non-native instruction set, e.g. Javabyte, legacy code
Abstract
Description
Die Erfindung betrifft eine Anordnung zur Übersetzung von virtuellen Befehlen in einer Datenverarbeitungseinheit mit einem Prozessorkern, einem ersten Befehlsspeicher, einem zweiten Befehlsspeicher und einer Speicherzugriffseinheit, welche alle über einen ersten Adress- und Datenbus miteinander verbunden sind, wobei der Prozessorkern sowie die Speicherzugriffseinheit über den Adress- und Datenbus einen Befehl aus dem ersten Befehlsspeicher holen können.The The invention relates to an arrangement for the translation of virtual instructions in a data processing unit with a processor core, a first instruction memory, a second instruction memory and a Memory access unit, all via a first address and Data bus are interconnected, with the processor core as well the memory access unit via the address and data bus an instruction from the first instruction memory can get.
Eine solche schaltungstechnische Grundstruktur bildet die Zentraleinheit einer bekannten Datenverarbeitungseinheit, wobei diese Zentraleinheit als kundenspezifisches, integriertes Bauteil (ASIC) implementiert ist. Der erste Befehlsspeicher befindet sich dabei außerhalb des ASIC als externes RAM, während der zweite Befehlsspeicher innerhalb des ASIC als internes RAM ausgeführt ist. Der Hauptprozessor holt sich aus dem externen RAM das auszuführende Programm in Form von Maschinenbefehlen und nutzt das interne RAM zum Zwischenspeichern. Die Speicherzugriffseinheit, beispielsweise ein Graphikcontroller, greift ebenfalls auf das externe RAM zu und teilt sich dabei den Adress- und Datenbus mit dem Hauptprozessor. Zu dieser bekannten Datenverarbeitungseinheit gehören des Weiteren akustische und grafische Schnittstellen sowie Schnittstellen zu Massenspeichereinrichtungen, wie beispielsweise Festplatten und DVDs. Die Datenverarbeitungseinheit wird vorzugsweise in heutigen Navigationsgeräten in Kraftfahrzeugen eingesetzt.A such basic circuit structure forms the central unit a known data processing unit, said central unit is implemented as a custom, integrated component (ASIC). The first instruction memory is outside the ASIC as external RAM while the second instruction memory within the ASIC is implemented as internal RAM. The main processor fetches the program to be executed from the external RAM in the form of machine instructions and uses the internal RAM for caching. The memory access unit, for example a graphics controller, also accesses the external RAM and shares the Address and data bus with the main processor. To this known data processing unit belong Furthermore, acoustic and graphic interfaces as well as interfaces to Mass storage devices, such as hard disks and DVDs. The data processing unit is preferably in today navigation devices used in motor vehicles.
Je nach gewünschter Anwendung kann die Zentraleinheit auch mit anderen Hardwarekomponenten kombiniert und in anderen elektronischen Geräten eingesetzt werden, wie beispielsweise in Audio- und Multimediageräten in Kraftfahrzeugen oder in tragbaren Telekommunikationsgeräten. Durch die Ausführung als ASIC ist die Zentraleinheit besonders kompakt und benötigt weniger Leistung als eine handelsübliche Mikroprozessoreinheit, weshalb die Zentraleinheit bevorzugt bei so genannten Embedded Systemen eingesetzt wird.ever according to the desired Application, the central unit can also be combined with other hardware components and be used in other electronic devices, such as for example, in audio and multimedia devices in motor vehicles or in portable telecommunications equipment. By the execution as ASIC the central unit is very compact and requires less power than one commercial Microprocessor unit, which is why the central unit preferably at so-called embedded systems is used.
In der bekannten Ausführung verarbeitet die zu der Zentraleinheit gehörende Recheneinheit ausschließlich so genannte Maschinenbefehle, d.h. solche Befehle, die direkt von dem in der Recheneinheit integrierten Prozessorkern verstanden und ausgeführt werden können. Der Prozessorkern kann dabei ein CISC- oder ein RISC-Prozessor sein. Die Maschinenbefehle werden üblicherweise durch die Übersetzung eines in einer Hochsprache geschriebenen Computerprogramms in ein Maschinenprogramm erzeugt, wofür ein speziell an die Zielhardware und damit den ausführenden Prozessorkern angepasster Übersetzer (Compiler) verwendet werden muss.In the known design processes the arithmetic unit belonging to the central unit exclusively in this way said machine instructions, i. such commands directly from the understood and executed in the arithmetic unit integrated processor core can. The processor core can be a CISC or a RISC processor. The machine commands are usually through the translation of a computer program written in a high level language Machine program generates, for what a specific to the target hardware and thus the executing Processor core adapted translator (Compiler) must be used.
Da die nicht auf andere Prozessortypen übertragbaren Maschinenprogramme die Flexibilität in der Entwicklung neuer Systeme einschränken, geht man heute mehr und mehr dazu über, Programme zu verwenden, die bei Einsatz von Übersetzungshilfsmitteln von verschiedenen Prozessoren verstanden werden können. Dazu wird eine so genannte virtuelle Maschine – also ein virtueller Prozessor – definiert, welche virtuelle Maschinenbefehle, kurz virtuelle Befehle, versteht und ausführt. Die Hochsprachen-Computerprogramme werden nun in ein solches virtuelles Maschinenprogramm übersetzt und in einem Festwertspeicher abgelegt. Zur Laufzeit müssen dann die einzelnen virtuellen Befehle in die vom Prozessorkern ausführbaren Maschinenbefehle übersetzt werden.There the machine programs that can not be transferred to other types of processors the flexibility To limit the development of new systems, one goes today more and more about, Programs to use when using translation tools from different processors can be understood. This will be a so-called virtual machine - so a virtual processor - defines which understands virtual machine instructions, in short virtual instructions and executes. The high-level computer programs are now in such a virtual Machine program translated and stored in a read-only memory. At runtime then have to the individual virtual commands into executable by the processor core Machine instructions translated become.
Eine inzwischen im Embedded Bereich sehr weit verbreitete Programmiersprache ist Java. Zu Java wurde eine virtuelle Maschine, die Java Virtual Machine (JVM) definiert, deren zugehörige virtuelle Befehle Java Bytecodes genannt werden. Java Bytecodes werden offline aus einem Java-Computerprogramm durch Kompilierung erzeugt. Um die Bytecodes ausführbar zu machen, sind verschiedene technische Lösungen bekannt. Bei einer ersten Lösung werden die Bytecodes mittels eines speziellen, auf der Zielhardware laufenden Softwareprogramms interpretiert, d.h. das Programm (der Interpretierer) lädt die Bytecodes und führt sie auf dem Prozessorkern aus. Eine zweite Lösung ist eng mit der ersten verbunden, nur werden dort die Bytecodes nicht interpretiert sondern mittels eines so genannten Just-In-Time-Compilers kurz vor der Ausführung in Maschinenbefehle übersetzt. Die übersetzten Maschinenbefehle liegen dann in Form mehrerer Kilo- bis Megabytes im Arbeitsspeicher vor.A meanwhile in the Embedded area very widespread programming language is Java. Java became a virtual machine called Java Virtual Machine (JVM) defines its associated virtual commands Java Be called bytecodes. Java bytecodes become offline from one Java computer program generated by compilation. To the bytecodes executable To make various technical solutions are known. At a first solution The bytecodes are written by means of a special, on the target hardware running software program, i. the program (the Interpreter) loads the bytecodes and leads they out on the processor core. A second solution is close to the first one connected, only the bytecodes are not interpreted there but by means of a just-in-time compiler shortly before execution in Machine instructions translated. The translated Machine commands are then in the form of several kilobytes to megabytes in memory.
Um den bei beiden Lösungen erhöhten Speicheraufwand für den Interpretierer bzw. Compiler sowie für die Zwischenergebnisse der Übersetzung zu reduzieren wurden als Weiteres Hardware-Compiler entwickelt. Diese sind in der einfachsten Form Zusatzprozessoren, welche neben der eigentlichen Recheneinheit, die den Hauptprozessor enthält, vorhanden sind und welche die Übersetzung der Bytecodes in Maschinenbefehle jeweils dann vornehmen, wenn der nächste virtuelle Befehl aufgerufen wird. Durch die direkt beim Aufruf des virtuellen Befehls erfolgende Übersetzung wird der Speicherplatzbedarf deutlich reduziert, da nur die wenigen zu dem virtuellen Befehl gehörenden Maschinenbefehle zwischengespeichert werden müssen.In order to reduce the increased memory requirements for the interpreter or compiler as well as for the intermediate results of the translation in both solutions, hardware compilers were further developed. These are in the simplest form additional processors, which are in addition to the actual processing unit that contains the main processor, and which are the translation of the bytecodes in Maschinenbe each time the next virtual command is called. The translation that takes place directly when the virtual command is called significantly reduces the storage space requirement because only the few machine instructions belonging to the virtual command need to be cached.
Aus der EP-950216-B1 ist ein solcher Zusatzprozessor in Form eines JAVA-Präprozessors bekannt, welcher neben dem eigentlichen Hauptprozessor Zugriff auf einen externen Befehlsspeicher hat, in welchem die virtuellen Befehle (Bytecodes) und unter Umständen auch direkt Maschinenbefehle abgelegt sind. Der Präprozessor verfügt über eine Übersetzungseinheit, in der eine Übersetzungstabelle abgelegt ist, die die zu den virtuellen Befehlen jeweils zugehörige Folge von Maschinenbefehlen beinhaltet. Weiterhin ist in der im Präprozessor vorhandenen Übersetzungseinheit ein spezielles internes Register RSP (register stack pointer) zur Ablage der gerade aktuellen Nummer des Hauptprozessor-Registers, welches die zuletzt belegte Position des Speicherstapels (top of memory stack) enthält, vorgesehen.Out EP-950216-B1 is one such additional processor in the form of a JAVA preprocessor known, which in addition to the actual main processor access to has an external instruction store in which the virtual instructions (Bytecodes) and possibly also machine instructions are stored directly. The preprocessor has a translation unit, in the translation table is stored, the corresponding to the virtual commands sequence of machine commands. Furthermore, in the preprocessor existing translation unit a special internal register RSP (register stack pointer) for Storage of the currently current number of the main processor register, which the last occupied position of the memory stack (top of contains memory stack), intended.
Wenn der Hauptprozessor einen Befehl aus dem externen Befehlsspeicher anfordert, so erkennt der Präprozessor anhand der zugehörigen Befehlsadresse, ob es sich um einen virtuellen Befehl handelt, der erst in Maschinenbefehle übersetzt werden muss, oder ob es ein Maschinenbefehl ist, der unverändert an den Hauptprozessor weitergegeben werden kann. Sofern ein virtueller Befehl angefordert wurde, wird dieser von dem Präprozessor aus dem externen Befehlsspeicher abgeholt, mit Hilfe der zugehörigen Eintragung in der Übersetzungstabelle sowie dem aktuellen Inhalt des Registers RSP übersetzt und die resultierende Folge von Maschinenbefehlen wird dem Hauptprozessor über einen Zwischenspeicher, ein so genanntes Feeding Memory, zur Verfügung gestellt.If the main processor receives an instruction from the external instruction memory request, then recognizes the preprocessor based on the associated Command address, whether it is a virtual command, the first translated into machine instructions or whether it is a machine command that is unchanged the main processor can be passed. Unless a virtual Command was requested, this is from the preprocessor from the external Command memory retrieved using the associated entry in the translation table as well as the current contents of the register RSP and the resulting Sequence of machine commands is the main processor via a Cache, a so-called Feeding Memory, provided.
Die in der Übersetzungstabelle abgelegten Einträge zu den virtuellen Befehlen enthalten je nach der Komplexität des Befehls unterschiedlich viele Maschinenbefehle, die zu dessen Ausführung erforderlich sind. Da die Einträge in direkter Aufeinanderfolge im Speicher der Übersetzungseinheit abgelegt sind, benötigt der Präprozessor eine zusätzliche Indizierungstabelle (Code-Index-Table), welche zu jedem virtuellen Befehl den jeweiligen Startpunkt aus der Übersetzungstabelle enthält.The in the translation table filed entries to the virtual commands included depending on the complexity of the command different number of machine commands required to execute it are. Because the entries stored in direct succession in the memory of the translation unit are needed the preprocessor an additional Indexing Table, which corresponds to each virtual Command contains the respective starting point from the translation table.
Aufgabe der vorliegenden Erfindung ist es, die bekannte, als ASIC ausgeführte Anordnung so zu erweitern, dass mit der erweiterten Anordnung auch eine Ausführung von virtuellen Befehlen möglich wird. Die anwendungsspezifischen Randbedingungen der Embedded Systeme bezüglich möglichst geringer Stückkosten und eines geringen Platzbedarfs sollen dabei berücksichtigt werden.task It is the object of the present invention to provide the known ASIC arrangement to extend so that with the extended arrangement also an execution of virtual commands possible becomes. The application-specific boundary conditions of the embedded systems in terms of preferably low unit costs and a small footprint should be taken into account.
Die Aufgabe wird durch eine eingangs beschriebene Anordnung mit den kennzeichnenden Merkmalen des Anspruchs 1 gelöst.The Task is by an arrangement described above with the characterizing features of claim 1 solved.
Die erfindungsgemäße Anordnung weist zwischen der Speicherzugriffseinheit und dem zweiten Befehlsspeicher einen weiteren Adressbus auf. In dem ersten Befehlsspeicher sind nun neben den Maschinenbefehlen auch virtuelle Befehle abgelegt. Greift der Hauptprozessor auf einen solchen virtuellen Befehl zu, so erfolgt der Zugriff nicht mehr direkt sondern wird über die Speicherzugriffseinheit umgeleitet, indem der Hauptprozessor den entsprechend zugeordneten Adressbereich anspricht. Beim Holen eines virtuellen Befehls wandelt die Speicherzugriffseinheit diesen in eine Speicheradresse des zweiten Befehlsspeichers um und führt anschließend über den weiteren Adressbus einen Zugriff auf den zweiten Befehlsspeicher durch. An der Speicheradresse des zweiten Befehlsspeichers ist ein Maschinenbefehl abgelegt, welcher zu einer Folge von Maschinenbefehlen gehört, die einer Übersetzung des virtuellen Befehls in durch den Prozessorkern ausführbaren Programmcode entsprechen. Der Maschinenbefehl wird dann in der üblichen Weise aus dem zweiten Befehlsspeicher über den ersten Datenbus an den Prozessorkern übertragen.The inventive arrangement points between the memory access unit and the second instruction memory another address bus. In the first instruction memory are Now, in addition to the machine commands, also stored virtual commands. If the main processor accesses such a virtual command, so the access is no longer directly but is over the Memory access unit redirected by the main processor correspondingly assigned address range responds. When getting a virtual memory command, the memory access unit transforms this into a memory address of the second instruction memory and then leads over the another address bus access to the second instruction memory by. At the memory address of the second instruction memory is a Machine command filed, which to a sequence of machine commands belongs, that of a translation of the virtual command in executable by the processor core Program code correspond. The machine command is then in the usual Way from the second instruction memory via the first data bus transfer the processor core.
Die erfindungsgemäße Anordnung ermöglicht die Erweiterung eines bekannten, zur Ausführung von Maschinenbefehlen ausgelegten ASIC zu einem ASIC mit integriertem Hardware-Compiler für virtuelle Befehle. Diese Erweiterung erfordert nur eine geringe Anzahl zusätzlicher Gatter (gates), da die bereits im ASIC vorhandene Speicherzugriffseinheit nur ein wenig erweitert werden muss und lediglich ein weiterer Adressbus in Form weniger Datenleitungen zwischen Speicherzugriffseinheit und zweitem Befehlsspeicher eingeführt wird. Die Kosten und auch der zusätzliche Platzbedarf für die Erweiterung sind also minimal, was in deutlichem Gegensatz zu den bekannten Ausführungen steht, bei denen ein zusätzlicher Präprozessor mit eigenem Speicher und eigener Datenverarbeitung eingeführt wird. Ein Präprozessor entspricht ja einer kompletten Recheneinheit, wofür beim ASIC-Entwurf mehrere Tausend Gatter benötigt werden.The inventive arrangement allows the extension of a known, to execute machine commands designed ASIC to an ASIC with integrated hardware compiler for virtual Commands. This extension requires only a small number of additional ones Gates, because the memory access unit already present in the ASIC just needs to be extended a bit and just another address bus in the form of a few data lines between memory access unit and second instruction memory. The cost and also the additional one Space required for the extension is so minimal, which is in marked contrast to the known versions stands where an additional preprocessor is introduced with its own memory and its own data processing. A preprocessor corresponds to a complete computing unit, what the ASIC design several thousand gates needed become.
Außerdem wird im Gegensatz zu den bekannten Ausführungen bei der erfindungsgemäßen Anordnung die Übersetzung nicht aktiv durch eine zusätzliche Recheneinheit vorgenommen, sondern sie ist in den Vorgang des Befehlszugriffs auf den ersten Befehlsspeicher eingebettet. Der abgeholte virtuelle Befehl nimmt auf dem Weg zum zweiten Befehlsspeicher lediglich einen kleinen „Umweg" über die Speicherzugriffseinheit, wo er in eine Speicheradresse des zweiten Befehlsspeichers umgewandelt wird. Die Übersetzung des virtuellen Befehls in Maschinenbefehle ist als Folge davon auch nicht in dem Speicher des zusätzlichen Präprozessors sondern im internen RAM des Haupt prozessors abgelegt, wobei das interne RAM gerade dem zweiten Befehlsspeicher entspricht.In addition, will in contrast to the known embodiments in the inventive arrangement the translation not active by an additional But it is in the process of command access embedded on the first instruction memory. The picked up virtual Command takes only one on the way to the second instruction memory small "detour" via the memory access unit, where it is converted to a memory address of the second instruction memory becomes. The translation the virtual command in machine commands is as a result of it too not in the memory of the extra preprocessor but stored in the internal RAM of the main processor, the internal RAM just corresponds to the second instruction memory.
In einer bevorzugten Ausgestaltung der Erfindung ist noch ein zweiter Adress- und Datenbus vorhanden, der die Speicherzugriffseinheit mit dem ersten Befehlsspeicher verbindet. Über diesen zweiten Adress- und Datenbus ist die Speicherzugriffseinheit in der Lage, nach Anforderung durch den Prozessorkern einen direkten Speicherzugriff (DMA) auf den ersten Befehlsspeicher durchzuführen, um einen virtuellen Befehl abzuholen, während beispielsweise der Prozessorkern über den ersten Adress- und Datenbus auf den zweiten Befehlsspeicher zugreift.In A preferred embodiment of the invention is still a second Address and data bus present, the memory access unit connects to the first instruction memory. About this second address and Data bus is the memory access unit capable of requesting through the processor core to a direct memory access (DMA) to perform the first instruction store to a virtual instruction pick up while For example, the processor core over the first address and Data bus accesses the second instruction memory.
Die Umwandlung eines virtuellen Befehls in eine Speicheradresse des zweiten Befehlsspeichers erfolgt bevorzugt dadurch, dass der Befehl direkt auf den weiteren Adressbus gelegt wird, d.h. die Bitfolge des virtuellen Befehls wird auf eine gleiche Anzahl von Adressleitungen gelegt. Bei einem virtuellen Befehl, der aus 8 Bit besteht, werden entsprechend acht Adressleitungen angesprochen. Diese spezielle Ausführung reduziert den Aufwand an intelligenter Logik innerhalb der Speicherzugriffseinheit, da keine aktive Umsetzung oder Umrechnung des virtuellen Befehls in die Speicheradresse erfolgt, sondern die vom ersten bzw. zweiten Datenbus eingehenden Spannungssignale direkt als Spannungssignale an den weiteren Adressbus ausgegeben werden.The Conversion of a virtual command into a memory address of the second instruction memory is preferably carried out in that the command is placed directly on the other address bus, i. the bit sequence of the virtual instruction is on an equal number of address lines placed. For a virtual command that consists of 8 bits addressed according to eight address lines. This special execution reduces the amount of intelligent logic within the memory access unit, there is no active conversion or conversion of the virtual command in the memory address, but the first or second Data bus incoming voltage signals directly as voltage signals be output to the other address bus.
In einer weiteren Ausgestaltung der Erfindung enthält der zweite Befehlsspeicher eine Tabelle, in der zu jedem virtuellen Befehl eine fest vorgegebene Anzahl an Maschinenbefehlen abgelegt ist. Damit entfällt die Notwendigkeit einer zusätzlichen Indizierungstabelle, wie sie in der EP-950216-B1 be schrieben ist, d.h. es ist nicht mehr erforderlich, sich zu jedem virtuellen Befehl den jeweiligen Startpunkt in der Tabelle zu merken. Vielmehr genügt es, die Adresse des allerersten Tabelleneintrags zu kennen, da daraus die Adressen aller übrigen Einträge berechnet werden können.In A further embodiment of the invention contains the second instruction memory a table in which a fixed default to each virtual command Number of machine commands is stored. This eliminates the need an additional one Indexing table as described in EP-950216-B1, i.e. It is no longer necessary to join any virtual command to remember the respective starting point in the table. Rather, it is enough, the To know the address of the very first table entry, as this results in the Addresses of all other entries calculated can be.
Die Berechnung erfolgt in einer vorteilhaften Ausgestaltung indirekt über die Gestaltung der Adressleitungen. Setzt sich nämlich die aus dem virtuellen Befehl gewonnene Speicheradresse zusammen aus einer Anzahl oberer Adress-Bits, welche dem virtuellen Befehl entsprechen, und einer Anzahl unterer Adress-Bits, welche durch die Anzahl an Maschinenbefehlen pro virtuellem Befehl in der Tabelle festgelegt ist, so muss sich die Speicherzugriffseinheit lediglich darum kümmern, dass die unteren Adress-Leitungen entsprechend dem gerade angeforderten Untereintrag des jeweiligen virtuellen Befehls richtig angesprochen werden.The Calculation takes place in an advantageous embodiment indirectly via the Design of the address lines. That's because it's made of the virtual Command obtained memory address together from a number of upper Address bits corresponding to the virtual instruction, and one Number of lower address bits, determined by the number of machine commands per virtual command is set in the table, so must the Memory access unit only take care that the lower address lines according to the currently requested subentry of the respective be addressed correctly.
In einer weiteren Vereinfachung des Zugriffs auf die zweite Speichereinheit entsprechen die unteren Adress-Bits des weiteren Adress-Busses den unteren Adress-Bits des ersten Adressbusses. Die Speicherzugriffseinheit benötigt dann keine intelligente Logik zur Berechnung des aktuell auszulesenden Tabelleneintrags. Bei einer solchen Anordnung fordert der Prozessorkern einen ersten Befehl an, welcher als virtueller Befehl aus dem ersten Befehlsspeicher gelesen wird und über die Speicherzugriffseinheit auf die oberen Leitungen des weiteren Adressbusses ausgegeben wird. Die unteren Adressleitungen werden nicht benutzt, d.h. dort liegt eine logische Null an. Im nächsten Arbeitsschritt fordert der Prozessorkern einen zweiten Befehl an, d.h. er springt in der Befehlsadresse um einen Schritt weiter. Die entsprechende logische Eins auf der untersten Adressleitung des ersten Adressbusses wird di rekt auf die zugehörige unterste Adressleitung des weiteren Adressbusses durchgereicht und damit der zweite Eintrag der Übersetzung des virtuellen Befehls aus der Tabelle gelesen.In a further simplification of the access to the second memory unit the lower address bits of the further address bus correspond to the lower address bits of the first address bus. The storage access unit needed then no intelligent logic for calculating the currently readable Table entry. In such an arrangement, the processor core requires a first command, which as a virtual command from the first Command memory is read and the memory access unit is output to the upper lines of the further address bus. The lower address lines are not used, i. there is a logical zero. In the next Step, the processor core requests a second command, i.e. he jumps in the command address one step further. The corresponding logical one on the lowest address line of the first address bus is di rectly to the associated lowest address line the further address bus passed through and thus the second entry the translation of the virtual command read from the table.
Da die zu unterschiedlichen virtuellen Befehlen gehörenden Übersetzungen im allgemeinen aus einer unterschiedlichen Anzahl von Maschinenbefehlen bestehen, sind in weiteren Ausgestaltungen entsprechende Abhilfen vorgesehen. So wird bei einem Tabelleneintrag mit weniger als der vorgegebenen Anzahl an Maschinenbefehlen eine zusätzliche Sprungfunktion eingeführt, welche zu einem Überspringen der nicht benutzten, leeren Speicherstellen führt.There the translations belonging to different virtual commands in general consist of a different number of machine commands, Corresponding remedies are provided in further embodiments. Thus, when a table entry is less than the default Number of machine instructions introduced an additional jump function, which to a skip the unused, empty memory locations leads.
Übersteigt die bei der Übersetzung eines virtuellen Befehls entstehende Anzahl an Maschinenbefehlen die vorgesehene Länge eines Tabelleneintrags, so wird ein Teil dieser Maschinenbefehle im ersten Befehlsspeicher abgelegt und die Tabelle enthält dann eine Sprungfunktion auf diesen Teil der Maschinenbefehle. Alternativ ist es auch möglich, einen dritten, als weiteres internes RAM ausgeführten Befehlsspeicher vorzusehen, welcher die zusätzlichen Maschinenbefehle enthält und mit der Sprungfunktion dann auf diesen weiteren internen Befehlsspeicher zu verzweigen.If the number of machine instructions resulting from the translation of a virtual instruction exceeds the intended length of a table entry, some of these machine instructions are stored in the first instruction memory and the table then contains a jump function to this part of the machine instructions. al ternatively, it is also possible to provide a third instruction memory which is designed as a further internal RAM and which contains the additional machine instructions and then to branch with the jump function to this further internal instruction memory.
Bei einer weiteren Ausgestaltung der Erfindung holt die Speicherzugriffseinheit per direkten Speicherzugriff nicht nur einen virtuellen Befehl von dem ersten Befehlsspeicher, sondern mehrere virtuelle Befehle auf einmal. Dies wird auch als DMA Burst-Read-Zugriff bezeichnet. Die virtuellen Befehle werden in einem zusätzlich vorhandenen internen Puffer zwischengespeichert. Die Anzahl der Zugriffe auf den ersten Befehlsspeicher wird damit reduziert, was sich positiv auf die gesamte Rechengeschwindigkeit der Recheneinheit auswirkt.at Another embodiment of the invention fetches the memory access unit direct memory access not just a virtual command from the first instruction memory, but multiple virtual instructions at once. This is also known as DMA burst read access. The virtual Commands are in addition to one cached existing internal buffer. The number of Access to the first instruction memory is thus reduced, which positively to the total computing speed of the arithmetic unit effect.
Bei einer anderen Ausführungsform der Erfindung werden der bzw. die zu einem virtuellen Befehl gehörenden Operanden an einer festgelegten Adresse abgelegt. Die Adressen dieser Operanden müssen dann nicht vom Prozessorkern berechnet werden, so dass die insgesamt auszuführende Anzahl an Maschinenbefehlen und damit der vom Programmcode benötigte Speicherplatz reduziert wird.at another embodiment of the invention become the operand (s) belonging to a virtual instruction stored at a specified address. The addresses of these operands have to then not be calculated by the processor core, so the total executed Number of machine commands and thus the memory required by the program code is reduced.
Die Erfindung wird nachfolgend anhand eines Ausführungsbeispiels und der Zeichnung sowie in weiteren Unteransprüchen verdeutlicht. Es zeigen:The Invention will be described below with reference to an embodiment and the drawing and in further subclaims clarified. Show it:
In
In
Vom
Aufbau gegenüber
Die
Arbeitsweise der abgewandelten Speicherzugriffseinheit
Bei
dem Ausführungsbeispiel
handelt es sich um die Übersetzung
von virtuellen Java-Befehlen, also Java Bytecodes. In dem zweiten
Befehlsspeicher
Der
Prozessorkern
Im
nachfolgenden Beispiel wird das in Tabelle 1 gezeigte kurze Java
Programm zur Addition zweier Integer und zur Erzeugung eines neuen
Objektes übersetzt.
Die aus dem Java Programm entstandenen Bytecodes sind in der zweiten
Spalte eingetragen. Zum besseren Verständnis der Bedeutung der Bytecodes
dient Spalte
Tabelle 1: Bytecodes eines Java Programmes Table 1: Bytecodes of a Java program
Die
Geräteadresse
der Speicherzugriffseinheit
Will
also der Prozessorkern
Zur
Erläuterung
des Funktionsbeispiels sind noch weitere Vorbemerkungen erforderlich.
So steht der zuletzt abgelegte Eintrag des Java Speicherstapels
(Top of Java Stack) im Register
Die
Basisadresse des Java Bytecodes im ersten Befehlsspeicher
Der
Offset des ersten Java Bytecodes, die 0x10, ist an den Offset 0x200
des Adressbereichs des Prozessorkerns
Umgekehrt
bedeuten die zugewiesenen Adressbereiche Folgendes:
Versucht
der Prozessorkern
Tried the processor core
Das
weiterhin in den Tabellen auftauchende Register
Mit
Tabelle 2 wird die Übersetzung
des ersten Java Bytecodes 0x04 (iconst 1) veranschaulicht. Der Prozessorkern
Tabelle 2: Übersetzung von iconst 1 Table 2: Translation of iconst 1
Zur Übersetzung
des Bytecodes 0x04 in einen Maschinenbefehl erfolgt nun der "Umweg" über den zweiten Befehlsspeicher
Die
Bits A4 – A0
entsprechen dem Offset innerhalb eines Eintrags in der Übersetzungstabelle.
Wie man bei der zweiten vom Prozessorkern
Die
Umwandlung der Daten 0x04 in die zugehörige Adresse in der Übersetzungstabelle
führt also
auf den Wert 0x0080. Dort befindet sich der erste zur Übersetzung
gehörende
Eintrag zum Bytecode 0x04. Dieser erste Eintrag ("sw r22, (r23)") wird über die
Verbindung
Dieser
fordert daraufhin den nächsten
auszuführenden
Befehl an, d.h. er springt in der Befehlsadresse um eine Wortlänge weiter.
Die Speicherzugriffseinheit
Die Übersetzung
des Bytecodes 0x04 besteht aus drei Maschinenbefehlen, nämlich „sw r22,
(r23)", „addiu
r23, r23, 4" und „addiu
r22, r0, 1". Da
jedoch je Bytecode-Eintrag ein Speicherplatz von acht Maschinenbefehlen
vorgesehen ist, müssen
fünf Plätze übersprungen
werden. Der entsprechende Sprungbefehl steht in Tabelle 2 in Zeile
Tabelle 3 enthält eine Beschreibung der Übersetzung des nächsten Java-Bytecodes, 0x10 0x78 (bipush 120). Die 0x78 ist der Operand des bipush-Befehls.table 3 contains a description of the translation the next Java bytecodes, 0x10 0x78 (bipush 120). The 0x78 is the operand of the bipush command.
Der
Prozessorkern
Der
Operand des bipush-Befehls, die Zahl
Tabelle 3: Übersetzung von bipush 120 Table 3: Translation of bipush 120
Als nächster Java Bytecode wird der Additionsbefehl 0x60 übersetzt (Tabelle 4). Dieser Befehl bewirkt das Holen der zwei auf dem Stack platzierten Integers sowie deren Addition. Da dafür nur drei Maschinenbefehle erforderlich sind, wird wieder eine Sprungfunktion vor dem letzten zur Übersetzung gehörenden Maschinenbefehl eingefügt.When Next Java bytecode, the addition instruction 0x60 is translated (Table 4). This Command causes the two integers placed on the stack to be fetched as well as their addition. Because of that Only three machine commands are required, again a jump function before the last for translation belonging Machine command inserted.
Tabelle 4: Übersetzung von iadd Table 4: Translation of iadd
Als
letztes wird ein neues Objekt im ersten Befehlsspeicher
Der
darauf folgende Befehl („add
r23, r0, r2") wird
dann nach der Rückkehr
von der externen Routine ausgeführt.
Der in Register
Tabelle 5: Übersetzung von new Table 5: Translation of new
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE200410005123 DE102004005123B4 (en) | 2004-02-02 | 2004-02-02 | Arrangement for the translation of virtual instructions in a data processing unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE200410005123 DE102004005123B4 (en) | 2004-02-02 | 2004-02-02 | Arrangement for the translation of virtual instructions in a data processing unit |
Publications (2)
Publication Number | Publication Date |
---|---|
DE102004005123A1 true DE102004005123A1 (en) | 2005-09-08 |
DE102004005123B4 DE102004005123B4 (en) | 2005-12-22 |
Family
ID=34832493
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
DE200410005123 Expired - Fee Related DE102004005123B4 (en) | 2004-02-02 | 2004-02-02 | Arrangement for the translation of virtual instructions in a data processing unit |
Country Status (1)
Country | Link |
---|---|
DE (1) | DE102004005123B4 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4587612A (en) * | 1982-10-22 | 1986-05-06 | International Business Machines Corporation | Accelerated instruction mapping external to source and target instruction streams for near realtime injection into the latter |
-
2004
- 2004-02-02 DE DE200410005123 patent/DE102004005123B4/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4587612A (en) * | 1982-10-22 | 1986-05-06 | International Business Machines Corporation | Accelerated instruction mapping external to source and target instruction streams for near realtime injection into the latter |
Non-Patent Citations (1)
Title |
---|
RADHAKRISHNAN,R.: Microarchitectural Techniques to Enable Efficient Java Execution, Dissertation, August 2000, University of Texas, Austin,S.67-74 * |
Also Published As
Publication number | Publication date |
---|---|
DE102004005123B4 (en) | 2005-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE69723286T2 (en) | REAL TIME PROGRAMMING LANGUAGE ACCELERATOR | |
DE69820027T2 (en) | DEVICE FOR EXECUTING VIRTUAL MACHINE COMMANDS | |
DE10393920B4 (en) | Methods and systems for controlling virtual machines | |
DE60131864T2 (en) | SAVING STACK OPERANDS IN TABS | |
DE60203612T2 (en) | DATA PROCESSING WITH MULTI-COMMAND PHRASES | |
DE60006410T2 (en) | METHOD AND SYSTEM FOR DISTRIBUTING OBJECT-ORIENTED COMPUTER PROGRAMS | |
DE69814174T2 (en) | JAVA RUNTIME SYSTEM WITH CHANGED CONSTANT COLLECTION | |
DE69433339T2 (en) | Load / store functional units and data caches for microprocessors | |
DE69434669T2 (en) | Speculative command queue for variable byte length commands | |
DE102018213430A1 (en) | Accelerator with low latency | |
DE69629140T2 (en) | Cache-ability attribute for virtual addresses in caches with both virtual and physical index | |
DE69732181T2 (en) | METHOD AND DEVICE FOR INTERMEDIATING SYSTEM MANAGEMENT INFORMATION WITH OTHER INFORMATION | |
DE112013002956T5 (en) | Preloading branch predictions | |
DE112010004971T5 (en) | A system, method, and apparatus for a cache flush of a page area and TLB invalidation of a range of entries | |
DE112010001467B4 (en) | Control of blocks of an on-die-system structure | |
DE102008025476A1 (en) | Translation of a virtual address into a physical address with support of page attributes | |
DE69937611T2 (en) | Intelligent buffer memory | |
DE112005003098T5 (en) | A method and apparatus for accessing physical memory from a high power CPU or processor element | |
DE202010018020U1 (en) | Opportunistic improvement of MMIO request processing based on a target report of room requirements | |
DE69815482T2 (en) | Computer arrangement with processor and memory hierarchy and its operating method | |
DE112005000996T5 (en) | Mechanism for canceling data entries of a translation buffer in a multiprocessor system | |
DE10329680A1 (en) | Processor architecture for exact pointer identification | |
DE69630416T2 (en) | Microprocessor for executing commands with variable lengths | |
EP0075714B1 (en) | On-chip microprocessor cache memory and its operating method | |
DE4238099C2 (en) | Microprocessor with multiple operating modes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
OP8 | Request for examination as to paragraph 44 patent law | ||
8364 | No opposition during term of opposition | ||
8327 | Change in the person/name/address of the patent owner |
Owner name: CONTINENTAL AUTOMOTIVE GMBH, 30165 HANNOVER, DE |
|
R119 | Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal fee | ||
R079 | Amendment of ipc main class |
Free format text: PREVIOUS MAIN CLASS: G06F0009450000 Ipc: G06F0008400000 |