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

Subversion Repositories pdp1

[/] [pdp1/] [trunk/] [rtl/] [vhdl/] [pdp1cpu.vhd] - Blame information for rev 3

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

Line No. Rev Author Line
1 3 yannv
----------------------------------------------------------------------------------
2
-- Company:     None
3
-- Engineer:    Yann Vernier
4
-- 
5
-- Create Date:    13:29:13 02/09/2009 
6
-- Design Name: 
7
-- Module Name:    pdp1cpu - Behavioral 
8
-- Project Name:   PDP-1
9
-- Target Devices: Xilinx Spartan 3A
10
-- Tool versions:  WebPack 10.1
11
-- Description:  PDP-1 CPU (main logic) module, executes instructions.
12
--
13
-- Dependencies: Requires a RAM and a clock source. RAM is accessed in alternating read and write.
14
--               Original clock is 200kHz memory cycle, where each cycle both
15
--               reads and writes (core memory). CPU itself must be clocked 10
16
--               times faster (original logic modules could keep up with 4MHz).
17
--
18
-- Revision: 
19
-- Revision 0.01 - File Created
20
-- Additional Comments: 
21
--   Aim is currently a PDP-1B level.
22
--   B version had multiply and divide Step to accelerate the subroutines,
23
--   and the first had pure software subroutines. C had full hardware multiply(?).
24
--   PDP-1D implements several more instructions not included here.
25
--   Extensions (including sequence break and extended memory) are not implemented.
26
--
27
--   Goal: Run Spacewar! in hardware. Initial target version is that used by Java
28
--   emulator, which is a PDP-1B, with multiply and divide steps.
29
--   That emulator doesn't have DIP.
30
--   PDP-1C had full multiply and divide instructions of variable time.
31
--
32
----------------------------------------------------------------------------------
33
library IEEE;
34
use IEEE.STD_LOGIC_1164.ALL;
35
use IEEE.NUMERIC_STD.ALL;
36
 
37
 
38
entity pdp1cpu is
39
    Port (
40
      -- memory interface
41
      M_DI : out STD_LOGIC_VECTOR(0 to 17) := (others=>'0');
42
      M_DO : in STD_LOGIC_VECTOR(0 to 17);
43
      MW : inout STD_LOGIC      := '0';
44
      MA : out std_logic_vector(0 to 11) := (others=>'0');
45
 
46
      CLK : in STD_LOGIC;          -- in progress: adapt to 10x clock
47
 
48
      -- CPU status
49
      AWAKE : out STD_LOGIC;
50
 
51
      -- user visible registers
52
      AC : inout STD_LOGIC_VECTOR(0 to 17)       := (others=>'0');  -- accumulator
53
      IO : inout STD_LOGIC_VECTOR(0 to 17)       := (others=>'0');  -- I/O
54
      PC : inout unsigned(0 to 11)       := (others=>'0');  -- program counter
55
      PF : inout STD_LOGIC_VECTOR(1 to 6)       := (others=>'0');  -- program flags
56
      OV : inout STD_LOGIC := '0';      -- overflow flag
57
 
58
      -- user settable switches
59
      SW_TESTA : in std_logic_vector(0 to 11) := (others => '0');  -- test address
60
      SW_TESTW : in std_logic_vector(0 to 17) := (others => '0');  -- test word
61
      SW_SENSE : in std_logic_vector(1 to 6) := (others => '0');  -- sense switches
62
 
63
      -- I/O interface
64
      IOT : out STD_LOGIC_VECTOR(0 to 63) := (others=>'0');  -- I/O transfer pulse lines
65
      IODOPULSE : out STD_LOGIC := '0';  -- signal to I/O device to send a
66
                                         -- pulse when done
67
      IODONE : in STD_LOGIC := '0';     -- I/O device done signal
68
      IO_SET : in STD_ULOGIC := '0';     -- used to set I/O register to IO_IN value (synchronous!)
69
      IO_IN : in STD_LOGIC_VECTOR(0 to 17) := o"000000"; -- bus for I/O devices to report values
70
 
71
      RESET : in STD_LOGIC
72
      );
73
end pdp1cpu;
74
 
75
architecture Behavioral of pdp1cpu is
76
        subtype word is STD_LOGIC_VECTOR(0 to 17);
77
        subtype opcode is std_logic_vector(0 to 5);
78
        -- Formally the opcode is 5 bits; I've included the indirection bit.
79
 
80
        signal MB: word;                -- memory buffer
81
        signal op: opcode := o"00";     -- current operation (user visible originally)
82
 
83
        signal IOWAIT, HALT : boolean := false;
84
 
85
        alias ib : std_logic is op(5);  -- indirection bit
86
        alias y : std_logic_vector(0 to 11) is MB(6 to 17);  -- address/operand
87
 
88
        -- operations - note that "load" here is OR, for some reason.
89
        alias cli : std_logic is MB(6);         -- clear IO
90
        alias lat : std_logic is MB(7);         -- load AC with Test.Switches
91
        alias cma : std_logic is MB(8);         -- complement AC
92
        alias hlt : std_logic is MB(9);         -- halt
93
        alias cla : std_logic is MB(10);        -- clear AC
94
        alias lap : std_logic is MB(11);        -- load AC from PC
95
        alias flag_setto : std_logic is MB(14); -- set program flag(s) - value
96
        alias flag_which : std_logic_vector(2 downto 0) is MB(15 to 17);
97
        -- skip conditions
98
        alias spi : std_logic is MB(7);         -- Skip if Positive IO
99
        alias szo : std_logic is MB(8);         -- skip if zero OV
100
        alias sza : std_logic is MB(9);         -- skip if zero AC
101
        alias spa : std_logic is MB(10);        -- skip if positive AC
102
        alias sma : std_logic is MB(11);        -- skip if negative AC
103
        alias szs : std_logic_vector(0 to 2) is MB(12 to 14);    -- skip if Zero Switches
104
        alias szf : std_logic_vector(0 to 2) is MB(15 to 17);    -- skip if Zero Flags
105
 
106
        -- Opcodes      -- loading group
107
        constant op_and : opcode := o"02";      -- AC&=M
108
        constant op_ior : opcode := o"04";      -- AC|=M
109
        constant op_xor : opcode := o"06";      -- AC^=M
110
        constant op_add : opcode := o"40";      -- AC+=M
111
        constant op_sub : opcode := o"42";      -- AC-=M
112
        constant op_lac : opcode := o"20";      -- load AC
113
        constant op_lio : opcode := o"22";      -- load IO
114
        constant op_sad : opcode := o"50";      -- skip if AC/=M(y)
115
        constant op_sas : opcode := o"52";      -- skip if AC=M(y)
116
        -- storing group
117
        constant op_dac : opcode := o"24";      -- store AC
118
        constant op_dap : opcode := o"26";      -- deposit address part of AC
119
        constant op_dip : opcode := o"30";      -- deposit instruction part -- missing in Java emulator
120
        constant op_dio : opcode := o"32";      -- deposit IO
121
        constant op_dzm : opcode := o"34";      -- deposit zero
122
        -- jumping group
123
        constant op_skip: opcode := o"64";      -- adds 1 to IP; SAD and SAS, load group, also do this
124
        constant op_skipi: opcode := o"65";     -- as above, but inverts condition
125
        constant op_jmp : opcode := o"60";      -- jump
126
        constant op_jsp : opcode := o"62";      -- jump and save PC
127
        constant op_cal : opcode := o"16";      -- call subroutine
128
        constant op_jda : opcode := o"17";      -- jump and deposit AC
129
        -- immediate group
130
        constant op_rotshiftl: opcode := o"66"; -- rotate/shift (IB is direction)
131
        constant op_rotshiftr: opcode := o"67";
132
        constant op_law : opcode := o"70";      -- load accumulator immediate
133
        constant op_lawm: opcode := o"71";
134
        constant op_opr : opcode := o"76";      -- operate group
135
        -- miscellaneous
136
        constant op_idx : opcode := o"44";              -- index - AC=++M[y]
137
        constant op_isp : opcode := o"46";              -- same, and skip if positive
138
--      constant op_mul : opcode := o"54";              -- full multiply (PDP-1C)
139
--      constant op_div : opcode := o"56";              -- full divide (PDP-1C)
140
        constant op_mus : opcode := o"54";              -- multiply step (PDP-1B)
141
        constant op_dis : opcode := o"56";              -- divide step (PDP-1B)
142
        constant op_xct : opcode := o"10";              -- execute
143
        constant op_iot : opcode := o"73";              -- I/O transfer group, ib is wait for completion
144
        constant op_iot_nw : opcode := o"72";
145
 
146
        -- cycletype tracks the memory cycle reason
147
        type cycle_type is (load_instruction, load_indirect, load_data, store_data);
148
        signal cycletype : cycle_type;
149
        signal cycle : integer range 0 to 9 := 0; -- 10 cycles per memory access cycle
150
        -- NOTE: rotshift relies on this range!
151
        constant cycle_setup_read: integer := 0;
152
        constant cycle_read: integer := 2;  -- memory is over-registered
153
        constant cycle_execute: integer := 3;
154
        constant cycle_setup_write: integer := 5;
155
        constant cycle_wrote: integer := 6;  -- not actually used
156
        constant cycle_skip: integer := 9;
157
 
158
        COMPONENT onecomplement_adder
159
        PORT(
160
                A : IN std_logic_vector(0 to 17);
161
                B : IN std_logic_vector(0 to 17);
162
                CI : IN std_logic;
163
                SUM : OUT std_logic_vector(0 to 17);
164
                OV : OUT std_logic;
165
                CSUM : OUT std_logic_vector(0 to 17)
166
                );
167
        END COMPONENT;
168
 
169
        COMPONENT pdp1rotshift
170
        PORT(
171
                ac : IN std_logic_vector(0 to 17);
172
                io : IN std_logic_vector(0 to 17);
173
                right : IN std_logic;
174
                shift : IN std_logic;
175
                words : IN std_logic_vector(0 to 1);
176
                acout : OUT std_logic_vector(0 to 17);
177
                ioout : OUT std_logic_vector(0 to 17)
178
                );
179
        END COMPONENT;
180
        signal rotshift_ac, rotshift_io: word;
181
        signal rotshift_right, rotshift_shift: std_logic;
182
        signal rotshift_words: std_logic_vector(0 to 1);
183
        signal add_a, add_b, add_sum, add_csum, dis_term: word;
184
        signal add_ci, add_ov: std_logic;
185
        signal skipcond: std_logic;     -- skip condition for op_skip
186
        signal ac_eq_mb : boolean;
187
        -- purpose: value of a sense switch if n valid, else '1'
188
        function sense_or_one (
189
          n        : integer;          -- which sense flag
190
          sense_sw : std_logic_vector(1 to 6))  -- sense switches
191
          return std_logic is
192
        begin  -- sense_or_one
193
          for i in 1 to 6 loop
194
            if n=i then
195
              return sense_sw(n);
196
            end if;
197
          end loop;  -- i
198
          return '1';
199
        end sense_or_one;
200
begin
201
        AWAKE <= '0' when IOWAIT or RESET='1' or HALT else '1';
202
 
203
        Inst_pdp1rotshift: pdp1rotshift PORT MAP(
204
                ac => AC,                       -- shift operation is read from memory
205
                io => IO,
206
                right => rotshift_right,
207
                shift => rotshift_shift,
208
                words => rotshift_words,
209
                acout => rotshift_ac,
210
                ioout => rotshift_io
211
        );
212
        with op select
213
          rotshift_right <= '1' when op_mus,
214
          '0' when op_dis,
215
          M_DO(5) when others;
216
        with op select
217
          rotshift_shift <= '1' when op_mus,
218
          '-' when op_dis,
219
          M_DO(6) when others;
220
        with op select
221
          rotshift_words <= "11" when op_mus,
222
          "11" when op_dis,
223
          M_DO(7 to 8) when others;
224
 
225
        Inst_onecomplement_adder: onecomplement_adder PORT MAP(
226
                A => add_a,
227
                B => add_b,
228
                CI => add_ci,
229
                SUM => add_sum,
230
                OV => add_ov,
231
                CSUM => add_csum
232
        );
233
        -- we use this same adder for addition, subtraction, indexing and multiply/divide step
234
        with io(17) select
235
          dis_term <= not MB when '1',
236
                      MB when '0',
237
                      (others=>'-') when others;
238
        with op select
239
          add_a <= o"000001" when op_idx | op_isp,
240
                   AC when op_add|op_mus|op_dis,
241
                   (others=>'-') when others;
242
        with op select
243
          add_b <= MB when op_add|op_idx|op_isp|op_mus,
244
                   not MB when op_sub,
245
                   dis_term when op_dis,
246
                   (others=>'-') when others;
247
        add_ci <= '1' when op=op_dis and io(17)='0' else
248
                  '0';
249
 
250
        M_DI <= MB;
251
        ac_eq_mb <= AC=MB;
252
 
253
        skipcond <= '1' when (
254
          (sza='1' and AC=o"00_0000") or        -- accumulator zero
255
          (spa='1' and AC(0)='0') or      -- accumulator positive
256
          (sma='1' and AC(0)='1') or     -- accumulator negative
257
          (szo='1' and OV='0') or                -- zero overflow
258
          (spi='1' and IO(0)='0') or      -- positive IO register
259
          (MB(12 to 14)=o"7" and sw_sense=o"00") or     -- all sense switches 0
260
          (sense_or_one(to_integer(unsigned(MB(12 to 14))),sw_sense)='0') or
261
          false                         -- so all lines above end with or
262
          ) else '0';
263
 
264
        process (CLK, RESET)
265
          variable idx: unsigned(0 to 17);
266
          variable tmp_w: word;
267
        begin
268
          if RESET='1' then                                     -- asynchronous reset
269
            AC <= (others => '0');
270
            IO <= (others => '0');
271
            PC <= o"0000";
272
            OV <= '0';
273
            PF <= (others => '0');
274
            -- memory control
275
            MW <= '0';
276
            MA <= o"0000";
277
            -- reset our internal state
278
            op <= o"00";
279
            IOWAIT <= false;
280
            IOT <= (others => '0');
281
            cycletype <= load_instruction;
282
            cycle <= cycle_setup_read;
283
          elsif rising_edge(CLK) then
284
            if IO_set='1' then
285
              IO <= IO_in;
286
            end if;
287
            IOT <= (others => '0');     -- ordinarily no io trigger pulse
288
            -- Advance the cycle, unless we're halted
289
            if IOWAIT then
290
              if IODONE='1' then
291
                IOWAIT <= false;
292
              end if;
293
            end if;
294
            -- pause during setup_read cycle for halt or iowait
295
            if not ((IOWAIT or HALT) and (cycle=cycle_setup_read)) then
296
              if cycle=9 then
297
                cycle <= 0;
298
              else
299
                cycle <= cycle+1;
300
              end if;
301
 
302
              -- common logic for signals
303
              if cycle=cycle_setup_write then
304
                MW <= '1';
305
              else
306
                MW <= '0';
307
              end if;
308
              if (op=op_rotshiftr or op=op_rotshiftl) then
309
                case cycle is
310
                  when 9 =>          -- don't shift on cycle 9
311
                  when others =>
312
                    if MB(9+cycle)='1' then
313
                      AC <= rotshift_ac;    -- perform rotate/shift instructions
314
                      if IO_set/='1' then
315
                        IO <= rotshift_io;
316
                      end if;
317
                    end if;
318
                end case;
319
              end if;
320
 
321
              case cycle is
322
                when cycle_read =>              -- have read something from memory
323
                  MB <= M_DO;
324
                  case cycletype is
325
                    when load_instruction =>    -- it's our next instruction
326
                      op <= M_DO(0 to 5);
327
                      if op/=op_xct then  -- indirect execution
328
                        PC<=PC+1;
329
                      end if;
330
                    when load_indirect =>               -- completing an indirect instruction
331
                      ib <= M_DO(5);            -- update indirection bit
332
                    when others =>              -- data access cycle
333
                  end case;
334
                when cycle_skip =>
335
                  if ((op=op_skip or op=op_skipi) and (skipcond xor ib)='1') or
336
                     (op=op_isp and cycletype=store_data and AC(0)='0') or
337
                     (op=op_sas and cycletype=load_data and ac_eq_mb) or
338
                     (op=op_sad and cycletype=load_data and not ac_eq_mb) or
339
                     FALSE then    -- increase PC an extra time
340
                    PC <= PC+1;
341
                  end if;
342
                  if (op=op_skip or op=op_skipi) and szo='1' then
343
                    OV <= '0';          -- clear overflow after checking it
344
                  end if;
345
                when cycle_setup_read =>        -- set up the memory address
346
                  case cycletype is
347
                    when load_instruction|load_indirect =>
348
                      case (op) is
349
                        -- memory loading instructions - will execute after loading data
350
                        when op_sas|op_sad|op_lac|op_lio|op_and|op_xor|op_ior|op_add|
351
                          op_sub|op_idx|op_isp|op_mus|op_dis =>
352
                          cycletype <= load_data;
353
                          MA <= y;
354
                        when op_xct =>      -- load specified instruction, do not change PC
355
                          cycletype <= load_instruction;
356
                          MA <= y;
357
                        when op_dac|op_dap|op_dip|op_dio|op_dzm =>        -- deposit instructions
358
                          cycletype <= store_data;
359
                          MA <= y;
360
                        when op_jmp|op_jsp|op_cal|op_jda =>             -- jumping instructions
361
                          if op/=op_jmp then
362
                            AC(0) <= OV;
363
                            AC(1 to 5) <= (others => '0');       -- extended PC
364
                            AC(6 to 17) <= std_logic_vector(PC);
365
                          end if;
366
                          if op=op_cal or op=op_jda then
367
                            if op=op_cal then
368
                              PC <= o"0101";
369
                              MA <= o"0100";
370
                            else
371
                              PC <= unsigned(y)+1;
372
                              MA <= y;
373
                            end if;
374
                            cycletype <= store_data;
375
                          else
376
                            MA <= y;
377
                            PC <= unsigned(y);
378
                            cycletype <= load_instruction;
379
                          end if;
380
                        when op_skipi|op_rotshiftr|op_lawm|op_iot_nw =>
381
                          -- instructions with IB set, yet are immediate
382
                          MA <= std_logic_vector(PC);
383
                          cycletype <= load_instruction;
384
                        when others =>  -- most instructions are followed by the next instruction
385
                          if ib='1' then  -- handle indirection bit
386
                            MA <= y;
387
                            cycletype <= load_indirect;
388
                          else
389
                            MA <= std_logic_vector(PC);
390
                            cycletype <= load_instruction;
391
                          end if;
392
                      end case;   -- end of by-instruction memory setup
393
                    when others =>      -- have done data load/store
394
                      MA <= std_logic_vector(PC);
395
                      cycletype <= load_instruction;
396
                  end case;
397
                when cycle_execute =>
398
                  -- execute common instructions - instr or operand has been read
399
                  case cycletype is
400
                    when load_instruction|load_indirect =>   -- new instr,
401
                      case op is
402
                        when op_law =>  -- load accumulator immediate
403
                          AC(0 to 5) <= (others => '0');
404
                          AC(6 to 17) <= y;
405
                        when op_lawm =>         -- load accumulator immediate negative
406
                          AC(0 to 5) <= (others => '1');
407
                          AC(6 to 17) <= not y;
408
                        when op_opr =>          -- operate group
409
                          if cli='1'  and IO_set/='1' then IO <= o"00_0000"; end if;
410
                          if hlt='1' then HALT <= TRUE; end if; -- HALT
411
                          if cla='1' then
412
                            tmp_w := (others => '0');
413
                          else
414
                            tmp_w := AC;
415
                          end if;
416
                          if lat='1' then tmp_w := tmp_w or sw_testw; end if;
417
                          if lap='1' then       -- or AC with PC and OV
418
                            tmp_w(6 to 17) := tmp_w(6 to 17) or std_logic_vector(PC);
419
                            tmp_w(0) := tmp_w(0) or OV;
420
                          end if;
421
                          if cma='1' then tmp_w := not tmp_w; end if;
422
                          AC <= tmp_w;
423
                          for j in 1 to 6 loop
424
                            if unsigned(flag_which)=j or unsigned(flag_which)=7 then
425
                              PF(j) <= flag_setto;      -- set or clear program flags
426
                            end if;
427
                          end loop;
428
                        when op_rotshiftl|op_rotshiftr =>
429
                          -- handled in a separate block
430
                        when op_skip|op_skipi =>
431
                          -- inverted skip is not documented in 1960 manual.
432
                          -- it does occur in PDP-1B emulator and 1963 manual.
433
                          -- all skips are handled in skip phase, for no
434
                          -- real reason
435
                        when op_iot|op_iot_nw =>                -- I/O transfer
436
                          -- Java emulator Spacewar! binary supports:
437
                          -- typewriter sequence break input,
438
                          -- display on ordinary display (7),
439
                          -- reading of controls using undocumented device 11,
440
                          --   should load 4 bits of button controls in low and
441
                          --   high ends of the word
442
                          -- and does display 3 display commands (disabled point?).
443
                          -- It uses nowait+pulse, nowait, and wait+noop modes, so waiting
444
                          -- has to be implemented.
445
                          IODOPULSE <= MB(5) xor MB(6);         -- generate an IODONE for this event
446
                          IOWAIT <= IB='1';
447
                          IOT(to_integer(unsigned(MB(12 to 17)))) <= '1';
448
 
449
                        when others =>
450
                          if ib='1' then                -- likely turns into a valid op once IB is cleared
451
                            cycletype <= load_indirect;
452
                          end if;
453
                      end case;     --  end of instruction check in execute phase
454
                    when load_data =>   -- loaded data for loading instruction
455
                      case (op) is
456
                        when op_sas|op_sad =>  -- handled in skip phase
457
                        when op_lac =>
458
                          AC <= M_DO;
459
                        when op_idx|op_isp =>
460
                          AC <= add_sum;
461
                          MB <= add_sum;
462
                        when op_lio =>
463
                          if IO_set/='1' then
464
                            IO <= MB;
465
                          end if;
466
                        when op_and =>
467
                          AC <= AC and MB;
468
                        when op_xor =>
469
                          AC <= AC xor MB;
470
                        when op_ior =>
471
                          AC <= AC or MB;
472
                        when op_add =>
473
                          AC <= add_csum;                       -- no negative 0
474
                          OV <= OV or add_ov;
475
                        when op_sub =>
476
                          AC <= add_sum;
477
                          OV <= OV or add_ov;
478
                          -- Multiply Step and Divide Step are the same opcode as Multiply and Divide.
479
                          -- There's no reasonable way for the CPU to determine which a program wants.
480
--          when op_mul =>              -- multiply originally takes 3-5 cycles. this one takes 2.
481
--              tmp_w := AC;
482
--              tmp_w2 := M_DO;
483
--              if tmp_w(0)='1' then tmp_w:=not tmp_w; end if;
484
--              if tmp_w2(0)='1' then tmp_w2:=not tmp_w2; end if;
485
--              product := tmp_w(1 to 17)*tmp_w2(1 to 17);
486
--              if AC(0)/=M_DO(0) then
487
--                      product:=not product;                   -- preserve sign
488
--                      AC(0)<='1';
489
--                      IO(0)<='1';
490
--              else
491
--                      AC(0)<='0';
492
--                      IO(0)<='0';
493
--              end if;
494
--              AC(1 to 17)<=product(0 to 16);
495
--              IO(1 to 17)<=product(17 to 33);
496
                        when op_mus =>          -- PDP-1B multiply step
497
                          if IO(17)='1' then
498
                            AC <= add_csum;
499
                          end if;
500
                          -- continued in next cycle
501
                        when op_dis =>          -- PDP-1B divide step
502
                          AC <= rotshift_ac;
503
                          IO(0 to 16) <= rotshift_io(0 to 16);
504
                          IO(17) <= not AC(0);
505
                          -- continued in next cycle
506
                        when others =>
507
                              -- can't happen, see cases leading to load_data.
508
                      end case;     -- end of load ops, execute cycle
509
                    when store_data =>
510
                      case op is
511
                        when op_dac =>
512
                          MB <= AC;
513
                        when op_dap =>
514
                          --MB(0 to 5) <= MB(0 to 5);
515
                          MB(6 to 17) <= AC(6 to 17);
516
                        when op_dip =>
517
                          MB(0 to 5) <= AC(0 to 5);
518
                          --MB(6 to 17) <= MB(6 to 17);
519
                        when op_dio =>
520
                          MB <= IO;
521
                        when op_dzm =>
522
                          MB <= o"00_0000";
523
                        when others =>  -- others should not occur
524
                      end case;
525
                  end case;         -- end of cycletype cases for execute cycle
526
                      -- FIXME more to fix here
527
                when cycle_execute+1 =>
528
                  case op is    -- multiply, divide and I/O use two stages
529
                    when op_mus =>
530
                      AC <= rotshift_ac;
531
                      if IO_set/='1' then
532
                        IO <= rotshift_io;
533
                      end if;
534
                    when op_dis =>
535
                      AC <= add_csum;
536
                    when others =>  -- note: rotshift uses 9 cycles
537
                  end case;
538
                when others =>
539
              end case;
540
            end if;
541
          end if;
542
        end process;
543
end Behavioral;
544
 

powered by: WebSVN 2.1.0

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