|
@@ -177,25 +177,13 @@
|
177
|
177
|
-- S'il ne faut pas injecter de bulles ont traite l'instruction (Possible code factorisable sur ce if)
|
178
|
178
|
if ((Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits) = Code_Instruction_CALL) or (Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits) = Code_Instruction_JMP)) then
|
179
|
179
|
-- CAS PARTICULIER : CALL ou JMP, on transmet et on saute
|
180
|
|
- C <= Instruction_courante (1 * Nb_bits - 1 downto 0 * Nb_bits);
|
181
|
|
- B <= Instruction_courante (2 * Nb_bits - 1 downto 1 * Nb_bits);
|
182
|
|
- A <= Instruction_courante (3 * Nb_bits - 1 downto 2 * Nb_bits);
|
183
|
|
- Instruction <= Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits);
|
184
|
180
|
Pointeur_Instruction <= Instruction_courante (2 * Nb_bits + Addr_size_mem_instruction - 1 downto 2 * Nb_bits);
|
185
|
181
|
elsif (Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits) = Code_Instruction_RET) then
|
186
|
182
|
-- CAS PARTICULIER : RET, on transmet et on revient
|
187
|
|
- C <= Instruction_courante (1 * Nb_bits - 1 downto 0 * Nb_bits);
|
188
|
|
- B <= Instruction_courante (2 * Nb_bits - 1 downto 1 * Nb_bits);
|
189
|
|
- A <= Instruction_courante (3 * Nb_bits - 1 downto 2 * Nb_bits);
|
190
|
|
- Instruction <= Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits);
|
191
|
183
|
Pointeur_Instruction <= Adresse_Retour;
|
192
|
184
|
elsif (Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits) = Code_Instruction_JMZ) then
|
193
|
185
|
-- CAS PARTICULIER : JMZ, on attends que l'instruction précedente arrive sur l'ALU, si le flag Zero est a un on saute, sinon on continue normalement
|
194
|
186
|
compteur <= compteur + 1;
|
195
|
|
- C <= Instruction_courante (1 * Nb_bits - 1 downto 0 * Nb_bits);
|
196
|
|
- B <= Instruction_courante (2 * Nb_bits - 1 downto 1 * Nb_bits);
|
197
|
|
- A <= Instruction_courante (3 * Nb_bits - 1 downto 2 * Nb_bits);
|
198
|
|
- Instruction <= Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits);
|
199
|
187
|
if (compteur = 2) then
|
200
|
188
|
if (Z = '1') then
|
201
|
189
|
Pointeur_Instruction <= Instruction_courante (2 * Nb_bits + Addr_size_mem_instruction - 1 downto 2 * Nb_bits);
|
|
@@ -218,29 +206,21 @@
|
218
|
206
|
compteur <= 0;
|
219
|
207
|
end if;
|
220
|
208
|
end if;
|
221
|
|
- C <= Instruction_courante (1 * Nb_bits - 1 downto 0 * Nb_bits);
|
222
|
|
- B <= Instruction_courante (2 * Nb_bits - 1 downto 1 * Nb_bits);
|
223
|
|
- A <= Instruction_courante (3 * Nb_bits - 1 downto 2 * Nb_bits);
|
224
|
|
- Instruction <= Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits);
|
225
|
209
|
elsif (Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits) = Code_Instruction_PRI) then
|
226
|
210
|
-- CAS PARTICULIER : PRI, on transmet l'instruction et fixe le compteur pour proteger des collisions
|
227
|
211
|
Compteur_PRI <= Nb_bits/4 + 1;
|
228
|
|
- C <= Instruction_courante (1 * Nb_bits - 1 downto 0 * Nb_bits);
|
229
|
|
- B <= Instruction_courante (2 * Nb_bits - 1 downto 1 * Nb_bits);
|
230
|
|
- A <= Instruction_courante (3 * Nb_bits - 1 downto 2 * Nb_bits);
|
231
|
|
- Instruction <= Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits);
|
232
|
212
|
Pointeur_Instruction <= Pointeur_Instruction + 1;
|
233
|
213
|
else
|
234
|
214
|
-- CAS GENERAL : On transmet l'instruction et les opérandes, si elle est critique en ecriture, on enregistre le registre associé dans le tableau
|
235
|
|
- C <= Instruction_courante (1 * Nb_bits - 1 downto 0 * Nb_bits);
|
236
|
|
- B <= Instruction_courante (2 * Nb_bits - 1 downto 1 * Nb_bits);
|
237
|
|
- A <= Instruction_courante (3 * Nb_bits - 1 downto 2 * Nb_bits);
|
238
|
|
- Instruction <= Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits);
|
239
|
215
|
if (Instructions_critiques_ecriture(to_integer(unsigned(Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits)))) = '1') then
|
240
|
216
|
Tableau(1) <= to_integer(unsigned(Instruction_courante (3 * Nb_bits - 1 downto 2 * Nb_bits)));
|
241
|
217
|
end if;
|
242
|
218
|
Pointeur_Instruction <= Pointeur_Instruction + 1;
|
243
|
219
|
end if;
|
|
220
|
+ C <= Instruction_courante (1 * Nb_bits - 1 downto 0 * Nb_bits);
|
|
221
|
+ B <= Instruction_courante (2 * Nb_bits - 1 downto 1 * Nb_bits);
|
|
222
|
+ A <= Instruction_courante (3 * Nb_bits - 1 downto 2 * Nb_bits);
|
|
223
|
+ Instruction <= Instruction_courante (Instruction_bus_size + 3 * Nb_bits - 1 downto 3 * Nb_bits);
|
244
|
224
|
else
|
245
|
225
|
-- Si besoin de bulle, on l'injecte
|
246
|
226
|
C <= Argument_nul;
|