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

Subversion Repositories i650

[/] [i650/] [trunk/] [rtl/] [operator_ctl.v] - Diff between revs 20 and 21

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 20 Rev 21
Line 41... Line 41...
                  prog_ontime,
                  prog_ontime,
      input [0:5] command,
      input [0:5] command,
 
 
      output reg[0:6] data_out, addr_out, console_out,
      output reg[0:6] data_out, addr_out, console_out,
      output [0:6] display_digit,
      output [0:6] display_digit,
      output reg console_to_addr,
      output reg console_to_addr, acc_ri_console,
      output reg[0:14] gs_ram_addr,
      output reg[0:14] gs_ram_addr,
      output reg read_gs, write_gs,
      output reg read_gs, write_gs,
      output reg pgm_start, pgm_stop, err_reset, err_sense_reset,
      output reg pgm_start, pgm_stop, err_reset, err_sense_reset,
      output run_control, half_or_pgm_stop, ri_storage, ro_storage,
      output run_control, half_or_pgm_stop, ri_storage, ro_storage,
             storage_control,
             storage_control,
Line 141... Line 141...
   `define state_read_dist_2           6'd45
   `define state_read_dist_2           6'd45
   `define state_read_dist_3           6'd46
   `define state_read_dist_3           6'd46
   `define state_read_prog_1           6'd47
   `define state_read_prog_1           6'd47
   `define state_read_prog_2           6'd48
   `define state_read_prog_2           6'd48
   `define state_read_prog_3           6'd49
   `define state_read_prog_3           6'd49
   `define state_clear_drum_1          6'd50
   `define state_write_acc_1           6'd50
   `define state_clear_drum_2          6'd51
   `define state_write_acc_2           6'd51
   `define state_clear_drum_3          6'd52
   `define state_write_acc_3           6'd52
   `define state_load_gs_1             6'd53
   `define state_clear_drum_1          6'd53
   `define state_load_gs_2             6'd54
   `define state_clear_drum_2          6'd54
   `define state_dump_gs_1             6'd55
   `define state_clear_drum_3          6'd55
   `define state_dump_gs_2             6'd56
   `define state_load_gs_1             6'd56
   `define state_dump_gs_3             6'd57
   `define state_load_gs_2             6'd57
   `define state_dump_gs_4             6'd58
   `define state_dump_gs_1             6'd58
 
   `define state_dump_gs_2             6'd59
 
   `define state_dump_gs_3             6'd60
 
   `define state_dump_gs_4             6'd61
 
 
   always @(posedge clk)
   always @(posedge clk)
      if (rst) begin
      if (rst) begin
         console_to_addr  <= 0;
         console_to_addr  <= 0;
         pgm_start        <= 0;
         pgm_start        <= 0;
Line 198... Line 201...
         do_clear_drum      <= 0;
         do_clear_drum      <= 0;
 
 
         gs_ram_addr        <= 15'd0;
         gs_ram_addr        <= 15'd0;
         read_gs            <= 0;
         read_gs            <= 0;
         write_gs           <= 0;
         write_gs           <= 0;
 
         acc_ri_console     <= 0;
         console_out        <= `biq_blank;
         console_out        <= `biq_blank;
      end else if (dp) begin
      end else if (dp) begin
         case (state)
         case (state)
            `state_idle: begin
            `state_idle: begin
               case (command)
               case (command)
Line 220... Line 224...
                        hard_reset <= 1;
                        hard_reset <= 1;
                        state <= `state_hard_reset_1;
                        state <= `state_hard_reset_1;
                     end else if (do_reset_console) begin
                     end else if (do_reset_console) begin
                        do_reset_console   <= 0;
                        do_reset_console   <= 0;
                        state <= `state_reset_console_1;
                        state <= `state_reset_console_1;
                     end else if (do_clear_drum) begin
 
                        do_clear_drum <= 0;
 
                        state <= `state_clear_drum_1;
 
                     end else if (do_pgm_reset) begin
                     end else if (do_pgm_reset) begin
                        do_pgm_reset       <= 0;
                        do_pgm_reset       <= 0;
                        state <= `state_pgm_reset_1;
                        state <= `state_pgm_reset_1;
                     end else if (do_acc_reset) begin
                     end else if (do_acc_reset) begin
                        do_acc_reset       <= 0;
                        do_acc_reset       <= 0;
Line 238... Line 239...
                        state <= `state_err_reset_1;
                        state <= `state_err_reset_1;
                     end else if (do_err_sense_reset) begin
                     end else if (do_err_sense_reset) begin
                        do_err_sense_reset <= 0;
                        do_err_sense_reset <= 0;
                        err_sense_reset <= 1;
                        err_sense_reset <= 1;
                        state <= `state_err_sense_reset_1;
                        state <= `state_err_sense_reset_1;
 
                     end else if (do_clear_drum) begin
 
                        do_clear_drum <= 0;
 
                        state <= `state_clear_drum_1;
                     end else begin
                     end else begin
                        busy <= 0;
                        busy <= 0;
                        digit_ready <= 0;
                        digit_ready <= 0;
                     end
                     end
                  end
                  end
Line 485... Line 489...
                  `cmd_read_prog: begin
                  `cmd_read_prog: begin
                     busy <= 1;
                     busy <= 1;
                     state <= `state_read_prog_1;
                     state <= `state_read_prog_1;
                  end
                  end
 
 
 
                  `cmd_write_acc: begin
 
                     busy <= 1;
 
                     state <= `state_write_acc_1;
 
                  end
 
 
                  // 0 : Ignore if not in manual
                  // 0 : Ignore if not in manual
                  //     Clear gs_ram_addr
                  //     Clear gs_ram_addr
                  // 1 : Synchronize with d10
                  // 1 : Synchronize with d10
                  //     Turn on console_write_gs
                  //     Turn on console_write_gs
                  // 2 : Put a digit:
                  // 2 : Put a digit:
Line 858... Line 867...
            `state_read_prog_3: begin
            `state_read_prog_3: begin
               digit_ready <= 0;
               digit_ready <= 0;
               state <= `state_idle;
               state <= `state_idle;
            end
            end
 
 
 
            `state_write_acc_1: begin
 
               if (wu & d10) begin
 
                  console_out <= cmd_digit_in;
 
                  acc_ri_console <= 1;
 
                  digit_ready <= 1;
 
                  state <= `state_write_acc_2;
 
               end
 
            end
 
 
 
            `state_write_acc_2: begin
 
               console_out <= cmd_digit_in;
 
               if (wu & d10) begin
 
                  digit_ready <= 0;
 
                  state <= `state_write_acc_3;
 
               end
 
            end
 
 
 
            `state_write_acc_3: begin
 
               acc_ri_console <= 0;
 
               state <= `state_idle;
 
            end
 
 
            // 0 : Ignore if not in manual
            // 0 : Ignore if not in manual
            // 1 : Synchronize with dx
            // 1 : Synchronize with dx
            //     Put first dx digit
            //     Put first dx digit
            // 2 : Put a digit:
            // 2 : Put a digit:
            //     dx: blank
            //     dx: blank

powered by: WebSVN 2.1.0

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