OpenCores
URL https://opencores.org/ocsvn/mcip_open/mcip_open/trunk

Subversion Repositories mcip_open

[/] [mcip_open/] [trunk/] [MCIPopen_XilinxISEproject/] [Decoder.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 mezzah
--------------------------------------------------------------------------------
2
-- Company:        Ferhat Abbas University - Algeria
3
-- Engineer:       Ibrahim MEZZAH
4
-- Progect Supervisor: Dr H. Chemali
5
-- Create Date:    01:16:40 05/16/05
6
-- Design Name:    Decoder
7
-- Module Name:    Decoder - Decode
8
-- Project Name:   Microcontroller IP (MCIP)
9
-- Target Device:  xc3s500e-4fg320
10
-- Tool versions:  Xilinx ISE 9.1.03i
11
-- Description:  This module generate system commands
12
--                                               by decoding instruction.
13
-- Revision:             07/07/2008
14
-- Revision  3.2 - Add description
15
-- Additional Comments: Decoder is based on instructions classification
16
--                                                      to optimize the code.
17
--------------------------------------------------------------------------------
18
library IEEE;
19
use IEEE.STD_LOGIC_1164.ALL;
20
 
21
 
22
entity Decoder is
23
    Port ( Instruction       : in std_logic_vector(15 downto 0);
24
                          Status            : in std_logic_vector(4 downto 1);
25
                          second_inst_ide   : in std_logic_vector(2 downto 0);
26
 
27
                          Command_vector_pc : out std_logic_vector(6 downto 0);
28
                          Command_vector_opu : out std_logic_vector(13 downto 0);
29
                          Command_status    : out std_logic_vector(4 downto 0);
30
                          second_inst_inf   : out std_logic_vector(2 downto 0);
31
                          Skip_inf          : out std_logic_vector(4 downto 0);
32
                          read_write        : out std_logic_vector(1 downto 0);
33
                          call_return       : out std_logic_vector(1 downto 0);
34
                          bit_op_enable     : out std_logic;
35
                          load_FREG         : out std_logic;
36
                          read_result       : out std_logic;
37
                          WREG_write_enable : out std_logic;
38
                          MUL_enable        : out std_logic;
39
                          MOVFF_enable      : out std_logic;
40
                          load_BSR          : out std_logic;
41
                          nop_enable        : out std_logic;
42
--                        retfie            : out std_logic;
43
                          soft_reset_enable : out std_logic;
44
                          sleep_mode_enable : out std_logic;
45
                          clear_watchdog    : out std_logic;
46
--                        table_read        : out std_logic;
47
--                        INDFx             : out std_logic;
48
                          literal_enable    : out std_logic );
49
 
50
end Decoder;
51
 
52
architecture Decode of Decoder is
53
 
54
  constant enable  : std_logic := '1';
55
  constant disable : std_logic := '0';
56
 
57
  constant Enabled  : std_logic := '1';
58
  constant Disabled : std_logic := '0';
59
 
60
        subtype Command_vector_opu_type is std_logic_vector(13 downto 0);
61
        subtype Command_status_type is std_logic_vector(4 downto 0);
62
        subtype Command_vector_pc_type is std_logic_vector(6 downto 0);
63
 
64
  -- Command vector for calcul unit ----------------------------
65
  constant NOP     : Command_vector_opu_type := "00011100000110";
66
  constant ADDWF   : Command_vector_opu_type := "00011110000110";
67
  constant ADDWFC  : Command_vector_opu_type := "11011110000110";
68
  constant ANDWF   : Command_vector_opu_type := "00011100001000";
69
  constant CLRF    : Command_vector_opu_type := "00011100000000";
70
  constant COMF    : Command_vector_opu_type := "00011100000011";
71
  constant CPF     : Command_vector_opu_type := "01011101001001";
72
  constant DECF    : Command_vector_opu_type := "00011111000011";
73
  constant INCF    : Command_vector_opu_type := "01011100001100";
74
  constant IORWF   : Command_vector_opu_type := "00011100001110";
75
  constant MOVF    : Command_vector_opu_type := "00011100001100";
76
  constant MOVWF   : Command_vector_opu_type := "00011100001010";
77
  constant NEGF    : Command_vector_opu_type := "01011100000011";
78
  constant RLCF    : Command_vector_opu_type := "11011111000000";
79
  constant RLNCF   : Command_vector_opu_type := "10011111000000";
80
  constant RRCF    : Command_vector_opu_type := "10101111000000";
81
  constant RRNCF   : Command_vector_opu_type := "10111111000000";
82
  constant SETF    : Command_vector_opu_type := "00011100001111";
83
  constant SUBFWB  : Command_vector_opu_type := "11011100101001";
84
  constant SUBWF   : Command_vector_opu_type := "01011101001001";
85
  constant SUBWFB  : Command_vector_opu_type := "11011101001001";
86
  constant SWAPF   : Command_vector_opu_type := "00010100001100";
87
  constant TSTF    : Command_vector_opu_type := "00011100001100";
88
  constant XORWF   : Command_vector_opu_type := "00011100000110";
89
 
90
  constant BCF     : Command_vector_opu_type := "00000000001100";
91
  constant BSF     : Command_vector_opu_type := "00010000001100";
92
  constant BTF     : Command_vector_opu_type := "00011000001100";
93
  constant BTG     : Command_vector_opu_type := "00011000001100";
94
 
95
  constant DAW     : Command_vector_opu_type := "00000110000110";
96
  --------------------------------------------------------------
97
 
98
  -- Command vector for status ---------------------------------
99
  constant allv                : command_status_type := "11111";
100
  constant ZN                  : command_status_type := "10100";
101
  constant CZN                 : command_status_type := "10101";
102
  constant C                   : command_status_type := "00001";
103
  constant Z                   : command_status_type := "00100";
104
  constant none                : command_status_type := "00000";
105
  --------------------------------------------------------------
106
 
107
  -- Command vector for program counter ------------------------
108
  constant increment      : Command_vector_pc_type := "0001010";
109
  constant branch_con     : Command_vector_pc_type := "0001100";
110
  constant branch_inc     : Command_vector_pc_type := "0001110";
111
  constant CALL1          : Command_vector_pc_type := "1001010";
112
  constant CALL2          : Command_vector_pc_type := "1111010";
113
  constant GOTO1          : Command_vector_pc_type := "1001010";
114
  constant GOTO2          : Command_vector_pc_type := "1101010";
115
  constant RCALL          : Command_vector_pc_type := "0011110";
116
  constant POP            : Command_vector_pc_type := "0010010";
117
  constant PUSH           : Command_vector_pc_type := "0011010";
118
  constant retur_n        : Command_vector_pc_type := "0010011";
119
  --------------------------------------------------------------
120
 
121
  -- second instruction information ----------------------------
122
  constant sec_disable  : std_logic_vector(2 downto 0) := "011";
123
  constant sec_MOVFF    : std_logic_vector(2 downto 0) := "100";
124
--  constant sec_LFSRx    : std_logic_vector(2 downto 0) := "101";
125
  constant sec_GOTO     : std_logic_vector(2 downto 0) := "110";
126
  constant sec_CALL     : std_logic_vector(2 downto 0) := "111";
127
  --------------------------------------------------------------
128
 
129
  -- Skip information ------------------------------------------
130
  constant not_skip   : std_logic_vector(4 downto 0) := "00011";
131
  constant CPFSEQ     : std_logic_vector(4 downto 0) := "11010";
132
  constant CPFSGT     : std_logic_vector(4 downto 0) := "10011";
133
  constant CPFSLT     : std_logic_vector(4 downto 0) := "10111";
134
  constant SZ         : std_logic_vector(4 downto 0) := "11010";
135
  constant SNZ        : std_logic_vector(4 downto 0) := "10010";
136
  constant BTFSC      : std_logic_vector(4 downto 0) := "10001";
137
  constant BTFSS      : std_logic_vector(4 downto 0) := "10101";
138
  --------------------------------------------------------------
139
 
140
  -- call-return -----------------------------------------------
141
  constant none_action   : std_logic_vector(1 downto 0) := "01";
142
  constant call_action   : std_logic_vector(1 downto 0) := "10";
143
  constant return_action : std_logic_vector(1 downto 0) := "11";
144
  --------------------------------------------------------------
145
 
146
  -- load FSRx -------------------------------------------------
147
--  constant load_disable  : std_logic_vector(1 downto 0) := "01";
148
--  constant enable_1stcyc : std_logic_vector(1 downto 0) := "10";
149
--  constant enable_2ndcyc : std_logic_vector(1 downto 0) := "11";
150
  --------------------------------------------------------------
151
 
152
  alias read_D  : std_logic is read_write(1);
153
  alias write_D : std_logic is read_write(0);
154
 
155
  alias d     : std_logic is Instruction(9);
156
  alias s1    : std_logic is Instruction(8);
157
  alias s2    : std_logic is Instruction(0);
158
 
159
  signal not_d : std_logic;
160
 
161
  signal BC   : Command_vector_pc_type;
162
  signal BNC  : Command_vector_pc_type;
163
  signal BN   : Command_vector_pc_type;
164
  signal BNN  : Command_vector_pc_type;
165
  signal BOV  : Command_vector_pc_type;
166
  signal BNOV : Command_vector_pc_type;
167
  signal BZ   : Command_vector_pc_type;
168
  signal BNZ  : Command_vector_pc_type;
169
 
170
begin
171
 
172
  not_d <= '1'                                                           when Instruction(9) = '0' else
173
                          '0';
174
 
175
  BC   <= branch_con                                             when Status(1) = '1' else
176
                         increment;
177
  BNC  <= branch_con                                             when Status(1) = '0' else
178
                         increment;
179
  BN   <= branch_con                                             when Status(4) = '1' else
180
                         increment;
181
  BNN  <= branch_con                                             when Status(4) = '0' else
182
                         increment;
183
  BOV  <= branch_con                                             when Status(3) = '1' else
184
                         increment;
185
  BNOV <= branch_con                                             when Status(3) = '0' else
186
                         increment;
187
  BZ   <= branch_con                                             when Status(2) = '1' else
188
                         increment;
189
  BNZ  <= branch_con                                             when Status(2) = '0' else
190
                         increment;
191
 
192
control : process(Instruction, Status, second_inst_ide, not_d,
193
                                                BC, BNC, BN, BNN, BOV, BNOV, BZ, BNZ)
194
  begin
195
 
196
        case Instruction(15 downto 12) is
197
        when "0000" =>                                                           -- class 0
198
         case Instruction(11 downto 10) is
199
         when "00" =>                                                            -- class 0:0
200
          case Instruction(9) is
201
          when '1' =>                                   -- MULWF
202
                  Command_vector_opu            <= NOP;
203
                  Command_vector_pc             <= increment;
204
                  Command_status                        <= none;
205
 
206
                  second_inst_inf                       <= sec_disable;
207
                  Skip_inf                                      <= not_skip;
208
                  call_return                           <= none_action;
209
                  nop_enable                            <= disabled;
210
--                retfie                                                <= disabled;
211
                  read_D                                                <= enabled;
212
                  write_D                                               <= disabled;
213
 
214
                  load_FREG                                     <= enabled;
215
                  read_result                           <= disabled;
216
                  WREG_write_enable             <= disabled;
217
                  bit_op_enable                 <= disabled;
218
                  literal_enable                        <= disabled;
219
                  MUL_enable                            <= enabled;
220
                  MOVFF_enable                          <= disabled;
221
--                load_FSRx                                     <= load_disable;
222
                  load_BSR                                      <= disabled;
223
                  soft_reset_enable             <= disabled;
224
                  sleep_mode_enable             <= disabled;
225
                  clear_watchdog                        <= disabled;
226
--                table_read                            <= disabled;
227
--                INDFx                                         <= enabled;
228
          when others =>
229
          case Instruction(8) is
230
          when '1' =>
231
          case Instruction(7 downto 4) is
232
          when "0000" =>                                -- MOVLB
233
                  Command_vector_opu            <= NOP;
234
                  Command_vector_pc             <= increment;
235
                  Command_status                        <= none;
236
 
237
                  second_inst_inf                       <= sec_disable;
238
                  Skip_inf                                      <= not_skip;
239
                  call_return                           <= none_action;
240
                  nop_enable                            <= disabled;
241
                  -- retfie                                             <= disabled;
242
                  read_D                                                <= disabled;
243
                  write_D                                               <= disabled;
244
 
245
                  load_FREG                                     <= disabled;
246
                  read_result                           <= disabled;
247
                  WREG_write_enable             <= disabled;
248
                  bit_op_enable                 <= disabled;
249
                  literal_enable                        <= disabled;
250
                  MUL_enable                            <= disabled;
251
                  MOVFF_enable                          <= disabled;
252
                  -- load_FSRx                                  <= load_disable;
253
                  load_BSR                                      <= enabled;
254
                  soft_reset_enable             <= disabled;
255
                  sleep_mode_enable             <= disabled;
256
                  clear_watchdog                        <= disabled;
257
                  -- table_read                         <= disabled;
258
                  -- INDFx                                              <= disabled;
259
          when others =>                                -- NOP
260
                  Command_vector_opu            <= NOP;
261
                  Command_vector_pc             <= increment;
262
                  Command_status                        <= none;
263
 
264
                  second_inst_inf                       <= sec_disable;
265
                  Skip_inf                                      <= not_skip;
266
                  call_return                           <= none_action;
267
                  nop_enable                            <= disabled;
268
                  -- retfie                                             <= disabled;
269
                  read_D                                                <= disabled;
270
                  write_D                                               <= disabled;
271
 
272
                  load_FREG                                     <= disabled;
273
                  read_result                           <= disabled;
274
                  WREG_write_enable             <= disabled;
275
                  bit_op_enable                 <= disabled;
276
                  literal_enable                        <= disabled;
277
                  MUL_enable                            <= disabled;
278
                  MOVFF_enable                          <= disabled;
279
                  -- load_FSRx                                  <= load_disable;
280
                  load_BSR                                      <= disabled;
281
                  soft_reset_enable             <= disabled;
282
                  sleep_mode_enable             <= disabled;
283
                  clear_watchdog                        <= disabled;
284
                  -- table_read                         <= disabled;
285
                  -- INDFx                                              <= disabled;
286
          end case;
287
          when others =>
288
          case Instruction(7 downto 0) is
289
          when "00000100" =>                    -- CLRWDT
290
                  Command_vector_opu            <= NOP;
291
                  Command_vector_pc             <= increment;
292
                  Command_status                        <= none;
293
 
294
                  second_inst_inf                       <= sec_disable;
295
                  Skip_inf                                      <= not_skip;
296
                  call_return                           <= none_action;
297
                  nop_enable                            <= disabled;
298
                  -- retfie                                             <= disabled;
299
                  read_D                                                <= disabled;
300
                  write_D                                               <= disabled;
301
 
302
                  load_FREG                                     <= disabled;
303
                  read_result                           <= disabled;
304
                  WREG_write_enable             <= disabled;
305
                  bit_op_enable                 <= disabled;
306
                  literal_enable                        <= disabled;
307
                  MUL_enable                            <= disabled;
308
                  MOVFF_enable                          <= disabled;
309
                  -- load_FSRx                                  <= load_disable;
310
                  load_BSR                                      <= disabled;
311
                  soft_reset_enable             <= disabled;
312
                  sleep_mode_enable             <= disabled;
313
                  clear_watchdog                        <= enabled;
314
                  -- table_read                         <= disabled;
315
                  -- INDFx                                              <= disabled;
316
          when "00000111" =>                    -- DAW
317
                  Command_vector_opu            <= DAW;
318
                  Command_vector_pc             <= increment;
319
                  Command_status                        <= C;
320
 
321
                  second_inst_inf                       <= sec_disable;
322
                  Skip_inf                                      <= not_skip;
323
                  call_return                           <= none_action;
324
                  nop_enable                            <= disabled;
325
                  -- retfie                                             <= disabled;
326
                  read_D                                                <= disabled;
327
                  write_D                                               <= disabled;
328
 
329
                  load_FREG                                     <= disabled;
330
                  read_result                           <= enabled;
331
                  WREG_write_enable             <= enabled;
332
                  bit_op_enable                 <= disabled;
333
                  literal_enable                        <= disabled;
334
                  MUL_enable                            <= disabled;
335
                  MOVFF_enable                          <= disabled;
336
                  -- load_FSRx                                  <= load_disable;
337
                  load_BSR                                      <= disabled;
338
                  soft_reset_enable             <= disabled;
339
                  sleep_mode_enable             <= disabled;
340
                  clear_watchdog                        <= disabled;
341
                  -- table_read                         <= disabled;
342
                  -- INDFx                                              <= disabled;
343
          when "00000110" =>                    -- POP
344
                  Command_vector_opu            <= NOP;
345
                  Command_vector_pc             <= POP;
346
                  Command_status                        <= none;
347
 
348
                  second_inst_inf                       <= sec_disable;
349
                  Skip_inf                                      <= not_skip;
350
                  call_return                           <= none_action;
351
                  nop_enable                            <= disabled;
352
                  -- retfie                                             <= disabled;
353
                  read_D                                                <= disabled;
354
                  write_D                                               <= disabled;
355
 
356
                  load_FREG                                     <= disabled;
357
                  read_result                           <= disabled;
358
                  WREG_write_enable             <= disabled;
359
                  bit_op_enable                 <= disabled;
360
                  literal_enable                        <= disabled;
361
                  MUL_enable                            <= disabled;
362
                  MOVFF_enable                          <= disabled;
363
                  -- load_FSRx                                  <= load_disable;
364
                  load_BSR                                      <= disabled;
365
                  soft_reset_enable             <= disabled;
366
                  sleep_mode_enable             <= disabled;
367
                  clear_watchdog                        <= disabled;
368
                  -- table_read                         <= disabled;
369
                  -- INDFx                                              <= disabled;
370
          when "00000101" =>                    -- PUSH
371
                  Command_vector_opu            <= NOP;
372
                  Command_vector_pc             <= PUSH;
373
                  Command_status                        <= none;
374
 
375
                  second_inst_inf                       <= sec_disable;
376
                  Skip_inf                                      <= not_skip;
377
                  call_return                           <= none_action;
378
                  nop_enable                            <= disabled;
379
                  -- retfie                                             <= disabled;
380
                  read_D                                                <= disabled;
381
                  write_D                                               <= disabled;
382
 
383
                  load_FREG                                     <= disabled;
384
                  read_result                           <= disabled;
385
                  WREG_write_enable             <= disabled;
386
                  bit_op_enable                 <= disabled;
387
                  literal_enable                        <= disabled;
388
                  MUL_enable                            <= disabled;
389
                  MOVFF_enable                          <= disabled;
390
                  -- load_FSRx                                  <= load_disable;
391
                  load_BSR                                      <= disabled;
392
                  soft_reset_enable             <= disabled;
393
                  sleep_mode_enable             <= disabled;
394
                  clear_watchdog                        <= disabled;
395
                  -- table_read                         <= disabled;
396
                  -- INDFx                                              <= disabled;
397
          when "00000011" =>                    -- SLEEP
398
                  Command_vector_opu            <= NOP;
399
                  Command_vector_pc             <= increment;
400
                  Command_status                        <= none;
401
 
402
                  second_inst_inf                       <= sec_disable;
403
                  Skip_inf                                      <= not_skip;
404
                  call_return                           <= none_action;
405
                  nop_enable                            <= disabled;
406
                  -- retfie                                             <= disabled;
407
                  read_D                                                <= disabled;
408
                  write_D                                               <= disabled;
409
 
410
                  load_FREG                                     <= disabled;
411
                  read_result                           <= disabled;
412
                  WREG_write_enable             <= disabled;
413
                  bit_op_enable                 <= disabled;
414
                  literal_enable                        <= disabled;
415
                  MUL_enable                            <= disabled;
416
                  MOVFF_enable                          <= disabled;
417
                  -- load_FSRx                                  <= load_disable;
418
                  load_BSR                                      <= disabled;
419
                  soft_reset_enable             <= disabled;
420
                  sleep_mode_enable             <= enabled;
421
                  clear_watchdog                        <= disabled;
422
                  -- table_read                         <= disabled;
423
                  -- INDFx                                              <= disabled;
424
          when "00001000" =>                    -- TBLRD*
425
                  Command_vector_opu            <= NOP;
426
                  Command_vector_pc             <= increment;
427
                  Command_status                        <= none;
428
 
429
                  second_inst_inf                       <= sec_disable;
430
                  Skip_inf                                      <= not_skip;
431
                  call_return                           <= none_action;
432
                  nop_enable                            <= enabled;
433
                  -- retfie                                             <= disabled;
434
                  read_D                                                <= disabled;
435
                  write_D                                               <= disabled;
436
 
437
                  load_FREG                                     <= disabled;
438
                  read_result                           <= disabled;
439
                  WREG_write_enable             <= disabled;
440
                  bit_op_enable                 <= disabled;
441
                  literal_enable                        <= disabled;
442
                  MUL_enable                            <= disabled;
443
                  MOVFF_enable                          <= disabled;
444
                  -- load_FSRx                                  <= load_disable;
445
                  load_BSR                                      <= disabled;
446
                  soft_reset_enable             <= disabled;
447
                  sleep_mode_enable             <= disabled;
448
                  clear_watchdog                        <= disabled;
449
                  -- table_read                         <= enabled;
450
                  -- INDFx                                              <= disabled;
451
          when "00001001" =>                    -- TBLRD*+
452
                  Command_vector_opu            <= NOP;
453
                  Command_vector_pc             <= increment;
454
                  Command_status                        <= none;
455
 
456
                  second_inst_inf                       <= sec_disable;
457
                  Skip_inf                                      <= not_skip;
458
                  call_return                           <= none_action;
459
                  nop_enable                            <= enabled;
460
                  -- retfie                                             <= disabled;
461
                  read_D                                                <= disabled;
462
                  write_D                                               <= disabled;
463
 
464
                  load_FREG                                     <= disabled;
465
                  read_result                           <= disabled;
466
                  WREG_write_enable             <= disabled;
467
                  bit_op_enable                 <= disabled;
468
                  literal_enable                        <= disabled;
469
                  MUL_enable                            <= disabled;
470
                  MOVFF_enable                          <= disabled;
471
                  -- load_FSRx                                  <= load_disable;
472
                  load_BSR                                      <= disabled;
473
                  soft_reset_enable             <= disabled;
474
                  sleep_mode_enable             <= disabled;
475
                  clear_watchdog                        <= disabled;
476
                  -- table_read                         <= enabled;
477
                  -- INDFx                                              <= disabled;
478
          when "00001010" =>                    -- TBLRD*-
479
                  Command_vector_opu            <= NOP;
480
                  Command_vector_pc             <= increment;
481
                  Command_status                        <= none;
482
 
483
                  second_inst_inf                       <= sec_disable;
484
                  Skip_inf                                      <= not_skip;
485
                  call_return                           <= none_action;
486
                  nop_enable                            <= enabled;
487
                  -- retfie                                             <= disabled;
488
                  read_D                                                <= disabled;
489
                  write_D                                               <= disabled;
490
 
491
                  load_FREG                                     <= disabled;
492
                  read_result                           <= disabled;
493
                  WREG_write_enable             <= disabled;
494
                  bit_op_enable                 <= disabled;
495
                  literal_enable                        <= disabled;
496
                  MUL_enable                            <= disabled;
497
                  MOVFF_enable                          <= disabled;
498
                  -- load_FSRx                                  <= load_disable;
499
                  load_BSR                                      <= disabled;
500
                  soft_reset_enable             <= disabled;
501
                  sleep_mode_enable             <= disabled;
502
                  clear_watchdog                        <= disabled;
503
                  -- table_read                         <= enabled;
504
                  -- INDFx                                              <= disabled;
505
          when "00001011" =>                    -- TBLRD+*
506
                  Command_vector_opu            <= NOP;
507
                  Command_vector_pc             <= increment;
508
                  Command_status                        <= none;
509
 
510
                  second_inst_inf                       <= sec_disable;
511
                  Skip_inf                                      <= not_skip;
512
                  call_return                           <= none_action;
513
                  nop_enable                            <= enabled;
514
                  -- retfie                                             <= disabled;
515
                  read_D                                                <= disabled;
516
                  write_D                                               <= disabled;
517
 
518
                  load_FREG                                     <= disabled;
519
                  read_result                           <= disabled;
520
                  WREG_write_enable             <= disabled;
521
                  bit_op_enable                 <= disabled;
522
                  literal_enable                        <= disabled;
523
                  MUL_enable                            <= disabled;
524
                  MOVFF_enable                          <= disabled;
525
                  -- load_FSRx                                  <= load_disable;
526
                  load_BSR                                      <= disabled;
527
                  soft_reset_enable             <= disabled;
528
                  sleep_mode_enable             <= disabled;
529
                  clear_watchdog                        <= disabled;
530
                  -- table_read                         <= enabled;
531
                  -- INDFx                                              <= disabled;
532
          when "11111111" =>                    -- RESET
533
                  Command_vector_opu            <= NOP;
534
                  Command_vector_pc             <= increment;
535
                  Command_status                        <= none;
536
 
537
                  second_inst_inf                       <= sec_disable;
538
                  Skip_inf                                      <= not_skip;
539
                  call_return                           <= none_action;
540
                  nop_enable                            <= disabled;
541
                  -- retfie                                             <= disabled;
542
                  read_D                                                <= disabled;
543
                  write_D                                               <= disabled;
544
 
545
                  load_FREG                                     <= disabled;
546
                  read_result                           <= disabled;
547
                  WREG_write_enable             <= disabled;
548
                  bit_op_enable                 <= disabled;
549
                  literal_enable                        <= disabled;
550
                  MUL_enable                            <= disabled;
551
                  MOVFF_enable                          <= disabled;
552
                  -- load_FSRx                                  <= load_disable;
553
                  load_BSR                                      <= disabled;
554
                  soft_reset_enable             <= enabled;
555
                  sleep_mode_enable             <= disabled;
556
                  clear_watchdog                        <= disabled;
557
                  -- table_read                         <= disabled;
558
                  -- INDFx                                              <= disabled;
559
          when "00010000" =>                    -- RETFIE
560
                  Command_vector_opu            <= NOP;
561
                  Command_vector_pc             <= retur_n;
562
                  Command_status                        <= none;
563
 
564
                  second_inst_inf                       <= sec_disable;
565
                  Skip_inf                                      <= not_skip;
566
                  call_return                           <= s2&'1';
567
                  nop_enable                            <= enabled;
568
                  -- retfie                                             <= enabled;
569
                  read_D                                                <= disabled;
570
                  write_D                                               <= disabled;
571
 
572
                  load_FREG                                     <= disabled;
573
                  read_result                           <= disabled;
574
                  WREG_write_enable             <= disabled;
575
                  bit_op_enable                 <= disabled;
576
                  literal_enable                        <= disabled;
577
                  MUL_enable                            <= disabled;
578
                  MOVFF_enable                          <= disabled;
579
                  -- load_FSRx                                  <= load_disable;
580
                  load_BSR                                      <= disabled;
581
                  soft_reset_enable             <= disabled;
582
                  sleep_mode_enable             <= disabled;
583
                  clear_watchdog                        <= disabled;
584
                  -- table_read                         <= disabled;
585
                  -- INDFx                                              <= disabled;
586
          when "00010001" =>                    -- RETFIE
587
                  Command_vector_opu            <= NOP;
588
                  Command_vector_pc             <= retur_n;
589
                  Command_status                        <= none;
590
 
591
                  second_inst_inf                       <= sec_disable;
592
                  Skip_inf                                      <= not_skip;
593
                  call_return                           <= s2&'1';
594
                  nop_enable                            <= enabled;
595
                  -- retfie                                             <= enabled;
596
                  read_D                                                <= disabled;
597
                  write_D                                               <= disabled;
598
 
599
                  load_FREG                                     <= disabled;
600
                  read_result                           <= disabled;
601
                  WREG_write_enable             <= disabled;
602
                  bit_op_enable                 <= disabled;
603
                  literal_enable                        <= disabled;
604
                  MUL_enable                            <= disabled;
605
                  MOVFF_enable                          <= disabled;
606
                  -- load_FSRx                                  <= load_disable;
607
                  load_BSR                                      <= disabled;
608
                  soft_reset_enable             <= disabled;
609
                  sleep_mode_enable             <= disabled;
610
                  clear_watchdog                        <= disabled;
611
                  -- table_read                         <= disabled;
612
                  -- INDFx                                              <= disabled;
613
          when "00010010" =>                    -- RETURN
614
                  Command_vector_opu            <= NOP;
615
                  Command_vector_pc             <= retur_n;
616
                  Command_status                        <= none;
617
 
618
                  second_inst_inf                       <= sec_disable;
619
                  Skip_inf                                      <= not_skip;
620
                  call_return                           <= s2&'1';
621
                  nop_enable                            <= enabled;
622
                  -- retfie                                             <= disabled;
623
                  read_D                                                <= disabled;
624
                  write_D                                               <= disabled;
625
 
626
                  load_FREG                                     <= disabled;
627
                  read_result                           <= disabled;
628
                  WREG_write_enable             <= disabled;
629
                  bit_op_enable                 <= disabled;
630
                  literal_enable                        <= disabled;
631
                  MUL_enable                            <= disabled;
632
                  MOVFF_enable                          <= disabled;
633
                  -- load_FSRx                                  <= load_disable;
634
                  load_BSR                                      <= disabled;
635
                  soft_reset_enable             <= disabled;
636
                  sleep_mode_enable             <= disabled;
637
                  clear_watchdog                        <= disabled;
638
                  -- table_read                         <= disabled;
639
                  -- INDFx                                              <= disabled;
640
          when "00010011" =>                    -- RETURN
641
                  Command_vector_opu            <= NOP;
642
                  Command_vector_pc             <= retur_n;
643
                  Command_status                        <= none;
644
 
645
                  second_inst_inf                       <= sec_disable;
646
                  Skip_inf                                      <= not_skip;
647
                  call_return                           <= s2&'1';
648
                  nop_enable                            <= enabled;
649
                  -- retfie                                             <= disabled;
650
                  read_D                                                <= disabled;
651
                  write_D                                               <= disabled;
652
 
653
                  load_FREG                                     <= disabled;
654
                  read_result                           <= disabled;
655
                  WREG_write_enable             <= disabled;
656
                  bit_op_enable                 <= disabled;
657
                  literal_enable                        <= disabled;
658
                  MUL_enable                            <= disabled;
659
                  MOVFF_enable                          <= disabled;
660
                  -- load_FSRx                                  <= load_disable;
661
                  load_BSR                                      <= disabled;
662
                  soft_reset_enable             <= disabled;
663
                  sleep_mode_enable             <= disabled;
664
                  clear_watchdog                        <= disabled;
665
                  -- table_read                         <= disabled;
666
                  -- INDFx                                              <= disabled;
667
          when others =>                                -- NOP
668
                  Command_vector_opu            <= NOP;
669
                  Command_vector_pc             <= increment;
670
                  Command_status                        <= none;
671
 
672
                  second_inst_inf                       <= sec_disable;
673
                  Skip_inf                                      <= not_skip;
674
                  call_return                           <= none_action;
675
                  nop_enable                            <= disabled;
676
                  -- retfie                                             <= disabled;
677
                  read_D                                                <= disabled;
678
                  write_D                                               <= disabled;
679
 
680
                  load_FREG                                     <= disabled;
681
                  read_result                           <= disabled;
682
                  WREG_write_enable             <= disabled;
683
                  bit_op_enable                 <= disabled;
684
                  literal_enable                        <= disabled;
685
                  MUL_enable                            <= disabled;
686
                  MOVFF_enable                          <= disabled;
687
                  -- load_FSRx                                  <= load_disable;
688
                  load_BSR                                      <= disabled;
689
                  soft_reset_enable             <= disabled;
690
                  sleep_mode_enable             <= disabled;
691
                  clear_watchdog                        <= disabled;
692
                  -- table_read                         <= disabled;
693
                  -- INDFx                                              <= disabled;
694
          end case;
695
          end case;
696
          end case;
697
         when "01" =>                                   -- DECF
698
                  Command_vector_opu            <= DECF;
699
                  Command_vector_pc             <= increment;
700
                  Command_status                        <= allv;
701
 
702
                  second_inst_inf                       <= sec_disable;
703
                  Skip_inf                                      <= not_skip;
704
                  call_return                           <= none_action;
705
                  nop_enable                            <= disabled;
706
                  -- retfie                                             <= disabled;
707
                  read_D                                                <= enabled;
708
                  write_D                                               <= d;
709
 
710
                  load_FREG                                     <= enabled;
711
                  read_result                           <= enabled;
712
                  WREG_write_enable             <= not_d;
713
                  bit_op_enable                 <= disabled;
714
                  literal_enable                        <= disabled;
715
                  MUL_enable                            <= disabled;
716
                  MOVFF_enable                          <= disabled;
717
                  -- load_FSRx                                  <= load_disable;
718
                  load_BSR                                      <= disabled;
719
                  soft_reset_enable             <= disabled;
720
                  sleep_mode_enable             <= disabled;
721
                  clear_watchdog                        <= disabled;
722
                  -- table_read                         <= disabled;
723
                  -- INDFx                                              <= enabled;
724
         when "10" =>                                   -- class 0:2
725
          case Instruction(9 downto 8) is
726
          when "00" =>                                  -- SUBLW
727
                  Command_vector_opu            <= SUBWF;
728
                  Command_vector_pc             <= increment;
729
                  Command_status                        <= allv;
730
 
731
                  second_inst_inf                       <= sec_disable;
732
                  Skip_inf                                      <= not_skip;
733
                  call_return                           <= none_action;
734
                  nop_enable                            <= disabled;
735
                  -- retfie                                             <= disabled;
736
                  read_D                                                <= disabled;
737
                  write_D                                               <= disabled;
738
 
739
                  load_FREG                                     <= enabled;
740
                  read_result                           <= enabled;
741
                  WREG_write_enable             <= enabled;
742
                  bit_op_enable                 <= disabled;
743
                  literal_enable                        <= enabled;
744
                  MUL_enable                            <= disabled;
745
                  MOVFF_enable                          <= disabled;
746
                  -- load_FSRx                                  <= load_disable;
747
                  load_BSR                                      <= disabled;
748
                  soft_reset_enable             <= disabled;
749
                  sleep_mode_enable             <= disabled;
750
                  clear_watchdog                        <= disabled;
751
                  -- table_read                         <= disabled;
752
                  -- INDFx                                              <= disabled;
753
          when "01" =>                                  -- IORLW
754
                  Command_vector_opu            <= IORWF;
755
                  Command_vector_pc             <= increment;
756
                  Command_status                        <= ZN;
757
 
758
                  second_inst_inf                       <= sec_disable;
759
                  Skip_inf                                      <= not_skip;
760
                  call_return                           <= none_action;
761
                  nop_enable                            <= disabled;
762
                  -- retfie                                             <= disabled;
763
                  read_D                                                <= disabled;
764
                  write_D                                               <= disabled;
765
 
766
                  load_FREG                                     <= enabled;
767
                  read_result                           <= enabled;
768
                  WREG_write_enable             <= enabled;
769
                  bit_op_enable                 <= disabled;
770
                  literal_enable                        <= enabled;
771
                  MUL_enable                            <= disabled;
772
                  MOVFF_enable                          <= disabled;
773
                  -- load_FSRx                                  <= load_disable;
774
                  load_BSR                                      <= disabled;
775
                  soft_reset_enable             <= disabled;
776
                  sleep_mode_enable             <= disabled;
777
                  clear_watchdog                        <= disabled;
778
                  -- table_read                         <= disabled;
779
                  -- INDFx                                              <= disabled;
780
          when "10" =>                                  -- XORLW
781
                  Command_vector_opu            <= XORWF;
782
                  Command_vector_pc             <= increment;
783
                  Command_status                        <= ZN;
784
 
785
                  second_inst_inf                       <= sec_disable;
786
                  Skip_inf                                      <= not_skip;
787
                  call_return                           <= none_action;
788
                  nop_enable                            <= disabled;
789
                  -- retfie                                             <= disabled;
790
                  read_D                                                <= disabled;
791
                  write_D                                               <= disabled;
792
 
793
                  load_FREG                                     <= enabled;
794
                  read_result                           <= enabled;
795
                  WREG_write_enable             <= enabled;
796
                  bit_op_enable                 <= disabled;
797
                  literal_enable                        <= enabled;
798
                  MUL_enable                            <= disabled;
799
                  MOVFF_enable                          <= disabled;
800
                  -- load_FSRx                                  <= load_disable;
801
                  load_BSR                                      <= disabled;
802
                  soft_reset_enable             <= disabled;
803
                  sleep_mode_enable             <= disabled;
804
                  clear_watchdog                        <= disabled;
805
                  -- table_read                         <= disabled;
806
                  -- INDFx                                              <= disabled;
807
          when others =>                                -- ANDLW
808
                  Command_vector_opu            <= ANDWF;
809
                  Command_vector_pc             <= increment;
810
                  Command_status                        <= ZN;
811
 
812
                  second_inst_inf                       <= sec_disable;
813
                  Skip_inf                                      <= not_skip;
814
                  call_return                           <= none_action;
815
                  nop_enable                            <= disabled;
816
                  -- retfie                                             <= disabled;
817
                  read_D                                                <= disabled;
818
                  write_D                                               <= disabled;
819
 
820
                  load_FREG                                     <= enabled;
821
                  read_result                           <= enabled;
822
                  WREG_write_enable             <= enabled;
823
                  bit_op_enable                 <= disabled;
824
                  literal_enable                        <= enabled;
825
                  MUL_enable                            <= disabled;
826
                  MOVFF_enable                          <= disabled;
827
                  -- load_FSRx                                  <= load_disable;
828
                  load_BSR                                      <= disabled;
829
                  soft_reset_enable             <= disabled;
830
                  sleep_mode_enable             <= disabled;
831
                  clear_watchdog                        <= disabled;
832
                  -- table_read                         <= disabled;
833
                  -- INDFx                                              <= disabled;
834
          end case;
835
         when others =>
836
          case Instruction(9 downto 8) is
837
          when "00" =>                                  -- RETLW
838
                  Command_vector_opu            <= MOVF;
839
                  Command_vector_pc             <= retur_n;
840
                  Command_status                        <= none;
841
 
842
                  second_inst_inf                       <= sec_disable;
843
                  Skip_inf                                      <= not_skip;
844
                  call_return                           <= none_action;
845
                  nop_enable                            <= enabled;
846
                  -- retfie                                             <= disabled;
847
                  read_D                                                <= disabled;
848
                  write_D                                               <= disabled;
849
 
850
                  load_FREG                                     <= enabled;
851
                  read_result                           <= enabled;
852
                  WREG_write_enable             <= enabled;
853
                  bit_op_enable                 <= disabled;
854
                  literal_enable                        <= enabled;
855
                  MUL_enable                            <= disabled;
856
                  MOVFF_enable                          <= disabled;
857
                  -- load_FSRx                                  <= load_disable;
858
                  load_BSR                                      <= disabled;
859
                  soft_reset_enable             <= disabled;
860
                  sleep_mode_enable             <= disabled;
861
                  clear_watchdog                        <= disabled;
862
                  -- table_read                         <= disabled;
863
                  -- INDFx                                              <= disabled;
864
          when "01" =>                                  -- MULLW
865
                  Command_vector_opu            <= NOP;
866
                  Command_vector_pc             <= increment;
867
                  Command_status                        <= none;
868
 
869
                  second_inst_inf                       <= sec_disable;
870
                  Skip_inf                                      <= not_skip;
871
                  call_return                           <= none_action;
872
                  nop_enable                            <= disabled;
873
                  -- retfie                                             <= disabled;
874
                  read_D                                                <= disabled;
875
                  write_D                                               <= disabled;
876
 
877
                  load_FREG                                     <= enabled;
878
                  read_result                           <= disabled;
879
                  WREG_write_enable             <= disabled;
880
                  bit_op_enable                 <= disabled;
881
                  literal_enable                        <= enabled;
882
                  MUL_enable                            <= enabled;
883
                  MOVFF_enable                          <= disabled;
884
                  -- load_FSRx                                  <= load_disable;
885
                  load_BSR                                      <= disabled;
886
                  soft_reset_enable             <= disabled;
887
                  sleep_mode_enable             <= disabled;
888
                  clear_watchdog                        <= disabled;
889
                  -- table_read                         <= disabled;
890
                  -- INDFx                                              <= disabled;
891
          when "10" =>                                  -- MOVLW
892
                  Command_vector_opu            <= MOVF;
893
                  Command_vector_pc             <= increment;
894
                  Command_status                        <= none;
895
 
896
                  second_inst_inf                       <= sec_disable;
897
                  Skip_inf                                      <= not_skip;
898
                  call_return                           <= none_action;
899
                  nop_enable                            <= disabled;
900
                  -- retfie                                             <= disabled;
901
                  read_D                                                <= disabled;
902
                  write_D                                               <= disabled;
903
 
904
                  load_FREG                                     <= enabled;
905
                  read_result                           <= enabled;
906
                  WREG_write_enable             <= enabled;
907
                  bit_op_enable                 <= disabled;
908
                  literal_enable                        <= enabled;
909
                  MUL_enable                            <= disabled;
910
                  MOVFF_enable                          <= disabled;
911
                  -- load_FSRx                                  <= load_disable;
912
                  load_BSR                                      <= disabled;
913
                  soft_reset_enable             <= disabled;
914
                  sleep_mode_enable             <= disabled;
915
                  clear_watchdog                        <= disabled;
916
                  -- table_read                         <= disabled;
917
                  -- INDFx                                              <= disabled;
918
          when others =>                                -- ADDLW
919
                  Command_vector_opu            <= ADDWF;
920
                  Command_vector_pc             <= increment;
921
                  Command_status                        <= allv;
922
 
923
                  second_inst_inf                       <= sec_disable;
924
                  Skip_inf                                      <= not_skip;
925
                  call_return                           <= none_action;
926
                  nop_enable                            <= disabled;
927
                  -- retfie                                             <= disabled;
928
                  read_D                                                <= disabled;
929
                  write_D                                               <= disabled;
930
 
931
                  load_FREG                                     <= enabled;
932
                  read_result                           <= enabled;
933
                  WREG_write_enable             <= enabled;
934
                  bit_op_enable                 <= disabled;
935
                  literal_enable                        <= enabled;
936
                  MUL_enable                            <= disabled;
937
                  MOVFF_enable                          <= disabled;
938
                  -- load_FSRx                                  <= load_disable;
939
                  load_BSR                                      <= disabled;
940
                  soft_reset_enable             <= disabled;
941
                  sleep_mode_enable             <= disabled;
942
                  clear_watchdog                        <= disabled;
943
                  -- table_read                         <= disabled;
944
                  -- INDFx                                              <= disabled;
945
          end case;
946
         end case;
947
        when "0001" =>                                  -- class 1
948
         case Instruction(11 downto 10) is
949
         when "00" =>                                   -- IORWF
950
                  Command_vector_opu            <= IORWF;
951
                  Command_vector_pc             <= increment;
952
                  Command_status                        <= ZN;
953
 
954
                  second_inst_inf                       <= sec_disable;
955
                  Skip_inf                                      <= not_skip;
956
                  call_return                           <= none_action;
957
                  nop_enable                            <= disabled;
958
                  -- retfie                                             <= disabled;
959
                  read_D                                                <= enabled;
960
                  write_D                                               <= d;
961
 
962
                  load_FREG                                     <= enabled;
963
                  read_result                           <= enabled;
964
                  WREG_write_enable             <= not_d;
965
                  bit_op_enable                 <= disabled;
966
                  literal_enable                        <= disabled;
967
                  MUL_enable                            <= disabled;
968
                  MOVFF_enable                          <= disabled;
969
                  -- load_FSRx                                  <= load_disable;
970
                  load_BSR                                      <= disabled;
971
                  soft_reset_enable             <= disabled;
972
                  sleep_mode_enable             <= disabled;
973
                  clear_watchdog                        <= disabled;
974
                  -- table_read                         <= disabled;
975
                  -- INDFx                                              <= enabled;
976
         when "01" =>                                   -- ANDWF
977
                  Command_vector_opu            <= ANDWF;
978
                  Command_vector_pc             <= increment;
979
                  Command_status                        <= ZN;
980
 
981
                  second_inst_inf                       <= sec_disable;
982
                  Skip_inf                                      <= not_skip;
983
                  call_return                           <= none_action;
984
                  nop_enable                            <= disabled;
985
                  -- retfie                                             <= disabled;
986
                  read_D                                                <= enabled;
987
                  write_D                                               <= d;
988
 
989
                  load_FREG                                     <= enabled;
990
                  read_result                           <= enabled;
991
                  WREG_write_enable             <= not_d;
992
                  bit_op_enable                 <= disabled;
993
                  literal_enable                        <= disabled;
994
                  MUL_enable                            <= disabled;
995
                  MOVFF_enable                          <= disabled;
996
                  -- load_FSRx                                  <= load_disable;
997
                  load_BSR                                      <= disabled;
998
                  soft_reset_enable             <= disabled;
999
                  sleep_mode_enable             <= disabled;
1000
                  clear_watchdog                        <= disabled;
1001
                  -- table_read                         <= disabled;
1002
                  -- INDFx                                              <= enabled;
1003
         when "10" =>                                   -- XORWF
1004
                  Command_vector_opu            <= XORWF;
1005
                  Command_vector_pc             <= increment;
1006
                  Command_status                        <= ZN;
1007
 
1008
                  second_inst_inf                       <= sec_disable;
1009
                  Skip_inf                                      <= not_skip;
1010
                  call_return                           <= none_action;
1011
                  nop_enable                            <= disabled;
1012
                  -- retfie                                             <= disabled;
1013
                  read_D                                                <= enabled;
1014
                  write_D                                               <= d;
1015
 
1016
                  load_FREG                                     <= enabled;
1017
                  read_result                           <= enabled;
1018
                  WREG_write_enable             <= not_d;
1019
                  bit_op_enable                 <= disabled;
1020
                  literal_enable                        <= disabled;
1021
                  MUL_enable                            <= disabled;
1022
                  MOVFF_enable                          <= disabled;
1023
                  -- load_FSRx                                  <= load_disable;
1024
                  load_BSR                                      <= disabled;
1025
                  soft_reset_enable             <= disabled;
1026
                  sleep_mode_enable             <= disabled;
1027
                  clear_watchdog                        <= disabled;
1028
                  -- table_read                         <= disabled;
1029
                  -- INDFx                                              <= enabled;
1030
         when others =>                         -- COMF
1031
                  Command_vector_opu            <= COMF;
1032
                  Command_vector_pc             <= increment;
1033
                  Command_status                        <= ZN;
1034
 
1035
                  second_inst_inf                       <= sec_disable;
1036
                  Skip_inf                                      <= not_skip;
1037
                  call_return                           <= none_action;
1038
                  nop_enable                            <= disabled;
1039
                  -- retfie                                             <= disabled;
1040
                  read_D                                                <= enabled;
1041
                  write_D                                               <= d;
1042
 
1043
                  load_FREG                                     <= enabled;
1044
                  read_result                           <= enabled;
1045
                  WREG_write_enable             <= not_d;
1046
                  bit_op_enable                 <= disabled;
1047
                  literal_enable                        <= disabled;
1048
                  MUL_enable                            <= disabled;
1049
                  MOVFF_enable                          <= disabled;
1050
                  -- load_FSRx                                  <= load_disable;
1051
                  load_BSR                                      <= disabled;
1052
                  soft_reset_enable             <= disabled;
1053
                  sleep_mode_enable             <= disabled;
1054
                  clear_watchdog                        <= disabled;
1055
                  -- table_read                         <= disabled;
1056
                  -- INDFx                                              <= enabled;
1057
         end case;
1058
        when "0010" =>                                  -- class 2
1059
         case Instruction(11 downto 10) is
1060
         when "00" =>                                   -- ADDWFC
1061
                  Command_vector_opu            <= ADDWFC;
1062
                  Command_vector_pc             <= increment;
1063
                  Command_status                        <= allv;
1064
 
1065
                  second_inst_inf                       <= sec_disable;
1066
                  Skip_inf                                      <= not_skip;
1067
                  call_return                           <= none_action;
1068
                  nop_enable                            <= disabled;
1069
                  -- retfie                                             <= disabled;
1070
                  read_D                                                <= enabled;
1071
                  write_D                                               <= d;
1072
 
1073
                  load_FREG                                     <= enabled;
1074
                  read_result                           <= enabled;
1075
                  WREG_write_enable             <= not_d;
1076
                  bit_op_enable                 <= disabled;
1077
                  literal_enable                        <= disabled;
1078
                  MUL_enable                            <= disabled;
1079
                  MOVFF_enable                          <= disabled;
1080
                  -- load_FSRx                                  <= load_disable;
1081
                  load_BSR                                      <= disabled;
1082
                  soft_reset_enable             <= disabled;
1083
                  sleep_mode_enable             <= disabled;
1084
                  clear_watchdog                        <= disabled;
1085
                  -- table_read                         <= disabled;
1086
                  -- INDFx                                              <= enabled;
1087
         when "01" =>                                   -- ADDWF
1088
                  Command_vector_opu            <= ADDWF;
1089
                  Command_vector_pc             <= increment;
1090
                  Command_status                        <= allv;
1091
 
1092
                  second_inst_inf                       <= sec_disable;
1093
                  Skip_inf                                      <= not_skip;
1094
                  call_return                           <= none_action;
1095
                  nop_enable                            <= disabled;
1096
                  -- retfie                                             <= disabled;
1097
                  read_D                                                <= enabled;
1098
                  write_D                                               <= d;
1099
 
1100
                  load_FREG                                     <= enabled;
1101
                  read_result                           <= enabled;
1102
                  WREG_write_enable             <= not_d;
1103
                  bit_op_enable                 <= disabled;
1104
                  literal_enable                        <= disabled;
1105
                  MUL_enable                            <= disabled;
1106
                  MOVFF_enable                          <= disabled;
1107
                  -- load_FSRx                                  <= load_disable;
1108
                  load_BSR                                      <= disabled;
1109
                  soft_reset_enable             <= disabled;
1110
                  sleep_mode_enable             <= disabled;
1111
                  clear_watchdog                        <= disabled;
1112
                  -- table_read                         <= disabled;
1113
                  -- INDFx                                              <= enabled;
1114
         when "10" =>                                   -- INCF
1115
                  Command_vector_opu            <= INCF;
1116
                  Command_vector_pc             <= increment;
1117
                  Command_status                        <= allv;
1118
 
1119
                  second_inst_inf                       <= sec_disable;
1120
                  Skip_inf                                      <= not_skip;
1121
                  call_return                           <= none_action;
1122
                  nop_enable                            <= disabled;
1123
                  -- retfie                                             <= disabled;
1124
                  read_D                                                <= enabled;
1125
                  write_D                                               <= d;
1126
 
1127
                  load_FREG                                     <= enabled;
1128
                  read_result                           <= enabled;
1129
                  WREG_write_enable             <= not_d;
1130
                  bit_op_enable                 <= disabled;
1131
                  literal_enable                        <= disabled;
1132
                  MUL_enable                            <= disabled;
1133
                  MOVFF_enable                          <= disabled;
1134
                  -- load_FSRx                                  <= load_disable;
1135
                  load_BSR                                      <= disabled;
1136
                  soft_reset_enable             <= disabled;
1137
                  sleep_mode_enable             <= disabled;
1138
                  clear_watchdog                        <= disabled;
1139
                  -- table_read                         <= disabled;
1140
                  -- INDFx                                              <= enabled;
1141
         when others =>                         -- DECFSZ
1142
                  Command_vector_opu            <= DECF;
1143
                  Command_vector_pc             <= increment;
1144
                  Command_status                        <= none;
1145
 
1146
                  second_inst_inf                       <= sec_disable;
1147
                  Skip_inf                                      <= SZ;
1148
                  call_return                           <= none_action;
1149
                  nop_enable                            <= disabled;
1150
                  -- retfie                                             <= disabled;
1151
                  read_D                                                <= enabled;
1152
                  write_D                                               <= d;
1153
 
1154
                  load_FREG                                     <= enabled;
1155
                  read_result                           <= enabled;
1156
                  WREG_write_enable             <= not_d;
1157
                  bit_op_enable                 <= disabled;
1158
                  literal_enable                        <= disabled;
1159
                  MUL_enable                            <= disabled;
1160
                  MOVFF_enable                          <= disabled;
1161
                  -- load_FSRx                                  <= load_disable;
1162
                  load_BSR                                      <= disabled;
1163
                  soft_reset_enable             <= disabled;
1164
                  sleep_mode_enable             <= disabled;
1165
                  clear_watchdog                        <= disabled;
1166
                  -- table_read                         <= disabled;
1167
                  -- INDFx                                              <= enabled;
1168
         end case;
1169
        when "0011" =>                                  -- class 3
1170
         case Instruction(11 downto 10) is
1171
         when "00" =>                                   -- RRCF
1172
                  Command_vector_opu            <= RRCF;
1173
                  Command_vector_pc             <= increment;
1174
                  Command_status                        <= CZN;
1175
 
1176
                  second_inst_inf                       <= sec_disable;
1177
                  Skip_inf                                      <= not_skip;
1178
                  call_return                           <= none_action;
1179
                  nop_enable                            <= disabled;
1180
                  -- retfie                                             <= disabled;
1181
                  read_D                                                <= enabled;
1182
                  write_D                                               <= d;
1183
 
1184
                  load_FREG                                     <= enabled;
1185
                  read_result                           <= enabled;
1186
                  WREG_write_enable             <= not_d;
1187
                  bit_op_enable                 <= disabled;
1188
                  literal_enable                        <= disabled;
1189
                  MUL_enable                            <= disabled;
1190
                  MOVFF_enable                          <= disabled;
1191
                  -- load_FSRx                                  <= load_disable;
1192
                  load_BSR                                      <= disabled;
1193
                  soft_reset_enable             <= disabled;
1194
                  sleep_mode_enable             <= disabled;
1195
                  clear_watchdog                        <= disabled;
1196
                  -- table_read                         <= disabled;
1197
                  -- INDFx                                              <= enabled;
1198
         when "01" =>                                   -- RLCF
1199
                  Command_vector_opu            <= RLCF;
1200
                  Command_vector_pc             <= increment;
1201
                  Command_status                        <= CZN;
1202
 
1203
                  second_inst_inf                       <= sec_disable;
1204
                  Skip_inf                                      <= not_skip;
1205
                  call_return                           <= none_action;
1206
                  nop_enable                            <= disabled;
1207
                  -- retfie                                             <= disabled;
1208
                  read_D                                                <= enabled;
1209
                  write_D                                               <= d;
1210
 
1211
                  load_FREG                                     <= enabled;
1212
                  read_result                           <= enabled;
1213
                  WREG_write_enable             <= not_d;
1214
                  bit_op_enable                 <= disabled;
1215
                  literal_enable                        <= disabled;
1216
                  MUL_enable                            <= disabled;
1217
                  MOVFF_enable                          <= disabled;
1218
                  -- load_FSRx                                  <= load_disable;
1219
                  load_BSR                                      <= disabled;
1220
                  soft_reset_enable             <= disabled;
1221
                  sleep_mode_enable             <= disabled;
1222
                  clear_watchdog                        <= disabled;
1223
                  -- table_read                         <= disabled;
1224
                  -- INDFx                                              <= enabled;
1225
         when "10" =>                                   -- SWAPF
1226
                  Command_vector_opu            <= SWAPF;
1227
                  Command_vector_pc             <= increment;
1228
                  Command_status                        <= none;
1229
 
1230
                  second_inst_inf                       <= sec_disable;
1231
                  Skip_inf                                      <= not_skip;
1232
                  call_return                           <= none_action;
1233
                  nop_enable                            <= disabled;
1234
                  -- retfie                                             <= disabled;
1235
                  read_D                                                <= enabled;
1236
                  write_D                                               <= d;
1237
 
1238
                  load_FREG                                     <= enabled;
1239
                  read_result                           <= enabled;
1240
                  WREG_write_enable             <= not_d;
1241
                  bit_op_enable                 <= disabled;
1242
                  literal_enable                        <= disabled;
1243
                  MUL_enable                            <= disabled;
1244
                  MOVFF_enable                          <= disabled;
1245
                  -- load_FSRx                                  <= load_disable;
1246
                  load_BSR                                      <= disabled;
1247
                  soft_reset_enable             <= disabled;
1248
                  sleep_mode_enable             <= disabled;
1249
                  clear_watchdog                        <= disabled;
1250
                  -- table_read                         <= disabled;
1251
                  -- INDFx                                              <= enabled;
1252
         when others =>                         -- INCFSZ
1253
                  Command_vector_opu            <= INCF;
1254
                  Command_vector_pc             <= increment;
1255
                  Command_status                        <= none;
1256
 
1257
                  second_inst_inf                       <= sec_disable;
1258
                  Skip_inf                                      <= SZ;
1259
                  call_return                           <= none_action;
1260
                  nop_enable                            <= disabled;
1261
                  -- retfie                                             <= disabled;
1262
                  read_D                                                <= enabled;
1263
                  write_D                                               <= d;
1264
 
1265
                  load_FREG                                     <= enabled;
1266
                  read_result                           <= enabled;
1267
                  WREG_write_enable             <= not_d;
1268
                  bit_op_enable                 <= disabled;
1269
                  literal_enable                        <= disabled;
1270
                  MUL_enable                            <= disabled;
1271
                  MOVFF_enable                          <= disabled;
1272
                  -- load_FSRx                                  <= load_disable;
1273
                  load_BSR                                      <= disabled;
1274
                  soft_reset_enable             <= disabled;
1275
                  sleep_mode_enable             <= disabled;
1276
                  clear_watchdog                        <= disabled;
1277
                  -- table_read                         <= disabled;
1278
                  -- INDFx                                              <= enabled;
1279
         end case;
1280
        when "0100" =>                                  -- class 4
1281
         case Instruction(11 downto 10) is
1282
         when "00" =>                                   -- RRNCF
1283
                  Command_vector_opu            <= RRNCF;
1284
                  Command_vector_pc             <= increment;
1285
                  Command_status                        <= ZN;
1286
 
1287
                  second_inst_inf                       <= sec_disable;
1288
                  Skip_inf                                      <= not_skip;
1289
                  call_return                           <= none_action;
1290
                  nop_enable                            <= disabled;
1291
                  -- retfie                                             <= disabled;
1292
                  read_D                                                <= enabled;
1293
                  write_D                                               <= d;
1294
 
1295
                  load_FREG                                     <= enabled;
1296
                  read_result                           <= enabled;
1297
                  WREG_write_enable             <= not_d;
1298
                  bit_op_enable                 <= disabled;
1299
                  literal_enable                        <= disabled;
1300
                  MUL_enable                            <= disabled;
1301
                  MOVFF_enable                          <= disabled;
1302
                  -- load_FSRx                                  <= load_disable;
1303
                  load_BSR                                      <= disabled;
1304
                  soft_reset_enable             <= disabled;
1305
                  sleep_mode_enable             <= disabled;
1306
                  clear_watchdog                        <= disabled;
1307
                  -- table_read                         <= disabled;
1308
                  -- INDFx                                              <= enabled;
1309
         when "01" =>                                   -- RLNCF
1310
                  Command_vector_opu            <= RLNCF;
1311
                  Command_vector_pc             <= increment;
1312
                  Command_status                        <= ZN;
1313
 
1314
                  second_inst_inf                       <= sec_disable;
1315
                  Skip_inf                                      <= not_skip;
1316
                  call_return                           <= none_action;
1317
                  nop_enable                            <= disabled;
1318
                  -- retfie                                             <= disabled;
1319
                  read_D                                                <= enabled;
1320
                  write_D                                               <= d;
1321
 
1322
                  load_FREG                                     <= enabled;
1323
                  read_result                           <= enabled;
1324
                  WREG_write_enable             <= not_d;
1325
                  bit_op_enable                 <= disabled;
1326
                  literal_enable                        <= disabled;
1327
                  MUL_enable                            <= disabled;
1328
                  MOVFF_enable                          <= disabled;
1329
                  -- load_FSRx                                  <= load_disable;
1330
                  load_BSR                                      <= disabled;
1331
                  soft_reset_enable             <= disabled;
1332
                  sleep_mode_enable             <= disabled;
1333
                  clear_watchdog                        <= disabled;
1334
                  -- table_read                         <= disabled;
1335
                  -- INDFx                                              <= enabled;
1336
         when "10" =>                                   -- INFSNZ
1337
                  Command_vector_opu            <= INCF;
1338
                  Command_vector_pc             <= increment;
1339
                  Command_status                        <= none;
1340
 
1341
                  second_inst_inf                       <= sec_disable;
1342
                  Skip_inf                                      <= SNZ;
1343
                  call_return                           <= none_action;
1344
                  nop_enable                            <= disabled;
1345
                  -- retfie                                             <= disabled;
1346
                  read_D                                                <= enabled;
1347
                  write_D                                               <= d;
1348
 
1349
                  load_FREG                                     <= enabled;
1350
                  read_result                           <= enabled;
1351
                  WREG_write_enable             <= not_d;
1352
                  bit_op_enable                 <= disabled;
1353
                  literal_enable                        <= disabled;
1354
                  MUL_enable                            <= disabled;
1355
                  MOVFF_enable                          <= disabled;
1356
                  -- load_FSRx                                  <= load_disable;
1357
                  load_BSR                                      <= disabled;
1358
                  soft_reset_enable             <= disabled;
1359
                  sleep_mode_enable             <= disabled;
1360
                  clear_watchdog                        <= disabled;
1361
                  -- table_read                         <= disabled;
1362
                  -- INDFx                                              <= enabled;
1363
         when others =>                         -- DCFSNZ
1364
                  Command_vector_opu            <= DECF;
1365
                  Command_vector_pc             <= increment;
1366
                  Command_status                        <= none;
1367
 
1368
                  second_inst_inf                       <= sec_disable;
1369
                  Skip_inf                                      <= SNZ;
1370
                  call_return                           <= none_action;
1371
                  nop_enable                            <= disabled;
1372
                  -- retfie                                             <= disabled;
1373
                  read_D                                                <= enabled;
1374
                  write_D                                               <= d;
1375
 
1376
                  load_FREG                                     <= enabled;
1377
                  read_result                           <= enabled;
1378
                  WREG_write_enable             <= not_d;
1379
                  bit_op_enable                 <= disabled;
1380
                  literal_enable                        <= disabled;
1381
                  MUL_enable                            <= disabled;
1382
                  MOVFF_enable                          <= disabled;
1383
                  -- load_FSRx                                  <= load_disable;
1384
                  load_BSR                                      <= disabled;
1385
                  soft_reset_enable             <= disabled;
1386
                  sleep_mode_enable             <= disabled;
1387
                  clear_watchdog                        <= disabled;
1388
                  -- table_read                         <= disabled;
1389
                  -- INDFx                                              <= enabled;
1390
         end case;
1391
        when "0101" =>                                  -- class 5
1392
         case Instruction(11 downto 10) is
1393
         when "00" =>                                   -- MOVF
1394
                  Command_vector_opu            <= MOVF;
1395
                  Command_vector_pc             <= increment;
1396
                  Command_status                        <= ZN;
1397
 
1398
                  second_inst_inf                       <= sec_disable;
1399
                  Skip_inf                                      <= not_skip;
1400
                  call_return                           <= none_action;
1401
                  nop_enable                            <= disabled;
1402
                  -- retfie                                             <= disabled;
1403
                  read_D                                                <= enabled;
1404
                  write_D                                               <= d;
1405
 
1406
                  load_FREG                                     <= enabled;
1407
                  read_result                           <= enabled;
1408
                  WREG_write_enable             <= not_d;
1409
                  bit_op_enable                 <= disabled;
1410
                  literal_enable                        <= disabled;
1411
                  MUL_enable                            <= disabled;
1412
                  MOVFF_enable                          <= disabled;
1413
                  -- load_FSRx                                  <= load_disable;
1414
                  load_BSR                                      <= disabled;
1415
                  soft_reset_enable             <= disabled;
1416
                  sleep_mode_enable             <= disabled;
1417
                  clear_watchdog                        <= disabled;
1418
                  -- table_read                         <= disabled;
1419
                  -- INDFx                                              <= enabled;
1420
         when "01" =>                                   -- SUBFWB
1421
                  Command_vector_opu            <= SUBFWB;
1422
                  Command_vector_pc             <= increment;
1423
                  Command_status                        <= allv;
1424
 
1425
                  second_inst_inf                       <= sec_disable;
1426
                  Skip_inf                                      <= not_skip;
1427
                  call_return                           <= none_action;
1428
                  nop_enable                            <= disabled;
1429
                  -- retfie                                             <= disabled;
1430
                  read_D                                                <= enabled;
1431
                  write_D                                               <= d;
1432
 
1433
                  load_FREG                                     <= enabled;
1434
                  read_result                           <= enabled;
1435
                  WREG_write_enable             <= not_d;
1436
                  bit_op_enable                 <= disabled;
1437
                  literal_enable                        <= disabled;
1438
                  MUL_enable                            <= disabled;
1439
                  MOVFF_enable                          <= disabled;
1440
                  -- load_FSRx                                  <= load_disable;
1441
                  load_BSR                                      <= disabled;
1442
                  soft_reset_enable             <= disabled;
1443
                  sleep_mode_enable             <= disabled;
1444
                  clear_watchdog                        <= disabled;
1445
                  -- table_read                         <= disabled;
1446
                  -- INDFx                                              <= enabled;
1447
         when "11" =>                                   -- SUBWF
1448
                  Command_vector_opu            <= SUBWF;
1449
                  Command_vector_pc             <= increment;
1450
                  Command_status                        <= allv;
1451
 
1452
                  second_inst_inf                       <= sec_disable;
1453
                  Skip_inf                                      <= not_skip;
1454
                  call_return                           <= none_action;
1455
                  nop_enable                            <= disabled;
1456
                  -- retfie                                             <= disabled;
1457
                  read_D                                                <= enabled;
1458
                  write_D                                               <= d;
1459
 
1460
                  load_FREG                                     <= enabled;
1461
                  read_result                           <= enabled;
1462
                  WREG_write_enable             <= not_d;
1463
                  bit_op_enable                 <= disabled;
1464
                  literal_enable                        <= disabled;
1465
                  MUL_enable                            <= disabled;
1466
                  MOVFF_enable                          <= disabled;
1467
                  -- load_FSRx                                  <= load_disable;
1468
                  load_BSR                                      <= disabled;
1469
                  soft_reset_enable             <= disabled;
1470
                  sleep_mode_enable             <= disabled;
1471
                  clear_watchdog                        <= disabled;
1472
                  -- table_read                         <= disabled;
1473
                  -- INDFx                                              <= enabled;
1474
         when others =>                         -- SUBWFB
1475
                  Command_vector_opu            <= SUBWFB;
1476
                  Command_vector_pc             <= increment;
1477
                  Command_status                        <= allv;
1478
 
1479
                  second_inst_inf                       <= sec_disable;
1480
                  Skip_inf                                      <= not_skip;
1481
                  call_return                           <= none_action;
1482
                  nop_enable                            <= disabled;
1483
                  -- retfie                                             <= disabled;
1484
                  read_D                                                <= enabled;
1485
                  write_D                                               <= d;
1486
 
1487
                  load_FREG                                     <= enabled;
1488
                  read_result                           <= enabled;
1489
                  WREG_write_enable             <= not_d;
1490
                  bit_op_enable                 <= disabled;
1491
                  literal_enable                        <= disabled;
1492
                  MUL_enable                            <= disabled;
1493
                  MOVFF_enable                          <= disabled;
1494
                  -- load_FSRx                                  <= load_disable;
1495
                  load_BSR                                      <= disabled;
1496
                  soft_reset_enable             <= disabled;
1497
                  sleep_mode_enable             <= disabled;
1498
                  clear_watchdog                        <= disabled;
1499
                  -- table_read                         <= disabled;
1500
                  -- INDFx                                              <= enabled;
1501
         end case;
1502
        when "0110" =>                                  -- class 6
1503
         case Instruction(11 downto 9) is
1504
         when "101" =>                                  -- CLRF
1505
                  Command_vector_opu            <= CLRF;
1506
                  Command_vector_pc             <= increment;
1507
                  Command_status                        <= Z;
1508
 
1509
                  second_inst_inf                       <= sec_disable;
1510
                  Skip_inf                                      <= not_skip;
1511
                  call_return                           <= none_action;
1512
                  nop_enable                            <= disabled;
1513
                  -- retfie                                             <= disabled;
1514
                  read_D                                                <= disabled;
1515
                  write_D                                               <= enabled;
1516
 
1517
                  load_FREG                                     <= disabled;
1518
                  read_result                           <= enabled;
1519
                  WREG_write_enable             <= disabled;
1520
                  bit_op_enable                 <= disabled;
1521
                  literal_enable                        <= disabled;
1522
                  MUL_enable                            <= disabled;
1523
                  MOVFF_enable                          <= disabled;
1524
                  -- load_FSRx                                  <= load_disable;
1525
                  load_BSR                                      <= disabled;
1526
                  soft_reset_enable             <= disabled;
1527
                  sleep_mode_enable             <= disabled;
1528
                  clear_watchdog                        <= disabled;
1529
                  -- table_read                         <= disabled;
1530
                  -- INDFx                                              <= enabled;
1531
         when "001" =>                                  -- CPFSEQ
1532
                  Command_vector_opu            <= CPF;
1533
                  Command_vector_pc             <= increment;
1534
                  Command_status                        <= none;
1535
 
1536
                  second_inst_inf                       <= sec_disable;
1537
                  Skip_inf                                      <= CPFSEQ;
1538
                  call_return                           <= none_action;
1539
                  nop_enable                            <= disabled;
1540
                  -- retfie                                             <= disabled;
1541
                  read_D                                                <= enabled;
1542
                  write_D                                               <= disabled;
1543
 
1544
                  load_FREG                                     <= enabled;
1545
                  read_result                           <= disabled;
1546
                  WREG_write_enable             <= disabled;
1547
                  bit_op_enable                 <= disabled;
1548
                  literal_enable                        <= disabled;
1549
                  MUL_enable                            <= disabled;
1550
                  MOVFF_enable                          <= disabled;
1551
                  -- load_FSRx                                  <= load_disable;
1552
                  load_BSR                                      <= disabled;
1553
                  soft_reset_enable             <= disabled;
1554
                  sleep_mode_enable             <= disabled;
1555
                  clear_watchdog                        <= disabled;
1556
                  -- table_read                         <= disabled;
1557
                  -- INDFx                                              <= enabled;
1558
         when "010" =>                                  -- CPFSGT
1559
                  Command_vector_opu            <= CPF;
1560
                  Command_vector_pc             <= increment;
1561
                  Command_status                        <= none;
1562
 
1563
                  second_inst_inf                       <= sec_disable;
1564
                  Skip_inf                                      <= CPFSGT;
1565
                  call_return                           <= none_action;
1566
                  nop_enable                            <= disabled;
1567
                  -- retfie                                             <= disabled;
1568
                  read_D                                                <= enabled;
1569
                  write_D                                               <= disabled;
1570
 
1571
                  load_FREG                                     <= enabled;
1572
                  read_result                           <= disabled;
1573
                  WREG_write_enable             <= disabled;
1574
                  bit_op_enable                 <= disabled;
1575
                  literal_enable                        <= disabled;
1576
                  MUL_enable                            <= disabled;
1577
                  MOVFF_enable                          <= disabled;
1578
                  -- load_FSRx                                  <= load_disable;
1579
                  load_BSR                                      <= disabled;
1580
                  soft_reset_enable             <= disabled;
1581
                  sleep_mode_enable             <= disabled;
1582
                  clear_watchdog                        <= disabled;
1583
                  -- table_read                         <= disabled;
1584
                  -- INDFx                                              <= enabled;
1585
         when "000" =>                                  -- CPFSLT
1586
                  Command_vector_opu            <= CPF;
1587
                  Command_vector_pc             <= increment;
1588
                  Command_status                        <= none;
1589
 
1590
                  second_inst_inf                       <= sec_disable;
1591
                  Skip_inf                                      <= CPFSLT;
1592
                  call_return                           <= none_action;
1593
                  nop_enable                            <= disabled;
1594
                  -- retfie                                             <= disabled;
1595
                  read_D                                                <= enabled;
1596
                  write_D                                               <= disabled;
1597
 
1598
                  load_FREG                                     <= enabled;
1599
                  read_result                           <= disabled;
1600
                  WREG_write_enable             <= disabled;
1601
                  bit_op_enable                 <= disabled;
1602
                  literal_enable                        <= disabled;
1603
                  MUL_enable                            <= disabled;
1604
                  MOVFF_enable                          <= disabled;
1605
                  -- load_FSRx                                  <= load_disable;
1606
                  load_BSR                                      <= disabled;
1607
                  soft_reset_enable             <= disabled;
1608
                  sleep_mode_enable             <= disabled;
1609
                  clear_watchdog                        <= disabled;
1610
                  -- table_read                         <= disabled;
1611
                  -- INDFx                                              <= enabled;
1612
         when "111" =>                                  -- MOVWF
1613
                  Command_vector_opu            <= MOVWF;
1614
                  Command_vector_pc             <= increment;
1615
                  Command_status                        <= none;
1616
 
1617
                  second_inst_inf                       <= sec_disable;
1618
                  Skip_inf                                      <= not_skip;
1619
                  call_return                           <= none_action;
1620
                  nop_enable                            <= disabled;
1621
                  -- retfie                                             <= disabled;
1622
                  read_D                                                <= disabled;
1623
                  write_D                                               <= enabled;
1624
 
1625
                  load_FREG                                     <= disabled;
1626
                  read_result                           <= enabled;
1627
                  WREG_write_enable             <= disabled;
1628
                  bit_op_enable                 <= disabled;
1629
                  literal_enable                        <= disabled;
1630
                  MUL_enable                            <= disabled;
1631
                  MOVFF_enable                          <= disabled;
1632
                  -- load_FSRx                                  <= load_disable;
1633
                  load_BSR                                      <= disabled;
1634
                  soft_reset_enable             <= disabled;
1635
                  sleep_mode_enable             <= disabled;
1636
                  clear_watchdog                        <= disabled;
1637
                  -- table_read                         <= disabled;
1638
                  -- INDFx                                              <= enabled;
1639
         when "110" =>                                  -- NEGF
1640
                  Command_vector_opu            <= NEGF;
1641
                  Command_vector_pc             <= increment;
1642
                  Command_status                        <= allv;
1643
 
1644
                  second_inst_inf                       <= sec_disable;
1645
                  Skip_inf                                      <= not_skip;
1646
                  call_return                           <= none_action;
1647
                  nop_enable                            <= disabled;
1648
                  -- retfie                                             <= disabled;
1649
                  read_D                                                <= enabled;
1650
                  write_D                                               <= enabled;
1651
 
1652
                  load_FREG                                     <= enabled;
1653
                  read_result                           <= enabled;
1654
                  WREG_write_enable             <= disabled;
1655
                  bit_op_enable                 <= disabled;
1656
                  literal_enable                        <= disabled;
1657
                  MUL_enable                            <= disabled;
1658
                  MOVFF_enable                          <= disabled;
1659
                  -- load_FSRx                                  <= load_disable;
1660
                  load_BSR                                      <= disabled;
1661
                  soft_reset_enable             <= disabled;
1662
                  sleep_mode_enable             <= disabled;
1663
                  clear_watchdog                        <= disabled;
1664
                  -- table_read                         <= disabled;
1665
                  -- INDFx                                              <= enabled;
1666
         when "100" =>                                  -- SETF
1667
                  Command_vector_opu            <= SETF;
1668
                  Command_vector_pc             <= increment;
1669
                  Command_status                        <= none;
1670
 
1671
                  second_inst_inf                       <= sec_disable;
1672
                  Skip_inf                                      <= not_skip;
1673
                  call_return                           <= none_action;
1674
                  nop_enable                            <= disabled;
1675
                  -- retfie                                             <= disabled;
1676
                  read_D                                                <= disabled;
1677
                  write_D                                               <= enabled;
1678
 
1679
                  load_FREG                                     <= disabled;
1680
                  read_result                           <= enabled;
1681
                  WREG_write_enable             <= disabled;
1682
                  bit_op_enable                 <= disabled;
1683
                  literal_enable                        <= disabled;
1684
                  MUL_enable                            <= disabled;
1685
                  MOVFF_enable                          <= disabled;
1686
                  -- load_FSRx                                  <= load_disable;
1687
                  load_BSR                                      <= disabled;
1688
                  soft_reset_enable             <= disabled;
1689
                  sleep_mode_enable             <= disabled;
1690
                  clear_watchdog                        <= disabled;
1691
                  -- table_read                         <= disabled;
1692
                  -- INDFx                                              <= enabled;
1693
         when others =>                         -- TSTFSZ
1694
                  Command_vector_opu            <= MOVF;
1695
                  Command_vector_pc             <= increment;
1696
                  Command_status                        <= none;
1697
 
1698
                  second_inst_inf                       <= sec_disable;
1699
                  Skip_inf                                      <= SZ;
1700
                  call_return                           <= none_action;
1701
                  nop_enable                            <= disabled;
1702
                  -- retfie                                             <= disabled;
1703
                  read_D                                                <= enabled;
1704
                  write_D                                               <= disabled;
1705
 
1706
                  load_FREG                                     <= enabled;
1707
                  read_result                           <= disabled;
1708
                  WREG_write_enable             <= disabled;
1709
                  bit_op_enable                 <= disabled;
1710
                  literal_enable                        <= disabled;
1711
                  MUL_enable                            <= disabled;
1712
                  MOVFF_enable                          <= disabled;
1713
                  -- load_FSRx                                  <= load_disable;
1714
                  load_BSR                                      <= disabled;
1715
                  soft_reset_enable             <= disabled;
1716
                  sleep_mode_enable             <= disabled;
1717
                  clear_watchdog                        <= disabled;
1718
                  -- table_read                         <= disabled;
1719
                  -- INDFx                                              <= enabled;
1720
         end case;
1721
        when "0111" =>                                  -- BTG
1722
                  Command_vector_opu            <= BTG;
1723
                  Command_vector_pc             <= increment;
1724
                  Command_status                        <= none;
1725
 
1726
                  second_inst_inf                       <= sec_disable;
1727
                  Skip_inf                                      <= not_skip;
1728
                  call_return                           <= none_action;
1729
                  nop_enable                            <= disabled;
1730
                  -- retfie                                             <= disabled;
1731
                  read_D                                                <= enabled;
1732
                  write_D                                               <= enabled;
1733
 
1734
                  load_FREG                                     <= enabled;
1735
                  read_result                           <= enabled;
1736
                  WREG_write_enable             <= disabled;
1737
                  bit_op_enable                 <= enabled;
1738
                  literal_enable                        <= disabled;
1739
                  MUL_enable                            <= disabled;
1740
                  MOVFF_enable                          <= disabled;
1741
                  -- load_FSRx                                  <= load_disable;
1742
                  load_BSR                                      <= disabled;
1743
                  soft_reset_enable             <= disabled;
1744
                  sleep_mode_enable             <= disabled;
1745
                  -- table_read                         <= disabled;
1746
                  clear_watchdog                        <= disabled;
1747
                  -- INDFx                                              <= enabled;
1748
        when "1000" =>                                  -- BSF
1749
                  Command_vector_opu            <= BSF;
1750
                  Command_vector_pc             <= increment;
1751
                  Command_status                        <= none;
1752
 
1753
                  second_inst_inf                       <= sec_disable;
1754
                  Skip_inf                                      <= not_skip;
1755
                  call_return                           <= none_action;
1756
                  nop_enable                            <= disabled;
1757
                  -- retfie                                             <= disabled;
1758
                  read_D                                                <= enabled;
1759
                  write_D                                               <= enabled;
1760
 
1761
                  load_FREG                                     <= enabled;
1762
                  read_result                           <= enabled;
1763
                  WREG_write_enable             <= disabled;
1764
                  bit_op_enable                 <= enabled;
1765
                  literal_enable                        <= disabled;
1766
                  MUL_enable                            <= disabled;
1767
                  MOVFF_enable                          <= disabled;
1768
                  -- load_FSRx                                  <= load_disable;
1769
                  load_BSR                                      <= disabled;
1770
                  soft_reset_enable             <= disabled;
1771
                  sleep_mode_enable             <= disabled;
1772
                  clear_watchdog                        <= disabled;
1773
                  -- table_read                         <= disabled;
1774
                  -- INDFx                                              <= enabled;
1775
        when "1001" =>                                  -- BCF
1776
                  Command_vector_opu            <= BCF;
1777
                  Command_vector_pc             <= increment;
1778
                  Command_status                        <= none;
1779
 
1780
                  second_inst_inf                       <= sec_disable;
1781
                  Skip_inf                                      <= not_skip;
1782
                  call_return                           <= none_action;
1783
                  nop_enable                            <= disabled;
1784
                  -- retfie                                             <= disabled;
1785
                  read_D                                                <= enabled;
1786
                  write_D                                               <= enabled;
1787
 
1788
                  load_FREG                                     <= enabled;
1789
                  read_result                           <= enabled;
1790
                  WREG_write_enable             <= disabled;
1791
                  bit_op_enable                 <= enabled;
1792
                  literal_enable                        <= disabled;
1793
                  MUL_enable                            <= disabled;
1794
                  MOVFF_enable                          <= disabled;
1795
                  -- load_FSRx                                  <= load_disable;
1796
                  load_BSR                                      <= disabled;
1797
                  soft_reset_enable             <= disabled;
1798
                  sleep_mode_enable             <= disabled;
1799
                  clear_watchdog                        <= disabled;
1800
                  -- table_read                         <= disabled;
1801
                  -- INDFx                                              <= enabled;
1802
        when "1010" =>                                  -- BTFSS
1803
                  Command_vector_opu            <= BTF;
1804
                  Command_vector_pc             <= increment;
1805
                  Command_status                        <= none;
1806
 
1807
                  second_inst_inf                       <= sec_disable;
1808
                  Skip_inf                                      <= BTFSS;
1809
                  call_return                           <= none_action;
1810
                  nop_enable                            <= disabled;
1811
                  -- retfie                                             <= disabled;
1812
                  read_D                                                <= enabled;
1813
                  write_D                                               <= disabled;
1814
 
1815
                  load_FREG                                     <= enabled;
1816
                  read_result                           <= disabled;
1817
                  WREG_write_enable             <= disabled;
1818
                  bit_op_enable                 <= enabled;
1819
                  literal_enable                        <= disabled;
1820
                  MUL_enable                            <= disabled;
1821
                  MOVFF_enable                          <= disabled;
1822
                  -- load_FSRx                                  <= load_disable;
1823
                  load_BSR                                      <= disabled;
1824
                  soft_reset_enable             <= disabled;
1825
                  sleep_mode_enable             <= disabled;
1826
                  clear_watchdog                        <= disabled;
1827
                  -- table_read                         <= disabled;
1828
                  -- INDFx                                              <= enabled;
1829
        when "1011" =>                                  -- BTFSC
1830
                  Command_vector_opu            <= BTF;
1831
                  Command_vector_pc             <= increment;
1832
                  Command_status                        <= none;
1833
 
1834
                  second_inst_inf                       <= sec_disable;
1835
                  Skip_inf                                      <= BTFSC;
1836
                  call_return                           <= none_action;
1837
                  nop_enable                            <= disabled;
1838
                  -- retfie                                             <= disabled;
1839
                  read_D                                                <= enabled;
1840
                  write_D                                               <= disabled;
1841
 
1842
                  load_FREG                                     <= enabled;
1843
                  read_result                           <= disabled;
1844
                  WREG_write_enable             <= disabled;
1845
                  bit_op_enable                 <= enabled;
1846
                  literal_enable                        <= disabled;
1847
                  MUL_enable                            <= disabled;
1848
                  MOVFF_enable                          <= disabled;
1849
                  -- load_FSRx                                  <= load_disable;
1850
                  load_BSR                                      <= disabled;
1851
                  soft_reset_enable             <= disabled;
1852
                  sleep_mode_enable             <= disabled;
1853
                  clear_watchdog                        <= disabled;
1854
                  -- table_read                         <= disabled;
1855
                  -- INDFx                                              <= enabled;
1856
        when "1100" =>                                  -- MOVFF
1857
                  Command_vector_opu            <= NOP;
1858
                  Command_vector_pc             <= increment;
1859
                  Command_status                        <= none;
1860
 
1861
                  second_inst_inf                       <= sec_MOVFF;
1862
                  Skip_inf                                      <= not_skip;
1863
                  call_return                           <= none_action;
1864
                  nop_enable                            <= disabled;
1865
                  -- retfie                                             <= disabled;
1866
                  read_D                                                <= enabled;
1867
                  write_D                                               <= disabled;
1868
 
1869
                  load_FREG                                     <= enabled;
1870
                  read_result                           <= disabled;
1871
                  WREG_write_enable             <= disabled;
1872
                  bit_op_enable                 <= disabled;
1873
                  literal_enable                        <= disabled;
1874
                  MUL_enable                            <= disabled;
1875
                  MOVFF_enable                          <= enabled;
1876
                  -- load_FSRx                                  <= load_disable;
1877
                  load_BSR                                      <= disabled;
1878
                  soft_reset_enable             <= disabled;
1879
                  sleep_mode_enable             <= disabled;
1880
                  clear_watchdog                        <= disabled;
1881
                  -- table_read                         <= disabled;
1882
                  -- INDFx                                              <= enabled;
1883
        when "1101" =>                                  -- class 13
1884
         case Instruction(11) is
1885
         when '0' =>                                     -- BRA
1886
                  Command_vector_opu            <= NOP;
1887
                  Command_vector_pc             <= branch_inc;
1888
                  Command_status                        <= none;
1889
 
1890
                  second_inst_inf                       <= sec_disable;
1891
                  Skip_inf                                      <= not_skip;
1892
                  call_return                           <= none_action;
1893
                  nop_enable                            <= enabled;
1894
                  -- retfie                                             <= disabled;
1895
                  read_D                                                <= disabled;
1896
                  write_D                                               <= disabled;
1897
 
1898
                  load_FREG                                     <= disabled;
1899
                  read_result                           <= disabled;
1900
                  WREG_write_enable             <= disabled;
1901
                  bit_op_enable                 <= disabled;
1902
                  literal_enable                        <= disabled;
1903
                  MUL_enable                            <= disabled;
1904
                  MOVFF_enable                          <= disabled;
1905
                  -- load_FSRx                                  <= load_disable;
1906
                  load_BSR                                      <= disabled;
1907
                  soft_reset_enable             <= disabled;
1908
                  sleep_mode_enable             <= disabled;
1909
                  clear_watchdog                        <= disabled;
1910
                  -- table_read                         <= disabled;
1911
                  -- INDFx                                              <= disabled;
1912
         when others =>                         -- RCALL
1913
                  Command_vector_opu            <= NOP;
1914
                  Command_vector_pc             <= RCALL;
1915
                  Command_status                        <= none;
1916
 
1917
                  second_inst_inf                       <= sec_disable;
1918
                  Skip_inf                                      <= not_skip;
1919
                  call_return                           <= none_action;
1920
                  nop_enable                            <= enabled;
1921
                  -- retfie                                             <= disabled;
1922
                  read_D                                                <= disabled;
1923
                  write_D                                               <= disabled;
1924
 
1925
                  load_FREG                                     <= disabled;
1926
                  read_result                           <= disabled;
1927
                  WREG_write_enable             <= disabled;
1928
                  bit_op_enable                 <= disabled;
1929
                  literal_enable                        <= disabled;
1930
                  MUL_enable                            <= disabled;
1931
                  MOVFF_enable                          <= disabled;
1932
                  -- load_FSRx                                  <= load_disable;
1933
                  load_BSR                                      <= disabled;
1934
                  soft_reset_enable             <= disabled;
1935
                  sleep_mode_enable             <= disabled;
1936
                  clear_watchdog                        <= disabled;
1937
                  -- table_read                         <= disabled;
1938
                  -- INDFx                                              <= disabled;
1939
         end case;
1940
        when "1110" =>                                  -- class 14
1941
         case Instruction(11 downto 8) is
1942
         when "0010" =>                         -- BC
1943
                  Command_vector_opu            <= NOP;
1944
                  Command_vector_pc             <= BC;
1945
                  Command_status                        <= none;
1946
 
1947
                  second_inst_inf                       <= sec_disable;
1948
                  Skip_inf                                      <= not_skip;
1949
                  call_return                           <= none_action;
1950
                  nop_enable                            <= BC(2);
1951
                  -- retfie                                             <= disabled;
1952
                  read_D                                                <= disabled;
1953
                  write_D                                               <= disabled;
1954
 
1955
                  load_FREG                                     <= disabled;
1956
                  read_result                           <= disabled;
1957
                  WREG_write_enable             <= disabled;
1958
                  bit_op_enable                 <= disabled;
1959
                  literal_enable                        <= disabled;
1960
                  MUL_enable                            <= disabled;
1961
                  MOVFF_enable                          <= disabled;
1962
                  -- load_FSRx                                  <= load_disable;
1963
                  load_BSR                                      <= disabled;
1964
                  soft_reset_enable             <= disabled;
1965
                  sleep_mode_enable             <= disabled;
1966
                  clear_watchdog                        <= disabled;
1967
                  -- table_read                         <= disabled;
1968
                  -- INDFx                                              <= disabled;
1969
         when "0110" =>                         -- BN
1970
                  Command_vector_opu            <= NOP;
1971
                  Command_vector_pc             <= BN;
1972
                  Command_status                        <= none;
1973
 
1974
                  second_inst_inf                       <= sec_disable;
1975
                  Skip_inf                                      <= not_skip;
1976
                  call_return                           <= none_action;
1977
                  nop_enable                            <= BN(2);
1978
                  -- retfie                                             <= disabled;
1979
                  read_D                                                <= disabled;
1980
                  write_D                                               <= disabled;
1981
 
1982
                  load_FREG                                     <= disabled;
1983
                  read_result                           <= disabled;
1984
                  WREG_write_enable             <= disabled;
1985
                  bit_op_enable                 <= disabled;
1986
                  literal_enable                        <= disabled;
1987
                  MUL_enable                            <= disabled;
1988
                  MOVFF_enable                          <= disabled;
1989
                  -- load_FSRx                                  <= load_disable;
1990
                  load_BSR                                      <= disabled;
1991
                  soft_reset_enable             <= disabled;
1992
                  sleep_mode_enable             <= disabled;
1993
                  clear_watchdog                        <= disabled;
1994
                  -- table_read                         <= disabled;
1995
                  -- INDFx                                              <= disabled;
1996
         when "0011" =>                         -- BNC
1997
                  Command_vector_opu            <= NOP;
1998
                  Command_vector_pc             <= BNC;
1999
                  Command_status                        <= none;
2000
 
2001
                  second_inst_inf                       <= sec_disable;
2002
                  Skip_inf                                      <= not_skip;
2003
                  call_return                           <= none_action;
2004
                  nop_enable                            <= BNC(2);
2005
                  -- retfie                                             <= disabled;
2006
                  read_D                                                <= disabled;
2007
                  write_D                                               <= disabled;
2008
 
2009
                  load_FREG                                     <= disabled;
2010
                  read_result                           <= disabled;
2011
                  WREG_write_enable             <= disabled;
2012
                  bit_op_enable                 <= disabled;
2013
                  literal_enable                        <= disabled;
2014
                  MUL_enable                            <= disabled;
2015
                  MOVFF_enable                          <= disabled;
2016
                  -- load_FSRx                                  <= load_disable;
2017
                  load_BSR                                      <= disabled;
2018
                  soft_reset_enable             <= disabled;
2019
                  sleep_mode_enable             <= disabled;
2020
                  clear_watchdog                        <= disabled;
2021
                  -- table_read                         <= disabled;
2022
                  -- INDFx                                              <= disabled;
2023
         when "0111" =>                         -- BNN
2024
                  Command_vector_opu            <= NOP;
2025
                  Command_vector_pc             <= BNN;
2026
                  Command_status                        <= none;
2027
 
2028
                  second_inst_inf                       <= sec_disable;
2029
                  Skip_inf                                      <= not_skip;
2030
                  call_return                           <= none_action;
2031
                  nop_enable                            <= BNN(2);
2032
                  -- retfie                                             <= disabled;
2033
                  read_D                                                <= disabled;
2034
                  write_D                                               <= disabled;
2035
 
2036
                  load_FREG                                     <= disabled;
2037
                  read_result                           <= disabled;
2038
                  WREG_write_enable             <= disabled;
2039
                  bit_op_enable                 <= disabled;
2040
                  literal_enable                        <= disabled;
2041
                  MUL_enable                            <= disabled;
2042
                  MOVFF_enable                          <= disabled;
2043
                  -- load_FSRx                                  <= load_disable;
2044
                  load_BSR                                      <= disabled;
2045
                  soft_reset_enable             <= disabled;
2046
                  sleep_mode_enable             <= disabled;
2047
                  clear_watchdog                        <= disabled;
2048
                  -- table_read                         <= disabled;
2049
                  -- INDFx                                              <= disabled;
2050
         when "0101" =>                         -- BNOV
2051
                  Command_vector_opu            <= NOP;
2052
                  Command_vector_pc             <= BNOV;
2053
                  Command_status                        <= none;
2054
 
2055
                  second_inst_inf                       <= sec_disable;
2056
                  Skip_inf                                      <= not_skip;
2057
                  call_return                           <= none_action;
2058
                  nop_enable                            <= BNOV(2);
2059
                  -- retfie                                             <= disabled;
2060
                  read_D                                                <= disabled;
2061
                  write_D                                               <= disabled;
2062
 
2063
                  load_FREG                                     <= disabled;
2064
                  read_result                           <= disabled;
2065
                  WREG_write_enable             <= disabled;
2066
                  bit_op_enable                 <= disabled;
2067
                  literal_enable                        <= disabled;
2068
                  MUL_enable                            <= disabled;
2069
                  MOVFF_enable                          <= disabled;
2070
                  -- load_FSRx                                  <= load_disable;
2071
                  load_BSR                                      <= disabled;
2072
                  soft_reset_enable             <= disabled;
2073
                  sleep_mode_enable             <= disabled;
2074
                  clear_watchdog                        <= disabled;
2075
                  -- table_read                         <= disabled;
2076
                  -- INDFx                                              <= disabled;
2077
         when "0001" =>                         -- BNZ
2078
                  Command_vector_opu            <= NOP;
2079
                  Command_vector_pc             <= BNZ;
2080
                  Command_status                        <= none;
2081
 
2082
                  second_inst_inf                       <= sec_disable;
2083
                  Skip_inf                                      <= not_skip;
2084
                  call_return                           <= none_action;
2085
                  nop_enable                            <= BNZ(2);
2086
                  -- retfie                                             <= disabled;
2087
                  read_D                                                <= disabled;
2088
                  write_D                                               <= disabled;
2089
 
2090
                  load_FREG                                     <= disabled;
2091
                  read_result                           <= disabled;
2092
                  WREG_write_enable             <= disabled;
2093
                  bit_op_enable                 <= disabled;
2094
                  literal_enable                        <= disabled;
2095
                  MUL_enable                            <= disabled;
2096
                  MOVFF_enable                          <= disabled;
2097
                  -- load_FSRx                                  <= load_disable;
2098
                  load_BSR                                      <= disabled;
2099
                  soft_reset_enable             <= disabled;
2100
                  sleep_mode_enable             <= disabled;
2101
                  clear_watchdog                        <= disabled;
2102
                  -- table_read                         <= disabled;
2103
                  -- INDFx                                              <= disabled;
2104
         when "0100" =>                         -- BOV
2105
                  Command_vector_opu            <= NOP;
2106
                  Command_vector_pc             <= BOV;
2107
                  Command_status                        <= none;
2108
 
2109
                  second_inst_inf                       <= sec_disable;
2110
                  Skip_inf                                      <= not_skip;
2111
                  call_return                           <= none_action;
2112
                  nop_enable                            <= BOV(2);
2113
                  -- retfie                                             <= disabled;
2114
                  read_D                                                <= disabled;
2115
                  write_D                                               <= disabled;
2116
 
2117
                  load_FREG                                     <= disabled;
2118
                  read_result                           <= disabled;
2119
                  WREG_write_enable             <= disabled;
2120
                  bit_op_enable                 <= disabled;
2121
                  literal_enable                        <= disabled;
2122
                  MUL_enable                            <= disabled;
2123
                  MOVFF_enable                          <= disabled;
2124
                  -- load_FSRx                                  <= load_disable;
2125
                  load_BSR                                      <= disabled;
2126
                  soft_reset_enable             <= disabled;
2127
                  sleep_mode_enable             <= disabled;
2128
                  clear_watchdog                        <= disabled;
2129
                  -- table_read                         <= disabled;
2130
                  -- INDFx                                              <= disabled;
2131
         when "0000" =>                         -- BZ
2132
                  Command_vector_opu            <= NOP;
2133
                  Command_vector_pc             <= BZ;
2134
                  Command_status                        <= none;
2135
 
2136
                  second_inst_inf                       <= sec_disable;
2137
                  Skip_inf                                      <= not_skip;
2138
                  call_return                           <= none_action;
2139
                  nop_enable                            <= BZ(2);
2140
                  -- retfie                                             <= disabled;
2141
                  read_D                                                <= disabled;
2142
                  write_D                                               <= disabled;
2143
 
2144
                  load_FREG                                     <= disabled;
2145
                  read_result                           <= disabled;
2146
                  WREG_write_enable             <= disabled;
2147
                  bit_op_enable                 <= disabled;
2148
                  literal_enable                        <= disabled;
2149
                  MUL_enable                            <= disabled;
2150
                  MOVFF_enable                          <= disabled;
2151
                  -- load_FSRx                                  <= load_disable;
2152
                  load_BSR                                      <= disabled;
2153
                  soft_reset_enable             <= disabled;
2154
                  sleep_mode_enable             <= disabled;
2155
                  clear_watchdog                        <= disabled;
2156
                  -- table_read                         <= disabled;
2157
                  -- INDFx                                              <= disabled;
2158
         when "1100" =>                         -- CALL
2159
                  Command_vector_opu            <= NOP;
2160
                  Command_vector_pc             <= CALL1;
2161
                  Command_status                        <= none;
2162
 
2163
                  second_inst_inf                       <= sec_CALL;
2164
                  Skip_inf                                      <= not_skip;
2165
                  call_return                           <= s1&'0';
2166
                  nop_enable                            <= disabled;
2167
                  -- retfie                                             <= disabled;
2168
                  read_D                                                <= disabled;
2169
                  write_D                                               <= disabled;
2170
 
2171
                  load_FREG                                     <= disabled;
2172
                  read_result                           <= disabled;
2173
                  WREG_write_enable             <= disabled;
2174
                  bit_op_enable                 <= disabled;
2175
                  literal_enable                        <= disabled;
2176
                  MUL_enable                            <= disabled;
2177
                  MOVFF_enable                          <= disabled;
2178
                  -- load_FSRx                                  <= load_disable;
2179
                  load_BSR                                      <= disabled;
2180
                  soft_reset_enable             <= disabled;
2181
                  sleep_mode_enable             <= disabled;
2182
                  clear_watchdog                        <= disabled;
2183
                  -- table_read                         <= disabled;
2184
                  -- INDFx                                              <= disabled;
2185
         when "1101" =>                         -- CALL
2186
                  Command_vector_opu            <= NOP;
2187
                  Command_vector_pc             <= CALL1;
2188
                  Command_status                        <= none;
2189
 
2190
                  second_inst_inf                       <= sec_CALL;
2191
                  Skip_inf                                      <= not_skip;
2192
                  call_return                           <= s1&'0';
2193
                  nop_enable                            <= disabled;
2194
                  -- retfie                                             <= disabled;
2195
                  read_D                                                <= disabled;
2196
                  write_D                                               <= disabled;
2197
 
2198
                  load_FREG                                     <= disabled;
2199
                  read_result                           <= disabled;
2200
                  WREG_write_enable             <= disabled;
2201
                  bit_op_enable                 <= disabled;
2202
                  literal_enable                        <= disabled;
2203
                  MUL_enable                            <= disabled;
2204
                  MOVFF_enable                          <= disabled;
2205
                  -- load_FSRx                                  <= load_disable;
2206
                  load_BSR                                      <= disabled;
2207
                  soft_reset_enable             <= disabled;
2208
                  sleep_mode_enable             <= disabled;
2209
                  clear_watchdog                        <= disabled;
2210
                  -- table_read                         <= disabled;
2211
                  -- INDFx                                              <= disabled;
2212
         when "1111" =>                         -- GOTO
2213
                  Command_vector_opu            <= NOP;
2214
                  Command_vector_pc             <= GOTO1;
2215
                  Command_status                        <= none;
2216
 
2217
                  second_inst_inf                       <= sec_GOTO;
2218
                  Skip_inf                                      <= not_skip;
2219
                  call_return                           <= none_action;
2220
                  nop_enable                            <= disabled;
2221
                  -- retfie                                             <= disabled;
2222
                  read_D                                                <= disabled;
2223
                  write_D                                               <= disabled;
2224
 
2225
                  load_FREG                                     <= disabled;
2226
                  read_result                           <= disabled;
2227
                  WREG_write_enable             <= disabled;
2228
                  bit_op_enable                 <= disabled;
2229
                  literal_enable                        <= disabled;
2230
                  MUL_enable                            <= disabled;
2231
                  MOVFF_enable                          <= disabled;
2232
                  -- load_FSRx                                  <= load_disable;
2233
                  load_BSR                                      <= disabled;
2234
                  soft_reset_enable             <= disabled;
2235
                  sleep_mode_enable             <= disabled;
2236
                  clear_watchdog                        <= disabled;
2237
                  -- table_read                         <= disabled;
2238
                  -- INDFx                                              <= disabled;
2239
         when "1110" =>
2240
         case Instruction(7 downto 6) is
2241
         when "00" =>                                   -- LFSR
2242
                  Command_vector_opu            <= NOP;
2243
                  Command_vector_pc             <= increment;
2244
                  Command_status                        <= none;
2245
 
2246
                  second_inst_inf                       <= sec_disable; --sec_LFSRx;
2247
                  Skip_inf                                      <= not_skip;
2248
                  call_return                           <= none_action;
2249
                  nop_enable                            <= disabled;
2250
                  -- retfie                                             <= disabled;
2251
                  read_D                                                <= disabled;
2252
                  write_D                                               <= disabled;
2253
 
2254
                  load_FREG                                     <= disabled;
2255
                  read_result                           <= disabled;
2256
                  WREG_write_enable             <= disabled;
2257
                  bit_op_enable                 <= disabled;
2258
                  literal_enable                        <= disabled;
2259
                  MUL_enable                            <= disabled;
2260
                  MOVFF_enable                          <= disabled;
2261
                  -- load_FSRx                                  <= enable_1stcyc;
2262
                  load_BSR                                      <= disabled;
2263
                  soft_reset_enable             <= disabled;
2264
                  sleep_mode_enable             <= disabled;
2265
                  clear_watchdog                        <= disabled;
2266
                  -- table_read                         <= disabled;
2267
                  -- INDFx                                              <= disabled;
2268
         when others =>                         -- NOP
2269
                  Command_vector_opu            <= NOP;
2270
                  Command_vector_pc             <= increment;
2271
                  Command_status                        <= none;
2272
 
2273
                  second_inst_inf                       <= sec_disable;
2274
                  Skip_inf                                      <= not_skip;
2275
                  call_return                           <= none_action;
2276
                  nop_enable                            <= disabled;
2277
                  -- retfie                                             <= disabled;
2278
                  read_D                                                <= disabled;
2279
                  write_D                                               <= disabled;
2280
 
2281
                  load_FREG                                     <= disabled;
2282
                  read_result                           <= disabled;
2283
                  WREG_write_enable             <= disabled;
2284
                  bit_op_enable                 <= disabled;
2285
                  literal_enable                        <= disabled;
2286
                  MUL_enable                            <= disabled;
2287
                  MOVFF_enable                          <= disabled;
2288
                  -- load_FSRx                                  <= load_disable;
2289
                  load_BSR                                      <= disabled;
2290
                  soft_reset_enable             <= disabled;
2291
                  sleep_mode_enable             <= disabled;
2292
                  clear_watchdog                        <= disabled;
2293
                  -- table_read                         <= disabled;
2294
                  -- INDFx                                              <= disabled;
2295
         end case;
2296
         when others =>                         -- NOP
2297
                  Command_vector_opu            <= NOP;
2298
                  Command_vector_pc             <= increment;
2299
                  Command_status                        <= none;
2300
 
2301
                  second_inst_inf                       <= sec_disable;
2302
                  Skip_inf                                      <= not_skip;
2303
                  call_return                           <= none_action;
2304
                  nop_enable                            <= disabled;
2305
                  -- retfie                                             <= disabled;
2306
                  read_D                                                <= disabled;
2307
                  write_D                                               <= disabled;
2308
 
2309
                  load_FREG                                     <= disabled;
2310
                  read_result                           <= disabled;
2311
                  WREG_write_enable             <= disabled;
2312
                  bit_op_enable                 <= disabled;
2313
                  literal_enable                        <= disabled;
2314
                  MUL_enable                            <= disabled;
2315
                  MOVFF_enable                          <= disabled;
2316
                  -- load_FSRx                                  <= load_disable;
2317
                  load_BSR                                      <= disabled;
2318
                  soft_reset_enable             <= disabled;
2319
                  sleep_mode_enable             <= disabled;
2320
                  clear_watchdog                        <= disabled;
2321
                  -- table_read                         <= disabled;
2322
                  -- INDFx                                              <= disabled;
2323
         end case;
2324
        when others =>                                  -- class 15
2325
                case second_inst_ide is
2326
                when "100" =>                           -- 2nd MOVFF
2327
                  Command_vector_opu            <= MOVF;
2328
                  Command_vector_pc             <= increment;
2329
                  Command_status                        <= none;
2330
 
2331
                  second_inst_inf                       <= sec_disable;
2332
                  Skip_inf                                      <= not_skip;
2333
                  call_return                           <= none_action;
2334
                  nop_enable                            <= disabled;
2335
                  -- retfie                                             <= disabled;
2336
                  read_D                                                <= disabled;
2337
                  write_D                                               <= enabled;
2338
 
2339
                  load_FREG                                     <= disabled;
2340
                  read_result                           <= enabled;
2341
                  WREG_write_enable             <= disabled;
2342
                  bit_op_enable                 <= disabled;
2343
                  literal_enable                        <= disabled;
2344
                  MUL_enable                            <= disabled;
2345
                  MOVFF_enable                          <= enabled;
2346
                  -- load_FSRx                                  <= load_disable;
2347
                  load_BSR                                      <= disabled;
2348
                  soft_reset_enable             <= disabled;
2349
                  sleep_mode_enable             <= disabled;
2350
                  clear_watchdog                        <= disabled;
2351
                  -- table_read                         <= disabled;
2352
                  -- INDFx                                              <= enabled;
2353
                when "101" =>                           -- 2nd LFSR
2354
                  Command_vector_opu            <= NOP;
2355
                  Command_vector_pc             <= increment;
2356
                  Command_status                        <= none;
2357
 
2358
                  second_inst_inf                       <= sec_disable;
2359
                  Skip_inf                                      <= not_skip;
2360
                  call_return                           <= none_action;
2361
                  nop_enable                            <= disabled;
2362
                  -- retfie                                             <= disabled;
2363
                  read_D                                                <= disabled;
2364
                  write_D                                               <= disabled;
2365
 
2366
                  load_FREG                                     <= disabled;
2367
                  read_result                           <= disabled;
2368
                  WREG_write_enable             <= disabled;
2369
                  bit_op_enable                 <= disabled;
2370
                  literal_enable                        <= disabled;
2371
                  MUL_enable                            <= disabled;
2372
                  MOVFF_enable                          <= disabled;
2373
                  -- load_FSRx                                  <= enable_2ndcyc;
2374
                  load_BSR                                      <= disabled;
2375
                  soft_reset_enable             <= disabled;
2376
                  sleep_mode_enable             <= disabled;
2377
                  clear_watchdog                        <= disabled;
2378
                  -- table_read                         <= disabled;
2379
                  -- INDFx                                              <= disabled;
2380
                when "110" =>                           -- 2nd GOTO
2381
                  Command_vector_opu            <= NOP;
2382
                  Command_vector_pc             <= GOTO2;
2383
                  Command_status                        <= none;
2384
 
2385
                  second_inst_inf                       <= sec_disable;
2386
                  Skip_inf                                      <= not_skip;
2387
                  call_return                           <= none_action;
2388
                  nop_enable                            <= disabled;
2389
                  -- retfie                                             <= disabled;
2390
                  read_D                                                <= disabled;
2391
                  write_D                                               <= disabled;
2392
 
2393
                  load_FREG                                     <= disabled;
2394
                  read_result                           <= disabled;
2395
                  WREG_write_enable             <= disabled;
2396
                  bit_op_enable                 <= disabled;
2397
                  literal_enable                        <= disabled;
2398
                  MUL_enable                            <= disabled;
2399
                  MOVFF_enable                          <= disabled;
2400
                  -- load_FSRx                                  <= load_disable;
2401
                  load_BSR                                      <= disabled;
2402
                  soft_reset_enable             <= disabled;
2403
                  sleep_mode_enable             <= disabled;
2404
                  clear_watchdog                        <= disabled;
2405
                  -- table_read                         <= disabled;
2406
                  -- INDFx                                              <= disabled;
2407
                when "111" =>                           -- 2nd CALL
2408
                  Command_vector_opu            <= NOP;
2409
                  Command_vector_pc             <= CALL2;
2410
                  Command_status                        <= none;
2411
 
2412
                  second_inst_inf                       <= sec_disable;
2413
                  Skip_inf                                      <= not_skip;
2414
                  call_return                           <= none_action;
2415
                  nop_enable                            <= disabled;
2416
                  -- retfie                                             <= disabled;
2417
                  read_D                                                <= disabled;
2418
                  write_D                                               <= disabled;
2419
 
2420
                  load_FREG                                     <= disabled;
2421
                  read_result                           <= disabled;
2422
                  WREG_write_enable             <= disabled;
2423
                  bit_op_enable                 <= disabled;
2424
                  literal_enable                        <= disabled;
2425
                  MUL_enable                            <= disabled;
2426
                  MOVFF_enable                          <= disabled;
2427
                  -- load_FSRx                                  <= load_disable;
2428
                  load_BSR                                      <= disabled;
2429
                  soft_reset_enable             <= disabled;
2430
                  sleep_mode_enable             <= disabled;
2431
                  clear_watchdog                        <= disabled;
2432
                  -- table_read                         <= disabled;
2433
                  -- INDFx                                              <= disabled;
2434
                when others =>                          -- NOP
2435
                  Command_vector_opu            <= NOP;
2436
                  Command_vector_pc             <= increment;
2437
                  Command_status                        <= none;
2438
 
2439
                  second_inst_inf                       <= sec_disable;
2440
                  Skip_inf                                      <= not_skip;
2441
                  call_return                           <= none_action;
2442
                  nop_enable                            <= disabled;
2443
                  -- retfie                                             <= disabled;
2444
                  read_D                                                <= disabled;
2445
                  write_D                                               <= disabled;
2446
 
2447
                  load_FREG                                     <= disabled;
2448
                  read_result                           <= disabled;
2449
                  WREG_write_enable             <= disabled;
2450
                  bit_op_enable                 <= disabled;
2451
                  literal_enable                        <= disabled;
2452
                  MUL_enable                            <= disabled;
2453
                  MOVFF_enable                          <= disabled;
2454
                  -- load_FSRx                                  <= load_disable;
2455
                  load_BSR                                      <= disabled;
2456
                  soft_reset_enable             <= disabled;
2457
                  sleep_mode_enable             <= disabled;
2458
                  clear_watchdog                        <= disabled;
2459
                  -- table_read                         <= disabled;
2460
                  -- INDFx                                              <= disabled;
2461
                end case;
2462
        end case;
2463
  end process;
2464
 
2465
end Decode;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.