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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [rtl/] [core/] [neorv32_cpu.vhd] - Diff between revs 27 and 29

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

Rev 27 Rev 29
Line 8... Line 8...
-- #   * neorv32_cpu_cp_muldiv.vhd      : MULDIV co-processor                                      #
-- #   * neorv32_cpu_cp_muldiv.vhd      : MULDIV co-processor                                      #
-- #   * neorv32_cpu_ctrl.vhd           : CPU control and CSR system                               #
-- #   * neorv32_cpu_ctrl.vhd           : CPU control and CSR system                               #
-- #     * neorv32_cpu_decompressor.vhd : Compressed instructions decoder                          #
-- #     * neorv32_cpu_decompressor.vhd : Compressed instructions decoder                          #
-- #   * neorv32_cpu_regfile.vhd        : Data register file                                       #
-- #   * neorv32_cpu_regfile.vhd        : Data register file                                       #
-- #                                                                                               #
-- #                                                                                               #
-- # Check the processor's documentary for more information: docs/NEORV32.pdf                      #
-- # Check out the processor's data sheet for more information: docs/NEORV32.pdf                   #
-- # ********************************************************************************************* #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License                                                                          #
-- # BSD 3-Clause License                                                                          #
-- #                                                                                               #
-- #                                                                                               #
-- # Copyright (c) 2020, Stephan Nolting. All rights reserved.                                     #
-- # Copyright (c) 2020, Stephan Nolting. All rights reserved.                                     #
-- #                                                                                               #
-- #                                                                                               #
Line 115... Line 115...
  signal alu_cmp    : std_ulogic_vector(1 downto 0); -- alu comparator result
  signal alu_cmp    : std_ulogic_vector(1 downto 0); -- alu comparator result
  signal imm        : std_ulogic_vector(data_width_c-1 downto 0); -- immediate
  signal imm        : std_ulogic_vector(data_width_c-1 downto 0); -- immediate
  signal instr      : std_ulogic_vector(data_width_c-1 downto 0); -- new instruction
  signal instr      : std_ulogic_vector(data_width_c-1 downto 0); -- new instruction
  signal rs1, rs2   : std_ulogic_vector(data_width_c-1 downto 0); -- source registers
  signal rs1, rs2   : std_ulogic_vector(data_width_c-1 downto 0); -- source registers
  signal alu_res    : std_ulogic_vector(data_width_c-1 downto 0); -- alu result
  signal alu_res    : std_ulogic_vector(data_width_c-1 downto 0); -- alu result
  signal alu_add    : std_ulogic_vector(data_width_c-1 downto 0); -- alu adder result
 
  signal rdata      : std_ulogic_vector(data_width_c-1 downto 0); -- memory read data
  signal rdata      : std_ulogic_vector(data_width_c-1 downto 0); -- memory read data
  signal alu_wait   : std_ulogic; -- alu is busy due to iterative unit
  signal alu_wait   : std_ulogic; -- alu is busy due to iterative unit
  signal bus_i_wait : std_ulogic; -- wait for current bus instruction fetch
  signal bus_i_wait : std_ulogic; -- wait for current bus instruction fetch
  signal bus_d_wait : std_ulogic; -- wait for current bus data access
  signal bus_d_wait : std_ulogic; -- wait for current bus data access
  signal csr_rdata  : std_ulogic_vector(data_width_c-1 downto 0); -- csr read data
  signal csr_rdata  : std_ulogic_vector(data_width_c-1 downto 0); -- csr read data
Line 191... Line 190...
    bus_i_wait_i  => bus_i_wait,  -- wait for bus
    bus_i_wait_i  => bus_i_wait,  -- wait for bus
    bus_d_wait_i  => bus_d_wait,  -- wait for bus
    bus_d_wait_i  => bus_d_wait,  -- wait for bus
    -- data input --
    -- data input --
    instr_i       => instr,       -- instruction
    instr_i       => instr,       -- instruction
    cmp_i         => alu_cmp,     -- comparator status
    cmp_i         => alu_cmp,     -- comparator status
    alu_add_i     => alu_add,     -- ALU.add result
 
    alu_res_i     => alu_res,     -- ALU processing result
    alu_res_i     => alu_res,     -- ALU processing result
    -- data output --
    -- data output --
    imm_o         => imm,         -- immediate
    imm_o         => imm,         -- immediate
    fetch_pc_o    => fetch_pc,    -- PC for instruction fetch
    fetch_pc_o    => fetch_pc,    -- PC for instruction fetch
    curr_pc_o     => curr_pc,     -- current PC (corresponding to current instruction)
    curr_pc_o     => curr_pc,     -- current PC (corresponding to current instruction)
Line 261... Line 259...
    rs2_i       => rs2,           -- rf source 2
    rs2_i       => rs2,           -- rf source 2
    pc2_i       => curr_pc,       -- delayed PC
    pc2_i       => curr_pc,       -- delayed PC
    imm_i       => imm,           -- immediate
    imm_i       => imm,           -- immediate
    -- data output --
    -- data output --
    cmp_o       => alu_cmp,       -- comparator status
    cmp_o       => alu_cmp,       -- comparator status
    add_o       => alu_add,       -- OPA + OPB
 
    res_o       => alu_res,       -- ALU result
    res_o       => alu_res,       -- ALU result
    -- co-processor interface --
    -- co-processor interface --
    cp0_start_o => cp0_start,     -- trigger co-processor 0
    cp0_start_o => cp0_start,     -- trigger co-processor 0
    cp0_data_i  => cp0_data,      -- co-processor 0 result
    cp0_data_i  => cp0_data,      -- co-processor 0 result
    cp0_valid_i => cp0_valid,     -- co-processor 0 result valid
    cp0_valid_i => cp0_valid,     -- co-processor 0 result valid
Line 335... Line 332...
    i_wait_o       => bus_i_wait,     -- wait for fetch to complete
    i_wait_o       => bus_i_wait,     -- wait for fetch to complete
    --
    --
    ma_instr_o     => ma_instr,       -- misaligned instruction address
    ma_instr_o     => ma_instr,       -- misaligned instruction address
    be_instr_o     => be_instr,       -- bus error on instruction access
    be_instr_o     => be_instr,       -- bus error on instruction access
    -- cpu data access interface --
    -- cpu data access interface --
    addr_i         => alu_add,        -- ALU.add result -> access address
    addr_i         => alu_res,       -- ALU result -> access address
    wdata_i        => rs2,            -- write data
    wdata_i        => rs2,            -- write data
    rdata_o        => rdata,          -- read data
    rdata_o        => rdata,          -- read data
    mar_o          => mar,            -- current memory address register
    mar_o          => mar,            -- current memory address register
    d_wait_o       => bus_d_wait,     -- wait for access to complete
    d_wait_o       => bus_d_wait,     -- wait for access to complete
    --
    --

powered by: WebSVN 2.1.0

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