OpenCores
URL https://opencores.org/ocsvn/mcs-4/mcs-4/trunk

Subversion Repositories mcs-4

[/] [mcs-4/] [trunk/] [rtl/] [verilog/] [i4004/] [instruction_pointer.v] - Diff between revs 5 and 6

Show entire file | Details | Blame | View Log

Rev 5 Rev 6
Line 5... Line 5...
// 4004 Instruction Pointer Array
// 4004 Instruction Pointer Array
// 
// 
// This file is part of the MCS-4 project hosted at OpenCores:
// This file is part of the MCS-4 project hosted at OpenCores:
//      http://www.opencores.org/cores/mcs-4/
//      http://www.opencores.org/cores/mcs-4/
// 
// 
// Copyright © 2012, 2020 by Reece Pollack <rrpollack@opencores.org>
// Copyright © 2012, 2021 by Reece Pollack <rrpollack@opencores.org>
// 
// 
// These materials are provided under the Creative Commons
// These materials are provided under the Creative Commons
// "Attribution-NonCommercial-ShareAlike" Public License. They
// "Attribution-NonCommercial-ShareAlike" (CC BY-NC-SA) Public License.
// are NOT "public domain" and are protected by copyright.
// They are NOT "public domain", and are protected by copyright.
// 
// 
// This work based on materials provided by Intel Corporation and
// This work based on materials provided by Intel Corporation and
// others under the same license. See the file doc/License for
// others under the same license. See the file doc/License for
// details of this license.
// details of this license.
//
//
Line 57... Line 57...
        wire inh = (jin_fin & sc) | ((jun_jms | (jcn_isz & ~cn_n)) & dc);
        wire inh = (jin_fin & sc) | ((jun_jms | (jcn_isz & ~cn_n)) & dc);
 
 
        // Row Counter stuff
        // Row Counter stuff
        wire [1:0]       addr_ptr;                               // Effective Address counter
        wire [1:0]       addr_ptr;                               // Effective Address counter
        wire            addr_ptr_step;                  // CLK2(JMS&DC&M22+BBL(M22+X12+X22))
        wire            addr_ptr_step;                  // CLK2(JMS&DC&M22+BBL(M22+X12+X22))
 
    wire        n0459;
 
    wire        n0466;
 
 
        assign addr_ptr_step = ~(~clk2 | ~(((m22 | x12 | x22) & bbl) |
        assign addr_ptr_step = ~(~clk2 | ~(((m22 | x12 | x22) & bbl) |
                                                                           (m22 & dc & jms)));
                                                                           (m22 & dc & jms)));
        counter addr_ptr_0 (
        counter addr_ptr_0 (
                .sysclk(sysclk),
                .sysclk(sysclk),
                .step_a(clk1),
        .step_a_in(clk1),
                .step_b(addr_ptr_step),
        .step_b_in(addr_ptr_step),
                .q(addr_ptr[0])
        .step_a_out(n0459),
 
        .step_b_out(n0466),
 
        .q(),
 
        .qn(addr_ptr[0])
        );
        );
        counter addr_ptr_1 (
        counter addr_ptr_1 (
                .sysclk(sysclk),
                .sysclk(sysclk),
                .step_a( addr_ptr[0]),
        .step_a_in(n0459),
                .step_b(~addr_ptr[0]),
        .step_b_in(n0466),
                .q(addr_ptr[1])
        .step_a_out(),
 
        .step_b_out(),
 
        .q(),
 
        .qn(addr_ptr[1])
        );
        );
 
 
        // Refresh counter stuff
        // Refresh counter stuff
        wire [1:0]       addr_rfsh;                              // Row Refresh counter
        wire [1:0]       addr_rfsh;                              // Row Refresh counter
        wire            addr_rfsh_step;                 // (~INH)&X32&CLK2
        wire            addr_rfsh_step;                 // (~INH)&X32&CLK2
 
    wire        n0455;
 
    wire        n0463;
 
 
        assign addr_rfsh_step = ~inh & x32 & clk2;
        assign addr_rfsh_step = ~inh & x32 & clk2;
 
 
        counter addr_rfsh_0 (
        counter addr_rfsh_0 (
                .sysclk(sysclk),
                .sysclk(sysclk),
                .step_a(clk1),
        .step_a_in(clk1),
                .step_b(addr_rfsh_step),
        .step_b_in(addr_rfsh_step),
                .q(addr_rfsh[0])
        .step_a_out(n0455),
 
        .step_b_out(n0463),
 
        .q(),
 
        .qn(addr_rfsh[0])
        );
        );
        counter addr_rfsh_1 (
        counter addr_rfsh_1 (
                .sysclk(sysclk),
                .sysclk(sysclk),
                .step_a( addr_rfsh[0]),
        .step_a_in(n0455),
                .step_b(~addr_rfsh[0]),
        .step_b_in(n0463),
                .q(addr_rfsh[1])
        .step_a_out(),
 
        .step_b_out(),
 
        .q(),
 
        .qn(addr_rfsh[1])
        );
        );
 
 
        // Row selection mux
        // Row selection mux
        reg  [1:0]       row;                                    // {N0409, N0420}
        reg  [1:0]       row;                                    // {N0409, N0420}
        always @(posedge sysclk) begin
        always @(posedge sysclk) begin
Line 157... Line 173...
                                                (((jcn_isz & n0322) | (jun_jms & ~sc)) & m12)));
                                                (((jcn_isz & n0322) | (jun_jms & ~sc)) & m12)));
        wire wadb2 = ~(~clk2 | ~(a32 | (jun_jms & ~sc & x22)));
        wire wadb2 = ~(~clk2 | ~(a32 | (jun_jms & ~sc & x22)));
 
 
 
 
        // Manage the row data buffer
        // Manage the row data buffer
 
    wire [11:0] row_data = dram_array[row];
        always @(posedge sysclk) begin
        always @(posedge sysclk) begin
                if (precharge)
                if (precharge)
                        dram_temp <= 12'b0;
                        dram_temp <= 12'b0;
 
 
                if (row_read)
                if (row_read)
                        dram_temp <= dram_array[row];
            dram_temp <= row_data;
 
 
                if (wadb0)
                if (wadb0)
                        dram_temp[ 3:0] <= ~din_n;
                        dram_temp[ 3:0] <= ~din_n;
                if (wadb1)
                if (wadb1)
                        dram_temp[ 7:4] <= ~din_n;
                        dram_temp[ 7:4] <= ~din_n;
Line 180... Line 197...
                        dram_array[row] <= dram_temp;
                        dram_array[row] <= dram_temp;
        end
        end
 
 
        // Manage the data output mux
        // Manage the data output mux
        reg   [3:0]      dout;
        reg   [3:0]      dout;
        always @* begin
    always @(*) begin
                (* PARALLEL_CASE *)
                (* PARALLEL_CASE *)
                case (1'b1)
                case (1'b1)
                        radb0:          dout = dram_temp[ 3:0];
                        radb0:          dout = dram_temp[ 3:0];
                        radb1:          dout = dram_temp[ 7:4];
                        radb1:          dout = dram_temp[ 7:4];
                        radb2:          dout = dram_temp[11:8];
                        radb2:          dout = dram_temp[11:8];

powered by: WebSVN 2.1.0

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