Skip to content

Commit

Permalink
ibex: move includes to separate dir
Browse files Browse the repository at this point in the history
  • Loading branch information
phsauter committed Oct 2, 2024
1 parent d897c00 commit 4e3acb4
Show file tree
Hide file tree
Showing 56 changed files with 1,370 additions and 61 deletions.
8 changes: 2 additions & 6 deletions rtl/ibex/Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ sources:

- target: not(all(any(test, ibex_include_tracer), not(ibex_exclude_tracer)))
include_dirs:
- ./
- lowrisc_prim
- include/lowrisc_prim

files:
# Source files grouped in levels. Files in level 0 have no dependencies on files in this
# package. Files in level 1 only depend on files in level 0, files in level 2 on files in
# levels 1 and 0, etc. Files within a level are ordered alphabetically.
# Level 0
- ibex_pkg.sv
- lowrisc_prim/prim_assert.sv
# Level 1
- ibex_alu.sv
- ibex_compressed_decoder.sv
Expand Down Expand Up @@ -50,15 +48,13 @@ sources:
# formal interface so the tracer module works (`define RVFI).
- target: all(any(test, ibex_include_tracer), not(ibex_exclude_tracer))
include_dirs:
- ./
- lowrisc_prim
- include/lowrisc_prim
defines:
RVFI: true
files:
# Level 0
- ibex_pkg.sv
- ibex_register_file_ff.sv
- lowrisc_prim/prim_assert.sv
# Level 1
- ibex_alu.sv
- ibex_compressed_decoder.sv
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_branch_predict.sv
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* The predictor is entirely combinational but takes clk/rst_n signals for use by assertions.
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_branch_predict (
input logic clk_i,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_compressed_decoder.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* assertions only.
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_compressed_decoder (
input logic clk_i,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_controller.sv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Main controller of the processor
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_controller #(
parameter bit WritebackStage = 0,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_core.sv
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
`define RVFI
`endif

`include "prim_assert.sv"
`include "prim_assert.svh"

/**
* Top level module of the ibex RISC-V core
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_cs_registers.sv
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Specification, draft version 1.11
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_cs_registers #(
parameter bit DbgTriggerEn = 0,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_csr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Control / status register primitive
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_csr #(
parameter int unsigned Width = 32,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_decoder.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* assertions only.
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_decoder #(
parameter bit RV32E = 0,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_fetch_fifo.sv
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* clear_i clears the FIFO for the following cycle, including any new request
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_fetch_fifo #(
parameter int unsigned NUM_REQS = 2
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_icache.sv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Provides an instruction cache along with cache management, instruction buffering and prefetching
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_icache #(
parameter bit BranchPredictor = 1'b0,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_id_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* file.
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_id_stage #(
parameter bit RV32E = 0,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_if_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* the read instruction.
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_if_stage #(
parameter int unsigned DmHaltAddr = 32'h1A110800,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_load_store_unit.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* and to align bytes and halfwords.
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_load_store_unit
(
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_multdiv_fast.sv
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* 16x16 kernel multiplier and Long Division
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_multdiv_fast #(
parameter ibex_pkg::rv32m_e RV32M = ibex_pkg::RV32MFast
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_multdiv_slow.sv
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Baugh-Wooley multiplier and Long Division
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_multdiv_slow
(
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/ibex_wb_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* a simple passthrough to write data direct to the register file.
*/

`include "prim_assert.sv"
`include "prim_assert.svh"

module ibex_wb_stage #(
parameter bit WritebackStage = 1'b0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// - Provides default clk and rst options to simplify code
// - Provides boiler plate template for common assertions

`ifndef PRIM_ASSERT_SV
`define PRIM_ASSERT_SV
`ifndef PRIM_ASSERT_SVH
`define PRIM_ASSERT_SVH

///////////////////
// Helper macros //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// Macro bodies included by prim_assert.sv for tools that don't support assertions. See
// prim_assert.sv for documentation for each of the macros.
// Macro bodies included by prim_assert.svhh for tools that don't support assertions. See
// prim_assert.svh for documentation for each of the macros.

`define ASSERT_I(__name, __prop)
`define ASSERT_INIT(__name, __prop)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// Macro bodies included by prim_assert.sv for tools that support full SystemVerilog and SVA syntax.
// See prim_assert.sv for documentation for each of the macros.
// Macro bodies included by prim_assert.svhh for tools that support full SystemVerilog and SVA syntax.
// See prim_assert.svh for documentation for each of the macros.

`define ASSERT_I(__name, __prop) \
__name: assert (__prop) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

// Macro bodies included by prim_assert.sv for formal verification with Yosys. See prim_assert.sv
// Macro bodies included by prim_assert.svhh for formal verification with Yosys. See prim_assert.svh
// for documentation for each of the macros.

`define ASSERT_I(__name, __prop) \
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_alert_receiver.sv
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
//
// See also: prim_alert_sender, prim_diff_decode, alert_handler

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_alert_receiver
import prim_alert_pkg::*;
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_alert_sender.sv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//
// See also: prim_alert_receiver, prim_diff_decode, alert_handler

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_alert_sender
import prim_alert_pkg::*;
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_arbiter_fixed.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//
// See also: prim_arbiter_ppc, prim_arbiter_tree

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_arbiter_fixed #(
parameter int N = 8,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_arbiter_ppc.sv
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//
// See also: prim_arbiter_tree

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_arbiter_ppc #(
parameter int unsigned N = 8,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_arbiter_tree.sv
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//
// See also: prim_arbiter_ppc

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_arbiter_tree #(
parameter int N = 8,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_clock_div.sv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_clock_div #(
parameter int Divisor = 2,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_diff_decode.sv
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//
// See also: prim_alert_sender, prim_alert_receiver, alert_handler

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_diff_decode #(
// enables additional synchronization logic
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_dom_and_2share.sv
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// Q1 = t{1,1} + sig(j>1,1)(...) + sig(j<1,1)(t{1,j} + Z{j})
// = a1&b1 + (0 + a1&b0 + z0)

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_dom_and_2share #(
parameter int DW = 64, // Input width
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_edn_req.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// requests.
//

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_edn_req
import prim_alert_pkg::*;
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_esc_receiver.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
// See also: prim_esc_sender, prim_diff_decode, alert_handler

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_esc_receiver
import prim_esc_pkg::*;
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_esc_sender.sv
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// See also: prim_esc_receiver, prim_diff_decode, alert_handler

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_esc_sender
import prim_esc_pkg::*;
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_fifo_async.sv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Generic asynchronous fifo for use in a variety of devices.

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_fifo_async #(
parameter int unsigned Width = 16,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_fifo_sync.sv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Generic synchronous fifo for use in a variety of devices.

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_fifo_sync #(
parameter int unsigned Width = 16,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_gate_gen.sv
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// If valid_i constantly set to 1'b1, the gate generator produces around 2.5% smaller designs for
// the configurations listed in the table above.

`include "prim_assert.sv"
`include "prim_assert.svh"
module prim_gate_gen #(
parameter int DataWidth = 32,
parameter int NumGates = 1000
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_gf_mult.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// https://ieeexplore.ieee.org/document/542803


`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_gf_mult #(
parameter int Width = 32,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_keccak.sv
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SPDX-License-Identifier: Apache-2.0
//
// prim_keccak is single round permutation module
`include "prim_assert.sv"
`include "prim_assert.svh"
module prim_keccak #(
parameter int Width = 1600, // b= {25, 50, 100, 200, 400, 800, 1600}

Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_lc_sender.sv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// for each bit in the life cycle control signal such that tools do not
// optimize the multibit encoding.

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_lc_sender (
input clk_i,
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_lc_sync.sv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Should be used exactly as recommended in the life cycle controller spec:
// https://docs.opentitan.org/hw/ip/lc_ctrl/doc/index.html#control-signal-propagation

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_lc_sync #(
// Number of separately buffered output signals.
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_lfsr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// [2] https://users.ece.cmu.edu/~koopman/lfsr/
// [3] https://www.xilinx.com/support/documentation/application_notes/xapp052.pdf

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_lfsr #(
// Lfsr Type, can be FIB_XNOR or GAL_XOR
Expand Down
2 changes: 1 addition & 1 deletion rtl/ibex/lowrisc_prim/prim_multibit_sync.sv
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// Note: CDC tools will likely flag this module due to re-convergent logic.
//

`include "prim_assert.sv"
`include "prim_assert.svh"

module prim_multibit_sync #(
// Width of the multibit signal.
Expand Down
Loading

0 comments on commit 4e3acb4

Please sign in to comment.