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

Subversion Repositories t48

[/] [t48/] [tags/] [rel_0_2_beta/] [rtl/] [vhdl/] [decoder.vhd] - Blame information for rev 329

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 arniml
-------------------------------------------------------------------------------
2
--
3
-- The Decoder unit.
4
-- It decodes the instruction opcodes and executes them.
5
--
6 106 arniml
-- $Id: decoder.vhd,v 1.13 2004-05-20 21:51:40 arniml Exp $
7 4 arniml
--
8
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
9
--
10
-- All rights reserved
11
--
12
-- Redistribution and use in source and synthezised forms, with or without
13
-- modification, are permitted provided that the following conditions are met:
14
--
15
-- Redistributions of source code must retain the above copyright notice,
16
-- this list of conditions and the following disclaimer.
17
--
18
-- Redistributions in synthesized form must reproduce the above copyright
19
-- notice, this list of conditions and the following disclaimer in the
20
-- documentation and/or other materials provided with the distribution.
21
--
22
-- Neither the name of the author nor the names of other contributors may
23
-- be used to endorse or promote products derived from this software without
24
-- specific prior written permission.
25
--
26
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
28
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
30
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36
-- POSSIBILITY OF SUCH DAMAGE.
37
--
38
-- Please report bugs to the author, but before you do so, please
39
-- make sure that this is not a derivative work and that
40
-- you have the latest version of this file.
41
--
42
-- The latest version of this file can be found at:
43
--      http://www.opencores.org/cvsweb.shtml/t48/
44
--
45
-------------------------------------------------------------------------------
46
 
47
library ieee;
48
use ieee.std_logic_1164.all;
49
 
50
use work.t48_pack.word_t;
51
use work.t48_pack.mstate_t;
52
use work.alu_pack.alu_op_t;
53
use work.cond_branch_pack.all;
54
use work.dmem_ctrl_pack.all;
55
use work.pmem_ctrl_pack.all;
56
 
57
entity decoder is
58
 
59
  generic (
60
    -- store mnemonic in flip-flops (registered-out)
61
    register_mnemonic_g   : integer := 1
62
  );
63
 
64
  port (
65
    -- Global Interface -------------------------------------------------------
66
    clk_i                  : in  std_logic;
67
    res_i                  : in  std_logic;
68
    en_clk_i               : in  boolean;
69
    ea_i                   : in  std_logic;
70
    ale_i                  : in  boolean;
71
    int_n_i                : in  std_logic;
72
    t0_dir_o               : out std_logic;
73
    -- T48 Bus Interface ------------------------------------------------------
74
    data_i                 : in  word_t;
75
    data_o                 : out word_t;
76
    stack_high_o           : out boolean;
77
    alu_write_accu_o       : out boolean;
78
    alu_write_shadow_o     : out boolean;
79
    alu_write_temp_reg_o   : out boolean;
80
    alu_read_alu_o         : out boolean;
81
    bus_write_bus_o        : out boolean;
82
    bus_read_bus_o         : out boolean;
83
    dm_write_dmem_addr_o   : out boolean;
84
    dm_write_dmem_o        : out boolean;
85
    dm_read_dmem_o         : out boolean;
86
    p1_write_p1_o          : out boolean;
87
    p1_read_p1_o           : out boolean;
88
    p2_write_p2_o          : out boolean;
89
    p2_write_exp_o         : out boolean;
90
    p2_read_p2_o           : out boolean;
91 21 arniml
    p2_read_exp_o          : out boolean;
92 4 arniml
    pm_write_pcl_o         : out boolean;
93
    pm_read_pcl_o          : out boolean;
94
    pm_write_pch_o         : out boolean;
95
    pm_read_pch_o          : out boolean;
96
    pm_read_pmem_o         : out boolean;
97
    psw_read_psw_o         : out boolean;
98
    psw_read_sp_o          : out boolean;
99
    psw_write_psw_o        : out boolean;
100
    psw_write_sp_o         : out boolean;
101
    -- ALU Interface ----------------------------------------------------------
102
    alu_carry_i            : in  std_logic;
103
    alu_op_o               : out alu_op_t;
104
    alu_use_carry_o        : out boolean;
105 27 arniml
    alu_da_high_o          : out boolean;
106 38 arniml
    alu_accu_low_o         : out boolean;
107 27 arniml
    alu_p06_temp_reg_o     : out boolean;
108
    alu_p60_temp_reg_o     : out boolean;
109
    alu_da_overflow_i      : in  boolean;
110 4 arniml
    -- BUS Interface ----------------------------------------------------------
111
    bus_output_pcl_o       : out boolean;
112
    bus_bidir_bus_o        : out boolean;
113
    -- Clock Controller Interface ---------------------------------------------
114
    clk_multi_cycle_o      : out boolean;
115
    clk_assert_psen_o      : out boolean;
116
    clk_assert_prog_o      : out boolean;
117
    clk_assert_rd_o        : out boolean;
118
    clk_assert_wr_o        : out boolean;
119
    clk_mstate_i           : in  mstate_t;
120
    clk_second_cycle_i     : in  boolean;
121
    -- Conditional Branch Logic Interface -------------------------------------
122
    cnd_compute_take_o     : out boolean;
123
    cnd_branch_cond_o      : out branch_conditions_t;
124
    cnd_take_branch_i      : in  boolean;
125
    cnd_comp_value_o       : out comp_value_t;
126
    cnd_f1_o               : out std_logic;
127
    cnd_tf_o               : out std_logic;
128
    -- Data Memory Controller Interface ---------------------------------------
129
    dm_addr_type_o         : out dmem_addr_ident_t;
130
    -- Port 1 Interface -------------------------------------------------------
131
    p1_read_reg_o          : out boolean;
132
    -- Port 2 Interface -------------------------------------------------------
133
    p2_read_reg_o          : out boolean;
134
    p2_output_pch_o        : out boolean;
135
    p2_output_exp_o        : out boolean;
136
    -- Program Memory Controller Interface ------------------------------------
137
    pm_inc_pc_o            : out boolean;
138
    pm_write_pmem_addr_o   : out boolean;
139
    pm_addr_type_o         : out pmem_addr_ident_t;
140
    -- Program Status Word Interface ------------------------------------------
141
    psw_special_data_o     : out std_logic;
142
    psw_carry_i            : in  std_logic;
143 27 arniml
    psw_aux_carry_i        : in  std_logic;
144 4 arniml
    psw_f0_i               : in  std_logic;
145
    psw_inc_stackp_o       : out boolean;
146
    psw_dec_stackp_o       : out boolean;
147
    psw_write_carry_o      : out boolean;
148
    psw_write_aux_carry_o  : out boolean;
149
    psw_write_f0_o         : out boolean;
150
    psw_write_bs_o         : out boolean;
151
    -- Timer Interface --------------------------------------------------------
152
    tim_read_timer_o       : out boolean;
153
    tim_write_timer_o      : out boolean;
154
    tim_start_t_o          : out boolean;
155
    tim_start_cnt_o        : out boolean;
156
    tim_stop_tcnt_o        : out boolean;
157
    tim_overflow_i         : in  boolean
158
  );
159
 
160
end decoder;
161
 
162
 
163
use work.t48_pack.all;
164
use work.alu_pack.all;
165
use work.decoder_pack.all;
166
 
167
use work.t48_comp_pack.opc_decoder;
168
use work.t48_comp_pack.int;
169
 
170 53 arniml
-- pragma translate_off
171
use work.t48_tb_pack.tb_istrobe_s;
172
-- pragma translate_on
173
 
174 4 arniml
architecture rtl of decoder is
175
 
176 92 arniml
  -- Enable fixing a bug of Quartus II 4.0
177
  constant enable_quartus_bugfix_c : boolean := true;
178
 
179 4 arniml
  -- Opcode Decoder
180
  signal opc_multi_cycle_s : boolean;
181
  signal opc_read_bus_s    : boolean;
182
  signal opc_inj_int_s     : boolean;
183
  signal opc_opcode_s      : word_t;
184
  signal opc_mnemonic_s    : mnemonic_t;
185
  signal last_cycle_s      : boolean;
186
 
187
  -- state translators
188
  signal assert_psen_s     : boolean;
189
 
190
  -- branch taken handshake
191
  signal branch_taken_s,
192
         branch_taken_q        : boolean;
193
  signal pm_inc_pc_s           : boolean;
194
  signal pm_write_pmem_addr_s  : boolean;
195
  -- additional signal to increment PC during CALL
196
  signal add_inc_pc_s          : boolean;
197
  -- addtional signal to set PC during RET(R)
198
  signal add_write_pmem_addr_s : boolean;
199
 
200
  -- Flag 1
201
  signal clear_f1_s,
202
         cpl_f1_s          : boolean;
203
  signal f1_q              : std_logic;
204
  -- memory bank select
205
  signal clear_mb_s,
206
         set_mb_s          : boolean;
207
  signal mb_q              : std_logic;
208
 
209
  -- T0 direction selection
210
  signal ent0_clk_s        : boolean;
211
  signal t0_dir_q          : std_logic;
212
 
213
  signal data_s            : word_t;
214
  signal read_dec_s        : boolean;
215
 
216
  signal tf_s              : std_logic;
217
 
218
  signal bus_read_bus_s    : boolean;
219
  signal add_read_bus_s    : boolean;
220
 
221
  signal dm_write_dmem_s   : boolean;
222
 
223
  -- interrupt handling
224
  signal jtf_executed_s    : boolean;
225
  signal en_tcnti_s        : boolean;
226
  signal dis_tcnti_s       : boolean;
227
  signal en_i_s            : boolean;
228
  signal dis_i_s           : boolean;
229
  signal tim_int_s         : boolean;
230
  signal retr_executed_s   : boolean;
231
  signal int_executed_s    : boolean;
232
  signal int_pending_s     : boolean;
233
 
234 38 arniml
  -- pragma translate_off
235 64 arniml
  signal istrobe_res_q     : std_logic;
236
  signal istrobe_q         : std_logic;
237 60 arniml
  signal injected_int_q    : std_logic;
238 38 arniml
  -- pragma translate_on
239
 
240 4 arniml
begin
241
 
242
  -----------------------------------------------------------------------------
243
  -- Opcode Decoder
244
  -----------------------------------------------------------------------------
245
  opc_decoder_b : opc_decoder
246
    generic map (
247
      register_mnemonic_g => register_mnemonic_g
248
    )
249
    port map (
250
      clk_i         => clk_i,
251
      res_i         => res_i,
252
      en_clk_i      => en_clk_i,
253
      data_i        => data_i,
254
      read_bus_i    => opc_read_bus_s,
255
      inj_int_i     => opc_inj_int_s,
256
      opcode_o      => opc_opcode_s,
257
      mnemonic_o    => opc_mnemonic_s,
258
      multi_cycle_o => opc_multi_cycle_s
259
    );
260
 
261
 
262
  -----------------------------------------------------------------------------
263
  -- Interrupt Controller.
264
  -----------------------------------------------------------------------------
265
  int_b : int
266
    port map (
267
      clk_i           => clk_i,
268
      res_i           => res_i,
269
      en_clk_i        => en_clk_i,
270
      clk_mstate_i    => clk_mstate_i,
271
      jtf_executed_i  => jtf_executed_s,
272
      tim_overflow_i  => tim_overflow_i,
273
      tf_o            => tf_s,
274
      en_tcnti_i      => en_tcnti_s,
275
      dis_tcnti_i     => dis_tcnti_s,
276
      int_n_i         => int_n_i,
277
      ale_i           => ale_i,
278
      last_cycle_i    => last_cycle_s,
279
      en_i_i          => en_i_s,
280
      dis_i_i         => dis_i_s,
281
      ext_int_o       => open,
282
      tim_int_o       => tim_int_s,
283
      retr_executed_i => retr_executed_s,
284
      int_executed_i  => int_executed_s,
285
      int_pending_o   => int_pending_s
286
    );
287
 
288
  last_cycle_s <= not opc_multi_cycle_s or
289
                  (opc_multi_cycle_s and clk_second_cycle_i);
290
 
291
  -----------------------------------------------------------------------------
292
  -- Process machine_cycle
293
  --
294
  -- Purpose:
295
  --   Generates the control signals that are basically needed for the
296
  --   handling of a machine cycle.
297
  --
298
  machine_cycle: process (clk_mstate_i,
299
                          clk_second_cycle_i,
300 64 arniml
                          last_cycle_s,
301 4 arniml
                          ea_i,
302
                          assert_psen_s,
303
                          branch_taken_q,
304
                          int_pending_s)
305
 
306
   variable need_address_v      : boolean;
307
 
308
  begin
309
    -- default assignments
310
    clk_assert_psen_o    <= false;
311
    pm_inc_pc_s          <= false;
312
    pm_write_pmem_addr_s <= false;
313
    pm_read_pmem_o       <= false;
314
    bus_output_pcl_o     <= false;
315
    p2_output_pch_o      <= false;
316
    opc_read_bus_s       <= false;
317
    opc_inj_int_s        <= false;
318
    bus_read_bus_s       <= false;
319
 
320
    need_address_v    := not clk_second_cycle_i or
321
                         (clk_second_cycle_i and assert_psen_s);
322
 
323
    case clk_mstate_i is
324
      when MSTATE1 =>
325
        if need_address_v and not int_pending_s then
326
          if ea_i = '0' then
327
            pm_read_pmem_o  <= true;
328
          else
329
            bus_read_bus_s  <= true;
330 64 arniml
            p2_output_pch_o <= true;
331 4 arniml
          end if;
332
        end if;
333
 
334
        if not clk_second_cycle_i then
335
          if not int_pending_s then
336
            opc_read_bus_s  <= true;
337
          else
338
            opc_inj_int_s   <= true;    -- inject interrupt call
339
          end if;
340
        end if;
341
 
342
      when MSTATE2 =>
343
        if need_address_v and not branch_taken_q and
344
           not int_pending_s then
345
          pm_inc_pc_s       <= true;
346
        end if;
347
 
348
      when MSTATE3 =>
349
        if need_address_v then
350 106 arniml
          -- Theory of operation:
351
          -- Program Memory address is updated at end of State 3 (or end of
352
          -- State 2 in case of a RET). Address information is thus available
353
          -- latest with State 4.
354
          -- This is the time where we need information about access target
355
          -- (internal or external = EA). EA information needs to be stable
356
          -- until end of State 1.
357 4 arniml
          pm_write_pmem_addr_s <= true;
358 64 arniml
        end if;
359 4 arniml
 
360
      when MSTATE4 =>
361 64 arniml
        if ea_i = '1' and
362
           (need_address_v or last_cycle_s) then
363 4 arniml
          clk_assert_psen_o <= true;
364 64 arniml
          p2_output_pch_o   <= true;
365
          bus_output_pcl_o  <= true;
366 4 arniml
        end if;
367
 
368
      when MSTATE5 =>
369 64 arniml
        if ea_i = '1' and
370 106 arniml
           (need_address_v or last_cycle_s) then
371 64 arniml
          p2_output_pch_o   <= true;
372 4 arniml
        end if;
373
 
374
      when others =>
375
        -- pragma translate_off
376
        assert false
377
          report "Unkown machine state!"
378
          severity error;
379
        -- pragma translate_on
380
 
381
    end case;
382
 
383
  end process machine_cycle;
384
  --
385
  -----------------------------------------------------------------------------
386
 
387
 
388
  -----------------------------------------------------------------------------
389
  -- Process decode
390
  --
391
  -- Purpose:
392
  --   Indentifies each single instruction and steps through the related
393
  --   execution sequence.
394
  --
395
  decode: process (alu_carry_i,
396 27 arniml
                   psw_aux_carry_i,
397
                   alu_da_overflow_i,
398 4 arniml
                   clk_mstate_i,
399
                   clk_second_cycle_i,
400
                   cnd_take_branch_i,
401
                   opc_opcode_s,
402
                   opc_mnemonic_s,
403
                   psw_carry_i,
404
                   psw_f0_i,
405
                   f1_q,
406
                   mb_q,
407
                   tim_int_s,
408
                   int_pending_s)
409
 
410
    procedure address_indirect_3_f is
411
    begin
412
      -- apply dmem address from selected register for indirect mode
413 92 arniml
      if opc_opcode_s(3) = '0' or enable_quartus_bugfix_c then
414 4 arniml
        dm_read_dmem_o       <= true;
415
        dm_write_dmem_addr_o <= true;
416
        dm_addr_type_o       <= DM_PLAIN;
417
      end if;
418
    end;
419
 
420
    procedure and_or_xor_add_4_f is
421
    begin
422
      -- write dmem contents to Temp Reg
423
      dm_read_dmem_o         <= true;
424
      alu_write_temp_reg_o   <= true;
425
    end;
426
 
427
    procedure and_or_xor_add_5_f (alu_op : alu_op_t) is
428
    begin
429
      -- perform ALU operation and store in Accumulator
430
      alu_op_o               <= alu_op;
431
      alu_read_alu_o         <= true;
432
      alu_write_accu_o       <= true;
433
    end;
434
 
435
    procedure cond_jump_c2_m1_f is
436
    begin
437
      -- store address in Program Counter low byte if branch has to
438
      -- be taken
439 92 arniml
--      if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
440 4 arniml
        pm_write_pcl_o       <= true;
441
        branch_taken_s       <= true;
442 92 arniml
--      end if;
443 4 arniml
    end;
444
 
445
  begin
446
    -- default assignments
447
    data_s                 <= (others => '-');
448
    read_dec_s             <= false;
449
    branch_taken_s         <= false;
450
    clear_f1_s             <= false;
451
    cpl_f1_s               <= false;
452
    clear_mb_s             <= false;
453
    set_mb_s               <= false;
454
    add_inc_pc_s           <= false;
455
    assert_psen_s          <= false;
456
    stack_high_o           <= false;
457
    alu_write_accu_o       <= false;
458
    alu_write_shadow_o     <= false;
459
    alu_write_temp_reg_o   <= false;
460 27 arniml
    alu_p06_temp_reg_o     <= false;
461
    alu_p60_temp_reg_o     <= false;
462 4 arniml
    alu_read_alu_o         <= false;
463
    bus_write_bus_o        <= false;
464
    bus_bidir_bus_o        <= false;
465
    dm_write_dmem_addr_o   <= false;
466
    dm_write_dmem_s        <= false;
467
    dm_read_dmem_o         <= false;
468
    pm_write_pcl_o         <= false;
469
    pm_read_pcl_o          <= false;
470
    pm_write_pch_o         <= false;
471
    pm_read_pch_o          <= false;
472
    pm_addr_type_o         <= PM_PC;
473
    psw_read_psw_o         <= false;
474
    psw_read_sp_o          <= false;
475
    psw_write_psw_o        <= false;
476
    psw_write_sp_o         <= false;
477
    alu_op_o               <= ALU_NOP;
478
    alu_use_carry_o        <= false;
479 27 arniml
    alu_da_high_o          <= false;
480 38 arniml
    alu_accu_low_o         <= false;
481 4 arniml
    clk_assert_prog_o      <= false;
482
    clk_assert_rd_o        <= false;
483
    clk_assert_wr_o        <= false;
484
    cnd_branch_cond_o      <= COND_ON_BIT;
485
    cnd_compute_take_o     <= false;
486
    cnd_comp_value_o       <= opc_opcode_s(7 downto 5);
487
    dm_addr_type_o         <= DM_REG;
488
    tim_read_timer_o       <= false;
489
    tim_write_timer_o      <= false;
490
    tim_start_t_o          <= false;
491
    tim_start_cnt_o        <= false;
492
    tim_stop_tcnt_o        <= false;
493
    p1_write_p1_o          <= false;
494
    p1_read_p1_o           <= false;
495
    p1_read_reg_o          <= false;
496
    p2_write_p2_o          <= false;
497
    p2_write_exp_o         <= false;
498
    p2_read_p2_o           <= false;
499
    p2_read_reg_o          <= false;
500 21 arniml
    p2_read_exp_o          <= false;
501
    p2_output_exp_o        <= false;
502 4 arniml
    psw_special_data_o     <= '0';
503
    psw_inc_stackp_o       <= false;
504
    psw_dec_stackp_o       <= false;
505
    psw_write_carry_o      <= false;
506
    psw_write_aux_carry_o  <= false;
507
    psw_write_f0_o         <= false;
508
    psw_write_bs_o         <= false;
509
    jtf_executed_s         <= false;
510
    en_tcnti_s             <= false;
511
    dis_tcnti_s            <= false;
512
    en_i_s                 <= false;
513
    dis_i_s                <= false;
514
    retr_executed_s        <= false;
515
    int_executed_s         <= false;
516
    add_write_pmem_addr_s  <= false;
517
    ent0_clk_s             <= false;
518
    add_read_bus_s         <= false;
519
 
520
    -- prepare potential register indirect address mode
521
    if not clk_second_cycle_i and clk_mstate_i = MSTATE2 then
522
      data_s               <= (others => '0');
523
      if opc_opcode_s(3) = '1' then
524
        data_s(2 downto 0) <= opc_opcode_s(2 downto 0);
525
      else
526
        data_s(2 downto 0) <= "00" & opc_opcode_s(0);
527
      end if;
528
 
529
      read_dec_s           <= true;
530
      dm_write_dmem_addr_o <= true;
531
      dm_addr_type_o       <= DM_REG;
532
    end if;
533
 
534
    case opc_mnemonic_s is
535
 
536
      -- Mnemonic ADD ---------------------------------------------------------
537
      when MN_ADD =>
538
        case clk_mstate_i is
539
          -- read RAM once for indirect address mode
540
          when MSTATE3 =>
541 92 arniml
            if not enable_quartus_bugfix_c or
542
               opc_opcode_s(3) = '0' then
543
              address_indirect_3_f;
544
            end if;
545 4 arniml
 
546
          -- store data from RAM to Temp Reg
547
          when MSTATE4 =>
548
            and_or_xor_add_4_f;
549
 
550
          -- perform ADD and store in Accumulator
551
          when MSTATE5 =>
552
            and_or_xor_add_5_f(alu_op => ALU_ADD);
553
 
554
            if opc_opcode_s(4) = '1' then
555 27 arniml
              alu_use_carry_o     <= true;
556 4 arniml
            end if;
557
 
558 27 arniml
            psw_special_data_o    <= alu_carry_i;
559
            psw_write_carry_o     <= true;
560
            psw_write_aux_carry_o <= true;
561 4 arniml
 
562
          when others =>
563
            null;
564
 
565
        end case;
566
 
567
      -- Mnemonic ADD_A_DATA --------------------------------------------------
568
      when MN_ADD_A_DATA =>
569 27 arniml
        assert_psen_s               <= true;
570 4 arniml
 
571
        if clk_second_cycle_i then
572
          case clk_mstate_i is
573
            -- write Temp Reg when contents of Program Memory is on bus
574
            when MSTATE1 =>
575 27 arniml
              alu_write_temp_reg_o  <= true;
576 4 arniml
 
577
            -- perform ADD and store in Accumulator
578
            when MSTATE3 =>
579
              and_or_xor_add_5_f(alu_op => ALU_ADD);
580
 
581
              if opc_opcode_s(4) = '1' then
582 27 arniml
                alu_use_carry_o     <= true;
583 4 arniml
              end if;
584
 
585 27 arniml
              psw_special_data_o    <= alu_carry_i;
586
              psw_write_carry_o     <= true;
587
              psw_write_aux_carry_o <= true;
588 4 arniml
 
589
            when others =>
590
              null;
591
 
592
          end case;
593
 
594
        end if;
595
 
596
      -- Mnemonic ANL ---------------------------------------------------------
597
      when MN_ANL =>
598
        case clk_mstate_i is
599
          -- read RAM once for indirect address mode
600
          when MSTATE3 =>
601 92 arniml
            if not enable_quartus_bugfix_c or
602
               opc_opcode_s(3) = '0' then
603
              address_indirect_3_f;
604
            end if;
605 4 arniml
 
606
          -- store data from RAM to Temp Reg
607
          when MSTATE4 =>
608
            and_or_xor_add_4_f;
609
 
610
          -- perform AND and store in Accumulator
611
          when MSTATE5 =>
612
            and_or_xor_add_5_f(alu_op => ALU_AND);
613
 
614
          when others =>
615
            null;
616
 
617
        end case;
618
 
619
      -- Mnemonic ANL_A_DATA --------------------------------------------------
620
      when MN_ANL_A_DATA =>
621
        assert_psen_s              <= true;
622
 
623
        if clk_second_cycle_i then
624
          case clk_mstate_i is
625
            -- write Temp Reg when contents of Program Memory is on bus
626
            when MSTATE1 =>
627
              alu_write_temp_reg_o <= true;
628
 
629
            -- perform AND and store in Accumulator
630
            when MSTATE3 =>
631
              and_or_xor_add_5_f(alu_op => ALU_AND);
632
 
633
            when others =>
634
              null;
635
 
636
          end case;
637
 
638
        end if;
639
 
640
      -- Mnemonic ANL_EXT -----------------------------------------------------
641
      when MN_ANL_EXT =>
642
        assert_psen_s            <= true;
643
 
644
        if not clk_second_cycle_i then
645
          -- read port to Temp Reg
646
          if clk_mstate_i = MSTATE5 then
647
            if opc_opcode_s(1 downto 0) = "00" then
648
              add_read_bus_s     <= true;
649
            elsif opc_opcode_s(1) = '0' then
650
              p1_read_p1_o       <= true;
651
              p1_read_reg_o      <= true;
652
            else
653
              p2_read_p2_o       <= true;
654
              p2_read_reg_o      <= true;
655
            end if;
656
 
657
            alu_write_temp_reg_o <= true;
658
          end if;
659
 
660
        else
661
          case clk_mstate_i is
662
            -- write shadow Accumulator when contents of Program Memory is
663
            -- on bus
664
            when MSTATE1 =>
665
              alu_write_shadow_o <= true;
666
 
667
            -- loop shadow Accumulator through ALU to prevent update from
668
            -- real Accumulator
669
            when MSTATE2 =>
670
              alu_read_alu_o     <= true;
671
              alu_write_shadow_o <= true;
672
 
673
            -- write result of AND operation back to port
674
            when MSTATE3 =>
675
              alu_op_o           <= ALU_AND;
676
              alu_read_alu_o     <= true;
677
 
678
              if opc_opcode_s(1 downto 0) = "00" then
679
                bus_write_bus_o  <= true;
680
              elsif opc_opcode_s(1) = '0' then
681
                p1_write_p1_o    <= true;
682
              else
683
                p2_write_p2_o    <= true;
684
              end if;
685
 
686
            when others =>
687
              null;
688
 
689
          end case;
690
 
691
        end if;
692
 
693
      -- Mnemonic CALL --------------------------------------------------------
694
      when MN_CALL =>
695
        assert_psen_s              <= true;
696
 
697
        if not clk_second_cycle_i then
698
          case clk_mstate_i is
699
            -- read Stack Pointer and address Data Memory for low byte
700
            -- also increment Program Counter to point to next instruction
701
            when MSTATE3 =>
702
              psw_read_sp_o        <= true;
703
              dm_write_dmem_addr_o <= true;
704
              dm_addr_type_o       <= DM_STACK;
705
 
706
              -- only increment PC if this is not an injected CALL
707
              -- injected CALLS are not located in Program Memory,
708
              -- the PC points already to the instruction to be executed
709
              -- after the interrupt
710
              if not int_pending_s then
711
                add_inc_pc_s       <= true;
712
              end if;
713
 
714
            -- store Program Counter low byte on stack
715
            when MSTATE4 =>
716
              pm_read_pcl_o        <= true;
717
              dm_write_dmem_s      <= true;
718
 
719
            -- store Program Counter high byte and PSW on stack
720
            -- increment Stack pointer
721
            when MSTATE5 =>
722
              psw_read_psw_o       <= true;
723
              pm_read_pch_o        <= true;
724
              dm_write_dmem_addr_o <= true;
725
              dm_addr_type_o       <= DM_STACK_HIGH;
726
              dm_write_dmem_s      <= true;
727
              psw_inc_stackp_o     <= true;
728
 
729
            when others =>
730
              null;
731
 
732
          end case;
733
 
734
        else
735
          case clk_mstate_i is
736
            -- store address in Program Counter low byte
737
            when MSTATE1 =>
738
              pm_write_pcl_o       <= true;
739
              branch_taken_s       <= true;
740
              if int_pending_s then
741
                -- apply low part of vector address manually
742
                data_s             <= (others => '0');
743
                data_s(1 downto 0) <= "11";
744
                if tim_int_s then
745
                  data_s(2)        <= '1';
746
                end if;
747
                read_dec_s         <= true;
748
              end if;
749
 
750
            when MSTATE2 =>
751
              pm_write_pch_o       <= true;
752
              read_dec_s           <= true;
753
              if not int_pending_s then
754
                -- store high part of target address in Program Counter
755
                data_s             <= "0000" & mb_q & opc_opcode_s(7 downto 5);
756
              else
757
                -- apply high part of vector address manually
758
                data_s             <= (others => '0');
759
                int_executed_s     <= true;
760
              end if;
761
 
762
            when others =>
763
              null;
764
 
765
          end case;
766
 
767
        end if;
768
 
769
      -- Mnemonic CLR_A -------------------------------------------------------
770
      when MN_CLR_A =>
771
        -- write CLR output of ALU to Accumulator
772
        if clk_mstate_i = MSTATE3 then
773
          alu_op_o         <= ALU_CLR;
774
          alu_read_alu_o   <= true;
775
          alu_write_accu_o <= true;
776
        end if;
777
 
778
      -- Mnemonic CLR_C -------------------------------------------------------
779
      when MN_CLR_C =>
780
        -- store 0 to Carry
781
        if clk_mstate_i = MSTATE3 then
782
          psw_special_data_o <= '0';
783
          psw_write_carry_o  <= true;
784
        end if;
785
 
786
      -- Mnemonic CLR_F -------------------------------------------------------
787
      when MN_CLR_F =>
788
        -- store 0 to selected flag
789
        if clk_mstate_i = MSTATE3 then
790
          if opc_opcode_s(5) = '0' then
791
            psw_special_data_o <= '0';
792
            psw_write_f0_o     <= true;
793
          else
794
            clear_f1_s         <= true;
795
          end if;
796
 
797
        end if;
798
 
799
      -- Mnemonic CPL_A -------------------------------------------------------
800
      when MN_CPL_A =>
801
        -- write CPL output of ALU to Accumulator
802
        if clk_mstate_i = MSTATE3 then
803
          alu_op_o         <= ALU_CPL;
804
          alu_read_alu_o   <= true;
805
          alu_write_accu_o <= true;
806
        end if;
807
 
808
      -- Mnemnonic CPL_C ------------------------------------------------------
809
      when MN_CPL_C =>
810
        -- write inverse of Carry to PSW
811
        if clk_mstate_i = MSTATE3 then
812
          psw_special_data_o <= not psw_carry_i;
813
          psw_write_carry_o  <= true;
814
        end if;
815
 
816
      -- Mnemonic CPL_F -------------------------------------------------------
817
      when MN_CPL_f =>
818
        -- write inverse of selected flag back to flag
819
        if clk_mstate_i = MSTATE3 then
820
          if opc_opcode_s(5) = '0' then
821
            psw_special_data_o <= not psw_f0_i;
822
            psw_write_f0_o     <= true;
823
          else
824
            cpl_f1_s           <= true;
825
          end if;
826
 
827
        end if;
828
 
829 27 arniml
      -- Mnemonic DA ----------------------------------------------------------
830
      when MN_DA =>
831
        alu_op_o                 <= ALU_ADD;
832
 
833
        case clk_mstate_i is
834
          -- Step 1: Preload Temp Reg with 0x06
835
          when MSTATE3 =>
836
            alu_p06_temp_reg_o   <= true;
837
 
838
          -- Step 2: Check Auxiliary Carry and overflow on low nibble
839
          --         Add 0x06 to shadow Accumulator if one is true
840
          when MSTATE4 =>
841
            if psw_aux_carry_i = '1' or alu_da_overflow_i then
842
              alu_read_alu_o     <= true;
843
              alu_write_shadow_o <= true;
844
            end if;
845
 
846
            -- preload Temp Reg with 0x60
847
            alu_p60_temp_reg_o  <= true;
848
 
849
          -- Step 3: Check overflow on high nibble
850
          --         Add 0x60 to shadow Accumulator if true and store result
851
          --         in Accumulator and PSW (only Carry)
852
          when MSTATE5 =>
853
            alu_da_high_o        <= true;
854
 
855
            if alu_da_overflow_i then
856
              psw_special_data_o <= alu_carry_i;
857
            else
858
              alu_op_o           <= ALU_NOP;
859
              psw_special_data_o <= '0';
860
            end if;
861
            alu_read_alu_o       <= true;
862
            alu_write_accu_o     <= true;
863
            psw_write_carry_o    <= true;
864
 
865
          when others =>
866
            null;
867
 
868
        end case;
869
 
870 4 arniml
      -- Mnemonic DEC ---------------------------------------------------------
871
      when MN_DEC =>
872
        case clk_mstate_i is
873
          when MSTATE4 =>
874
            -- DEC Rr: store data from RAM to shadow Accumulator
875
            if opc_opcode_s(6) = '1' then
876
              dm_read_dmem_o         <= true;
877
              alu_write_shadow_o     <= true;
878
            end if;
879
 
880
          when MSTATE5 =>
881
            alu_op_o                 <= ALU_DEC;
882
            alu_read_alu_o           <= true;
883
 
884
            if opc_opcode_s(6) = '0' then
885
              -- write DEC of Accumulator to Accumulator
886
              alu_write_accu_o       <= true;
887
            else
888
              -- store DEC of shadow Accumulator back to dmem
889
              dm_write_dmem_s        <= true;
890
            end if;
891
 
892
          when others =>
893
            null;
894
 
895
        end case;
896
 
897
      -- Mnemonic DIS_EN_I ----------------------------------------------------
898
      when MN_DIS_EN_I =>
899
        if clk_mstate_i = MSTATE3 then
900
          if opc_opcode_s(4) = '1' then
901
            dis_i_s <= true;
902
          else
903
            en_i_s  <= true;
904
          end if;
905
        end if;
906
 
907
      -- Mnemonic DIS_EN_TCNTI ------------------------------------------------
908
      when MN_DIS_EN_TCNTI =>
909
        if clk_mstate_i = MSTATE3 then
910
          if opc_opcode_s(4) = '1' then
911
            dis_tcnti_s <= true;
912
          else
913
            en_tcnti_s  <= true;
914
          end if;
915
        end if;
916
 
917
      -- Mnemonic DJNZ --------------------------------------------------------
918
      when MN_DJNZ =>
919
        assert_psen_s              <= true;
920
 
921
        if not clk_second_cycle_i then
922
          case clk_mstate_i is
923
            -- store data from RAM to shadow Accumulator
924
            when MSTATE4 =>
925
              dm_read_dmem_o         <= true;
926
              alu_write_shadow_o     <= true;
927
 
928
            -- write DEC result of shadow Accumulator back to dmem and
929
            -- conditional branch logic
930
            when MSTATE5 =>
931
              alu_op_o               <= ALU_DEC;
932
              alu_read_alu_o         <= true;
933
              dm_write_dmem_s        <= true;
934
 
935
              cnd_compute_take_o     <= true;
936
              cnd_branch_cond_o      <= COND_Z;
937
              cnd_comp_value_o(0)    <= '0';
938
 
939
            when others =>
940
              null;
941
 
942
          end case;
943
 
944
        else
945
          -- store address in Program Counter low byte if branch has to
946
          -- be taken
947 92 arniml
          if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
948
            cond_jump_c2_m1_f;
949
          end if;
950 4 arniml
 
951
        end if;
952
 
953
      -- Mnemonic ENT0_CLK ----------------------------------------------------
954
      when MN_ENT0_CLK =>
955
        if clk_mstate_i = MSTATE3 then
956
          ent0_clk_s <= true;
957
        end if;
958
 
959
      -- Mnemonic IN ----------------------------------------------------------
960
      when MN_IN =>
961
        -- read Port and store in Accumulator
962
        if clk_second_cycle_i and clk_mstate_i = MSTATE2 then
963
          alu_write_accu_o <= true;
964
 
965
          if opc_opcode_s(1) = '0' then
966
            p1_read_p1_o   <= true;
967
          else
968
            p2_read_p2_o   <= true;
969
          end if;
970
        end if;
971
 
972
      -- Mnemonic INS ---------------------------------------------------------
973
      when MN_INS =>
974
        -- read BUS and store in Accumulator
975
        if clk_second_cycle_i and clk_mstate_i = MSTATE2 then
976
          alu_write_accu_o <= true;
977
 
978
          add_read_bus_s   <= true;
979
        end if;
980
 
981
      -- Mnemonic INC ---------------------------------------------------------
982
      when MN_INC =>
983
        case clk_mstate_i is
984
          -- read RAM once for indirect address mode
985
          when MSTATE3 =>
986 92 arniml
            if not enable_quartus_bugfix_c or
987
               opc_opcode_s(3) = '0' then
988
              address_indirect_3_f;
989
            end if;
990 4 arniml
 
991
          when MSTATE4 =>
992
            -- INC Rr; INC @ Rr: store data from RAM to shadow Accumulator
993
            if opc_opcode_s(3 downto 2) /= "01" then
994
              dm_read_dmem_o         <= true;
995
              alu_write_shadow_o     <= true;
996
            end if;
997
 
998
          when MSTATE5 =>
999
            alu_op_o                 <= ALU_INC;
1000
            alu_read_alu_o           <= true;
1001
 
1002
            if opc_opcode_s(3 downto 2) = "01" then
1003
              -- write INC output of ALU to Accumulator
1004
              alu_write_accu_o       <= true;
1005
            else
1006
              -- store INC of shadow Accumulator back to dmem
1007
              dm_write_dmem_s        <= true;
1008
            end if;
1009
 
1010
          when others =>
1011
            null;
1012
 
1013
        end case;
1014
 
1015
      -- Mnemonic JBB ---------------------------------------------------------
1016
      when MN_JBB =>
1017
        assert_psen_s          <= true;
1018
        cnd_branch_cond_o      <= COND_ON_BIT;
1019
 
1020
        if not clk_second_cycle_i then
1021
          -- read Accumulator and start branch calculation
1022
          if clk_mstate_i = MSTATE3 then
1023
            alu_read_alu_o     <= true;
1024
            cnd_compute_take_o <= true;
1025
            -- cnd_comp_value_o is ok by default assignment
1026
          end if;
1027
 
1028
        else
1029
          -- store address in Program Counter low byte if branch has to
1030
          -- be taken
1031 92 arniml
          if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
1032
            cond_jump_c2_m1_f;
1033
          end if;
1034 4 arniml
 
1035
        end if;
1036
 
1037
      -- Mnemonic JC ----------------------------------------------------------
1038
      when MN_JC =>
1039
        assert_psen_s           <= true;
1040
        cnd_branch_cond_o       <= COND_C;
1041
 
1042
        if not clk_second_cycle_i then
1043
          -- start branch calculation
1044
          if clk_mstate_i = MSTATE3 then
1045
            cnd_compute_take_o  <= true;
1046
            cnd_comp_value_o(0) <= opc_opcode_s(4);
1047
          end if;
1048
 
1049
        else
1050
          -- store address in Program Counter low byte if branch has to
1051
          -- be taken
1052 92 arniml
          if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
1053
            cond_jump_c2_m1_f;
1054
          end if;
1055 4 arniml
 
1056
        end if;
1057
 
1058
      -- Mnemonic JF ----------------------------------------------------------
1059
      when MN_JF =>
1060
        assert_psen_s           <= true;
1061
 
1062
        if not clk_second_cycle_i then
1063
          -- start branch calculation
1064
          if clk_mstate_i = MSTATE3 then
1065
            cnd_compute_take_o  <= true;
1066
            if opc_opcode_s(7) = '1' then
1067
              -- JF0
1068
              cnd_branch_cond_o <= COND_F0;
1069
            else
1070
              -- JF1
1071
              cnd_branch_cond_o <= COND_F1;
1072
            end if;
1073
 
1074
          end if;
1075
 
1076
        else
1077
          -- store address in Program Counter low byte if branch has to
1078
          -- be taken
1079 92 arniml
          if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
1080
            cond_jump_c2_m1_f;
1081
          end if;
1082 4 arniml
 
1083
        end if;
1084
 
1085
 
1086
      -- Mnemonic JMP ---------------------------------------------------------
1087
      when MN_JMP =>
1088
        assert_psen_s        <= true;
1089
 
1090
        if clk_second_cycle_i then
1091
          case clk_mstate_i is
1092
            -- store address in Program Counter low byte
1093
            when MSTATE1 =>
1094
              pm_write_pcl_o <= true;
1095
              branch_taken_s <= true;
1096
 
1097
            -- store high part of target address in Program Counter
1098
            when MSTATE2 =>
1099
              data_s         <= "0000" & mb_q & opc_opcode_s(7 downto 5);
1100
              read_dec_s     <= true;
1101
              pm_write_pch_o <= true;
1102
 
1103
 
1104
            when others =>
1105
              null;
1106
 
1107
          end case;
1108
 
1109
        end if;
1110
 
1111
      -- Mnemonic JMPP --------------------------------------------------------
1112
      when MN_JMPP =>
1113
        assert_psen_s    <= true;
1114
 
1115
        if not clk_second_cycle_i then
1116
          -- write Accumulator to Program Memory address
1117
          -- (skip page offset update from Program Counter)
1118
          if clk_mstate_i = MSTATE3 then
1119
            alu_read_alu_o <= true;
1120
            pm_addr_type_o <= PM_PAGE;
1121
          end if;
1122
 
1123
        else
1124
          if clk_mstate_i = MSTATE1 then
1125
            -- store address in Program Counter low byte
1126
            pm_write_pcl_o <= true;
1127
            branch_taken_s <= true;
1128
          end if;
1129
 
1130
        end if;
1131
 
1132
      -- Mnemonic JNI ---------------------------------------------------------
1133
      when MN_JNI =>
1134
        assert_psen_s          <= true;
1135
        cnd_branch_cond_o      <= COND_INT;
1136
 
1137
        if not clk_second_cycle_i then
1138
          -- start branch calculation
1139
          if clk_mstate_i = MSTATE3 then
1140
            cnd_compute_take_o <= true;
1141
          end if;
1142
 
1143
        else
1144
          -- store address in Program Counter low byte if branch has to
1145
          -- be taken
1146 92 arniml
          if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
1147
            cond_jump_c2_m1_f;
1148
          end if;
1149 4 arniml
 
1150
        end if;
1151
 
1152
      -- Mnemonic JT ----------------------------------------------------------
1153
      when MN_JT =>
1154
        assert_psen_s           <= true;
1155
        if opc_opcode_s(6) = '0' then
1156
          cnd_branch_cond_o     <= COND_T0;
1157
        else
1158
          cnd_branch_cond_o     <= COND_T1;
1159
        end if;
1160
 
1161
        if not clk_second_cycle_i then
1162
          -- start branch calculation
1163
          if clk_mstate_i = MSTATE3 then
1164
            cnd_compute_take_o  <= true;
1165
            cnd_comp_value_o(0) <= opc_opcode_s(4);
1166
          end if;
1167
 
1168
        else
1169
          -- store address in Program Counter low byte if branch has to
1170
          -- be taken
1171 92 arniml
          if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
1172
            cond_jump_c2_m1_f;
1173
          end if;
1174 4 arniml
 
1175
        end if;
1176
 
1177
      -- Mnemonic JTF ---------------------------------------------------------
1178
      when MN_JTF =>
1179
        assert_psen_s          <= true;
1180
        cnd_branch_cond_o      <= COND_TF;
1181
 
1182
        if not clk_second_cycle_i then
1183
          -- start branch calculation
1184
          if clk_mstate_i = MSTATE3 then
1185
            cnd_compute_take_o <= true;
1186
            jtf_executed_s     <= true;
1187
          end if;
1188
 
1189
        else
1190
          -- store address in Program Counter low byte if branch has to
1191
          -- be taken
1192 92 arniml
          if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
1193
            cond_jump_c2_m1_f;
1194
          end if;
1195 4 arniml
 
1196
        end if;
1197
 
1198
      -- Mnemonic JZ ----------------------------------------------------------
1199
      when MN_JZ =>
1200
        assert_psen_s           <= true;
1201
        cnd_branch_cond_o       <= COND_Z;
1202
 
1203
        if not clk_second_cycle_i then
1204
          -- read Accumulator and start branch calculation
1205
          if clk_mstate_i = MSTATE3 then
1206
            alu_read_alu_o      <= true;
1207
            cnd_compute_take_o  <= true;
1208
            cnd_comp_value_o(0) <= opc_opcode_s(6);
1209
          end if;
1210
 
1211
        else
1212
          -- store address in Program Counter low byte if branch has to
1213
          -- be taken
1214 92 arniml
          if clk_mstate_i = MSTATE1 and cnd_take_branch_i then
1215
            cond_jump_c2_m1_f;
1216
          end if;
1217 4 arniml
 
1218
        end if;
1219
 
1220
      -- Mnemonic MOV_A_DATA --------------------------------------------------
1221
      when MN_MOV_A_DATA =>
1222
        assert_psen_s      <= true;
1223
 
1224
        -- Write Accumulator when contents of Program Memory is on bus
1225
        -- during machine state 1 of second cycle.
1226
        if clk_second_cycle_i and clk_mstate_i = MSTATE1 then
1227
          alu_write_accu_o <= true;
1228
        end if;
1229
 
1230
      -- Mnemonic MOV_A_RR ----------------------------------------------------
1231
      when MN_MOV_A_RR =>
1232
        case clk_mstate_i is
1233
          -- read RAM once for indirect address mode
1234
          when MSTATE3 =>
1235 92 arniml
            if not enable_quartus_bugfix_c or
1236
               opc_opcode_s(3) = '0' then
1237
              address_indirect_3_f;
1238
            end if;
1239 4 arniml
 
1240
          -- read data from RAM and store in Accumulator
1241
          when MSTATE4 =>
1242
            and_or_xor_add_4_f;
1243
            alu_write_accu_o <= true;
1244
 
1245
          when others =>
1246
            null;
1247
 
1248
        end case;
1249
 
1250
      -- Mnemonic MOV_A_PSW ---------------------------------------------------
1251
      when MN_MOV_A_PSW =>
1252
        if clk_mstate_i = MSTATE3 then
1253
          psw_read_psw_o   <= true;
1254
          psw_read_sp_o    <= true;
1255
          alu_write_accu_o <= true;
1256
        end if;
1257
 
1258
      -- Mnemoniv MOV_PSW_A ---------------------------------------------------
1259
      when MN_MOV_PSW_A =>
1260
        if clk_mstate_i = MSTATE3 then
1261
          alu_read_alu_o  <= true;
1262
          psw_write_psw_o <= true;
1263
          psw_write_sp_o  <= true;
1264
        end if;
1265
 
1266
      -- Mnemonic MOV_RR ------------------------------------------------------
1267
      when MN_MOV_RR =>
1268
        case clk_mstate_i is
1269
          -- read RAM once for indirect address mode
1270
          when MSTATE3 =>
1271 92 arniml
            if not enable_quartus_bugfix_c or
1272
               opc_opcode_s(3) = '0' then
1273
              address_indirect_3_f;
1274
            end if;
1275 4 arniml
 
1276
          -- write Accumulator to dmem
1277
          when MSTATE5 =>
1278
            alu_read_alu_o       <= true;
1279
            dm_write_dmem_s      <= true;
1280
 
1281
          when others =>
1282
            null;
1283
 
1284
        end case;
1285
 
1286
      -- Mnemonic MOV_RR_DATA -------------------------------------------------
1287
      when MN_MOV_RR_DATA =>
1288
        assert_psen_s     <= true;
1289
 
1290
        -- read RAM once for indirect address mode
1291
        if not clk_second_cycle_i and clk_mstate_i = MSTATE3 then
1292 92 arniml
          if not enable_quartus_bugfix_c or
1293
             opc_opcode_s(3) = '0' then
1294
            address_indirect_3_f;
1295
          end if;
1296 4 arniml
        end if;
1297
 
1298
        -- Write Data Memory when contents of Program Memory is on bus
1299
        -- during machine state 1 of second cycle.
1300
        if clk_second_cycle_i and clk_mstate_i = MSTATE1 then
1301
          dm_write_dmem_s <= true;
1302
        end if;
1303
 
1304
      -- Mnemonic MOV_T -------------------------------------------------------
1305
      when MN_MOV_T =>
1306
        if clk_mstate_i = MSTATE3 then
1307
          if opc_opcode_s(5) = '1' then
1308
            alu_read_alu_o    <= true;  -- MOV T, A
1309
            tim_write_timer_o <= true;
1310
          else
1311
            tim_read_timer_o  <= true;  -- MOV A, T
1312
            alu_write_accu_o  <= true;
1313
          end if;
1314
        end if;
1315
 
1316 21 arniml
      -- Mnemonic OUTD_PP_A ---------------------------------------------------
1317
      when MN_OUTD_PP_A =>
1318
        clk_assert_prog_o     <= true;
1319
 
1320
        if not clk_second_cycle_i then
1321
          case clk_mstate_i is
1322
            -- propagate expander port number to Port 2
1323
            when MSTATE3 =>
1324
 
1325
              data_s(7 downto 4)     <= (others => '0');
1326
              data_s(1 downto 0)     <= opc_opcode_s(1 downto 0);
1327
              -- decide which 8243 command to use
1328
              case opc_opcode_s(7 downto 4) is
1329
                when "1001" =>
1330
                  data_s(3 downto 2) <= "11";  -- ANLD command
1331
                when "1000" =>
1332
                  data_s(3 downto 2) <= "10";  -- ORLD command
1333
                when "0011" =>
1334
                  data_s(3 downto 2) <= "01";  -- MOVD command
1335
                when others =>
1336
                  null;
1337
              end case;
1338
 
1339
              read_dec_s      <= true;
1340
              p2_write_exp_o  <= true;
1341
 
1342
            -- output expander port number on Port 2 while active edge of PROG
1343
            -- write Accumulator to expander port
1344
            when MSTATE4 =>
1345
              p2_output_exp_o <= true;
1346
 
1347
              alu_read_alu_o  <= true;
1348
              p2_write_exp_o  <= true;
1349
 
1350
            when MSTATE5 =>
1351
              p2_output_exp_o <= true;
1352
 
1353
            when others =>
1354
              null;
1355
 
1356
          end case;
1357
 
1358
        else
1359
          -- hold expander port until inactive edge of PROG 
1360
          if clk_mstate_i = MSTATE1 or clk_mstate_i = MSTATE2 then
1361
            p2_output_exp_o   <= true;
1362
          end if;
1363
 
1364
        end if;
1365
 
1366
      -- Mnemonic MOVD_A_PP ---------------------------------------------------
1367
      when MN_MOVD_A_PP =>
1368
        clk_assert_prog_o            <= true;
1369
 
1370
        if not clk_second_cycle_i then
1371
          case clk_mstate_i is
1372
            -- propagate expander port number to Port 2
1373
            when MSTATE3 =>
1374
              data_s                 <= "0000" &
1375
                                        "00"   &  -- 8243 command: read
1376
                                        opc_opcode_s(1 downto 0);
1377
              read_dec_s             <= true;
1378
              p2_write_exp_o         <= true;
1379
 
1380
            -- output expander port number on Port 2 while active edge of PROG
1381
            -- write 1's to expander port to set lower nibble of Port 2 to input
1382
            when MSTATE4 =>
1383
              p2_output_exp_o        <= true;
1384
 
1385
              data_s(nibble_t'range) <= (others => '1');
1386
              read_dec_s             <= true;
1387
              p2_write_exp_o         <= true;
1388
 
1389
            when MSTATE5 =>
1390
              p2_output_exp_o        <= true;
1391
 
1392
            when others =>
1393
              null;
1394
 
1395
          end case;
1396
 
1397
        else
1398
          case clk_mstate_i is
1399
            -- hold expander port until inactive edge of PROG
1400
            when MSTATE1 =>
1401
              p2_output_exp_o  <= true;
1402
 
1403
            -- hold expander port until inactive edge of PROG
1404
            -- write Accumulator with nibble of expander port
1405
            when MSTATE2 =>
1406 101 arniml
              p2_read_p2_o     <= true;
1407 21 arniml
              p2_output_exp_o  <= true;
1408
              p2_read_exp_o    <= true;
1409
              alu_write_accu_o <= true;
1410
 
1411
            when others =>
1412
              null;
1413
 
1414
          end case;
1415
 
1416
        end if;
1417
 
1418 4 arniml
      -- Mnemonic MOVP --------------------------------------------------------
1419
      when MN_MOVP =>
1420
        assert_psen_s        <= true;
1421
 
1422
        if not clk_second_cycle_i then
1423
          -- write Accumulator to Program Memory address
1424
          -- (skip page offset update from Program Counter)
1425
          if clk_mstate_i = MSTATE3 then
1426
            alu_read_alu_o   <= true;
1427
            if opc_opcode_s(6) = '0' then
1428
              pm_addr_type_o <= PM_PAGE;
1429
            else
1430
              pm_addr_type_o <= PM_PAGE3;
1431
            end if;
1432
          end if;
1433
 
1434
        else
1435
          if clk_mstate_i = MSTATE1 then
1436
            -- store data from Program Memory in Accumulator
1437
            alu_write_accu_o <= true;
1438
            -- trick & treat to prevent additional PC increment
1439
            -- our branch target is the previously incremented PC!
1440
            branch_taken_s   <= true;
1441
          end if;
1442
 
1443
        end if;
1444
 
1445
      -- Mnemonic MOVX --------------------------------------------------------
1446
      when MN_MOVX =>
1447
        bus_bidir_bus_o        <= true;
1448
 
1449
        if opc_opcode_s(4) = '0' then
1450
          clk_assert_rd_o      <= true;
1451
        else
1452
          clk_assert_wr_o      <= true;
1453
        end if;
1454
 
1455
        if not clk_second_cycle_i then
1456 78 arniml
          case clk_mstate_i is
1457
            -- read dmem and put contents on BUS as external address
1458
            when MSTATE3 =>
1459
              dm_read_dmem_o     <= true;
1460
              bus_write_bus_o    <= true;
1461 4 arniml
 
1462 78 arniml
            -- store contents of Accumulator to BUS
1463
            when MSTATE5 =>
1464
              if opc_opcode_s(4) = '1' then
1465
                alu_read_alu_o   <= true;
1466
                bus_write_bus_o  <= true;
1467
              end if;
1468
 
1469
            when others =>
1470
              null;
1471
          end case;
1472
 
1473 4 arniml
        else
1474
          if clk_mstate_i = MSTATE1 then
1475
            if opc_opcode_s(4) = '0' then
1476
              -- store contents of BUS in Accumulator
1477
              add_read_bus_s   <= true;
1478
              alu_write_accu_o <= true;
1479
            else
1480
              -- store contents of Accumulator to BUS
1481
              alu_read_alu_o   <= true;
1482
              bus_write_bus_o  <= true;
1483
            end if;
1484
          end if;
1485
 
1486
        end if;
1487
 
1488
      -- Mnemonic NOP ---------------------------------------------------------
1489
      when MN_NOP =>
1490
        -- nothing to do
1491
 
1492
      -- Mnemonic ORL ---------------------------------------------------------
1493
      when MN_ORL =>
1494
        case clk_mstate_i is
1495
          -- read RAM once for indirect address mode
1496
          when MSTATE3 =>
1497 92 arniml
            if not enable_quartus_bugfix_c or
1498
               opc_opcode_s(3) = '0' then
1499
              address_indirect_3_f;
1500
            end if;
1501 4 arniml
 
1502
          -- store data from RAM to Temp Reg
1503
          when MSTATE4 =>
1504
            and_or_xor_add_4_f;
1505
 
1506
          -- perform OR and store in Accumulator
1507
          when MSTATE5 =>
1508
            and_or_xor_add_5_f(alu_op => ALU_OR);
1509
 
1510
          when others =>
1511
            null;
1512
 
1513
        end case;
1514
 
1515
      -- Mnemonic ORL_A_DATA --------------------------------------------------
1516
      when MN_ORL_A_DATA =>
1517
        assert_psen_s              <= true;
1518
 
1519
        if clk_second_cycle_i then
1520
          case clk_mstate_i is
1521
            -- write Temp Reg when contents of Program Memory is on bus
1522
            when MSTATE1 =>
1523
              alu_write_temp_reg_o <= true;
1524
 
1525
            -- perform OR and store in Accumulator
1526
            when MSTATE3 =>
1527
              and_or_xor_add_5_f(alu_op => ALU_OR);
1528
 
1529
            when others =>
1530
              null;
1531
 
1532
          end case;
1533
 
1534
        end if;
1535
 
1536
      -- Mnemonic ORL_EXT -----------------------------------------------------
1537
      when MN_ORL_EXT =>
1538
        assert_psen_s            <= true;
1539
 
1540
        if not clk_second_cycle_i then
1541
          -- read port to Temp Reg
1542
          if clk_mstate_i = MSTATE5 then
1543
            if opc_opcode_s(1 downto 0) = "00" then
1544
              add_read_bus_s     <= true;
1545
            elsif opc_opcode_s(1) = '0' then
1546
              p1_read_p1_o       <= true;
1547
              p1_read_reg_o      <= true;
1548
            else
1549
              p2_read_p2_o       <= true;
1550
              p2_read_reg_o      <= true;
1551
            end if;
1552
 
1553
            alu_write_temp_reg_o <= true;
1554
          end if;
1555
 
1556
        else
1557
          case clk_mstate_i is
1558
            -- write shadow Accumulator when contents of Program Memory is
1559
            -- on bus
1560
            when MSTATE1 =>
1561
              alu_write_shadow_o <= true;
1562
 
1563
            -- loop shadow Accumulator through ALU to prevent update from
1564
            -- real Accumulator
1565
            when MSTATE2 =>
1566
              alu_read_alu_o     <= true;
1567
              alu_write_shadow_o <= true;
1568
 
1569
            -- write result of OR operation back to port
1570
            when MSTATE3 =>
1571
              alu_op_o           <= ALU_OR;
1572
              alu_read_alu_o     <= true;
1573
 
1574
              if opc_opcode_s(1 downto 0) = "00" then
1575
                bus_write_bus_o  <= true;
1576
              elsif opc_opcode_s(1) = '0' then
1577
                p1_write_p1_o    <= true;
1578
              else
1579
                p2_write_p2_o    <= true;
1580
              end if;
1581
 
1582
            when others =>
1583
              null;
1584
 
1585
          end case;
1586
 
1587
        end if;
1588
 
1589
      -- Mnemonic OUTL_EXT ----------------------------------------------------
1590
      when MN_OUTL_EXT =>
1591
        -- read Accumulator and store in Port/BUS output register
1592
        if clk_second_cycle_i and clk_mstate_i = MSTATE4 then
1593
          alu_read_alu_o  <= true;
1594
 
1595
          if opc_opcode_s(4) = '1' then
1596
            if opc_opcode_s(1) = '0' then
1597
              p1_write_p1_o <= true;
1598
            else
1599
              p2_write_p2_o <= true;
1600
            end if;
1601
 
1602
          else
1603
            bus_write_bus_o <= true;
1604
 
1605
          end if;
1606
 
1607
        end if;
1608
 
1609
      -- Mnemonic RET ---------------------------------------------------------
1610
      when MN_RET =>
1611
        if not clk_second_cycle_i then
1612
          case clk_mstate_i is
1613
            -- decrement Stack Pointer
1614
            when MSTATE3 =>
1615
              psw_dec_stackp_o     <= true;
1616
 
1617
            -- read Stack Pointer and address Data Memory for low byte
1618
            when MSTATE4 =>
1619
              psw_read_sp_o        <= true;
1620
              dm_write_dmem_addr_o <= true;
1621
              dm_addr_type_o       <= DM_STACK;
1622
 
1623
            -- read Data Memory and store to Program Counter low
1624
            -- prepare address to Data memory for high byte
1625
            when MSTATE5 =>
1626
              dm_read_dmem_o       <= true;
1627
              pm_write_pcl_o       <= true;
1628
              dm_write_dmem_addr_o <= true;
1629
              dm_addr_type_o       <= DM_STACK_HIGH;
1630
 
1631
            when others =>
1632
              null;
1633
 
1634
          end case;
1635
 
1636
        else
1637
          case clk_mstate_i is
1638
            -- read Data Memory and store to Program Counter high and PSW
1639
            when MSTATE1 =>
1640
              dm_read_dmem_o         <= true;
1641
              pm_write_pch_o         <= true;
1642
              if opc_opcode_s(4) = '1' then
1643
                psw_write_psw_o      <= true;
1644
                retr_executed_s      <= true;
1645
              end if;
1646
 
1647
            when MSTATE2 =>
1648
              add_write_pmem_addr_s  <= true;
1649
 
1650
            when others =>
1651
              null;
1652
 
1653
          end case;
1654
 
1655
        end if;
1656
 
1657
      -- Mnemonic RL ----------------------------------------------------------
1658
      when MN_RL =>
1659
        if clk_mstate_i = MSTATE3 then
1660
          alu_op_o             <= ALU_RL;
1661
          alu_read_alu_o       <= true;
1662
          alu_write_accu_o     <= true;
1663
 
1664
          if opc_opcode_s(4) = '1' then
1665
            psw_special_data_o <= alu_carry_i;
1666
            psw_write_carry_o  <= true;
1667
            alu_use_carry_o    <= true;
1668
          end if;
1669
        end if;
1670
 
1671
      -- Mnemonic RR ----------------------------------------------------------
1672
      when MN_RR =>
1673
        if clk_mstate_i = MSTATE3 then
1674
          alu_op_o             <= ALU_RR;
1675
          alu_read_alu_o       <= true;
1676
          alu_write_accu_o     <= true;
1677
 
1678
          if opc_opcode_s(4) = '0' then
1679
            psw_special_data_o <= alu_carry_i;
1680
            psw_write_carry_o  <= true;
1681
            alu_use_carry_o    <= true;
1682
          end if;
1683
        end if;
1684
 
1685
      -- Mnemonic SEL_MB ------------------------------------------------------
1686
      when MN_SEL_MB =>
1687
        if clk_mstate_i = MSTATE3 then
1688
          if opc_opcode_s(4) = '1' then
1689
            set_mb_s   <= true;
1690
          else
1691
            clear_mb_s <= true;
1692
          end if;
1693
        end if;
1694
 
1695
      -- Mnemonic SEL_RB ------------------------------------------------------
1696
      when MN_SEL_RB =>
1697
        if clk_mstate_i = MSTATE3 then
1698
          psw_special_data_o <= opc_opcode_s(4);
1699
          psw_write_bs_o     <= true;
1700
        end if;
1701
 
1702
      -- Mnemonic STOP_TCNT ---------------------------------------------------
1703
      when MN_STOP_TCNT =>
1704
        if clk_mstate_i = MSTATE3 then
1705
          tim_stop_tcnt_o <= true;
1706
        end if;
1707
 
1708
      -- Mnemonic STRT --------------------------------------------------------
1709
      when MN_STRT =>
1710
        if clk_mstate_i = MSTATE3 then
1711
          if opc_opcode_s(4) = '1' then
1712
            tim_start_t_o   <= true;
1713
          else
1714
            tim_start_cnt_o <= true;
1715
          end if;
1716
        end if;
1717
 
1718
      -- Mnemonic SWAP --------------------------------------------------------
1719
      when MN_SWAP =>
1720
        alu_op_o           <= ALU_SWAP;
1721
 
1722
        if clk_mstate_i = MSTATE3 then
1723
          alu_read_alu_o   <= true;
1724
          alu_write_accu_o <= true;
1725
        end if;
1726
 
1727
      -- Mnemonic XCH ---------------------------------------------------------
1728
      when MN_XCH =>
1729
        case clk_mstate_i is
1730
          -- read RAM once for indirect address mode
1731
          when MSTATE3 =>
1732 92 arniml
            if not enable_quartus_bugfix_c or
1733
               opc_opcode_s(3) = '0' then
1734
              address_indirect_3_f;
1735
            end if;
1736 4 arniml
 
1737 38 arniml
          -- store data from RAM in Accumulator and Temp Reg
1738 4 arniml
          -- Accumulator is already shadowed!
1739
          when MSTATE4 =>
1740 38 arniml
            dm_read_dmem_o       <= true;
1741
            alu_write_accu_o     <= true;
1742
            alu_write_temp_reg_o <= true;
1743
            if opc_opcode_s(4) = '1' then
1744
              -- XCHD
1745
              -- only write lower nibble of Accumulator
1746
              alu_accu_low_o     <= true;
1747
            end if;
1748 4 arniml
 
1749
          -- store data from shadow (previous) Accumulator to dmem
1750
          when MSTATE5 =>
1751 38 arniml
            dm_write_dmem_s      <= true;
1752
            alu_read_alu_o       <= true;
1753
            if opc_opcode_s(4) = '1' then
1754
              -- XCHD
1755
              -- concatenate shadow Accumulator and Temp Reg
1756
              alu_op_o           <= ALU_CONCAT;
1757
            end if;
1758 4 arniml
 
1759
          when others =>
1760
            null;
1761
 
1762
        end case;
1763
 
1764
      -- Mnemonic XRL ---------------------------------------------------------
1765
      when MN_XRL =>
1766
        case clk_mstate_i is
1767
          -- read RAM once for indirect address mode
1768
          when MSTATE3 =>
1769 92 arniml
            if not enable_quartus_bugfix_c or
1770
               opc_opcode_s(3) = '0' then
1771
              address_indirect_3_f;
1772
            end if;
1773 4 arniml
 
1774
          -- store data from RAM to Temp Reg
1775
          when MSTATE4 =>
1776
            and_or_xor_add_4_f;
1777
 
1778
          -- perform XOR and store in Accumulator
1779
          when MSTATE5 =>
1780
            and_or_xor_add_5_f(alu_op => ALU_XOR);
1781
 
1782
          when others =>
1783
            null;
1784
 
1785
        end case;
1786
 
1787
      -- Mnemonic XRL_A_DATA --------------------------------------------------
1788
      when MN_XRL_A_DATA =>
1789
        assert_psen_s              <= true;
1790
 
1791
        if clk_second_cycle_i then
1792
          case clk_mstate_i is
1793
            -- write Temp Reg when contents of Program Memory is on bus
1794
            when MSTATE1 =>
1795
              alu_write_temp_reg_o <= true;
1796
 
1797
            -- perform XOR and store in Accumulator
1798
            when MSTATE3 =>
1799
              and_or_xor_add_5_f(alu_op => ALU_XOR);
1800
 
1801
            when others =>
1802
              null;
1803
 
1804
          end case;
1805
 
1806
        end if;
1807
 
1808
      -- Unimplemented mnemonic -----------------------------------------------
1809
      when others =>
1810
        -- this will behave like a NOP
1811
 
1812
        -- pragma translate_off
1813
        assert false
1814
          report "Mnemonic not yet implemented."
1815
          severity warning;
1816
        -- pragma translate_on
1817
 
1818
    end case;
1819
 
1820
  end process decode;
1821
  --
1822
  -----------------------------------------------------------------------------
1823
 
1824
 
1825
  -----------------------------------------------------------------------------
1826
  -- Process regs
1827
  --
1828
  -- Purpose:
1829
  --   Implements the various registes.
1830
  --
1831
  regs: process (res_i, clk_i)
1832
  begin
1833
    if res_i = res_active_c then
1834
      branch_taken_q <= false;
1835
      f1_q           <= '0';
1836
      mb_q           <= '0';
1837
      t0_dir_q       <= '0';
1838 38 arniml
      -- pragma translate_off
1839 64 arniml
      istrobe_res_q  <= '1';
1840
      istrobe_q      <= '0';
1841 60 arniml
      injected_int_q <= '0';
1842 38 arniml
      -- pragma translate_on
1843 4 arniml
 
1844
    elsif clk_i'event and clk_i = clk_active_c then
1845
      if en_clk_i then
1846
 
1847
        -- branch taken flag
1848
        if branch_taken_s then
1849
          branch_taken_q <= true;
1850
        elsif clk_mstate_i = MSTATE5 then
1851
          -- release flag when new instruction starts
1852
          branch_taken_q <= false;
1853
        end if;
1854
 
1855
        -- Flag 1
1856
        if clear_f1_s then
1857
          f1_q         <= '0';
1858
        elsif cpl_f1_s then
1859
          f1_q         <= not f1_q;
1860
        end if;
1861
 
1862
        -- Memory Bank select
1863
        if clear_mb_s then
1864
          mb_q         <= '0';
1865
        elsif set_mb_s then
1866
          mb_q         <= '1';
1867
        end if;
1868
 
1869
        -- T0 direction selection
1870
        if ent0_clk_s then
1871
          t0_dir_q     <= '1';
1872
        end if;
1873
 
1874 60 arniml
        -- pragma translate_off
1875
        -- Marker for injected instruction ------------------------------------
1876
        if opc_inj_int_s then
1877
          injected_int_q <= '1';
1878
        elsif clk_mstate_i = MSTATE5 and last_cycle_s then
1879
          injected_int_q <= '0';
1880
        end if;
1881 64 arniml
 
1882
        -- Remove istrobe after reset suppression -----------------------------
1883
        if clk_mstate_i = MSTATE5 and last_cycle_s then
1884
          istrobe_res_q  <= '0';
1885
        end if;
1886 60 arniml
        -- pragma translate_on
1887
 
1888 38 arniml
      end if;
1889
 
1890 64 arniml
      -- pragma translate_off
1891
      -- Instruction Strobe ---------------------------------------------------
1892
      if clk_mstate_i = MSTATE5 and last_cycle_s and
1893
         injected_int_q = '0' then
1894
        if istrobe_res_q = '0' then
1895
          istrobe_q <= '1';
1896
        end if;
1897
      else
1898
        istrobe_q   <= '0';
1899
      end if;
1900
      -- pragma translate_on
1901
 
1902 4 arniml
    end if;
1903
 
1904
  end process regs;
1905
  --
1906
  -----------------------------------------------------------------------------
1907
 
1908 53 arniml
  -- pragma translate_off
1909
  -- assign to global signal for testbench
1910 64 arniml
  tb_istrobe_s <= istrobe_q;
1911 53 arniml
  -- pragma translate_on
1912 4 arniml
 
1913 53 arniml
 
1914 4 arniml
  -----------------------------------------------------------------------------
1915
  -- Output Mapping.
1916
  -----------------------------------------------------------------------------
1917
  clk_multi_cycle_o    <= opc_multi_cycle_s;
1918
  cnd_f1_o             <= f1_q;
1919
  cnd_tf_o             <= tf_s;
1920
  data_o               <=   data_s
1921
                          when read_dec_s else
1922
                            (others => bus_idle_level_c);
1923
  dm_write_dmem_o      <= dm_write_dmem_s      and en_clk_i;
1924
  pm_inc_pc_o          <= pm_inc_pc_s          or add_inc_pc_s;
1925
  pm_write_pmem_addr_o <= pm_write_pmem_addr_s or add_write_pmem_addr_s;
1926
  t0_dir_o             <= t0_dir_q;
1927
  bus_read_bus_o       <= bus_read_bus_s       or add_read_bus_s;
1928
 
1929
end rtl;
1930
 
1931
 
1932
-------------------------------------------------------------------------------
1933
-- File History:
1934
--
1935
-- $Log: not supported by cvs2svn $
1936 106 arniml
-- Revision 1.12  2004/05/17 14:40:09  arniml
1937
-- assert p2_read_p2_o when expander port is read
1938
--
1939 101 arniml
-- Revision 1.11  2004/05/16 15:33:39  arniml
1940
-- work around bug in Quartus II 4.0
1941
--
1942 92 arniml
-- Revision 1.10  2004/04/25 16:22:03  arniml
1943
-- adjust external timing of BUS
1944
--
1945 78 arniml
-- Revision 1.9  2004/04/24 11:22:55  arniml
1946
-- removed superfluous signal from sensitivity list
1947
--
1948 72 arniml
-- Revision 1.8  2004/04/18 18:57:43  arniml
1949
-- + enhance instruction strobe generation
1950
-- + rework address output under EA=1 conditions
1951
--
1952 64 arniml
-- Revision 1.7  2004/04/15 22:06:05  arniml
1953
-- + add marker for injected calls
1954
-- + suppress intstruction strobes for injected calls
1955
--
1956 60 arniml
-- Revision 1.6  2004/04/14 20:53:33  arniml
1957
-- make istrobe visible through testbench package
1958
--
1959 53 arniml
-- Revision 1.5  2004/04/07 22:09:03  arniml
1960
-- remove unused signals
1961
--
1962 45 arniml
-- Revision 1.4  2004/04/04 14:18:53  arniml
1963
-- add measures to implement XCHD
1964
--
1965 38 arniml
-- Revision 1.3  2004/03/28 21:15:48  arniml
1966
-- implemented mnemonic DA
1967
--
1968 27 arniml
-- Revision 1.2  2004/03/28 13:06:32  arniml
1969
-- implement mnemonics:
1970
--    + MOVD_A_PP
1971
--    + OUTD_PP_A -> ANLD PP, A; MOVD PP, A; ORLD PP, A
1972
--
1973 21 arniml
-- Revision 1.1  2004/03/23 21:31:52  arniml
1974
-- initial check-in
1975 27 arniml
--
1976 4 arniml
-------------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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