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

Subversion Repositories yifive

[/] [yifive/] [trunk/] [caravel_yifive/] [verilog/] [rtl/] [syntacore/] [scr1/] [src/] [core/] [pipeline/] [scr1_pipe_top.sv] - Diff between revs 11 and 21

Show entire file | Details | Blame | View Log

Rev 11 Rev 21
Line 1... Line 1...
/// Copyright by Syntacore LLC © 2016-2020. See LICENSE for details
/// Copyright by Syntacore LLC © 2016-2020. See LICENSE for details
/// @file       
/// @file       
/// @brief      SCR1 pipeline top
/// @brief      SCR1 pipeline top
///
///
 
 
 
//----------------------------------------------------------------------------------
 
//  project : YiFive
 
// Rev: June 10, 2021, Dinesh A
 
//           Bugfix- reset correction for scr1_pipe_tdu when debug is not enabled
 
//           Note: previously reset rst_n is floating at simulation is failing
 
//           when SCR1_DBG_EN is disabled
 
//---------------------------------------------------------------------------------
 
 
`include "scr1_arch_description.svh"
`include "scr1_arch_description.svh"
`include "scr1_memif.svh"
`include "scr1_memif.svh"
`include "scr1_riscv_isa_decoding.svh"
`include "scr1_riscv_isa_decoding.svh"
`include "scr1_csr.svh"
`include "scr1_csr.svh"
 
 
Line 29... Line 37...
`endif // SCR1_DBG_EN
`endif // SCR1_DBG_EN
    input   logic                                       clk,                        // Pipe clock
    input   logic                                       clk,                        // Pipe clock
 
 
    // Instruction Memory Interface
    // Instruction Memory Interface
    output  logic                                       pipe2imem_req_o,            // IMEM request
    output  logic                                       pipe2imem_req_o,            // IMEM request
    output  type_scr1_mem_cmd_e                         pipe2imem_cmd_o,            // IMEM command
    output  logic                                       pipe2imem_cmd_o,            // IMEM command
    output  logic [`SCR1_IMEM_AWIDTH-1:0]               pipe2imem_addr_o,           // IMEM address
    output  logic [`SCR1_IMEM_AWIDTH-1:0]               pipe2imem_addr_o,           // IMEM address
    input   logic                                       imem2pipe_req_ack_i,        // IMEM request acknowledge
    input   logic                                       imem2pipe_req_ack_i,        // IMEM request acknowledge
    input   logic [`SCR1_IMEM_DWIDTH-1:0]               imem2pipe_rdata_i,          // IMEM read data
    input   logic [`SCR1_IMEM_DWIDTH-1:0]               imem2pipe_rdata_i,          // IMEM read data
    input   type_scr1_mem_resp_e                        imem2pipe_resp_i,           // IMEM response
    input   logic [1:0]                                 imem2pipe_resp_i,           // IMEM response
 
 
    // Data Memory Interface
    // Data Memory Interface
    output  logic                                       pipe2dmem_req_o,            // DMEM request
    output  logic                                       pipe2dmem_req_o,            // DMEM request
    output  type_scr1_mem_cmd_e                         pipe2dmem_cmd_o,            // DMEM command
    output  logic                                       pipe2dmem_cmd_o,            // DMEM command
    output  type_scr1_mem_width_e                       pipe2dmem_width_o,          // DMEM data width
    output  logic [1:0]                                 pipe2dmem_width_o,          // DMEM data width
    output  logic [`SCR1_DMEM_AWIDTH-1:0]               pipe2dmem_addr_o,           // DMEM address
    output  logic [`SCR1_DMEM_AWIDTH-1:0]               pipe2dmem_addr_o,           // DMEM address
    output  logic [`SCR1_DMEM_DWIDTH-1:0]               pipe2dmem_wdata_o,          // DMEM write data
    output  logic [`SCR1_DMEM_DWIDTH-1:0]               pipe2dmem_wdata_o,          // DMEM write data
    input   logic                                       dmem2pipe_req_ack_i,        // DMEM request acknowledge
    input   logic                                       dmem2pipe_req_ack_i,        // DMEM request acknowledge
    input   logic [`SCR1_DMEM_DWIDTH-1:0]               dmem2pipe_rdata_i,          // DMEM read data
    input   logic [`SCR1_DMEM_DWIDTH-1:0]               dmem2pipe_rdata_i,          // DMEM read data
    input   type_scr1_mem_resp_e                        dmem2pipe_resp_i,           // DMEM response
    input   logic [1:0]                                 dmem2pipe_resp_i,           // DMEM response
 
 
`ifdef SCR1_DBG_EN
`ifdef SCR1_DBG_EN
    // Debug interface:
    // Debug interface:
    input  logic                                        dbg_en,                     // 1 - debug operations enabled
    input  logic                                        dbg_en,                     // 1 - debug operations enabled
    // DM <-> Pipeline: HART Run Control i/f
    // DM <-> Pipeline: HART Run Control i/f
Line 165... Line 173...
// EXU <-> CSR event interface
// EXU <-> CSR event interface
logic                                       exu2csr_take_irq;       // Take IRQ trap
logic                                       exu2csr_take_irq;       // Take IRQ trap
logic                                       exu2csr_take_exc;       // Take exception trap
logic                                       exu2csr_take_exc;       // Take exception trap
logic                                       exu2csr_mret_update;    // MRET update CSR
logic                                       exu2csr_mret_update;    // MRET update CSR
logic                                       exu2csr_mret_instr;     // MRET instruction
logic                                       exu2csr_mret_instr;     // MRET instruction
type_scr1_exc_code_e                        exu2csr_exc_code;       // Exception code (see scr1_arch_types.svh)
logic [SCR1_EXC_CODE_WIDTH_E-1:0]           exu2csr_exc_code;       // Exception code (see scr1_arch_types.svh)
logic [`SCR1_XLEN-1:0]                      exu2csr_trap_val;       // Trap value
logic [`SCR1_XLEN-1:0]                      exu2csr_trap_val;       // Trap value
logic [`SCR1_XLEN-1:0]                      csr2exu_new_pc;         // Exception/IRQ/MRET new PC
logic [`SCR1_XLEN-1:0]                      csr2exu_new_pc;         // Exception/IRQ/MRET new PC
logic                                       csr2exu_irq;            // IRQ request
logic                                       csr2exu_irq;            // IRQ request
logic                                       csr2exu_ip_ie;          // Some IRQ pending and locally enabled
logic                                       csr2exu_ip_ie;          // Some IRQ pending and locally enabled
logic                                       csr2exu_mstatus_mie_up; // MSTATUS or MIE update in the current cycle
logic                                       csr2exu_mstatus_mie_up; // MSTATUS or MIE update in the current cycle
Line 587... Line 595...
scr1_pipe_tdu i_pipe_tdu (
scr1_pipe_tdu i_pipe_tdu (
    // Common signals
    // Common signals
 `ifdef SCR1_DBG_EN
 `ifdef SCR1_DBG_EN
    .rst_n                      (dbg_rst_n             ),
    .rst_n                      (dbg_rst_n             ),
 `else
 `else
    .rst_n                      (rst_n                 ),
    .rst_n                      (pipe_rst_n            ), // dinesh-a: Bugfix- reset correction when debug is not enabled
 `endif // SCR1_DBG_EN
 `endif // SCR1_DBG_EN
    .clk                        (clk                   ),
    .clk                        (clk                   ),
    .clk_en                     (1'b1                  ),
    .clk_en                     (1'b1                  ),
 `ifdef SCR1_DBG_EN
 `ifdef SCR1_DBG_EN
    .tdu_dsbl_i                 (hwbrk_dsbl            ),
    .tdu_dsbl_i                 (hwbrk_dsbl            ),

powered by: WebSVN 2.1.0

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