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

Subversion Repositories neorv32

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

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

Rev 24 Rev 27
Line 130... Line 130...
  signal be_instr   : std_ulogic; -- bus error on instruction access
  signal be_instr   : std_ulogic; -- bus error on instruction access
  signal be_load    : std_ulogic; -- bus error on load data access
  signal be_load    : std_ulogic; -- bus error on load data access
  signal be_store   : std_ulogic; -- bus error on store data access
  signal be_store   : std_ulogic; -- bus error on store data access
  signal fetch_pc   : std_ulogic_vector(data_width_c-1 downto 0); -- pc for instruction fetch
  signal fetch_pc   : std_ulogic_vector(data_width_c-1 downto 0); -- pc for instruction fetch
  signal curr_pc    : std_ulogic_vector(data_width_c-1 downto 0); -- current pc (for current executed instruction)
  signal curr_pc    : std_ulogic_vector(data_width_c-1 downto 0); -- current pc (for current executed instruction)
  signal next_pc    : std_ulogic_vector(data_width_c-1 downto 0); -- next pc (for current executed instruction)
  signal next_pc    : std_ulogic_vector(data_width_c-1 downto 0); -- next pc (for next to-be-executed instruction)
 
 
  -- co-processor interface --
  -- co-processor interface --
  signal cp_opa,    cp_opb    : std_ulogic_vector(data_width_c-1 downto 0);
 
  signal cp0_data,  cp1_data  : std_ulogic_vector(data_width_c-1 downto 0);
  signal cp0_data,  cp1_data  : std_ulogic_vector(data_width_c-1 downto 0);
  signal cp0_valid, cp1_valid : std_ulogic;
  signal cp0_valid, cp1_valid : std_ulogic;
  signal cp0_start, cp1_start : std_ulogic;
  signal cp0_start, cp1_start : std_ulogic;
 
 
  -- pmp interface --
  -- pmp interface --
Line 193... Line 192...
    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_add_i     => alu_add,     -- ALU.add 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)
    next_pc_o     => next_pc,     -- next PC (corresponding to current instruction)
    next_pc_o     => next_pc,     -- next PC (corresponding to current instruction
    -- csr interface --
 
    csr_wdata_i   => alu_res,     -- CSR write data
 
    csr_rdata_o   => csr_rdata,   -- CSR read data
    csr_rdata_o   => csr_rdata,   -- CSR read data
    -- interrupts (risc-v compliant) --
    -- interrupts (risc-v compliant) --
    msw_irq_i     => msw_irq_i,   -- machine software interrupt
    msw_irq_i     => msw_irq_i,   -- machine software interrupt
    mext_irq_i    => mext_irq_i,  -- machine external interrupt
    mext_irq_i    => mext_irq_i,  -- machine external interrupt
    mtime_irq_i   => mtime_irq_i, -- machine timer interrupt
    mtime_irq_i   => mtime_irq_i, -- machine timer interrupt
Line 261... Line 259...
    -- data input --
    -- data input --
    rs1_i       => rs1,           -- rf source 1
    rs1_i       => rs1,           -- rf source 1
    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
    csr_i       => csr_rdata,     -- csr read data
 
    -- data output --
    -- data output --
    cmp_o       => alu_cmp,       -- comparator status
    cmp_o       => alu_cmp,       -- comparator status
    add_o       => alu_add,       -- OPA + OPB
    add_o       => alu_add,       -- OPA + OPB
    res_o       => alu_res,       -- ALU result
    res_o       => alu_res,       -- ALU result
    -- co-processor interface --
    -- co-processor interface --
    cp_opa_o    => cp_opa,        -- co-processor operand a
 
    cp_opb_o    => cp_opb,        -- co-processor operand b
 
    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
    cp1_start_o => cp1_start,     -- trigger co-processor 1
    cp1_start_o => cp1_start,     -- trigger co-processor 1
    cp1_data_i  => cp1_data,      -- co-processor 1 result
    cp1_data_i  => cp1_data,      -- co-processor 1 result
Line 295... Line 290...
      clk_i   => clk_i,           -- global clock, rising edge
      clk_i   => clk_i,           -- global clock, rising edge
      rstn_i  => rstn_i,          -- global reset, low-active, async
      rstn_i  => rstn_i,          -- global reset, low-active, async
      ctrl_i  => ctrl,            -- main control bus
      ctrl_i  => ctrl,            -- main control bus
      -- data input --
      -- data input --
      start_i => cp0_start,       -- trigger operation
      start_i => cp0_start,       -- trigger operation
      rs1_i   => cp_opa,          -- rf source 1
      rs1_i   => rs1,             -- rf source 1
      rs2_i   => cp_opb,          -- rf source 2
      rs2_i   => rs2,             -- rf source 2
      -- result and status --
      -- result and status --
      res_o   => cp0_data,        -- operation result
      res_o   => cp0_data,        -- operation result
      valid_o => cp0_valid        -- data output valid
      valid_o => cp0_valid        -- data output valid
    );
    );
  end generate;
  end generate;

powered by: WebSVN 2.1.0

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