Un graphe de contrôle (dans notre contexte) décrit l'algorithme d'analyse des instructions assembleur (en entrée de l'automate) et l'exécution correspondante (les commandes en sortie de l'automate). Un exemple :

 



(obtenue à partir de GraphViz / GVedit, puis (?) un peu de inkscapee) :

digraph {
node [shape=ellipse, fontname=Courier, fontsize=12];
edge [fontname=Courier, fontsize=10];

rien [label="", shape=none];
 rien -> init [tailport=se, headport=nw];
 init [label="init : PC <- 00"];
  init  -> fetch ;
  fetch [label="fetch : IR <- Mem[PC]nPC++nTIR <- Mem[PC]nPC++"];
      fetch -> jmp  [label="JMP"];
      jmp [label="PC <- TIR"];
        jmp  -> versfetch [arrowhead=none, headport=w];

      fetch -> brcc [label="BRC et CnBRZ et ZnBRN et N"];
      brcc [label="PC <- PC + TIR"];
        brcc -> versfetch [arrowhead=none, headport=w];

      fetch -> loadim [label="LOAD#"];
      loadim [label="Reg(IR3-0) <- TIR"];
        loadim -> versfetch [arrowhead=none, headport=w];

      fetch -> addandim [label="ADD#/AND#"];
      addandim [label="TIR <- TIR and/add Reg(IR3-0)"];
        addandim -> loadim;

      fetch -> storedir [label="STORE@"];
      storedir [label="Mem[TIR] <- Reg(IR3-0)"];

      fetch -> loadaddanddir [label="LOAD@/ADD@/AND@"];
      loadaddanddir [label="TIR <- Mem[TIR]"];
        loadaddanddir -> loadim [label="LOAD@"];
        loadaddanddir -> addandim [label="ADD@/AND@"];
       
      storedir [label="Mem[TIR] <- Reg(IR3-0)"];
        storedir -> versfetch [arrowhead=none, headport=w];    

      fetch -> versfetch [label="BRC sans CnBRZ sans ZnBRN sans N",arrowhead=none, headport=w];

versfetch [label="vers fetch", shape=none];
versfetch -> fetch [tailport=e, headport=ne];
}

Last modified: Wednesday, 15 February 2012, 9:38 AM