Labo

Sign in or create your account | Project List | Help

Labo Commit Details

Date:2008-11-26 16:56:26 (1 year 9 months ago)
Author:naps
Commit:350bd225c02b581faa9e996fe9587dbc5edfbb48
Message:Import of gneumann (old svn-revisions lost)

Files: gneumann/GLObject.py (1 diff)
gneumann/gneulib.py (1 diff)
gneumann/gneumann.glade (1 diff)
gneumann/gneumann.py (1 diff)
gneumann/gtk_gneulib.py (1 diff)
gneumann/icon.png (1 diff)
gneumann/neumann.png (1 diff)
gneumann/neumann.py (1 diff)
gneumann/pix/icon.png (0 diffs)
gneumann/pix/neumann.png (0 diffs)
gneumann/pix/neumann.svg (1 diff)

Change Details

gneumann/GLObject.py
1#!/usr/bin/env python
2# PyMyAdmin/gui/tools/GLObject.py - Copyright Jonathan Adami
3#
4
5import gtk.glade
6
7class GLObject(object):
8
9    """
10    This class is the base of all window managements. It provide tools to autoconnect signals,
11    to make window dependencies, accessing to all widgets and obviously, make the link
12    between the glade file and the window.
13
14    @author Jonathan Adami
15    """
16
17    def __init__(self,glFile,rootWidget):
18        """
19        This function is able to launch the window, to connect all signals and to initialize some variables
20
21        @param string glFile : The real path to access the glade file
22        @param string rootWidget : Indicate where in the glade xml file,
23            this window have to point to. Most of the time, the rootWidget
24            correspond to the name of the window in the gladefile
25        """
26        self.widgets = gtk.glade.XML(glFile,rootWidget,None)
27        self.rootWidget = rootWidget
28        sig = {}
29        for it in dir(self):
30            sig[it] = getattr(self,it)
31        self.widgets.signal_autoconnect(sig)
32        self.childs = []
33
34    def destroy(self):
35        """
36        This function destory the widget (often the window) and all its child
37        widgets registered bu the addChildWindow function
38
39        """
40        for child in self.childs:
41            child.destroy()
42        root = self.getRoot()
43        if root != None:
44            root.destroy()
45
46    def getRoot(self):
47        """
48        This function return the link of the root widget
49
50        @return gtk.Widget : The rootWidget
51        """
52        return self.widgets.get_widget(self.rootWidget)
53
54    def addChildWindow(self,which):
55        """
56        If the GLObject represent a window, most of the time this function is called
57        in order to register child windows. In this case, when the window is destroyed,
58        all it's child windows are destroy recursively
59
60        @param gtk.Widget which : The widget to destroy with the actual widget
61        """
62        self.childs.append(which)
gneumann/gneulib.py
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# gneulib.py
5#
6# Copyright 2008 Antoine 'NaPs' Millet <antoine@inaps.org>
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21# MA 02110-1301, USA.
22
23
24'''Module des classes définissant les différents éléments de
25l'architecture de Von Neumann'''
26
27class CPU(object):
28    '''Représente le CPU de l'architecture de Von Neumann'''
29
30    def __init__(self, taille_memoire=30):
31        self.bus_donnees = Bus()
32        self.bus_adresses = Bus()
33        self.bus_commandes = Bus()
34        self.memoire = Memoire('memoire0', taille_memoire, self.bus_adresses, self.bus_donnees, self.bus_commandes)
35        self.ual = UAL('ual0', self.bus_donnees, self.bus_commandes)
36        self.registres = Registres('registres0', self.bus_donnees, self.bus_commandes)
37        self.compteur_ordinal = CompteurOrdinal(self.bus_adresses)
38        self.composant_action = (self.memoire, self.ual, self.registres)
39        self.registre_instruction = (None, None, None)
40
41    def actions(self):
42        '''Executer...'''
43        print self.bus_commandes.valeur
44        if self.bus_commandes.valeur != None:
45            for composant in self.composant_action:
46                print composant
47                composant.action()
48
49    def decoder(self, instruction):
50        '''Décoder une instruction'''
51
52        if type(instruction) == type(int()):
53            raise self.BadCmdError('''L'instruction ressemble à une donnée : %s''' % instruction)
54        instruction = instruction.split(' ')
55        if len(instruction) == 2:
56            cmd = instruction[0].upper()
57            try:
58                op1 = int(instruction[1][1:-1])
59            except:
60                op1 = instruction[1]
61            op2 = None
62        elif len(instruction) == 3:
63            cmd = instruction[0].upper()
64            try:
65                op1 = int(instruction[1][1:-1])
66            except:
67                op1 = instruction[1]
68            try:
69                op2 = int(instruction[2][1:-1])
70            except:
71                op2 = instruction[2]
72        else:
73            raise self.BadCmdError('''L'instruction est formée d'un nombre incorrect d'arguments : %s''' % instruction)
74
75        self.registre_instruction = (cmd, op1, op2)
76
77    class BadCmdError(Exception):
78        '''Exception lors du décodage d'une instruction'''
79        pass
80
81class Memoire(object):
82    '''Représente de la mémoire dans l'architecture de Von Neumann
83    L'argument taille de la méthode constructeur est la taille de la
84    mémoire en cellules mémoires.'''
85
86    def __init__(self, id, taille, bus_adresses, bus_donnees, bus_commandes):
87        self.memoire = [0]*taille
88        self.taille = taille
89        self.bus_adresses = bus_adresses
90        self.bus_donnees = bus_donnees
91        self.bus_commandes = bus_commandes
92        self.id = id
93        self.commandes = {
94            'lire': self.lire,
95            'ecrire': self.ecrire
96        }
97
98    def lire(self):
99        '''Lire une VALEUR (donnée numérique) dans la mémoire à l'adresse
100        pointée par le bus d'adresses et place la valeur sur le bus de
101        données'''
102
103        self.bus_donnees.valeur = int(self.memoire[self.bus_adresses.valeur])
104
105    def ecrire(self):
106        '''Ecrire une VALEUR (donnée numérique) issue du bus d'adresses
107        dans la mémoire à l'adresse donnée par le bus de données.'''
108
109        self.memoire[self.bus_adresses.valeur] = int(self.bus_donnees.valeur)
110
111    def importer(self, code):
112        '''Importer du code dans la mémoire. La mémoire est vidée puis
113        re-remplie avec le code (une ligne par cellule mémoire), les
114        cellules mémoires restantes se voient affectées la valeur 0.
115        Si le nombre de lignes est supérieur à la taille de la mémoire
116        (self.taille), la méthode échoue et renvoit False.'''
117
118        self.memoire = [x for x in code.split('\n')]
119        self.memoire += [0] * (self.taille - len(self.memoire))
120
121    def action(self):
122        '''Effectuer l'action décrite sur le bus de commandes'''
123
124        if self.bus_commandes.valeur[0] == self.id and self.commandes.has_key(self.bus_commandes.valeur[1]):
125            self.commandes[self.bus_commandes.valeur[1]]()
126
127
128class Registres(object):
129    '''Représente les registres de l'architecture de Von Neumann'''
130
131    def __init__(self, id, bus_donnees, bus_commandes, registres=('AX', 'BX')):
132        self.registres = dict([(x.upper(), 0) for x in registres])
133        self.bus_donnees = bus_donnees
134        self.bus_commandes = bus_commandes
135        self.id = id
136        self.commandes = {
137            'lire': self.lire,
138            'ecrire': self.ecrire
139        }
140
141
142    def lire(self, registre):
143        '''Lire la valeur contenue dans le registre et la place sur le
144        bus de données.'''
145
146        self.bus_donnees.valeur = self.registres[registre.upper()]
147
148    def ecrire(self, registre):
149        '''Ecrire une valeur dans le registre.'''
150
151        if self.registres.has_key(registre.upper()):
152            self.registres[registre.upper()] = int(self.bus_donnees.valeur)
153        else: raise self.UnknownRegisterError()
154
155    def action(self):
156        '''Effectuer l'action décrite sur le bus de commandes'''
157
158        if self.bus_commandes.valeur[0] == self.id and self.commandes.has_key(self.bus_commandes.valeur[1]):
159            self.commandes[self.bus_commandes.valeur[1]](self.bus_commandes.valeur[2])
160
161    class UnknownRegisterError(Exception):
162        '''Exception lors de l'accès à un registre inconnu'''
163        pass
164
165class UAL(object):
166    '''Représente une Unité Arithmétique et Logique dans l'architecture
167    de Von Neumann'''
168
169    op1 = 0
170    op2 = 0
171    resultat = 0
172
173
174    def __init__(self, id, bus_donnees, bus_commandes):
175        self.bus_donnees = bus_donnees
176        self.bus_commandes = bus_commandes
177        self.id = id
178        self.commandes = {
179            'additionner': self.add,
180            'soustraire': self.sub,
181            'resultat': self.resultat,
182            'lectureOP1': self.set_op1,
183            'lectureOP2': self.set_op2,
184        }
185
186    def set_op1(self):
187        '''Définir l'opérateur 1 de l'UAL par la valeur du bus de
188        données.'''
189
190        self.op1 = int(self.bus_donnees.valeur)
191
192    def set_op2(self):
193        '''Définir l'opérateur 2 de l'UAL par la valeur du bus de
194        données.'''
195
196        self.op2 = int(self.bus_donnees.valeur)
197
198    def add(self):
199        '''Calculer le résultat de l'opération de l'instruction ADD
200        (addition).'''
201
202        self.resultat = self.op1 + self.op2
203
204    def sub(self):
205        '''Calculer le résultat de l'opération de l'instruction SUB
206        (soustraction).'''
207
208        self.resultat = self.op1 - self.op2
209
210    def resultat(self):
211        '''Retourner le dernier résultat récupéré par l'UAL sur le bus
212        de données.'''
213
214        self.bus_donnees.valeur = self.resultat
215
216    def action(self):
217        '''Effectuer l'action décrite sur le bus de commandes'''
218
219        if self.bus_commandes.valeur[0] == self.id and self.commandes.has_key(self.bus_commandes.valeur[1]):
220            self.commandes[self.bus_commandes.valeur[1]]()
221
222
223class CompteurOrdinal(object):
224    '''Représente un compteur ordinal dans l'architecture de Von Neumann'''
225
226    adresse_courante = 0
227    prochaine_adresse = 0
228
229    def __init__(self, bus_adresses):
230        self.bus_adresses = bus_adresses
231
232    def get_adresse(self):
233        '''Obtenir la prochaine adresse du compteur ordinal'''
234        self.adresse_courante = self.prochaine_adresse
235        self.bus_adresses.valeur = self.adresse_courante
236        self.prochaine_adresse += 1
237
238
239    def set_adresse(self, adresse):
240        '''Définir la prochaine adresse du compteur ordinal'''
241        self.prochaine_adresse = int(adresse)
242
243    adresse = property(get_adresse, set_adresse)
244
245class Bus(object):
246    '''Représente un bus dans l'architecture de Von Neumann'''
247
248    valeur_courante = None
249
250    def get_valeur(self):
251        '''Récupération de la valeur du bus'''
252        return self.valeur_courante
253
254    def set_valeur(self, valeur):
255        '''Affectation d'une valeur au bus'''
256        self.valeur_courante = valeur
257
258    def del_valeur(self):
259        '''RAZ de la valeur du bus'''
260        self.valeur = None
261
262    valeur = property(get_valeur, set_valeur, del_valeur)
gneumann/gneumann.glade
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
3<!--Generated with glade3 3.4.1 on Sun Feb 3 16:17:59 2008 -->
4<glade-interface>
5  <widget class="GtkWindow" id="Gneumann">
6    <property name="visible">True</property>
7    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
8    <property name="title" translatable="yes">Architecture de Von Neumann</property>
9    <property name="resizable">False</property>
10    <property name="icon">icon.png</property>
11    <signal name="destroy" handler="on_destroy"/>
12    <child>
13      <widget class="GtkVBox" id="vbox">
14        <property name="visible">True</property>
15        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
16        <child>
17          <widget class="GtkMenuBar" id="menu">
18            <property name="visible">True</property>
19            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
20            <child>
21              <widget class="GtkMenuItem" id="menuitem_fichier">
22                <property name="visible">True</property>
23                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
24                <property name="label" translatable="yes">_Fichier</property>
25                <property name="use_underline">True</property>
26                <child>
27                  <widget class="GtkMenu" id="menu_fichier">
28                    <property name="visible">True</property>
29                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
30                    <child>
31                      <widget class="GtkImageMenuItem" id="menu_fichier_raz">
32                        <property name="visible">True</property>
33                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
34                        <property name="label" translatable="yes">gtk-new</property>
35                        <property name="use_underline">True</property>
36                        <property name="use_stock">True</property>
37                        <signal name="activate" handler="on_reset"/>
38                      </widget>
39                    </child>
40                    <child>
41                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
42                        <property name="visible">True</property>
43                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
44                      </widget>
45                    </child>
46                    <child>
47                      <widget class="GtkImageMenuItem" id="menu_fichier_quitter">
48                        <property name="visible">True</property>
49                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
50                        <property name="label" translatable="yes">gtk-quit</property>
51                        <property name="use_underline">True</property>
52                        <property name="use_stock">True</property>
53                      </widget>
54                    </child>
55                  </widget>
56                </child>
57              </widget>
58            </child>
59            <child>
60              <widget class="GtkMenuItem" id="menuitem_memoire">
61                <property name="visible">True</property>
62                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
63                <property name="label" translatable="yes">_Mémoire</property>
64                <property name="use_underline">True</property>
65                <child>
66                  <widget class="GtkMenu" id="menu_memoire">
67                    <property name="visible">True</property>
68                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
69                    <child>
70                      <widget class="GtkImageMenuItem" id="menu_memoire_editer">
71                        <property name="visible">True</property>
72                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
73                        <property name="label" translatable="yes">gtk-edit</property>
74                        <property name="use_underline">True</property>
75                        <property name="use_stock">True</property>
76                      </widget>
77                    </child>
78                    <child>
79                      <widget class="GtkImageMenuItem" id="menu_memoire_vider">
80                        <property name="visible">True</property>
81                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
82                        <property name="label" translatable="yes">gtk-clear</property>
83                        <property name="use_underline">True</property>
84                        <property name="use_stock">True</property>
85                      </widget>
86                    </child>
87                  </widget>
88                </child>
89              </widget>
90            </child>
91          </widget>
92          <packing>
93            <property name="expand">False</property>
94          </packing>
95        </child>
96        <child>
97          <widget class="GtkFixed" id="fixed">
98            <property name="visible">True</property>
99            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
100            <child>
101              <widget class="GtkImage" id="fond">
102                <property name="width_request">671</property>
103                <property name="height_request">448</property>
104                <property name="visible">True</property>
105                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
106                <property name="pixbuf">neumann.png</property>
107              </widget>
108            </child>
109            <child>
110              <widget class="GtkLabel" id="valeur_compteur_ordinal">
111                <property name="width_request">151</property>
112                <property name="height_request">20</property>
113                <property name="visible">True</property>
114                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
115                <property name="label" translatable="yes">&lt;b&gt;&lt;/b&gt;</property>
116                <property name="use_markup">True</property>
117              </widget>
118              <packing>
119                <property name="x">301</property>
120                <property name="y">62</property>
121              </packing>
122            </child>
123            <child>
124              <widget class="GtkLabel" id="valeur_bus_donnees">
125                <property name="width_request">182</property>
126                <property name="height_request">20</property>
127                <property name="visible">True</property>
128                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
129                <property name="label" translatable="yes">&lt;b&gt;&lt;/b&gt;</property>
130                <property name="use_markup">True</property>
131              </widget>
132              <packing>
133                <property name="x">218</property>
134                <property name="y">392</property>
135              </packing>
136            </child>
137            <child>
138              <widget class="GtkLabel" id="valeur_op1_ual">
139                <property name="width_request">38</property>
140                <property name="height_request">21</property>
141                <property name="visible">True</property>
142                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
143              </widget>
144              <packing>
145                <property name="x">128</property>
146                <property name="y">295</property>
147              </packing>
148            </child>
149            <child>
150              <widget class="GtkLabel" id="valeur_op2_ual">
151                <property name="width_request">36</property>
152                <property name="height_request">20</property>
153                <property name="visible">True</property>
154                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
155              </widget>
156              <packing>
157                <property name="x">212</property>
158                <property name="y">295</property>
159              </packing>
160            </child>
161            <child>
162              <widget class="GtkLabel" id="valeur_resultat_ual">
163                <property name="width_request">76</property>
164                <property name="height_request">20</property>
165                <property name="visible">True</property>
166                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
167                <property name="label" translatable="yes">&lt;b&gt;&lt;/b&gt;</property>
168                <property name="use_markup">True</property>
169              </widget>
170              <packing>
171                <property name="x">151</property>
172                <property name="y">229</property>
173              </packing>
174            </child>
175            <child>
176              <widget class="GtkLabel" id="valeur_bus_adresses">
177                <property name="width_request">84</property>
178                <property name="height_request">20</property>
179                <property name="visible">True</property>
180                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
181                <property name="label" translatable="yes">&lt;span foreground="#FFFFFF"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;</property>
182                <property name="use_markup">True</property>
183              </widget>
184              <packing>
185                <property name="x">362</property>
186                <property name="y">99</property>
187              </packing>
188            </child>
189            <child>
190              <widget class="GtkButton" id="top">
191                <property name="width_request">130</property>
192                <property name="height_request">34</property>
193                <property name="visible">True</property>
194                <property name="can_focus">True</property>
195                <property name="receives_default">True</property>
196                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
197                <property name="label" translatable="yes">top !</property>
198                <property name="response_id">0</property>
199                <signal name="clicked" handler="on_top"/>
200              </widget>
201              <packing>
202                <property name="x">290</property>
203                <property name="y">185</property>
204              </packing>
205            </child>
206            <child>
207              <widget class="GtkLabel" id="valeur_code">
208                <property name="width_request">58</property>
209                <property name="height_request">20</property>
210                <property name="visible">True</property>
211                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
212                <property name="label" translatable="yes">&lt;b&gt;&lt;/b&gt;</property>
213                <property name="use_markup">True</property>
214              </widget>
215              <packing>
216                <property name="x">276</property>
217                <property name="y">305</property>
218              </packing>
219            </child>
220            <child>
221              <widget class="GtkLabel" id="valeur_donnees">
222                <property name="width_request">99</property>
223                <property name="height_request">34</property>
224                <property name="visible">True</property>
225                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
226                <property name="label" translatable="yes">&lt;b&gt;
227&lt;/b&gt;</property>
228                <property name="use_markup">True</property>
229                <property name="justify">GTK_JUSTIFY_CENTER</property>
230              </widget>
231              <packing>
232                <property name="x">344</property>
233                <property name="y">299</property>
234              </packing>
235            </child>
236            <child>
237              <widget class="GtkScrolledWindow" id="scrollmemoire">
238                <property name="width_request">182</property>
239                <property name="height_request">236</property>
240                <property name="visible">True</property>
241                <property name="can_focus">True</property>
242                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
243                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
244                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
245                <child>
246                  <widget class="GtkTreeView" id="memoire">
247                    <property name="width_request">143</property>
248                    <property name="height_request">234</property>
249                    <property name="visible">True</property>
250                    <property name="can_focus">True</property>
251                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
252                    <property name="headers_visible">False</property>
253                    <property name="headers_clickable">True</property>
254                    <property name="search_column">0</property>
255                    <property name="enable_grid_lines">GTK_TREE_VIEW_GRID_LINES_HORIZONTAL</property>
256                  </widget>
257                </child>
258              </widget>
259              <packing>
260                <property name="x">472</property>
261                <property name="y">30</property>
262              </packing>
263            </child>
264            <child>
265              <widget class="GtkScrolledWindow" id="scrollregistres">
266                <property name="width_request">221</property>
267                <property name="height_request">100</property>
268                <property name="visible">True</property>
269                <property name="can_focus">True</property>
270                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
271                <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
272                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
273                <child>
274                  <widget class="GtkTreeView" id="registres">
275                    <property name="width_request">220</property>
276                    <property name="height_request">102</property>
277                    <property name="visible">True</property>
278                    <property name="can_focus">True</property>
279                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
280                    <property name="headers_visible">False</property>
281                    <property name="search_column">0</property>
282                    <property name="enable_grid_lines">GTK_TREE_VIEW_GRID_LINES_HORIZONTAL</property>
283                  </widget>
284                </child>
285              </widget>
286              <packing>
287                <property name="x">15</property>
288                <property name="y">34</property>
289              </packing>
290            </child>
291            <child>
292              <widget class="GtkLabel" id="valeur_bus_commandes">
293                <property name="width_request">186</property>
294                <property name="height_request">20</property>
295                <property name="visible">True</property>
296                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
297                <property name="label" translatable="yes">&lt;span foreground="#FFFFFF"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;</property>
298                <property name="use_markup">True</property>
299              </widget>
300              <packing>
301                <property name="x">262</property>
302                <property name="y">1</property>
303              </packing>
304            </child>
305            <child>
306              <widget class="GtkButton" id="debug1">
307                <property name="width_request">74</property>
308                <property name="height_request">32</property>
309                <property name="visible">True</property>
310                <property name="can_focus">True</property>
311                <property name="receives_default">True</property>
312                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
313                <property name="label" translatable="yes">Debug 1</property>
314                <property name="response_id">0</property>
315                <signal name="clicked" handler="on_debug1"/>
316              </widget>
317              <packing>
318                <property name="x">579</property>
319                <property name="y">279</property>
320              </packing>
321            </child>
322            <child>
323              <widget class="GtkButton" id="debug2">
324                <property name="width_request">80</property>
325                <property name="height_request">32</property>
326                <property name="visible">True</property>
327                <property name="can_focus">True</property>
328                <property name="receives_default">True</property>
329                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
330                <property name="label" translatable="yes">Debug 2</property>
331                <property name="response_id">0</property>
332                <signal name="clicked" handler="on_debug2"/>
333              </widget>
334              <packing>
335                <property name="x">578</property>
336                <property name="y">317</property>
337              </packing>
338            </child>
339          </widget>
340          <packing>
341            <property name="position">1</property>
342          </packing>
343        </child>
344      </widget>
345    </child>
346  </widget>
347  <widget class="GtkWindow" id="Editeur">
348    <property name="width_request">400</property>
349    <property name="height_request">500</property>
350    <property name="visible">True</property>
351    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
352    <property name="title" translatable="yes">Editer la mémoire</property>
353    <property name="resizable">False</property>
354    <property name="modal">True</property>
355    <property name="window_position">GTK_WIN_POS_CENTER</property>
356    <property name="default_width">300</property>
357    <property name="default_height">500</property>
358    <child>
359      <widget class="GtkVBox" id="vbox">
360        <property name="visible">True</property>
361        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
362        <child>
363          <widget class="GtkScrolledWindow" id="scrolledwindow2">
364            <property name="visible">True</property>
365            <property name="can_focus">True</property>
366            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
367            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
368            <child>
369              <widget class="GtkTextView" id="code">
370                <property name="visible">True</property>
371                <property name="can_focus">True</property>
372                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
373              </widget>
374            </child>
375          </widget>
376        </child>
377        <child>
378          <widget class="GtkExpander" id="expander1">
379            <property name="visible">True</property>
380            <property name="can_focus">True</property>
381            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
382            <child>
383              <widget class="GtkLabel" id="label2">
384                <property name="visible">True</property>
385                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
386                <property name="xalign">0.019999999552965164</property>
387                <property name="label" translatable="yes">&lt;b&gt;Liste des instructions utilisables :&lt;/b&gt;
388
389 - ADD / SUB : Additionner / Soustraire
390 - MOV : Recopier une donnée à un emplacement donné
391 - JMP : Sauter à un endroit</property>
392                <property name="use_markup">True</property>
393              </widget>
394            </child>
395            <child>
396              <widget class="GtkLabel" id="label1">
397                <property name="visible">True</property>
398                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
399                <property name="label" translatable="yes">&lt;b&gt;Aide&lt;/b&gt;</property>
400                <property name="use_markup">True</property>
401              </widget>
402              <packing>
403                <property name="type">label_item</property>
404              </packing>
405            </child>
406          </widget>
407          <packing>
408            <property name="expand">False</property>
409            <property name="fill">False</property>
410            <property name="position">1</property>
411          </packing>
412        </child>
413        <child>
414          <widget class="GtkHButtonBox" id="hbuttonbox1">
415            <property name="visible">True</property>
416            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
417            <property name="spacing">4</property>
418            <property name="layout_style">GTK_BUTTONBOX_END</property>
419            <child>
420              <widget class="GtkButton" id="button1">
421                <property name="visible">True</property>
422                <property name="can_focus">True</property>
423                <property name="receives_default">True</property>
424                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
425                <property name="label" translatable="yes">gtk-cancel</property>
426                <property name="use_stock">True</property>
427                <property name="response_id">0</property>
428              </widget>
429            </child>
430            <child>
431              <widget class="GtkButton" id="button2">
432                <property name="visible">True</property>
433                <property name="can_focus">True</property>
434                <property name="receives_default">True</property>
435                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
436                <property name="label" translatable="yes">gtk-apply</property>
437                <property name="use_stock">True</property>
438                <property name="response_id">0</property>
439              </widget>
440              <packing>
441                <property name="position">1</property>
442              </packing>
443            </child>
444          </widget>
445          <packing>
446            <property name="expand">False</property>
447            <property name="padding">3</property>
448            <property name="position">2</property>
449          </packing>
450        </child>
451      </widget>
452    </child>
453  </widget>
454  <widget class="GtkDialog" id="Erreur_instruction">
455    <property name="visible">True</property>
456    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
457    <property name="border_width">5</property>
458    <property name="title" translatable="yes">Erreur de décodage</property>
459    <property name="resizable">False</property>
460    <property name="modal">True</property>
461    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
462    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
463    <property name="has_separator">False</property>
464    <child internal-child="vbox">
465      <widget class="GtkVBox" id="dialog-vbox1">
466        <property name="visible">True</property>
467        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
468        <property name="spacing">2</property>
469        <child>
470          <widget class="GtkHBox" id="hbox1">
471            <property name="visible">True</property>
472            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
473            <child>
474              <widget class="GtkImage" id="image1">
475                <property name="visible">True</property>
476                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
477                <property name="yalign">0</property>
478                <property name="stock">gtk-dialog-error</property>
479                <property name="icon_size">6</property>
480              </widget>
481              <packing>
482                <property name="padding">10</property>
483              </packing>
484            </child>
485            <child>
486              <widget class="GtkVBox" id="vbox1">
487                <property name="visible">True</property>
488                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
489                <child>
490                  <widget class="GtkLabel" id="label3">
491                    <property name="visible">True</property>
492                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
493                    <property name="xalign">0.20000000298023224</property>
494                    <property name="label" translatable="yes">&lt;b&gt;Erreur !&lt;/b&gt;
495
496L'instruction n'a pas pu être décodée, soit parce qu'elle est mal formée, soit parce que le programme à lu une donnée au lieu d'une instruction.
497Fin de l'exécution du programme, remise à zéro du compteur ordinal.</property>
498                    <property name="use_markup">True</property>
499                    <property name="wrap">True</property>
500                    <property name="selectable">True</property>
501                  </widget>
502                  <packing>
503                    <property name="padding">9</property>
504                  </packing>
505                </child>
506                <child>
507                  <widget class="GtkExpander" id="expander2">
508                    <property name="visible">True</property>
509                    <property name="can_focus">True</property>
510                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
511                    <child>
512                      <widget class="GtkLabel" id="debug">
513                        <property name="visible">True</property>
514                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
515                        <property name="xalign">0.10000000149011612</property>
516                        <property name="xpad">5</property>
517                        <property name="ypad">5</property>
518                        <property name="use_markup">True</property>
519                        <property name="wrap">True</property>
520                        <property name="selectable">True</property>
521                      </widget>
522                    </child>
523                    <child>
524                      <widget class="GtkLabel" id="label4">
525                        <property name="visible">True</property>
526                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
527                        <property name="label" translatable="yes">&lt;b&gt;Informations de debug&lt;/b&gt;</property>
528                        <property name="use_markup">True</property>
529                      </widget>
530                      <packing>
531                        <property name="type">label_item</property>
532                      </packing>
533                    </child>
534                  </widget>
535                  <packing>
536                    <property name="position">1</property>
537                  </packing>
538                </child>
539              </widget>
540              <packing>
541                <property name="position">1</property>
542              </packing>
543            </child>
544          </widget>
545          <packing>
546            <property name="position">1</property>
547          </packing>
548        </child>
549        <child internal-child="action_area">
550          <widget class="GtkHButtonBox" id="dialog-action_area1">
551            <property name="visible">True</property>
552            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
553            <property name="layout_style">GTK_BUTTONBOX_END</property>
554            <child>
555              <widget class="GtkButton" id="ok">
556                <property name="visible">True</property>
557                <property name="can_focus">True</property>
558                <property name="receives_default">True</property>
559                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
560                <property name="label" translatable="yes">gtk-ok</property>
561                <property name="use_stock">True</property>
562                <property name="response_id">0</property>
563                <signal name="clicked" handler="on_close"/>
564              </widget>
565            </child>
566          </widget>
567          <packing>
568            <property name="expand">False</property>
569            <property name="pack_type">GTK_PACK_END</property>
570          </packing>
571        </child>
572      </widget>
573    </child>
574  </widget>
575</glade-interface>
gneumann/gneumann.py
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# gneumann.py
5#
6# Copyright 2008 Antoine 'NaPs' Millet <antoine@inaps.org>
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21# MA 02110-1301, USA.
22
23'''GTK Neumann'''
24
25from gneulib import CPU
26from gtk_gneulib import GNeumann, main
27
28class Neumann(object):
29    '''Programme'''
30
31    def __init__(self):
32        self.cpu = CPU()
33        self.prochaine_etape = self.exec_instruction
34        self.gneumann = GNeumann(self, 'gneumann.glade', 'Gneumann')
35        main()
36
37    def reset(self):
38        self.cpu = CPU()
39        self.prochaine_etape = self.exec_instruction
40
41    def top(self):
42        self.cpu.actions()
43        del self.cpu.bus_commandes.valeur
44        del self.gneumann.valeur_bus_commandes
45
46        try:
47            self.prochaine_etape = self.prochaine_etape()
48        except self.cpu.BadCmdError, erreur:
49            self.cpu.compteur_ordinal.adresse = 0
50            self.gneumann.raise_cmd_error(erreur)
51            self.prochaine_etape = self.exec_instruction
52
53        # Mise à jour de l'affichage :
54
55        self.gneumann.memoire = [[i,x] for x, i in zip(self.cpu.memoire.memoire, xrange(len(self.cpu.memoire.memoire)))]
56        self.gneumann.registres = [[nom, valeur] for nom, valeur in self.cpu.registres.registres.items()]
57
58        if self.cpu.bus_adresses.valeur:
59            self.gneumann.valeur_bus_adresses = self.cpu.bus_adresses.valeur
60        else:
61            del self.gneumann.valeur_bus_adresses
62
63        if self.cpu.bus_commandes.valeur:
64            self.gneumann.valeur_bus_commandes = ' '.join((str(x) for x in self.cpu.bus_commandes.valeur))
65        else:
66            del self.gneumann.valeur_bus_commandes
67
68        if self.cpu.bus_donnees.valeur:
69            self.gneumann.valeur_bus_donnees = self.cpu.bus_donnees.valeur
70        else:
71            del self.gneumann.valeur_bus_donnees
72
73        self.gneumann.valeur_code = self.cpu.registre_instruction[0]
74        self.gneumann.valeur_donnees = self.cpu.registre_instruction[1:]
75        self.gneumann.op1_ual = self.cpu.ual.op1
76        self.gneumann.op2_ual = self.cpu.ual.op2
77        self.gneumann.resultat_ual = self.cpu.ual.resultat
78        self.gneumann.valeur_co = self.cpu.compteur_ordinal.adresse_courante
79
80
81    def exec_instruction(self):
82        self.cpu.compteur_ordinal.get_adresse() # Placer la prochaine adresse du compteur
83                                                # ordinal sur le bus d'adresses
84
85        self.cpu.decoder(self.cpu.memoire.memoire[self.cpu.bus_adresses.valeur])
86        # ^-- Placer l'instruction décomposée dans le registre d'instructions
87
88        if self.cpu.registre_instruction[0] == 'ADD':
89            return self.exec_add_1
90        elif self.cpu.registre_instruction[0] == 'SUB':
91            pass
92        elif self.cpu.registre_instruction[0] == 'MOV':
93            return self.exec_mov_1
94        elif self.cpu.registre_instruction[0] == 'JMP':
95            return self.exec_jmp_1
96
97    def exec_add_1(self): # Etape 1 : Charger la valeur de l'op1 sur le bus de données
98        if type(self.cpu.registre_instruction[1]) == type(str()): # On a affaire à un registre
99            # Commande de lecture du registre
100            self.cpu.bus_commandes.valeur = ('registres0', 'lire', self.cpu.registre_instruction[1])
101        else: # On a affaire à la mémoire centrale
102            self.cpu.bus_adresses.valeur = self.cpu.registre_instruction[1]
103            self.cpu.bus_commandes.valeur = ('memoire0', 'lire')
104        return self.exec_add_2
105
106    def exec_add_2(self): # Etape 2 : Bus de données dans op1
107        self.cpu.bus_commandes.valeur = ('ual0', 'lectureOP1')
108        return self.exec_add_3
109
110    def exec_add_3(self): # Etape 3 : valeur de l'op2 sur le bus de données
111        if type(self.cpu.registre_instruction[2]) == type(str()): # On a affaire à un registre
112            self.cpu.bus_commandes.valeur = ('registres0', 'lire', self.cpu.registre_instruction[2])
113        else: # On a affaire à la mémoire centrale
114            self.cpu.bus_adresses.valeur = self.cpu.registre_instruction[2]
115            self.cpu.bus_commandes.valeur = ('memoire0', 'lire', self.cpu.registre_instruction[2])
116        return self.exec_add_4
117
118    def exec_add_4(self): # Etape 4 : Bus de données dans op1
119        self.cpu.bus_commandes.valeur = ('ual0', 'lectureOP2')
120        return self.exec_add_5
121
122    def exec_add_5(self): # Etape 5 : ADDer
123        self.cpu.bus_commandes.valeur = ('ual0', 'additionner')
124        return self.exec_add_6
125
126    def exec_add_6(self): # Etape 6 : Resulter
127        self.cpu.bus_commandes.valeur = ('ual0', 'resultat')
128        return self.exec_add_7
129
130    def exec_add_7(self): # Etape 7 : Envoyer le résultat la ou il faut
131        if type(self.cpu.registre_instruction[1]) == type(str()): # On a affaire à un registre
132            # Commande de lecture du registre
133            self.cpu.bus_commandes.valeur = ('registres0', 'ecrire', self.cpu.registre_instruction[1])
134        else: # On a affaire à la mémoire centrale
135            self.cpu.bus_adresses.valeur = self.cpu.registre_instruction[1]
136            self.cpu.bus_commandes.valeur = ('memoire0', 'ecrire')
137        return self.exec_instruction
138
139
140    def exec_mov_1(self): # Etape 1 : Lire l'opérateur 2 (la source)
141        if type(self.cpu.registre_instruction[2]) == type(str()): # On a affaire à un registre
142            # Commande de lecture du registre
143            self.cpu.bus_commandes.valeur = ('registres0', 'lire', self.cpu.registre_instruction[2])
144        else: # On a affaire à la mémoire centrale
145            self.cpu.bus_adresses.valeur = self.cpu.registre_instruction[2]
146            self.cpu.bus_commandes.valeur = ('memoire0', 'lire')
147        return self.exec_mov_2
148
149    def exec_mov_2(self): # Etape 2 : écrire le bdd sur l'op1
150        if type(self.cpu.registre_instruction[1]) == type(str()): # On a affaire à un registre
151            # Commande de lecture du registre
152            self.cpu.bus_commandes.valeur = ('registres0', 'ecrire', self.cpu.registre_instruction[1])
153        else: # On a affaire à la mémoire centrale
154            self.cpu.bus_adresses.valeur = self.cpu.registre_instruction[1]
155            self.cpu.bus_commandes.valeur = ('memoire0', 'ecrire')
156        return self.exec_instruction
157
158    def exec_jmp_1(self):
159        self.cpu.compteur_ordinal.adresse = self.cpu.registre_instruction[1]
160        return self.exec_instruction
161
162if __name__ == '__main__':
163    neumann = Neumann()
gneumann/gtk_gneulib.py
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3#
4# gtk_gneulib.py
5#
6# Copyright 2008 Antoine 'NaPs' Millet <antoine@inaps.org>
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21# MA 02110-1301, USA.
22
23'''Classes des fenêtres gtk de l'application'''
24
25from GLObject import GLObject
26import gtk
27
28def main():
29    gtk.main()
30
31class GNeumann(GLObject):
32    '''Fenête principale de l'application
33    Attributs :
34    ===========
35
36     - op1_ual : opérateur 1 de l'ual
37     - op2_ual : opérateur 2 de l'ual
38     - resultat_ual : résultat de l'ual
39     - valeur_bus_adresses : Valeur du bus d'adresses
40     - valeur_bus_donnees : Valeur du bus de données
41     - valeur_bus_commandes : Valeur du bus de commandes
42     - valeur_code : Valeur du code opération
43     - valeur_donnees : Valeur des données à manipuler (tuple (d1, d2))
44     -
45
46     Méthodes :
47     ==========
48
49
50    '''
51
52    def __init__(self, neumann_obj, *args, **kwargs):
53        GLObject.__init__(self, *args, **kwargs)
54
55        self.neumann = neumann_obj
56
57        self.gmemoire = gtk.ListStore(int, str)
58        self.widgets.get_widget('memoire').set_model(self.gmemoire)
59        self.widgets.get_widget('memoire').append_column(gtk.TreeViewColumn('Adresse', gtk.CellRendererText(), text=0))
60        self.widgets.get_widget('memoire').append_column(gtk.TreeViewColumn('Donnée', gtk.CellRendererText(), text=1))
61
62        self.gregistres = gtk.ListStore(str, int)
63        self.widgets.get_widget('registres').set_model(self.gregistres)
64        self.widgets.get_widget('registres').append_column(gtk.TreeViewColumn('Nom', gtk.CellRendererText(), text=0))
65        self.widgets.get_widget('registres').append_column(gtk.TreeViewColumn('Donnée', gtk.CellRendererText(), text=1))
66
67    def raise_cmd_error(self, erreur):
68        erreur = Erreur_instruction(erreur, 'gneumann.glade', 'Erreur_instruction')
69
70    def on_reset(self, event):
71        self.neumann.reset()
72
73    def on_destroy(self, event):
74        '''Méthode appelée lors de la fermeture de la fenêtre'''
75        gtk.main_quit()
76
77
78
79    def on_top(self, event):
80        self.neumann.top()
81
82    def on_debug2(self, event):
83        ''''''
84
85        ed = Editeur('gneumann.glade', 'Editeur')
86
87    def on_debug1(self, event):
88        '''Signal de test'''
89        self.neumann.cpu.memoire.importer('''ADD AX [6]
90ADD AX AX
91ADD [6] AX
92MOV BX [6]
93JMP 0
941
952
963
974''')
98        self.memoire = [[i,x] for x, i in zip(self.neumann.cpu.memoire.memoire, xrange(len(self.neumann.cpu.memoire.memoire)))]
99        self.neumann.cpu.registres.registres['AX'] = 3
100    def set_memoire(self, lignes):
101        '''Définir les éléments affichés dans la mémoire'''
102        self.del_memoire()
103        for ligne in lignes:
104            self.gmemoire.append(ligne)
105
106    def get_memoire(self):
107        return None
108
109    def del_memoire(self):
110        self.gmemoire.clear()
111
112    memoire = property(get_memoire, set_memoire, del_memoire)
113
114    def set_registres(self, lignes):
115        '''Définir les éléments affichés dans la mémoire'''
116        self.del_registres()
117        for ligne in lignes:
118            self.gregistres.append(ligne)
119
120    def get_registres(self):
121        return None
122
123    def del_registres(self):
124        self.gregistres.clear()
125
126    registres = property(get_registres, set_registres, del_registres)
127
128    def set_op1_ual(self, valeur):
129        '''Définir l'opérateur 1 de l'ual'''
130        self.widgets.get_widget('valeur_op1_ual').set_text(str(valeur))
131
132    def get_op1_ual(self):
133        '''Obtenir la valeur de l'opérateur 1 sur l'ual'''
134        return self.widgets.get_widget('valeur_op1_ual').get_text()
135
136    def del_op1_ual(self):
137        '''RAZ de la valeur de l'opérateur 1 de l'ual'''
138        self.widgets.get_widget('valeur_op1_ual').set_text('')
139
140    op1_ual = property(get_op1_ual, set_op1_ual, del_op1_ual)
141
142    def set_op2_ual(self, valeur):
143        '''Définir l'opérateur 2 de l'ual'''
144        self.widgets.get_widget('valeur_op2_ual').set_text(str(valeur))
145
146    def get_op2_ual(self):
147        '''Obtenir la valeur de l'opérateur 2 sur l'ual'''
148        return self.widgets.get_widget('valeur_op2_ual').get_text()
149
150    def del_op2_ual(self):
151        '''RAZ de la valeur de l'opérateur 2 de l'ual'''
152        self.widgets.get_widget('valeur_op2_ual').set_text('')
153
154    op2_ual = property(get_op2_ual, set_op2_ual, del_op2_ual)
155
156    def set_resultat_ual(self, valeur):
157        '''Définir le résultat de l'ual'''
158        self.widgets.get_widget('valeur_resultat_ual').set_text(str(valeur))
159
160    def get_resultat_ual(self):
161        '''Obtenir la valeur du résultat sur l'ual'''
162        return self.widgets.get_widget('valeur_resultat_ual').get_text()
163
164    def del_resultat_ual(self):
165        '''RAZ de la valeur du résultat sur l'ual'''
166        self.widgets.get_widget('valeur_resultat_ual').set_text('')
167
168    resultat_ual = property(get_resultat_ual, set_resultat_ual, del_resultat_ual)
169
170    def set_valeur_bus_adresses(self, valeur):
171        '''Définir la valeur du bus d'adresses'''
172        self.widgets.get_widget('valeur_bus_adresses').set_markup(
173            '<span foreground="#FFFFFF"><b>%s</b></span>' % str(valeur)
174        )
175
176    def get_valeur_bus_adresses(self):
177        '''Obtenir la valeur du bus d'adresses'''
178        return self.widgets.get_widget('valeur_bus_adresses').get_text()
179
180    def del_valeur_bus_adresses(self):
181        '''RAZ de la valeur du bus d'adresses'''
182        self.widgets.get_widget('valeur_bus_adresses').set_text('')
183
184    valeur_bus_adresses = property(
185        get_valeur_bus_adresses,
186        set_valeur_bus_adresses,
187        del_valeur_bus_adresses
188    )
189
190    def set_valeur_bus_donnees(self, valeur):
191        '''Définir la valeur du bus de données'''
192        self.widgets.get_widget('valeur_bus_donnees').set_markup(
193            '<b>%s</b>' % str(valeur)
194        )
195
196    def get_valeur_bus_donnees(self):
197        '''Obtenir la valeur du bus de données'''
198        return self.widgets.get_widget('valeur_bus_donnees').get_text()
199
200    def del_valeur_bus_donnees(self):
201        '''RAZ de la valeur du bus de données'''
202        self.widgets.get_widget('valeur_bus_donnees').set_text('')
203
204    valeur_bus_donnees = property(
205        get_valeur_bus_donnees,
206        set_valeur_bus_donnees,
207        del_valeur_bus_donnees
208    )
209
210    def set_valeur_bus_commandes(self, valeur):
211        '''Définir la valeur du bus de commandes'''
212        self.widgets.get_widget('valeur_bus_commandes').set_markup(
213            '<span foreground="#FFFFFF"><b>%s</b></span>' % str(valeur)
214        )
215
216    def get_valeur_bus_commandes(self):
217        '''Obtenir la valeur du bus de commandes'''
218        return self.widgets.get_widget('valeur_bus_commandes').get_text()
219
220    def del_valeur_bus_commandes(self):
221        '''RAZ de la valeur du bus de commandes'''
222        self.widgets.get_widget('valeur_bus_commandes').set_text('')
223
224    valeur_bus_commandes = property(
225        get_valeur_bus_commandes,
226        set_valeur_bus_commandes,
227        del_valeur_bus_commandes
228    )
229
230    def set_valeur_code(self, valeur):
231        '''Définir la valeur du code'''
232        self.widgets.get_widget('valeur_code').set_markup(
233            '<b>%s</b>' % str(valeur)
234        )
235
236    def get_valeur_code(self):
237        '''Obtenir la valeur du code'''
238        return self.widgets.get_widget('valeur_code').get_text()
239
240    def del_valeur_code(self):
241        '''RAZ de la valeur du code'''
242        self.widgets.get_widget('valeur_code').set_text('')
243
244    valeur_code = property(
245        get_valeur_code,
246        set_valeur_code,
247        del_valeur_code
248    )
249
250
251    def set_valeur_donnees(self, valeur):
252        '''Définir la valeur des données'''
253        self.widgets.get_widget('valeur_donnees').set_markup(
254            '<b>%s\n%s</b>' % (str(valeur[0]), str(valeur[1]))
255        )
256
257    def get_valeur_donnees(self):
258        '''Obtenir la valeur des données'''
259        return self.widgets.get_widget('valeur_donnees').get_text()
260
261    def del_valeur_donnees(self):
262        '''RAZ de la valeur des données'''
263        self.widgets.get_widget('valeur_donnees').set_text('')
264
265    valeur_donnees = property(
266        get_valeur_donnees,
267        set_valeur_donnees,
268        del_valeur_donnees
269    )
270
271    def set_valeur_co(self, valeur):
272        '''Définir la valeur du compteur ordinal'''
273        self.widgets.get_widget('valeur_compteur_ordinal').set_markup('<b>%s</b>' % valeur)
274
275    def get_valeur_co(self):
276        '''Obtenir la valeur du compteur ordinal'''
277        return self.widgets.get_widget('valeur_compteur_ordinal').get_text()
278
279    def del_valeur_co(self):
280        '''RAZ de la valeur du compteur ordinal'''
281        self.widgets.get_widget('valeur_compteur_ordinal').set_text('')
282
283    valeur_co = property(get_valeur_co, set_valeur_co, del_valeur_co)
284
285class Editeur(GLObject):
286    pass
287
288class Erreur_instruction(GLObject):
289
290    def __init__(self, erreur, *args, **kwargs):
291        GLObject.__init__(self, *args, **kwargs)
292        self.widgets.get_widget('debug').set_markup(str(erreur))
293
294
295    def on_close(self, event):
296        self.destroy()
gneumann/icon.png
1/home/naps/Devel/dev.inaps.org/gneumann/trunk/pix/icon.png
gneumann/neumann.png
1/home/naps/Devel/dev.inaps.org/gneumann/trunk/pix/neumann.png
gneumann/neumann.py
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4import sys
5
6class Neumann:
7
8    def __init__(self, mem):
9        self.mem = mem
10        self.registres = {'AX': '', 'BX': ''}
11        self.cartesDesInstructions = {'ADD': self.ual_add, 'MOV':self.ins_mov, 'JMP': self.ins_jmp}
12
13    def executerInstruction(self, adresse):
14        (instruction, arguments) = self.decodeur(self.mem[adresse])
15        print 'Execution de %s %s' % (instruction, arguments)
16        self.cartesDesInstructions[instruction](*arguments)
17        print 'Etat des registres :'
18        for registre, valeur in self.registres.items():
19            print ' %s : %s' % (registre, valeur)
20        print 'Etat de la mémoire :'
21        for valeur in self.mem:
22            print ' %s' % valeur
23        print '####### Fin de l\'exécution de l\'instruction #######'
24
25    def lancer(self):
26        self.adresse_instruction = 0
27        while 1:
28            self.executerInstruction(self.adresse_instruction)
29            self.adresse_instruction += 1
30            raw_input()
31
32    def decodeur(self, mem):
33        try:
34            (instruction, arguments) = mem.split(' ', 1)
35            arguments = arguments.split(', ')
36        except:
37            print 'Instruction non exécutable : %s ' % mem
38            sys.exit()
39        else:
40            return (instruction, arguments)
41
42    def ins_jmp(self, adresse):
43        self.adresse_instruction = int(adresse[1:-1]) - 1
44
45    def ins_mov(self, dest, src):
46        if dest[0] == '[':
47            # Une adresse
48            dest = int(dest[1:-1])
49            dansRegistre = False
50        else:
51            # Un registre
52            dansRegistre = True
53
54        if src[0] == '[':
55            # Une adresse
56            src = int(src[1:-1])
57            src_valeur = int(self.mem[src])
58        else:
59            # Un registre
60            src_valeur = self.registres[src]
61
62        if dansRegistre:
63            self.registres[dest] = src_valeur
64        else:
65            self.mem[dest] = src_valeur
66
67
68
69    def ual_add(self, arg1, arg2):
70        if arg1[0] == '[':
71            # Une adresse
72            arg1 = int(arg1[1:-1])
73            arg1_valeur = int(self.mem[arg1])
74            dansRegistre = False
75        else:
76            # Un registre
77            arg1_valeur = self.registres[arg1]
78            dansRegistre = True
79
80        if arg2[0] == '[':
81            # Une adresse
82            arg2 = int(arg2[1:-1])
83            arg2_valeur = int(self.mem[arg2])
84        else:
85            # Un registre
86            arg2_valeur = self.registres[arg2]
87
88        # Calcul
89        resultat = arg1_valeur + arg2_valeur
90
91        # Copie du résultat dans la mémoire
92        if dansRegistre:
93            self.registres[arg1] = str(resultat)
94        else:
95            self.mem[arg1] = str(resultat)
96
97
98
99if __name__ == '__main__':
100
101    memoire = [
102        'MOV AX, [3]',
103        'ADD AX, [4]',
104        'JMP [0]',
105        '3',
106        '4',
107    ]
108
109    m = Neumann(memoire)
110    m.lancer()
111
gneumann/pix/icon.png
gneumann/pix/neumann.png
gneumann/pix/neumann.svg
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4   xmlns:dc="http://purl.org/dc/elements/1.1/"
5   xmlns:cc="http://web.resource.org/cc/"
6   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7   xmlns:svg="http://www.w3.org/2000/svg"
8   xmlns="http://www.w3.org/2000/svg"
9   xmlns:xlink="http://www.w3.org/1999/xlink"
10   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12   width="210mm"
13   height="297mm"
14   id="svg2"
15   sodipodi:version="0.32"
16   inkscape:version="0.45.1"
17   sodipodi:docbase="/home/naps/Devel/dev.inaps.org/gneumann/trunk/pix"
18   sodipodi:docname="neumann.svg"
19   inkscape:output_extension="org.inkscape.output.svg.inkscape"
20   inkscape:export-filename="/home/naps/Devel/dev.inaps.org/gneumann/trunk/pix/neumann.png"
21   inkscape:export-xdpi="50"
22   inkscape:export-ydpi="50">
23  <defs
24     id="defs4">
25    <marker
26       inkscape:stockid="Arrow1Lend"
27       orient="auto"
28       refY="0.0"
29       refX="0.0"
30       id="Arrow1Lend"
31       style="overflow:visible;">
32      <path
33         id="path25925"
34         d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
35         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;"
36         transform="scale(0.8) rotate(180) translate(12.5,0)" />
37    </marker>
38    <linearGradient
39       id="linearGradient3187">
40      <stop
41         id="stop3189"
42         offset="0"
43         style="stop-color:#0f1561;stop-opacity:1;" />
44      <stop
45         id="stop3191"
46         offset="1"
47         style="stop-color:#181637;stop-opacity:1;" />
48    </linearGradient>
49    <marker
50       inkscape:stockid="Arrow2Lend"
51       orient="auto"
52       refY="0.0"
53       refX="0.0"
54       id="Arrow2Lend"
55       style="overflow:visible;">
56      <path
57         id="path4129"
58         style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
59         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
60         transform="scale(1.1) rotate(180) translate(1,0)" />
61    </marker>
62    <marker
63       inkscape:stockid="TriangleOutL"
64       orient="auto"
65       refY="0.0"
66       refX="0.0"
67       id="TriangleOutL"
68       style="overflow:visible">
69      <path
70         id="path4206"
71         d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
72         style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
73         transform="scale(0.8)" />
74    </marker>
75    <marker
76       inkscape:stockid="Arrow2Lstart"
77       orient="auto"
78       refY="0.0"
79       refX="0.0"
80       id="Arrow2Lstart"
81       style="overflow:visible">
82      <path
83         id="path4126"
84         style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
85         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
86         transform="scale(1.1) translate(1,0)" />
87    </marker>
88    <linearGradient
89       inkscape:collect="always"
90       xlink:href="#linearGradient3187"
91       id="linearGradient3185"
92       x1="31.085712"
93       y1="275.21933"
94       x2="670.34283"
95       y2="275.21933"
96       gradientUnits="userSpaceOnUse"
97       gradientTransform="matrix(1.058465,0,0,1,-2.0045147,0)" />
98  </defs>
99  <sodipodi:namedview
100     id="base"
101     pagecolor="#ffffff"
102     bordercolor="#666666"
103     borderopacity="1.0"
104     inkscape:pageopacity="0.0"
105     inkscape:pageshadow="2"
106     inkscape:zoom="1"
107     inkscape:cx="577.35969"
108     inkscape:cy="803.66318"
109     inkscape:document-units="px"
110     inkscape:current-layer="layer1"
111     inkscape:window-width="1280"
112     inkscape:window-height="727"
113     inkscape:window-x="0"
114     inkscape:window-y="25" />
115  <metadata
116     id="metadata7">
117    <rdf:RDF>
118      <cc:Work
119         rdf:about="">
120        <dc:format>image/svg+xml</dc:format>
121        <dc:type
122           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
123      </cc:Work>
124    </rdf:RDF>
125  </metadata>
126  <g
127     inkscape:groupmode="layer"
128     id="layer2"
129     inkscape:label="Fond">
130    <rect
131       style="opacity:1;fill:url(#linearGradient3185);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
132       id="rect4335"
133       width="669.85712"
134       height="448.57144"
135       x="34.285713"
136       y="50.933609"
137       inkscape:export-xdpi="90"
138       inkscape:export-ydpi="90"
139       inkscape:export-filename="/home/naps/Devel/dev.inaps.org/gneumann/trunk/pix/neumann.png" />
140    <g
141       id="g40960"
142       inkscape:export-filename="/home/naps/Devel/dev.inaps.org/gneumann/trunk/pix/icon.png"
143       inkscape:export-xdpi="84.410004"
144       inkscape:export-ydpi="84.410004">
145      <rect
146         transform="matrix(0,1,-1,0,0,0)"
147         ry="1.1490486"
148         rx="2.4748738"
149         y="87.902206"
150         x="366.0267"
151         height="17.05895"
152         width="2.8284271"
153         id="rect40897"
154         style="fill:#f3b805;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
155      <rect
156         transform="matrix(0,1,-1,0,0,0)"
157         ry="1.1490486"
158         rx="2.4748738"
159         y="87.902206"
160         x="361.43048"
161         height="17.05895"
162         width="2.8284271"
163         id="rect40887"
164         style="fill:#f3b805;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
165      <rect
166         ry="1.1490486"
167         rx="2.4748738"
168         y="356.74591"
169         x="-95.282616"
170         height="17.05895"
171         width="2.8284271"
172         id="rect40885"
173         style="fill:#f3b805;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
174      <rect
175         ry="1.1490486"
176         rx="2.4748738"
177         y="356.74591"
178         x="-100.23241"
179         height="17.05895"
180         width="2.8284271"
181         id="rect40883"
182         style="fill:#f3b805;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
183      <rect
184         ry="2.8873527"
185         rx="2.8873527"
186         y="357.85074"
187         x="-103.85631"
188         height="14.849243"
189         width="14.849243"
190         id="rect38930"
191         style="opacity:0.9;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
192      <text
193         sodipodi:linespacing="125%"
194         transform="scale(0.5886937,1.6986762)"
195         id="text38932"
196         y="218.76955"
197         x="-175.67056"
198         style="font-size:10.32852364px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
199         xml:space="preserve"><tspan
200           y="218.76955"
201           x="-175.67056"
202           id="tspan38934"
203           sodipodi:role="line">CPU</tspan></text>
204    </g>
205  </g>
206  <g
207     inkscape:label="Calque 1"
208     inkscape:groupmode="layer"
209     id="layer1">
210    <rect
211       style="opacity:0.9;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
212       id="rect35863"
213       width="172"
214       height="185"
215       x="-211.58578"
216       y="109.74518" />
217    <g
218       id="g22725"
219       transform="translate(-5.2857305,0)">
220      <path
221         id="path19801"
222         d="M 124.95313,408.34656 L 62.546874,444.37781 L 124.95313,480.37781 L 124.95313,469.28406 L 585.04688,469.28406 L 585.04688,480.37781 L 647.45313,444.37781 L 585.04688,408.34656 L 585.04688,419.47156 L 124.95313,419.47156 L 124.95313,408.34656 z "
223         style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
224      <path
225         id="path21754"
226         d="M 126.95313,410.34656 L 64.546872,446.37781 L 126.95313,482.37781 L 126.95313,471.28406 L 587.04688,471.28406 L 587.04688,482.37781 L 649.45313,446.37781 L 587.04688,410.34656 L 587.04688,421.47156 L 126.95313,421.47156 L 126.95313,410.34656 z "
227         style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
228    </g>
229    <g
230       id="g38917">
231      <g
232         transform="translate(-33.359648,23.59798)"
233         id="g22762">
234        <g
235           id="g22752"
236           transform="translate(2.0820865,-11.878064)">
237          <rect
238             y="193.86218"
239             x="349"
240             height="70"
241             width="140"
242             id="rect22729"
243             style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
244          <path
245             id="rect22733"
246             d="M 349.15625,268.21637 L 363.8125,287.71637 L 367.5625,292.71637 L 470.4375,292.71637 L 475.9375,285.37262 L 488.84375,268.21637 L 349.15625,268.21637 z "
247             style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
248        </g>
249        <g
250           id="g22756"
251           transform="translate(4.0820865,-9.8780637)">
252          <rect
253             y="193.86218"
254             x="349"
255             height="70"
256             width="140"
257             id="rect22758"
258             style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
259          <path
260             id="path22760"
261             d="M 349.15625,268.21637 L 363.8125,287.71637 L 367.5625,292.71637 L 470.4375,292.71637 L 475.9375,285.37262 L 488.84375,268.21637 L 349.15625,268.21637 z "
262             style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
263        </g>
264      </g>
265      <text
266         sodipodi:linespacing="125%"
267         id="text22770"
268         y="225.08148"
269         x="347.15076"
270         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
271         xml:space="preserve"><tspan
272           y="225.08148"
273           x="347.15076"
274           id="tspan22772"
275           sodipodi:role="line">Séquenceur</tspan></text>
276      <text
277         sodipodi:linespacing="125%"
278         id="text22774"
279         y="297.76526"
280         x="352.91843"
281         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
282         xml:space="preserve"><tspan
283           y="297.76526"
284           x="352.91843"
285           id="tspan22776"
286           sodipodi:role="line">Décodeur</tspan></text>
287    </g>
288    <text
289       xml:space="preserve"
290       style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
291       x="289.27881"
292       y="439.23688"
293       id="text22791"
294       sodipodi:linespacing="125%"><tspan
295         sodipodi:role="line"
296         id="tspan22793"
297         x="289.27881"
298         y="439.23688">Bus de données</tspan></text>
299    <g
300       id="g36839"
301       transform="translate(8,0)">
302      <g
303         id="g11955"
304         transform="translate(29.52589,7.1072e-2)"
305         style="fill:#ffffff;fill-opacity:0.66666667">
306        <path
307           id="path4315"
308           d="M 149.05804,265.90319 L 122.18304,366.18444 L 160.05804,366.18444 L 177.90179,299.59069 L 180.02679,299.59069 L 189.30804,299.59069 L 191.46429,299.59069 L 209.30804,366.18444 L 247.18304,366.18444 L 220.30804,265.90319 L 190.74554,265.90319 L 178.58929,265.90319 L 149.05804,265.90319 z "
309           style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
310        <path
311           id="path6103"
312           d="M 151.05804,267.90319 L 124.18304,368.18444 L 162.05804,368.18444 L 179.90179,301.59069 L 182.02679,301.59069 L 191.30804,301.59069 L 193.46429,301.59069 L 211.30804,368.18444 L 249.18304,368.18444 L 222.30804,267.90319 L 192.74554,267.90319 L 180.58929,267.90319 L 151.05804,267.90319 z "
313           style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
314      </g>
315      <text
316         sodipodi:linespacing="125%"
317         id="text22808"
318         y="281.62314"
319         x="202.13622"
320         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
321         xml:space="preserve"><tspan
322           y="281.62314"
323           x="202.13622"
324           id="tspan22810"
325           sodipodi:role="line">UAL</tspan></text>
326    </g>
327    <g
328       transform="translate(9.372583,15.150758)"
329       id="g22831">
330      <g
331         id="g18791"
332         transform="translate(1.4639553,-14.445181)">
333        <rect
334           y="93.707199"
335           x="318.70038"
336           height="41.088734"
337           width="158.44803"
338           id="rect13919"
339           style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:17.06699944;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:43.79999924;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
340        <rect
341           y="95.707199"
342           x="320.70038"
343           height="41.088734"
344           width="158.44803"
345           id="rect13921"
346           style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:17.06699944;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:43.79999924;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
347      </g>
348      <text
349         sodipodi:linespacing="125%"
350         id="text22812"
351         y="96.290077"
352         x="326.75549"
353         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
354         xml:space="preserve"><tspan
355           y="96.290077"
356           x="326.75549"
357           id="tspan22814"
358           sodipodi:role="line">Compteur ordinal</tspan></text>
359    </g>
360    <g
361       id="g38899">
362      <g
363         id="g23813"
364         transform="matrix(1.1617235,0,0,1,-8.8473397,1.4142136)">
365        <rect
366           y="61.352036"
367           x="45.961941"
368           height="126.57211"
369           width="195.86858"
370           id="rect22816"
371           style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
372        <rect
373           y="63.352036"
374           x="47.961941"
375           height="126.57211"
376           width="195.86858"
377           id="rect22842"
378           style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
379      </g>
380      <text
381         sodipodi:linespacing="125%"
382         id="text22838"
383         y="79.319511"
384         x="49.569614"
385         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
386         xml:space="preserve"><tspan
387           y="79.319511"
388           x="49.569614"
389           id="tspan22840"
390           sodipodi:role="line">Registres</tspan></text>
391    </g>
392    <g
393       id="g38887">
394      <g
395         id="g23828"
396         transform="matrix(1.2501537,0,0,1,-104.54967,-28.991378)">
397        <rect
398           y="90.343414"
399           x="485.78235"
400           height="258.09396"
401           width="149.90663"
402           id="rect23824"
403           style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
404        <rect
405           y="92.343414"
406           x="487.78235"
407           height="258.09396"
408           width="149.90663"
409           id="rect23826"
410           style="opacity:1;fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
411      </g>
412      <text
413         sodipodi:linespacing="125%"
414         id="text23832"
415         y="77.198174"
416         x="507.06772"
417         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
418         xml:space="preserve"><tspan
419           y="77.198174"
420           x="507.06772"
421           id="tspan23834"
422           sodipodi:role="line">Mémoire centrale</tspan></text>
423    </g>
424    <path
425       style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114"
426       d="M 481.38448,163.10503 L 481.38448,170.07378 L 337.16573,170.07378 L 337.16573,180.66753 L 481.38448,180.66753 L 481.38448,187.63628 L 502.63448,175.38628 L 481.38448,163.10503 z "
427       id="rect23968" />
428    <g
429       id="g42060">
430      <path
431         id="path23973"
432         d="M 483.38448,165.10503 L 483.38448,172.07378 L 339.16573,172.07378 L 339.16573,182.66753 L 483.38448,182.66753 L 483.38448,189.63628 L 504.63448,177.38628 L 483.38448,165.10503 z "
433         style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
434      <text
435         sodipodi:linespacing="125%"
436         id="text23975"
437         y="192.84578"
438         x="393.82263"
439         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
440         xml:space="preserve"><tspan
441           y="192.84578"
442           x="393.82263"
443           id="tspan23977"
444           sodipodi:role="line">Bus d'adresses</tspan></text>
445    </g>
446    <g
447       id="g28069"
448       transform="translate(-0.1767767,29.46967)"
449       style="opacity:0.9">
450      <path
451         id="path27096"
452         d="M 379.36279,106.96042 L 379.36279,139.13378"
453         style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
454      <path
455         transform="matrix(0.8427457,0,0,0.8427457,155.89609,-1.8179186)"
456         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
457         inkscape:randomized="0"
458         inkscape:rounded="0"
459         inkscape:flatsided="true"
460         sodipodi:arg2="2.6179939"
461         sodipodi:arg1="1.5707963"
462         sodipodi:r2="3.5399506"
463         sodipodi:r1="7.0799012"
464         sodipodi:cy="162.82185"
465         sodipodi:cx="265.16504"
466         sodipodi:sides="3"
467         id="path28067"
468         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
469         sodipodi:type="star" />
470    </g>
471    <g
472       id="g31963"
473       style="opacity:0.9">
474      <path
475         id="path29042"
476         d="M 529,419.86218 L 529,320.86219"
477         style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
478      <path
479         transform="matrix(0.8427457,0,0,0.8427457,305.5333,278.15313)"
480         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
481         inkscape:randomized="0"
482         inkscape:rounded="0"
483         inkscape:flatsided="true"
484         sodipodi:arg2="2.6179939"
485         sodipodi:arg1="1.5707963"
486         sodipodi:r2="3.5399506"
487         sodipodi:r1="7.0799012"
488         sodipodi:cy="162.82185"
489         sodipodi:cx="265.16504"
490         sodipodi:sides="3"
491         id="path30015"
492         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
493         sodipodi:type="star" />
494    </g>
495    <g
496       id="g32936"
497       style="opacity:0.9">
498      <path
499         id="path30013"
500         d="M 557,419.86218 L 557,320.86219"
501         style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
502      <path
503         transform="matrix(0.8427457,0,0,-0.8427457,333.5333,462.07124)"
504         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
505         inkscape:randomized="0"
506         inkscape:rounded="0"
507         inkscape:flatsided="true"
508         sodipodi:arg2="2.6179939"
509         sodipodi:arg1="1.5707963"
510         sodipodi:r2="3.5399506"
511         sodipodi:r1="7.0799012"
512         sodipodi:cy="162.82185"
513         sodipodi:cx="265.16504"
514         sodipodi:sides="3"
515         id="path30017"
516         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
517         sodipodi:type="star" />
518    </g>
519    <g
520       id="g33917"
521       style="opacity:0.9"
522       transform="translate(8,0)">
523      <path
524         id="path32940"
525         d="M 170.94306,419.50161 L 170.94306,369.47381"
526         style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
527      <path
528         transform="matrix(0.8427457,0,0,-0.8427457,-52.346856,509.77385)"
529         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
530         inkscape:randomized="0"
531         inkscape:rounded="0"
532         inkscape:flatsided="true"
533         sodipodi:arg2="2.6179939"
534         sodipodi:arg1="1.5707963"
535         sodipodi:r2="3.5399506"
536         sodipodi:r1="7.0799012"
537         sodipodi:cy="162.82185"
538         sodipodi:cx="265.16504"
539         sodipodi:sides="3"
540         id="path33913"
541         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
542         sodipodi:type="star" />
543    </g>
544    <g
545       id="g34890"
546       style="opacity:0.9"
547       transform="translate(8,0)">
548      <path
549         id="path32942"
550         d="M 259.33141,419.76677 L 259.33141,369.73897"
551         style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
552      <path
553         transform="matrix(0.8427457,0,0,-0.8427457,35.687938,509.42029)"
554         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
555         inkscape:randomized="0"
556         inkscape:rounded="0"
557         inkscape:flatsided="true"
558         sodipodi:arg2="2.6179939"
559         sodipodi:arg1="1.5707963"
560         sodipodi:r2="3.5399506"
561         sodipodi:r1="7.0799012"
562         sodipodi:cy="162.82185"
563         sodipodi:cx="265.16504"
564         sodipodi:sides="3"
565         id="path33915"
566         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
567         sodipodi:type="star" />
568    </g>
569    <path
570       sodipodi:type="star"
571       style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
572       id="path27086"
573       sodipodi:sides="3"
574       sodipodi:cx="265.16504"
575       sodipodi:cy="162.82185"
576       sodipodi:r1="7.0799012"
577       sodipodi:r2="3.5399506"
578       sodipodi:arg1="1.5707963"
579       sodipodi:arg2="2.6179939"
580       inkscape:flatsided="true"
581       inkscape:rounded="0"
582       inkscape:randomized="0"
583       d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
584       transform="matrix(0.8427457,0,0,0.8427457,-398.9273,30.011941)" />
585    <g
586       id="g36917"
587       transform="translate(6.363961,2.8284271)">
588      <g
589         transform="translate(-0.7071068,4.5961941)"
590         id="g36907">
591        <rect
592           y="326.51895"
593           x="301.84393"
594           height="53.029266"
595           width="61.236336"
596           id="rect36876"
597           style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
598        <rect
599           y="326.51895"
600           x="368.19006"
601           height="53.029266"
602           width="104.36986"
603           id="rect36891"
604           style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
605        <rect
606           y="328.51898"
607           x="303.95975"
608           height="53.029266"
609           width="61.236336"
610           id="rect36893"
611           style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
612        <rect
613           y="328.51898"
614           x="370.30588"
615           height="53.029266"
616           width="104.36986"
617           id="rect36895"
618           style="fill:#ffffff;fill-opacity:0.66666667;fill-rule:nonzero;stroke:none;stroke-width:4.9000001;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.80547114" />
619      </g>
620      <text
621         sodipodi:linespacing="125%"
622         id="text36880"
623         y="347.84616"
624         x="305.88007"
625         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
626         xml:space="preserve"><tspan
627           y="347.84616"
628           x="305.88007"
629           id="tspan36882"
630           sodipodi:role="line">Code</tspan></text>
631      <text
632         sodipodi:linespacing="125%"
633         id="text36913"
634         y="347.66998"
635         x="372.30255"
636         style="font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
637         xml:space="preserve"><tspan
638           y="347.66998"
639           x="372.30255"
640           id="tspan36915"
641           sodipodi:role="line">Données</tspan></text>
642    </g>
643    <g
644       id="g37909"
645       style="opacity:0.9"
646       transform="translate(8,0)">
647      <path
648         id="path37899"
649         d="M 131.1683,191.33666 C 131.1683,418.31794 131.1683,419.73215 131.1683,419.73215"
650         style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
651      <path
652         transform="matrix(0.8427457,0,0,0.8427457,-92.261017,277.53828)"
653         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
654         inkscape:randomized="0"
655         inkscape:rounded="0"
656         inkscape:flatsided="true"
657         sodipodi:arg2="2.6179939"
658         sodipodi:arg1="1.5707963"
659         sodipodi:r2="3.5399506"
660         sodipodi:r1="7.0799012"
661         sodipodi:cy="162.82185"
662         sodipodi:cx="265.16504"
663         sodipodi:sides="3"
664         id="path37901"
665         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
666         sodipodi:type="star" />
667    </g>
668    <g
669       id="g37905"
670       style="opacity:0.9"
671       transform="translate(-20,0)">
672      <path
673         id="path36928"
674         d="M 144.95689,191.31323 C 144.95689,418.29451 144.95689,419.70872 144.95689,419.70872"
675         style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
676      <path
677         transform="matrix(0.8427457,0,0,-0.8427457,-78.591701,332.32124)"
678         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
679         inkscape:randomized="0"
680         inkscape:rounded="0"
681         inkscape:flatsided="true"
682         sodipodi:arg2="2.6179939"
683         sodipodi:arg1="1.5707963"
684         sodipodi:r2="3.5399506"
685         sodipodi:r1="7.0799012"
686         sodipodi:cy="162.82185"
687         sodipodi:cx="265.16504"
688         sodipodi:sides="3"
689         id="path37903"
690         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
691         sodipodi:type="star" />
692    </g>
693    <g
694       id="g41963"
695       style="opacity:0.9"
696       transform="translate(-1,-1)">
697      <path
698         id="path40982"
699         d="M 374.17677,420.57319 L 374.17677,392.42085"
700         style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
701      <path
702         transform="matrix(0.8427457,0,0,-0.8427457,150.5333,532.53944)"
703         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
704         inkscape:randomized="0"
705         inkscape:rounded="0"
706         inkscape:flatsided="true"
707         sodipodi:arg2="2.6179939"
708         sodipodi:arg1="1.5707963"
709         sodipodi:r2="3.5399506"
710         sodipodi:r1="7.0799012"
711         sodipodi:cy="162.82185"
712         sodipodi:cx="265.16504"
713         sodipodi:sides="3"
714         id="path40984"
715         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
716         sodipodi:type="star" />
717    </g>
718    <g
719       id="g41967"
720       style="opacity:0.9"
721       transform="translate(-1.999998,-83.84363)">
722      <path
723         id="path41969"
724         d="M 374.17677,420.57319 L 374.17677,392.42085"
725         style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
726      <path
727         transform="matrix(0.8427457,0,0,-0.8427457,150.5333,532.53944)"
728         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
729         inkscape:randomized="0"
730         inkscape:rounded="0"
731         inkscape:flatsided="true"
732         sodipodi:arg2="2.6179939"
733         sodipodi:arg1="1.5707963"
734         sodipodi:r2="3.5399506"
735         sodipodi:r1="7.0799012"
736         sodipodi:cy="162.82185"
737         sodipodi:cx="265.16504"
738         sodipodi:sides="3"
739         id="path41971"
740         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
741         sodipodi:type="star" />
742    </g>
743    <g
744       id="g41989"
745       style="opacity:0.9"
746       transform="translate(1,0)">
747      <path
748         id="path41973"
749         d="M 223,266.36219 L 223,236.36219 L 151,236.36219 L 151,419.36219"
750         style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
751      <path
752         transform="matrix(0.8427457,0,0,0.8427457,-72.322622,277.52219)"
753         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
754         inkscape:randomized="0"
755         inkscape:rounded="0"
756         inkscape:flatsided="true"
757         sodipodi:arg2="2.6179939"
758         sodipodi:arg1="1.5707963"
759         sodipodi:r2="3.5399506"
760         sodipodi:r1="7.0799012"
761         sodipodi:cy="162.82185"
762         sodipodi:cx="265.16504"
763         sodipodi:sides="3"
764         id="path41976"
765         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
766         sodipodi:type="star" />
767    </g>
768    <path
769       style="opacity:1;fill:#ffffff;fill-opacity:0.66666669;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
770       d="M 294 63.21875 L 273 75.375 L 294 87.5 L 294 80.375 L 295.5 80.375 L 295.5 274.375 L 281 274.375 L 281 267.21875 L 260 279.375 L 281 291.5 L 281 284.375 L 295.5 284.375 L 295.5 290.375 L 305.5 290.375 L 305.5 80.375 L 482 80.375 L 482 87.5 L 503 75.375 L 482 63.21875 L 482 70.375 L 294 70.375 L 294 63.21875 z "
771       id="rect42011" />
772    <path
773       style="opacity:1;fill:#ffffff;fill-opacity:0.66666669;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
774       d="M 296,65.21875 L 275,77.375002 L 296,89.500002 L 296,82.375002 L 297.5,82.375002 L 297.5,276.375 L 283,276.375 L 283,269.21875 L 262,281.375 L 283,293.5 L 283,286.375 L 297.5,286.375 L 297.5,292.375 L 307.5,292.375 L 307.5,82.375002 L 484,82.375002 L 484,89.500002 L 505,77.375002 L 484,65.21875 L 484,72.375001 L 296,72.375001 L 296,65.21875 z "
775       id="path42026" />
776    <g
777       id="g42036"
778       style="opacity:0.9">
779      <path
780         id="path42030"
781         d="M 319.29074,242.19459 L 307.31341,242.19459"
782         style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
783      <path
784         transform="matrix(0,-0.8427457,-0.8427457,0,448.00655,465.83806)"
785         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
786         inkscape:randomized="0"
787         inkscape:rounded="0"
788         inkscape:flatsided="true"
789         sodipodi:arg2="2.6179939"
790         sodipodi:arg1="1.5707963"
791         sodipodi:r2="3.5399506"
792         sodipodi:r1="7.0799012"
793         sodipodi:cy="162.82185"
794         sodipodi:cx="265.16504"
795         sodipodi:sides="3"
796         id="path42032"
797         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
798         sodipodi:type="star" />
799    </g>
800    <g
801       id="g42048"
802       style="opacity:0.9">
803      <path
804         id="path42042"
805         d="M 364.23223,206.49189 L 364.23223,183.45613"
806         style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
807      <path
808         transform="matrix(0.8427457,0,0,-0.8427457,140.58876,323.75647)"
809         d="M 265.16504,169.90175 L 259.03366,159.2819 L 271.29641,159.2819 L 265.16504,169.90175 z "
810         inkscape:randomized="0"
811         inkscape:rounded="0"
812         inkscape:flatsided="true"
813         sodipodi:arg2="2.6179939"
814         sodipodi:arg1="1.5707963"
815         sodipodi:r2="3.5399506"
816         sodipodi:r1="7.0799012"
817         sodipodi:cy="162.82185"
818         sodipodi:cx="265.16504"
819         sodipodi:sides="3"
820         id="path42044"
821         style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:1.227;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
822         sodipodi:type="star" />
823    </g>
824    <text
825       xml:space="preserve"
826       style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Gothic L"
827       x="-235.12201"
828       y="291.99759"
829       id="text42056"
830       sodipodi:linespacing="125%"
831       transform="matrix(0,-1,1,0,0,0)"><tspan
832         sodipodi:role="line"
833         id="tspan42058"
834         x="-235.12201"
835         y="291.99759">Bus de commandes</tspan></text>
836  </g>
837</svg>

Archive Download the corresponding diff file

Branches:
master