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

Subversion Repositories rtf8088

[/] [rtf8088/] [trunk/] [rtl/] [verilog/] [FETCH_IMMEDIATE.v] - Diff between revs 2 and 8

Show entire file | Details | Blame | View Log

Rev 2 Rev 8
Line 4... Line 4...
//  FETCH_IMM8
//  FETCH_IMM8
//  - Fetch 8 bit immediate as operand 'B'
//  - Fetch 8 bit immediate as operand 'B'
//
//
//
//
//  2009-2012  Robert Finch
//  2009-2012  Robert Finch
//  robfinch[remove]@opencores.org
//  robfinch[remove]@finitron.ca
//  Stratford
//  Stratford
//
//
// This source file is free software: you can redistribute it and/or modify 
// This source file is free software: you can redistribute it and/or modify 
// it under the terms of the GNU Lesser General Public License as published 
// it under the terms of the GNU Lesser General Public License as published 
// by the Free Software Foundation, either version 3 of the License, or     
// by the Free Software Foundation, either version 3 of the License, or     
Line 32... Line 32...
//   operation.
//   operation.
// ============================================================================
// ============================================================================
//
//
FETCH_IMM8:
FETCH_IMM8:
        begin
        begin
                `INITIATE_CODE_READ
                code_read();
                state <= FETCH_IMM8_ACK;
                state <= FETCH_IMM8_ACK;
        end
        end
 
 
FETCH_IMM8_ACK:
FETCH_IMM8_ACK:
        if (ack_i) begin
        if (ack_i) begin
                `TERMINATE_CODE_READ
                term_code_read();
                lock_o <= bus_locked;
                lock_o <= bus_locked;
                b <= {{8{dat_i[7]}},dat_i};
                b <= {{8{dat_i[7]}},dat_i};
                state <= EXECUTE;
                state <= EXECUTE;
        end
        end
 
 
FETCH_IMM16:
FETCH_IMM16:
        begin
        begin
                lock_o <= 1'b1;
                lock_o <= 1'b1;
                `INITIATE_CODE_READ
                code_read();
                state <= FETCH_IMM16_ACK;
                state <= FETCH_IMM16_ACK;
        end
        end
FETCH_IMM16_ACK:
FETCH_IMM16_ACK:
        if (ack_i) begin
        if (ack_i) begin
                `PAUSE_CODE_READ
                pause_code_read();
                state <= FETCH_IMM16a;
                state <= FETCH_IMM16a;
                b[ 7:0] <= dat_i;
                b[ 7:0] <= dat_i;
        end
        end
FETCH_IMM16a:
FETCH_IMM16a:
        begin
        begin
                `CONTINUE_CODE_READ
                continue_code_read();
                state <= FETCH_IMM16a_ACK;
                state <= FETCH_IMM16a_ACK;
        end
        end
FETCH_IMM16a_ACK:
FETCH_IMM16a_ACK:
        if (ack_i) begin
        if (ack_i) begin
                `TERMINATE_CODE_READ
                term_code_read();
                lock_o <= bus_locked;
                lock_o <= bus_locked;
                b[15:8] <= dat_i;
                b[15:8] <= dat_i;
                $display("Fetched #%h", {dat_i,b[7:0]});
                $display("Fetched #%h", {dat_i,b[7:0]});
                state <= EXECUTE;
                state <= EXECUTE;
        end
        end

powered by: WebSVN 2.1.0

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