Skip to content

Commit fb30fb2

Browse files
paulsc96niwis
andauthored
occamy: Update register interface and peripherals (pulp-platform#207)
* vendor: Prevent recursive vendor patching of `register_interface` * vendor: Update pulp_platform_register_interface to 73de8e5 Update code from upstream repository https://github.com/pulp- platform/register_interface.git to revision 73de8e51b79f416350229b1d2420b2c527e002b8 * Release v0.3.1 (Manuel Eggimann) * Update README (Manuel Eggimann) * Align axi version in ips_list with Bender.yml (Manuel Eggimann) * Release v0.3.0 (Manuel Eggimann) * Bump AXI version (Manuel Eggimann) * Update changelog (Manuel Eggimann) * Rebased reggen patches on top of current master (Manuel Eggimann) * Release v0.2.2 (Florian Zaruba) * Bump axi version (pulp-platform#12) (Manuel Eggimann) * ci: Also run on pull requests (pulp-platform#11) (Florian Zaruba) * Add periph to register adapter (pulp-platform#10) (Michael Rogenmoser) * Release v0.2.1 (Florian Zaruba) * src_files.yml: Remove dropped pkg (bluew) * Update axi and common_cells dependencies (pulp-platform#9) (Michael Rogenmoser) * Add reggen register primitives to src_files.yml (Manuel Eggimann) * Add ip_description for IPAppprox (Manuel Eggimann) Signed-off-by: Paul Scheffler <[email protected]> python-requirements: Add yaml package * vendor: Patch windowing bug in pulp_platform regtool * vendor: Add regtool patch * snitch_cluster: Regenerate peripheral registers with new generator snitch_cluster: Remove non-existant DE connection in cluster peripherals * occamy: Regenerate CLINT register interface * occamy: Regenerate SoC registers * vendor: Exclude unneeded files from opentitan vendor, remove UART * vendor: Update lowrisc_opentitan to lowRISC/opentitan@726718a6d Update code from upstream repository https://github.com/lowRISC/opentitan.git to revision 726718a6de32aa047a4064e02e7b619699f054ed * [dv/prim_esc] Fix prim_esc regression error (Cindy Chen) * [spi_host,design] Properly handle TX "stall" and "flush" conditions (Martin Lueker-Boden) * [sram_ctrl] Harden initialization counter (Michael Schaffner) * [fpv/rv_plic] Fix assertion irq_id_o width (Cindy Chen) * [prim] SRAM Async FIFO (Eunchan Kim) * [prim_lfsr] Do not shadow |state| variable (Philipp Wagner) * [prim] Add non-linear out option to prim_lfsr (Timothy Chen) * [primgen] Instantiate tech libs in stable order (Philipp Wagner) * [primgen] Actually find the Verible Python wrapper (Philipp Wagner) * [dv/prim_esc] fix regression error (Cindy Chen) * [dv/gpio] fix intr_test regression failure (Cindy Chen) * [dv/common] Exclude assertion coverage from IP level testbench (Cindy Chen) * [i2c, rtl] Update i2c.prj.hjson for D2 completion (Igor Kouznetsov) * [dv/prince] hit additional toggle coverpoints (Udi Jonnalagadda) * [sram_ctrl] Update docs (Michael Schaffner) * [sram_ctrl] Absorb prim_ram_1p_scr (Michael Schaffner) * [dv/gpio] Fix filter_stress test timeout (Cindy Chen) * [dv/prim_alert/esc] Improvements for prim_alert/esc_tb (Cindy Chen) * [dv/prim_esc] Direct test for prim_rx/tx (Cindy Chen) * [dv/ips] Fix a few small items in gpio and hmac (Cindy Chen) * [prim_xor2/lint] Add waiver for .* use in generated prim (Michael Schaffner) * [dv, doc] Replace all 'dv.plan' with testplan (Srikrishna Iyer) * [util, reggen] Support standardized cdc handling for regfile (Timothy Chen) * [spi_host/dv] updated checkout list to track doc and testplan status (Rasmus Madsen) * [spi_host/dv/doc] Updated dv plan for spi host for V1 review (Rasmus Madsen) * [spi_host/dv/doc] Updated spi_host testplan (Rasmus Madsen) * [i2c, doc] Checklist Update for D2 Sign-off (Igor Kouznetsov) * [rtl/prim_alert_sender] Allow ping_req to stay high without error (Cindy Chen) * [dv/prim_alert] Add a testbench for prim_alert (Cindy Chen) * [prim_subreg_shadow] Make local parameter a localparam (Philipp Wagner) * [prim_subreg] Make software access type an enum (Philipp Wagner) * [rtl/prim_diff_decode] Add prim_flop_2sync dependency (Cindy Chen) * [edn] Add MaxLatency assertion (Eunchan Kim) * [prim_subreg_shadow] Correct write data signal usage (Michael Schaffner) * [prim_lfsr] Fix assertion issue occuring right after reset (Michael Schaffner) * [memutil] Allow use without scrambled memories (Philipp Wagner) * [prim_prince] Fix comment (Philipp Wagner) * [memutil] Fix width mismatch (Philipp Wagner) * [prim] Allow disabling SVAs ensuring REQ is held until ACK at run time (Pirmin Vogel) * [prim] Fix typo that caused fifo_async to get stuck (Timothy Chen) * [prim] Add a missing ROM_CFG_DEFAULT to prim_rom_pkg.sv (Rupert Swarbrick) * [prim_subreg_shadow] Invert meaning of SWACCESS in shadow/stage regs (Michael Schaffner) * [prim_arb_tree/rv_plic_target] Remove TODOs due to a Vivado tool bug (Michael Schaffner) * [primgen] Remove unused import (Philipp Wagner) * [primgen] Add shebang (Philipp Wagner) * [primgen] Make primgen "portable" again (Philipp Wagner) * [rv_plic] rv_plic updates as part of rv_core_ibex templating (Timothy Chen) * [ spi_host ] Fix Lint Errors (Martin Lueker-Boden) * [fpv/rv_plic] Fix compile error with alert (Cindy Chen) * [uart] Minor lint fix (Timothy Chen) * [ spi_host ] Transition to D1 (Martin Lueker-Boden) * [spi_host,doc] Update spi_host documentation (Martin Lueker-Boden) * [pwm, dv] Fix fifo test for i2c host rtl (Tung Hoang) * [dv/uart] Fix assertion (Weicai Yang) * [doc/fpv] Unify the wording for IPs that verified in FPV (Cindy Chen) * [reggen] Pair up clock and reset signals (Rupert Swarbrick) * [integ alerts] Align description of integ alerts (Michael Schaffner) * [tlul] Add some missing dependencies (Michael Schaffner) * [rv_plic] Fix a bitwidth lint error (Michael Schaffner) * [rv_plic] Wire up integ alert (Michael Schaffner) * [otbn/otp_ctrl] Replicate dmem scrambling keystream (Michael Schaffner) * [spi*/uart] Make sure integ alert is fatal (Michael Schaffner) * [adc_ctrl] Various preparation steps for d2 (Timothy Chen) * [dv/i2c] Fix alert clock/reset (Weicai Yang) * [i2c, rtl] FIFO Depth Parameterization (Igor Kouznetsov) * Revert "[prim] Do remove prim_esc.core from the dependencies" (Rupert Swarbrick) * [prim] Remove dependency of prim:esc on a hardware block (Rupert Swarbrick) * [lint] prim_ram_1p_scr verilator lint fixes (Greg Chadwick) * [dv] Add scrambled_ecc32_mem_area for memutils (Greg Chadwick) * [dv] Add C++ memory scrambling model (Greg Chadwick) * [prim] Do remove prim_esc.core from the dependencies (Michael Schaffner) * [i2c, doc] Updated Description of Clock Stretching by Target (Igor Kouznetsov) * [reggen] Generate a single we/re signal per register in reg_top (Rupert Swarbrick) * [alert_handler] Implement reverse ping feature (Michael Schaffner) * [prim_esc] Split the prims into their own core file (Michael Schaffner) * [uart/dv] Fix regression failure (Weicai Yang) * [dv/common] Stress_all_with_rand_reset apply reset concurrently (Cindy Chen) * [dv/all] update scoreboard `csr_addrs` accesses (Udi Jonnalagadda) * [i2c, rtl] Lint fixes (Igor Kouznetsov) * [reggen] Simplify reg_top ports if there's exactly one window (Rupert Swarbrick) * [prim_fifo_async] Fix a width calculation issue in case of Depth = 1 (Michael Schaffner) * [dv] Add automated alert_test to all IPs with new tl_int alert (Cindy Chen) * [i2c] Wire up integrity alert (Michael Schaffner) * [uart/dv] reduce sim time for smoke test (Weicai Yang) * [i2c, rtl] Lint Fixes (Igor Kouznetsov) * [dv/stress_all_with_reset] Revert back IPs that uses apply_reset (Cindy Chen) * [uart] Wire up integrity alert (Michael Schaffner) * [gpio] Wire up bus integrity alert (Michael Schaffner) * [i2c, dv] Fix csr_* and smoke test for I2C (Tung Hoang) * [gpio/dv] add run-opt for gpio_tl_intg_err (Weicai Yang) * [dv/edn_reset] Update IPs that overrides apply_reset task (Cindy Chen) * [reggen] Make spacing uniform and simplify comments in reg_top (Rupert Swarbrick) * [spi_host] Wire up integrity alert (Michael Schaffner) * [uart/dv] Fix unmapped test (Weicai Yang) * [prim_lfsr] Fix spyglass lint warnings (Michael Schaffner) * [prim_alert*/prim_esc*] Rework placement of size_only bufs/flops (Michael Schaffner) * [i2c, rtl] Fixes to Lint Errors and Changes to Clock Stretching by Target (Igor Kouznetsov) * [doc, testplans] Fix non-existent tests (Srikrishna Iyer) * [i2c, rtl] Loopback test and other changes (Igor Kouznetsov) * [primgen] Use verible-verilog-syntax for parsing (Mariusz Glebocki) * [rv_plic] fix Src width mismatch (Eunchan Kim) * [prim] Break always_comb block to avoid apparent loop (Rupert Swarbrick) * [fpv] update secded_gen (Cindy Chen) * [dv/common] Improve coverage exclusion method (Cindy Chen) * [dvsim] Testplanner refactor & covergroup support (Srikrishna Iyer) * [otp_ctrl] Workaround for generated prim depending on generated prim (Michael Schaffner) * [checklists] Update all checklists for consistency (Srikrishna Iyer) * [prim_secded] Add C reference models for Hsiao encode (Greg Chadwick) * [rtl/prim_async_fifo] Fix async fifo typo when depth <= 2 (Cindy Chen) * [pads] - added AnalogIn1 pads for OTP supply (Arnon Sharlin) * [dv/common] add ECC support to mem_bkdr_if (Udi Jonnalagadda) * [prim_secded] Use _i/_o suffix for port names (Philipp Wagner) * [prim_fifo_async] Style fixes (Philipp Wagner) * [uart] Fix line continuation in DV code (Philipp Wagner) * Remove non-ASCII characters from SV code and meson.build (Rupert Swarbrick) * [ spi_host ] Remove cmd_len_q register to clean up DC logs (Martin Lueker-Boden) * [fpv/spi_host] Fix undecleared variable issue (Cindy Chen) * [ spi_device, spi_host, top_earlgrey ] Add SPI passthrough to spi_host (Martin Lueker-Boden) * [uart,lint] Waive warning about unused field in uart reg2hw (Rupert Swarbrick) * [ prim ] Suppress unneeded assertion when clearing prim_packer_fifo (Martin Lueker-Boden) * [spi_host] Proper routing of sd_o in standard mode. (Martin Lueker- Boden) * [all] Minor lint fixes (Timothy Chen) * [regtool] Reformulate wr_err calculation to avoid long lines (Rupert Swarbrick) * [prim_clock_div] Update waiver (Michael Schaffner) * [prim] Make SECDED prim generation deterministic (Rupert Swarbrick) * [prim_pad_attr/prim_flop_en] Add waiver files (Michael Schaffner) * [spi_host] Minor lint fixes (Michael Schaffner) * [prim_clock_div] Update waiver file (Michael Schaffner) * [top] change prim_generic usage into prim (Timothy Chen) * Add formatting changes from allow list (Rafal Kapuscik) * [prim] Add generic and Xilinx-specific xor2 primitives (Pirmin Vogel) * [prim] Add generic and Xilinx-specific enable-FF primitives (Pirmin Vogel) * [ spi_host ] SPI_HOST Implementation (Martin Lueker-Boden) * [pinmux/padring] Wire up the pad attribute WARL behavior modules (Michael Schaffner) * [pad_wrapper] Extend the generic and Xilinx pad wrapper models (Michael Schaffner) * [dv] Update scb for all blocks (Weicai Yang) * [prim_arbiter,lint] Tell Verilator to split variables for scheduling (Rupert Swarbrick) * [rv_plic,lint] Tell Verilator to split variables for scheduling (Rupert Swarbrick) * [prim] Fix lint warnings, replace inline AscentLint waivers (Pirmin Vogel) * [dv] Update `process_tl_access` args for all blocks (Weicai Yang) * [formal] Clean up some formal warnings (Cindy Chen) * [topgen] Rework pinmux datastructure and templatize tops (Michael Schaffner) * [prim_fifo_async] Make async FIFO output zero when empty (Noah Moroze) * [ci] Switch from a blacklist to a whitelist for executable files (Rupert Swarbrick) Signed-off-by: Paul Scheffler <[email protected]> * vendor: Re-patch opentitan peripherals * vendor: Fixes to opentitan SPI * vendor: Add SV APB UART * vendor: Patch SV APB UART * occamy: Integrate 16550-compliant APB UART, regenerate PLIC * vendor: Update patches vendor: Update SPI patches * occamy: Fix SoC control overlay RTL issue * fpga: Replace Xilinx UART with internal one * Remove the Xilinx UART from the Block Design * Map internal UART to UART0 of VCU128 * Update device tree * Update ZSBL Signed-off-by: Nils Wistoff <[email protected]> Co-authored-by: Nils Wistoff <[email protected]>
1 parent 0ff968e commit fb30fb2

File tree

480 files changed

+30646
-47009
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+30646
-47009
lines changed

hw/ip/clint/data/clint.hjson.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
{
88
name: "CLINT",
99
clock_primary: "clk_i",
10-
bus_device: "reg",
10+
bus_interfaces: [
11+
{ protocol: "reg_iface", direction: "device" }
12+
],
1113
regwidth: "32",
1214
param_list: [
1315
{ name: "NumCores",

hw/ip/clint/src/clint.hjson

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,30 @@
77
{
88
name: "CLINT",
99
clock_primary: "clk_i",
10-
bus_device: "reg",
10+
bus_interfaces: [
11+
{ protocol: "reg_iface", direction: "device" }
12+
],
1113
regwidth: "32",
14+
param_list: [
15+
{ name: "NumCores",
16+
desc: "Number of cores",
17+
type: "int",
18+
default: "2",
19+
local: "true"
20+
}
21+
],
1222
registers: [
13-
{ name: "MSIP0",
14-
desc: "Machine Software Interrupt Pending Core 0",
23+
{ multireg: {
24+
name: "MSIP",
25+
desc: "Machine Software Interrupt Pending ",
26+
count: "NumCores",
27+
cname: "MSIP",
1528
swaccess: "rw",
1629
hwaccess: "hro",
1730
fields: [
18-
{ bits: "0", name: "MSIP", desc: "Machine Software Interrupt Pending of Core 0" },
19-
]
20-
},
21-
{ name: "MSIP1",
22-
desc: "Machine Software Interrupt Pending Core 1",
23-
swaccess: "rw",
24-
hwaccess: "hro",
25-
fields: [
26-
{ bits: "0", name: "MSIP", desc: "Machine Software Interrupt Pending of Core 1" },
31+
{ bits: "0", name: "P", desc: "Machine Software Interrupt Pending" }
2732
]
33+
}
2834
},
2935
{ skipto: "0x4000" },
3036
{ name: "MTIMECMP_LOW0",

hw/ip/clint/src/clint.sv

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module clint import clint_reg_pkg::*; #(
2828

2929
logic [63:0] mtime_q;
3030
logic [1:0][63:0] mtimecmp_q;
31-
logic [1:0] msip_q;
3231
// increase the timer
3332
logic increase_timer;
3433

@@ -50,9 +49,9 @@ module clint import clint_reg_pkg::*; #(
5049

5150
assign mtime_q = {reg2hw.mtime_high.q, reg2hw.mtime_low.q};
5251
assign mtimecmp_q[0] = {reg2hw.mtimecmp_high0.q, reg2hw.mtimecmp_low0.q};
53-
assign msip_q[0] = reg2hw.msip0.q;
52+
assign ipi_o[0] = reg2hw.msip[0].q;
5453
assign mtimecmp_q[1] = {reg2hw.mtimecmp_high1.q, reg2hw.mtimecmp_low1.q};
55-
assign msip_q[1] = reg2hw.msip1.q;
54+
assign ipi_o[1] = reg2hw.msip[1].q;
5655

5756
assign {hw2reg.mtime_high.d, hw2reg.mtime_low.d} = mtime_q + 1;
5857
assign hw2reg.mtime_low.de = increase_timer;
@@ -91,7 +90,6 @@ module clint import clint_reg_pkg::*; #(
9190
.serial_o ( ) // left open
9291
);
9392

94-
assign ipi_o = msip_q;
9593

9694
endmodule
9795

hw/ip/clint/src/clint_reg_pkg.sv

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@
66

77
package clint_reg_pkg;
88

9+
// Param list
10+
parameter int NumCores = 2;
11+
12+
// Address widths within the block
13+
parameter int BlockAw = 16;
14+
915
////////////////////////////
1016
// Typedefs for registers //
1117
////////////////////////////
12-
typedef struct packed {
13-
logic q;
14-
} clint_reg2hw_msip0_reg_t;
1518

1619
typedef struct packed {
1720
logic q;
18-
} clint_reg2hw_msip1_reg_t;
21+
} clint_reg2hw_msip_mreg_t;
1922

2023
typedef struct packed {
2124
logic [31:0] q;
@@ -41,7 +44,6 @@ package clint_reg_pkg;
4144
logic [31:0] q;
4245
} clint_reg2hw_mtime_high_reg_t;
4346

44-
4547
typedef struct packed {
4648
logic [31:0] d;
4749
logic de;
@@ -52,44 +54,35 @@ package clint_reg_pkg;
5254
logic de;
5355
} clint_hw2reg_mtime_high_reg_t;
5456

55-
56-
///////////////////////////////////////
57-
// Register to internal design logic //
58-
///////////////////////////////////////
57+
// Register -> HW type
5958
typedef struct packed {
60-
clint_reg2hw_msip0_reg_t msip0; // [194:194]
61-
clint_reg2hw_msip1_reg_t msip1; // [193:193]
62-
clint_reg2hw_mtimecmp_low0_reg_t mtimecmp_low0; // [192:161]
63-
clint_reg2hw_mtimecmp_high0_reg_t mtimecmp_high0; // [160:129]
64-
clint_reg2hw_mtimecmp_low1_reg_t mtimecmp_low1; // [128:97]
65-
clint_reg2hw_mtimecmp_high1_reg_t mtimecmp_high1; // [96:65]
66-
clint_reg2hw_mtime_low_reg_t mtime_low; // [64:33]
67-
clint_reg2hw_mtime_high_reg_t mtime_high; // [32:1]
59+
clint_reg2hw_msip_mreg_t [1:0] msip; // [193:192]
60+
clint_reg2hw_mtimecmp_low0_reg_t mtimecmp_low0; // [191:160]
61+
clint_reg2hw_mtimecmp_high0_reg_t mtimecmp_high0; // [159:128]
62+
clint_reg2hw_mtimecmp_low1_reg_t mtimecmp_low1; // [127:96]
63+
clint_reg2hw_mtimecmp_high1_reg_t mtimecmp_high1; // [95:64]
64+
clint_reg2hw_mtime_low_reg_t mtime_low; // [63:32]
65+
clint_reg2hw_mtime_high_reg_t mtime_high; // [31:0]
6866
} clint_reg2hw_t;
6967

70-
///////////////////////////////////////
71-
// Internal design logic to register //
72-
///////////////////////////////////////
68+
// HW -> register type
7369
typedef struct packed {
74-
clint_hw2reg_mtime_low_reg_t mtime_low; // [66:35]
75-
clint_hw2reg_mtime_high_reg_t mtime_high; // [34:3]
70+
clint_hw2reg_mtime_low_reg_t mtime_low; // [65:33]
71+
clint_hw2reg_mtime_high_reg_t mtime_high; // [32:0]
7672
} clint_hw2reg_t;
7773

78-
// Register Address
79-
parameter logic [15:0] CLINT_MSIP0_OFFSET = 16'h 0;
80-
parameter logic [15:0] CLINT_MSIP1_OFFSET = 16'h 4;
81-
parameter logic [15:0] CLINT_MTIMECMP_LOW0_OFFSET = 16'h 4000;
82-
parameter logic [15:0] CLINT_MTIMECMP_HIGH0_OFFSET = 16'h 4004;
83-
parameter logic [15:0] CLINT_MTIMECMP_LOW1_OFFSET = 16'h 4008;
84-
parameter logic [15:0] CLINT_MTIMECMP_HIGH1_OFFSET = 16'h 400c;
85-
parameter logic [15:0] CLINT_MTIME_LOW_OFFSET = 16'h bff8;
86-
parameter logic [15:0] CLINT_MTIME_HIGH_OFFSET = 16'h bffc;
74+
// Register offsets
75+
parameter logic [BlockAw-1:0] CLINT_MSIP_OFFSET = 16'h 0;
76+
parameter logic [BlockAw-1:0] CLINT_MTIMECMP_LOW0_OFFSET = 16'h 4000;
77+
parameter logic [BlockAw-1:0] CLINT_MTIMECMP_HIGH0_OFFSET = 16'h 4004;
78+
parameter logic [BlockAw-1:0] CLINT_MTIMECMP_LOW1_OFFSET = 16'h 4008;
79+
parameter logic [BlockAw-1:0] CLINT_MTIMECMP_HIGH1_OFFSET = 16'h 400c;
80+
parameter logic [BlockAw-1:0] CLINT_MTIME_LOW_OFFSET = 16'h bff8;
81+
parameter logic [BlockAw-1:0] CLINT_MTIME_HIGH_OFFSET = 16'h bffc;
8782

88-
89-
// Register Index
83+
// Register index
9084
typedef enum int {
91-
CLINT_MSIP0,
92-
CLINT_MSIP1,
85+
CLINT_MSIP,
9386
CLINT_MTIMECMP_LOW0,
9487
CLINT_MTIMECMP_HIGH0,
9588
CLINT_MTIMECMP_LOW1,
@@ -99,15 +92,15 @@ package clint_reg_pkg;
9992
} clint_id_e;
10093

10194
// Register width information to check illegal writes
102-
parameter logic [3:0] CLINT_PERMIT [8] = '{
103-
4'b 0001, // index[0] CLINT_MSIP0
104-
4'b 0001, // index[1] CLINT_MSIP1
105-
4'b 1111, // index[2] CLINT_MTIMECMP_LOW0
106-
4'b 1111, // index[3] CLINT_MTIMECMP_HIGH0
107-
4'b 1111, // index[4] CLINT_MTIMECMP_LOW1
108-
4'b 1111, // index[5] CLINT_MTIMECMP_HIGH1
109-
4'b 1111, // index[6] CLINT_MTIME_LOW
110-
4'b 1111 // index[7] CLINT_MTIME_HIGH
95+
parameter logic [3:0] CLINT_PERMIT [7] = '{
96+
4'b 0001, // index[0] CLINT_MSIP
97+
4'b 1111, // index[1] CLINT_MTIMECMP_LOW0
98+
4'b 1111, // index[2] CLINT_MTIMECMP_HIGH0
99+
4'b 1111, // index[3] CLINT_MTIMECMP_LOW1
100+
4'b 1111, // index[4] CLINT_MTIMECMP_HIGH1
101+
4'b 1111, // index[5] CLINT_MTIME_LOW
102+
4'b 1111 // index[6] CLINT_MTIME_HIGH
111103
};
104+
112105
endpackage
113106

0 commit comments

Comments
 (0)