Browse Source

Début clean

Faure Paul 2 years ago
parent
commit
7230638484

+ 0
- 68
Processeur.srcs/sim_1/new/Test_ScreenSystem.vhd View File

@@ -1,90 +0,0 @@
1
-----------------------------------------------------------------------------------
2
-----------------------------------------------------------------------------------
3
-
4
-
5
-library IEEE;
6
-use IEEE.STD_LOGIC_1164.ALL;
7
-
8
---use IEEE.NUMERIC_STD.ALL;
9
-
10
---library UNISIM;
11
---use UNISIM.VComponents.all;
12
-
13
-entity Test_ScreenSystem is
14
-end Test_ScreenSystem;
15
-
16
-architecture Behavioral of Test_ScreenSystem is
17
-
18
-    component ScreenSystem is
19
-      Port (  vgaRed   : out STD_LOGIC_VECTOR (3 downto 0);
20
-              vgaBlue  : out STD_LOGIC_VECTOR (3 downto 0);
21
-              vgaGreen : out STD_LOGIC_VECTOR (3 downto 0);
22
-              Hsync    : out STD_LOGIC;
23
-              Vsync    : out STD_LOGIC;
24
-              
25
-              
26
-              btnC : in STD_LOGIC;
27
-              CLK  : in  STD_LOGIC
28
-       );
29
-     end component;
30
-       
31
-    signal my_vgaRed   : STD_LOGIC_VECTOR (3 downto 0) := (others => '0');
32
-    signal my_vgaBlue  : STD_LOGIC_VECTOR (3 downto 0) := (others => '0');
33
-    signal my_vgaGreen : STD_LOGIC_VECTOR (3 downto 0) := (others => '0');
34
-    signal my_Hsync    : STD_LOGIC := '0';
35
-    signal my_Vsync    : STD_LOGIC := '0';
36
-    
37
-    
38
-    signal my_btnC : STD_LOGIC := '0';
39
-    signal my_CLK  : STD_LOGIC := '0';
40
-
41
-    constant CLK_period : time := 9.26 ns;
42
-
43
-begin
44
-    instance : ScreenSystem
45
-    port map    (
46
-                 vgaRed => my_vgaRed,
47
-                 vgaBlue => my_vgaBlue,
48
-                 vgaGreen => my_vgaGreen,
49
-                 Hsync => my_Hsync,
50
-                 Vsync => my_Vsync,
51
-                 btnC => my_btnC,
52
-                 CLK => my_CLK
53
-                );
54
-    
55
-    CLK_process :process
56
-    begin
57
-        my_CLK <= '0';
58
-        wait for CLK_period/2;
59
-        my_CLK <= '1';
60
-        wait for CLK_period/2;
61
-    end process;
62
-    
63
-    process 
64
-    begin   
65
-        wait;
66
-    end process;  
67
-      
68
-end Behavioral;

+ 1
- 1
Processeur.srcs/sources_1/new/Etage1_LectureInstruction_NS.vhd View File

@@ -14,7 +14,6 @@
14 14
 -- 
15 15
 -- Dependencies: 
16 16
 --    - MemoireInstruction
17 17
 ----------------------------------------------------------------------------------
18 18
 
19 19
 
@@ -224,7 +223,7 @@ begin
224 223
     end process;
225 224
     
226 225
     
227
-    -- Condition horrible -> Instruction critique en lecture sur A qui lit dans A=i et Ri dans tableau ou instruction critique en lecture sur B qui lit dans B=j et Rj dans tableau ou instruction critique en lecture sur C qui lit dans C=k et Rk dans tableau 
226
+    -- Condition horrible -> Instruction critique en lecture sur A qui lit dans A=i et Ri dans tableau ou instruction critique en lecture sur B qui lit dans B=j et Rj dans tableau ou instruction critique en lecture sur C qui lit dans C=k et Rk dans tableau ou PRI en cours et un PRI ou un PRIC arrive
228 227
     bulles <= 
229 228
     (
230 229
         (

+ 4
- 4
Processeur.srcs/sources_1/new/Etage2-5_Registres.vhd View File

@@ -35,11 +35,11 @@ entity Etage2_5_Registres is
35 35
     Port ( CLK : in STD_LOGIC; -- Clock
36 36
            RST : in STD_LOGIC; -- Reset
37 37
            STD_IN : in STD_LOGIC_VECTOR (Nb_bits - 1 downto 0); -- Entrée de données depuis l'exterieur du processeur
38
-           STD_IN_Av : in STD_LOGIC;
39
-           STD_IN_Request : out STD_LOGIC;
38
+           STD_IN_Av : in STD_LOGIC;                            -- Donnée depuis l'exterieur du processeur disponible
39
+           STD_IN_Request : out STD_LOGIC;                      -- Donnée depuis l'exterieur du processeur demandée
40 40
            STD_OUT : out STD_LOGIC_VECTOR (Nb_bits - 1 downto 0); -- Sortie de données vers l'exterieur du processeur
41
-           STD_OUT_Av : out STD_LOGIC;
42
-           STD_OUT_Int : out STD_LOGIC;
41
+           STD_OUT_Av : out STD_LOGIC;                            -- Donnée vers l'exterieur du processeur disponible
42
+           STD_OUT_Int : out STD_LOGIC;                           -- Type de la donnée (int ou char)
43 43
            IN_2_A : in STD_LOGIC_VECTOR (Nb_bits - 1 downto 0); -- Entrée de l'opérande A de l'étage 2
44 44
            IN_2_B : in STD_LOGIC_VECTOR (Nb_bits - 1 downto 0); -- Entrée de l'opérande B de l'étage 2
45 45
            IN_2_C : in STD_LOGIC_VECTOR (Nb_bits - 1 downto 0); -- Entrée de l'opérande C de l'étage 2

+ 6
- 2
Processeur.srcs/sources_1/new/Etage4_Memoire_NS.vhd View File

@@ -10,11 +10,10 @@
10 10
 --
11 11
 -- Description: Etage 4 du processeur
12 12
 --     - Gestion de la mémoire
13
+--     - Gestion de la sauvegarde du contexte et de l'adresse de retour lors des appels de fonction
13 14
 -- 
14 15
 -- Dependencies: 
15 16
 --    - MemoireDonnees
16 17
 --    - LC
17 18
 --    - MUX
18 19
 ----------------------------------------------------------------------------------
@@ -168,7 +167,8 @@ begin
168 167
              '0';
169 168
     CALL_Aux <= '1' when IN_Instruction = Code_Instruction_CALL else
170 169
              '0';
171
-             
170
+       
171
+    -- Gestion d'EBP      
172 172
     process 
173 173
     begin
174 174
         wait until CLK'event and CLK = '1';
@@ -181,7 +181,9 @@ begin
181 181
         end if;
182 182
     end process;
183 183
            
184
-   New_EBP <= EBP + IN_B (Adresse_mem_size - 1 downto 0) + 2;
184
+    -- Calcul de la nouvelle valeur d'EBP
185
+    New_EBP <= EBP + IN_B (Adresse_mem_size - 1 downto 0) + 2;
186
+    -- Valeur de EBP à stocker (bourré avec des '0')
185 187
     IN_EBP <= (Nb_bits - 1 downto Adresse_mem_size => '0') & EBP;
186 188
            
187 189
     Addr_MemoireDonnees_EBP <= IN_Addr_MemoireDonnees + EBP;

+ 0
- 0
Processeur.srcs/sources_1/new/IntToASCII.vhd View File


+ 0
- 3
Processeur.srcs/sources_1/new/MemoireInstructions.vhd
File diff suppressed because it is too large
View File


+ 0
- 5
Processeur.srcs/sources_1/new/PeripheriqueEcran.vhd View File

@@ -24,15 +24,6 @@ use IEEE.STD_LOGIC_1164.ALL;
24 24
 
25 25
 use work.ScreenProperties.all;
26 26
 
27
---use IEEE.NUMERIC_STD.ALL;
28
-
29
---library UNISIM;
30
---use UNISIM.VComponents.all;
31
-
32 27
 entity PeripheriqueEcran is
33 28
     Generic ( Nb_Bits : Natural);
34 29
     Port ( CLK : in STD_LOGIC;

+ 25
- 16
Processeur.srcs/sources_1/new/Pipeline_NS.vhd View File

@@ -1,47 +1,36 @@
1 1
 ----------------------------------------------------------------------------------
2
+-- Company:  INSA-Toulouse
3
+-- Engineer: Paul Faure
2 4
 -- 
3 5
 -- Create Date: 19.04.2021 16:57:41
4 6
 -- Module Name: Pipeline_NS - Behavioral
7
+-- Project Name: Processeur sécurisé
8
+-- Target Devices: Basys 3 ARTIX7
9
+-- Tool Versions: Vivado 2016.4
10
+-- Description: Version non sécurisée du pipeline, connecte les étages et fait avancer les signaux sur le pipeline
5 11
 -- 
6 12
 -- Dependencies: 
13
+--    - Etage1_LectureInstruction_NS
14
+--    - Etage2_5_Registres
15
+--    - Etage3_Calcul
16
+--    - Etage4_Memoire_NS
7 17
 ----------------------------------------------------------------------------------
8 18
 
9 19
 
10 20
 library IEEE;
11 21
 use IEEE.STD_LOGIC_1164.ALL;
12 22
 
13
---use IEEE.NUMERIC_STD.ALL;
14
-
15
---library UNISIM;
16
---use UNISIM.VComponents.all;
17
-
18 23
 entity Pipeline_NS is
19
-    Generic (Nb_bits : Natural := 8;
20
-             Instruction_En_Memoire_Size : Natural := 29;
21
-             Addr_Memoire_Instruction_Size : Natural := 3;
22
-             Memoire_Instruction_Size : Natural := 8;
23
-             Instruction_Bus_Size : Natural := 5;
24
-             Nb_Instructions : Natural := 32;
25
-             Nb_Registres : Natural := 16;
26
-             Addr_registres_size : Natural := 4;
27
-             Memoire_Size : Natural := 32;
28
-             Adresse_mem_size : Natural := 5);
24
+    Generic (Nb_bits : Natural := 8;                       -- Taille d'un mot binaire
25
+             Instruction_En_Memoire_Size : Natural := 29;  -- Taille d'une instruction en mémoire (Taille d'un code instruction + 3*Taille d'un mot binaire)
26
+             Addr_Memoire_Instruction_Size : Natural := 3; -- Nombre de bits pour adresser la mémoire d'instruction
27
+             Memoire_Instruction_Size : Natural := 8;      -- Taille de la mémoire d'instruction (nombre d'instructions stockées)
28
+             Instruction_Bus_Size : Natural := 5;          -- Nombre de bits du bus d'instruction (Taille d'un code instruction)
29
+             Nb_Instructions : Natural := 32;              -- Nombre d'instructions dans le processeur
30
+             Nb_Registres : Natural := 16;                 -- Nombre de registres du processeurs
31
+             Addr_registres_size : Natural := 4;           -- Nombre de bits pour adresser les registres
32
+             Memoire_Size : Natural := 32;                 -- Taille de la mémoire de données
33
+             Adresse_mem_size : Natural := 5);             -- Nombre de bits pour adresser la mémoire
29 34
     Port (CLK : STD_LOGIC;
30 35
           RST : STD_LOGIC;
31 36
           STD_IN      : in STD_LOGIC_VECTOR (Nb_bits - 1 downto 0); 
@@ -156,6 +145,7 @@ architecture Behavioral of Pipeline_NS is
156 145
                OUT_AddrRetour : out STD_LOGIC_VECTOR (Nb_bits - 1 downto 0)); 
157 146
     end component;
158 147
     
148
+    -- Signaux reliant les étages
159 149
     signal A_from_1 : STD_LOGIC_VECTOR (Nb_bits - 1 downto 0) := (others => '0');
160 150
     signal A_from_2 : STD_LOGIC_VECTOR (Nb_bits - 1 downto 0) := (others => '0');
161 151
     signal A_from_3 : STD_LOGIC_VECTOR (Nb_bits - 1 downto 0) := (others => '0');
@@ -184,15 +174,17 @@ architecture Behavioral of Pipeline_NS is
184 174
     signal Instruction_to_3 : STD_LOGIC_VECTOR (Instruction_Bus_Size - 1 downto 0) := (others => '0');
185 175
     signal Instruction_to_4 : STD_LOGIC_VECTOR (Instruction_Bus_Size - 1 downto 0) := (others => '0');
186 176
     signal Instruction_to_5 : STD_LOGIC_VECTOR (Instruction_Bus_Size - 1 downto 0) := (others => '0');
177
+    -- Sorties de l'ALU
187 178
     signal N : STD_LOGIC := '0';
188 179
     signal Z : STD_LOGIC := '0';
189 180
     signal O : STD_LOGIC := '0';
190 181
     signal C : STD_LOGIC := '0';
182
+    -- Sortie de l'adresse de retour de l'étage 4 vers le 1
191 183
     signal AdresseRetour : STD_LOGIC_VECTOR (Nb_bits - 1 downto 0) := (others => '0');
192 184
     
193 185
     signal intern_STD_IN_Request : STD_LOGIC := '0';
194 186
     
195
-    
187
+    -- Constantes de contrôle des MUX et LC
196 188
     constant Bits_Controle_MUX_2_A      : STD_LOGIC_VECTOR (Nb_Instructions - 1 downto 0) := "111111111" & "11110011101111111111111";
197 189
     constant Bits_Controle_MUX_2_B      : STD_LOGIC_VECTOR (Nb_Instructions - 1 downto 0) := "111111111" & "11111111000011000000001";
198 190
     constant Bits_Controle_LC_3         : STD_LOGIC_VECTOR (Nb_Instructions * 3 - 1 downto 0) := "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "000" & "111" & "110" & "101" & "100" & "010" & "011" & "001" & "000";
@@ -211,6 +203,7 @@ architecture Behavioral of Pipeline_NS is
211 203
     constant Code_Instruction_RET  : STD_LOGIC_VECTOR (Instruction_Bus_Size - 1 downto 0) := "10101";
212 204
     constant Code_Instruction_STOP  : STD_LOGIC_VECTOR (Instruction_Bus_Size - 1 downto 0) := "10110";
213 205
     
206
+    -- Constantes de contrôle des bulles
214 207
     constant Instructions_critiques_lecture_A : STD_LOGIC_VECTOR (Nb_Instructions - 1 downto 0) := "111111111" & "00001100010000000000000";
215 208
     constant Instructions_critiques_lecture_B : STD_LOGIC_VECTOR (Nb_Instructions - 1 downto 0) := "111111111" & "00000000111100111111110";
216 209
     constant Instructions_critiques_lecture_C : STD_LOGIC_VECTOR (Nb_Instructions - 1 downto 0) := "111111111" & "00000000000000011111110";

+ 0
- 108
Processeur.srcs/sources_1/new/ScreenSystem.vhd View File

@@ -1,129 +0,0 @@
1
-----------------------------------------------------------------------------------
2
-----------------------------------------------------------------------------------
3
-
4
-
5
-library IEEE;
6
-use IEEE.STD_LOGIC_1164.ALL;
7
-
8
-use work.ScreenProperties.all;
9
-
10
---use IEEE.NUMERIC_STD.ALL;
11
-
12
---library UNISIM;
13
---use UNISIM.VComponents.all;
14
-
15
-entity ScreenSystem is
16
-  Port (  vgaRed   : out STD_LOGIC_VECTOR (3 downto 0);
17
-          vgaBlue  : out STD_LOGIC_VECTOR (3 downto 0);
18
-          vgaGreen : out STD_LOGIC_VECTOR (3 downto 0);
19
-          Hsync    : out STD_LOGIC;
20
-          Vsync    : out STD_LOGIC;
21
-          
22
-          
23
-          btnC : in STD_LOGIC;
24
-          CLK       : in  STD_LOGIC
25
-       );
26
-end ScreenSystem;
27
-
28
-architecture Behavioral of ScreenSystem is
29
-
30
-    component VGAControler is
31
-    Port (     VGA_RED   : out STD_LOGIC_VECTOR (3 downto 0);
32
-               VGA_BLUE  : out STD_LOGIC_VECTOR (3 downto 0);
33
-               VGA_GREEN : out STD_LOGIC_VECTOR (3 downto 0);
34
-               VGA_HS    : out STD_LOGIC;
35
-               VGA_VS    : out STD_LOGIC;
36
-               
37
-               X         : out X_T;
38
-               Y         : out Y_T;
39
-               PIXEL_ON  : in STD_LOGIC;
40
-               
41
-               CLK       : in STD_LOGIC;
42
-               RST       : in STD_LOGIC);
43
-    end component; 
44
-    
45
-    component clk_wiz_0
46
-    port
47
-     (-- Clock in ports
48
-      clk_in1           : in     std_logic;
49
-      -- Clock out ports
50
-      clk_out1          : out    std_logic
51
-     );
52
-    end component;
53
-    
54
-    component Ecran is
55
-        Port (     CLK            : in STD_LOGIC;
56
-                   RST            : in STD_LOGIC;
57
-                   Data_Av        : in STD_LOGIC;
58
-                   Data_IN        : in STD_LOGIC_VECTOR (0 to 6);
59
-                   X              : in X_T;
60
-                   Y              : in Y_T;
61
-                   OUT_ON         : out STD_LOGIC);
62
-    end component;
63
-    
64
-    signal my_X : X_T := 0;
65
-    signal my_Y : Y_T := 0;
66
-    signal my_PIXEL_ON : STD_LOGIC := '0';
67
-    
68
-    signal my_CLK : STD_LOGIC := '0';
69
-    signal RST : STD_LOGIC;
70
-
71
-begin
72
-
73
-    instanceVGA : VGAControler 
74
-    port map(  VGA_RED   => vgaRed,
75
-               VGA_BLUE  => vgaBlue,
76
-               VGA_GREEN => vgaGreen,
77
-               VGA_HS    => Hsync,
78
-               VGA_VS    => Vsync,
79
-                 
80
-               X         => my_X,
81
-               Y         => my_Y,
82
-               PIXEL_ON  => my_PIXEL_ON,
83
-                 
84
-               CLK       => my_CLK,
85
-               RST       => RST);
86
-               
87
-    
88
-    clk_wiz_0_inst : clk_wiz_0
89
-    port map (
90
-              clk_in1 => CLK,
91
-              clk_out1 => my_CLK
92
-             );
93
-    
94
-    
95
-    instance_Ecran : Ecran
96
-    port map (     CLK     => CLK,
97
-                   RST     => RST,
98
-                   Data_Av => '0',
99
-                   Data_IN => "0000000",
100
-                   X => my_X,
101
-                   Y => my_Y,
102
-                   OUT_ON => my_PIXEL_ON);
103
-
104
-    -- Gestion du RST (inversion d'état)
105
-    RST <= '1' when btnC = '0' else
106
-           '0';
107
-
108
-end Behavioral;

+ 31
- 22
Processeur.srcs/sources_1/new/System.vhd View File

@@ -7,11 +7,14 @@
7 7
 -- Project Name: Processeur sécurisé
8 8
 -- Target Devices: Basys 3 ARTIX7
9 9
 -- Tool Versions: Vivado 2016.4
10
+-- Description: Environnement du processeur, mapping entre le processeur et les periphériques, affectation des ports la carte
10 11
 -- 
11 12
 -- Dependencies: 
12 13
 --    - Clock_Divider
13 14
 --    - Pipeline
15
+--    - Pipeline_NS
16
+--    - PeripheriqueEcran
17
+--    - PeripheriqueClavier
14 18
 ----------------------------------------------------------------------------------
15 19
 
16 20
 
@@ -19,8 +22,8 @@ library IEEE;
19 22
 use IEEE.STD_LOGIC_1164.ALL;
20 23
 
21 24
 -- Lien avec le fichier de contraintes 
25
+--   Récupération du VGA
26
+--   Récupération du PS2
22 27
 --   Récupération d'un bouton pour RST
23 28
 --   Récupération de la clock
24 29
 entity System is
@@ -117,22 +120,24 @@ architecture Structural of System is
117 120
     end component;
118 121
     
119 122
     -- signaux auxiliaires
120
-    signal my_RST : STD_LOGIC;
121
-    signal my_CLK : STD_LOGIC;
122
-    signal STD_IN      : STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); 
123
-    signal STD_IN_Av   : STD_LOGIC := '0';
124
-    signal STD_IN_Request  : STD_LOGIC := '0';
125
-    signal intern_STD_OUT     : STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); 
126
-    signal intern_STD_OUT_Av  : STD_LOGIC := '0';
127
-    signal intern_STD_OUT_Int : STD_LOGIC := '0';
128
-    signal pipeline_STD_OUT     : STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); 
129
-    signal pipeline_STD_OUT_Av  : STD_LOGIC := '0';
130
-    signal pipeline_STD_OUT_Int : STD_LOGIC := '0';
131
-    signal clavier_STD_OUT     : STD_LOGIC_VECTOR (15 downto 0) := (others => '0'); 
132
-    signal clavier_STD_OUT_Av  : STD_LOGIC := '0';
133
-    signal clavier_STD_OUT_Int : STD_LOGIC := '0';
123
+    signal my_RST : STD_LOGIC; -- Signal de RST (inversion par rapport au btnC)
124
+    signal my_CLK : STD_LOGIC; -- Signal de clock (divisée par rapport CLK)
125
+    -- signaux de gestion de l'entrée
126
+    signal STD_IN      : STD_LOGIC_VECTOR (15 downto 0) := (others => '0');  -- Entrée
127
+    signal STD_IN_Av   : STD_LOGIC := '0';                                   -- Entrée disponible en lecture sur le clavier
128
+    signal STD_IN_Request  : STD_LOGIC := '0';                               -- Demande d'une entrée au clavier
129
+    -- signaux de gestion de la sortie
130
+    signal STD_OUT     : STD_LOGIC_VECTOR (15 downto 0) := (others => '0');               -- Sortie vers l'écran                                  
131
+    signal STD_OUT_Av  : STD_LOGIC := '0';                                                -- Sortie disponible pour l'écran
132
+    signal STD_OUT_Int : STD_LOGIC := '0';                                                -- Type de la sortie (entier ou ASCII) pour l'écran          
133
+    signal pipeline_STD_OUT     : STD_LOGIC_VECTOR (15 downto 0) := (others => '0');      -- Sortie depuis le Pipeline                                    
134
+    signal pipeline_STD_OUT_Av  : STD_LOGIC := '0';                                       -- Sortie disponible depuis le Pipeline
135
+    signal pipeline_STD_OUT_Int : STD_LOGIC := '0';                                       -- Type de la sortie (entier ou ASCII) depuis le pipeline          
136
+    signal clavier_STD_OUT     : STD_LOGIC_VECTOR (15 downto 0) := (others => '0');       -- Sortie depuis le Clavier                              
137
+    signal clavier_STD_OUT_Av  : STD_LOGIC := '0';                                        -- Sortie disponible depuis le Clavier                   
138
+    signal clavier_STD_OUT_Int : STD_LOGIC := '0';                                        -- Type de la sortie (entier ou ASCII) depuis le Clavier 
134 139
     
135
-    constant SECURISED : boolean := false;
140
+    constant SECURISED : boolean := false;  -- Booléen de sélection entre la version sécurisée et non sécurisée
136 141
         
137 142
 begin    
138 143
            
@@ -142,7 +147,7 @@ begin
142 147
               CLK_OUT => my_CLK);
143 148
               
144 149
               
145
-    -- Generation du processeur en fonction de la condition sécurisé ou non       
150
+    -- Generation du pipeline en fonction de la condition sécurisé ou non       
146 151
     instance: if (SECURISED) generate
147 152
         instance_securisee : entity work.Pipeline
148 153
             generic map (Nb_bits => 16,
@@ -199,9 +204,9 @@ begin
199 204
                Hsync    => Hsync,
200 205
                Vsync    => Vsync,
201 206
                          
202
-               STD_OUT =>     intern_STD_OUT,
203
-               STD_OUT_Av =>  intern_STD_OUT_Av,
204
-               STD_OUT_Int => intern_STD_OUT_Int);
207
+               STD_OUT =>     STD_OUT,
208
+               STD_OUT_Av =>  STD_OUT_Av,
209
+               STD_OUT_Int => STD_OUT_Int);
205 210
                
206 211
     instance_perif_clavier : PeripheriqueClavier 
207 212
     generic map (Nb_Bits => 16)
@@ -221,9 +226,10 @@ begin
221 226
               '0';
222 227
               
223 228
     
224
-    intern_STD_OUT <= clavier_STD_OUT when STD_IN_Request = '1' else pipeline_STD_OUT;
225
-    intern_STD_OUT_Av <= clavier_STD_OUT_Av when STD_IN_Request = '1' else pipeline_STD_OUT_Av;
226
-    intern_STD_OUT_Int <= clavier_STD_OUT_Int when STD_IN_Request = '1' else pipeline_STD_OUT_Int;
229
+    -- Gestion de l'affichage sur l'écran lors d'une demande d'entrée le clavier affiche sur l'écran
230
+    STD_OUT <= clavier_STD_OUT when STD_IN_Request = '1' else pipeline_STD_OUT;
231
+    STD_OUT_Av <= clavier_STD_OUT_Av when STD_IN_Request = '1' else pipeline_STD_OUT_Av;
232
+    STD_OUT_Int <= clavier_STD_OUT_Int when STD_IN_Request = '1' else pipeline_STD_OUT_Int;
227 233
     
228 234
 end Structural;
229 235
 

+ 0
- 74
Processeur.srcs/sources_1/new/SystemKeyboard.vhd View File

@@ -1,95 +0,0 @@
1
-----------------------------------------------------------------------------------
2
-----------------------------------------------------------------------------------
3
-
4
-
5
-library IEEE;
6
-use IEEE.STD_LOGIC_1164.ALL;
7
-
8
---use IEEE.NUMERIC_STD.ALL;
9
-
10
---library UNISIM;
11
---use UNISIM.VComponents.all;
12
-
13
-entity SystemKeyboard is
14
-    Port (CLK : in STD_LOGIC;
15
-    
16
-          PS2Clk : in STD_LOGIC;
17
-          PS2Data : in STD_LOGIC;
18
-          
19
-          led : out STD_LOGIC_VECTOR (0 to 10);
20
-          btnC : in STD_LOGIC);
21
-end SystemKeyboard;
22
-
23
-architecture Behavioral of SystemKeyboard is
24
-
25
-component Keyboard 
26
-    Port (CLK : in STD_LOGIC;
27
-  
28
-          PS2Clk : in STD_LOGIC;
29
-          PS2Data : in STD_LOGIC;
30
-        
31
-          Data_read : in STD_LOGIC;
32
-          Data_av : out STD_LOGIC;
33
-          Data : out STD_LOGIC_VECTOR (0 to 6);
34
-        
35
-          alert : out STD_LOGIC);
36
-end component;
37
-
38
-signal intern_Data_read : STD_LOGIC := '0';
39
-signal intern_Data_av   : STD_LOGIC := '0';
40
-signal Data_Read : STD_LOGIC_VECTOR (0 to 6);
41
-
42
-begin
43
-
44
-    instance_Keyboard : Keyboard
45
-    port map (CLK => CLK,
46
-    
47
-              PS2Clk => PS2Clk,
48
-              PS2Data => PS2Data,
49
-            
50
-              Data_read => intern_Data_read,
51
-              Data_av => intern_Data_av,
52
-              Data => Data_Read,
53
-            
54
-              alert => led(10));
55
-       
56
-    led(7) <= '0';       
57
-    led(8) <= intern_Data_av;
58
-    led(9) <= intern_Data_read;
59
-    
60
-    process
61
-    begin
62
-        wait until CLK'event and CLK = '1';
63
-        if (intern_Data_av = '1' and btnC = '1') then
64
-            led(0 to 6) <= Data_read;
65
-            intern_Data_read <= '1';
66
-        else 
67
-            intern_Data_read <= '0';
68
-        end if;
69
-    end process;
70
-            
71
-   
72
-              
73
-
74
-end Behavioral;

+ 0
- 24
Processeur.xpr View File

@@ -203,12 +203,6 @@
203 203
           <Attr Name="UsedIn" Val="synthesis"/>
204 204
         </FileInfo>
205 205
       </File>
206
-      <File Path="$PSRCDIR/sources_1/new/ScreenSystem.vhd">
207
-        <FileInfo>
208
-          <Attr Name="UsedIn" Val="synthesis"/>
209
-          <Attr Name="UsedIn" Val="simulation"/>
210
-        </FileInfo>
211
-      </File>
212 206
       <File Path="$PSRCDIR/sources_1/new/Keyboard.vhd">
213 207
         <FileInfo>
214 208
           <Attr Name="UsedIn" Val="synthesis"/>
@@ -221,12 +215,6 @@
221 215
           <Attr Name="UsedIn" Val="simulation"/>
222 216
         </FileInfo>
223 217
       </File>
224
-      <File Path="$PSRCDIR/sources_1/new/SystemKeyboard.vhd">
225
-        <FileInfo>
226
-          <Attr Name="UsedIn" Val="synthesis"/>
227
-          <Attr Name="UsedIn" Val="simulation"/>
228
-        </FileInfo>
229
-      </File>
230 218
       <File Path="$PSRCDIR/sources_1/new/SystemKeyboardScreen.vhd">
231 219
         <FileInfo>
232 220
           <Attr Name="UsedIn" Val="synthesis"/>
@@ -251,12 +239,6 @@
251 239
           <Attr Name="UsedIn" Val="simulation"/>
252 240
         </FileInfo>
253 241
       </File>
254
-      <File Path="$PSRCDIR/sources_1/new/IntToASCII.vhd">
255
-        <FileInfo>
256
-          <Attr Name="UsedIn" Val="synthesis"/>
257
-          <Attr Name="UsedIn" Val="simulation"/>
258
-        </FileInfo>
259
-      </File>
260 242
       <File Path="$PSRCDIR/sources_1/new/ScreenDriver.vhd">
261 243
         <FileInfo>
262 244
           <Attr Name="UsedIn" Val="synthesis"/>
@@ -391,12 +373,6 @@
391 373
           <Attr Name="UsedIn" Val="simulation"/>
392 374
         </FileInfo>
393 375
       </File>
394
-      <File Path="$PSRCDIR/sim_1/new/Test_ScreenSystem.vhd">
395
-        <FileInfo>
396
-          <Attr Name="UsedIn" Val="synthesis"/>
397
-          <Attr Name="UsedIn" Val="simulation"/>
398
-        </FileInfo>
399
-      </File>
400 376
       <File Path="$PSRCDIR/sim_1/new/TestTableASCII.vhd">
401 377
         <FileInfo>
402 378
           <Attr Name="UsedIn" Val="synthesis"/>

Loading…
Cancel
Save