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

Subversion Repositories i650

[/] [i650/] [trunk/] [rtl/] [prog_step.v] - Blame information for rev 20

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 20 eightycc
`timescale 1ns / 1ps
2
//////////////////////////////////////////////////////////////////////////////////
3
// IBM 650 Reconstruction in Verilog (i650)
4
// 
5
// This file is part of the IBM 650 Reconstruction in Verilog (i650) project
6
// http:////www.opencores.org/project,i650
7
//
8
// Description: Program step register.
9
// 
10
// Additional Comments: See US 2959351, Fig. 62.
11
//
12
// Copyright (c) 2015 Robert Abeles
13
//
14
// This source file is free software; you can redistribute it
15
// and/or modify it under the terms of the GNU Lesser General
16
// Public License as published by the Free Software Foundation;
17
// either version 2.1 of the License, or (at your option) any
18
// later version.
19
//
20
// This source is distributed in the hope that it will be
21
// useful, but WITHOUT ANY WARRANTY; without even the implied
22
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
23
// PURPOSE.  See the GNU Lesser General Public License for more
24
// details.
25
//
26
// You should have received a copy of the GNU Lesser General
27
// Public License along with this source; if not, download it
28
// from http://www.opencores.org/lgpl.shtml
29
//////////////////////////////////////////////////////////////////////////////////
30
`include "defines.v"
31
 
32
module prog_step (
33
    input rst,
34
    input ap, dp,
35
         input dx, d0, d10,
36
    input [0:3] early_idx, ontime_idx,
37
         input man_prog_reset, rips,
38
         input [0:6] adder_out, sel_store_out,
39
         input prog_ped_regen, prog_add, // see tlu 86d
40
 
41
         output reg [0:6] early_out, ontime_out,
42
         output [0:6] ped_out,
43
         output prog_restart_sig
44
    );
45
 
46
        reg [0:6] digits [0:15];
47
        reg ri_prog_step;
48
 
49
        //-----------------------------------------------------------------------------
50
        // AP -- Read digits RAM, write early and ontime outs
51
        //       Start/stop RI control
52
        //                      Generate prog_restart_sig
53
        //-----------------------------------------------------------------------------
54
        digit_pulse pr_sig (rst, ap, ~rips, 1'b1, prog_restart_sig);
55
        always @(posedge ap)
56
                if (rst) begin
57
                        ri_prog_step <= 0;
58
                        early_out <= `biq_blank;
59
                        ontime_out <= `biq_blank;
60
                end else begin
61
                   if (d0) begin
62
                                ri_prog_step <= rips;
63
                        end
64
                        early_out <= (dx | d10)? `biq_blank : digits[early_idx];
65
                        ontime_out <= man_prog_reset? `biq_0 : early_out;
66
                end;
67
 
68
        //-----------------------------------------------------------------------------
69
        // DP
70
        //-----------------------------------------------------------------------------
71
        assign ped_out = ri_prog_step? sel_store_out
72
                       : prog_ped_regen? ontime_out
73
                                                : prog_add? adder_out
74
                                                : `biq_blank;
75
        always @(posedge dp)
76
                digits[ontime_idx] <= (dx | d0)? `biq_blank : ped_out;
77
 
78
endmodule

powered by: WebSVN 2.1.0

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