Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hw,tlul_adapter_sram,rtl] Expose reserved user bits #25373

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hw/ip/hmac/rtl/hmac.sv
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ module hmac
.wdata_o (msg_fifo_wdata ),
.wmask_o (msg_fifo_wmask ),
.intg_error_o ( ),
.user_rsvd_o ( ),
.rdata_i (msg_fifo_rdata ),
.rvalid_i (msg_fifo_rvalid),
.rerror_i (msg_fifo_rerror),
Expand Down
1 change: 1 addition & 0 deletions hw/ip/kmac/rtl/kmac.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ module kmac
.wdata_o (tlram_wdata),
.wmask_o (tlram_wmask),
.intg_error_o ( ),
.user_rsvd_o ( ),
.rdata_i (tlram_rdata),
.rvalid_i (tlram_rvalid),
.rerror_i (tlram_rerror),
Expand Down
1 change: 1 addition & 0 deletions hw/ip/kmac/rtl/kmac_staterd.sv
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ module kmac_staterd
.wdata_o (unused_tlram_wdata),
.wmask_o (unused_tlram_wmask),
.intg_error_o (),
.user_rsvd_o (),
.rdata_i (tlram_rdata),
.rvalid_i (tlram_rvalid),
.rerror_i (tlram_rerror),
Expand Down
2 changes: 2 additions & 0 deletions hw/ip/otbn/rtl/otbn.sv
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ module otbn
.wdata_o (imem_wdata_bus),
.wmask_o (imem_wmask_bus),
.intg_error_o (imem_bus_intg_violation),
.user_rsvd_o (),
.rdata_i (imem_rdata_bus),
.rvalid_i (imem_rvalid_bus),
.rerror_i (imem_rerror_bus),
Expand Down Expand Up @@ -643,6 +644,7 @@ module otbn
.wdata_o (dmem_wdata_bus),
.wmask_o (dmem_wmask_bus),
.intg_error_o (dmem_bus_intg_violation),
.user_rsvd_o (),
.rdata_i (dmem_rdata_bus),
.rvalid_i (dmem_rvalid_bus),
.rerror_i (dmem_rerror_bus),
Expand Down
1 change: 1 addition & 0 deletions hw/ip/otp_ctrl/rtl/otp_ctrl.sv
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ module otp_ctrl
.wmask_o ( ), // unused
// SEC_CM: BUS.INTEGRITY
.intg_error_o ( intg_error[1] ),
.user_rsvd_o ( ),
.rdata_i ( tlul_rdata ),
.rvalid_i ( tlul_rvalid ),
.rerror_i ( tlul_rerror ),
Expand Down
1 change: 1 addition & 0 deletions hw/ip/rom_ctrl/rtl/rom_ctrl.sv
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ module rom_ctrl
.wdata_o (),
.wmask_o (),
.intg_error_o (rom_integrity_error),
.user_rsvd_o (),
.rdata_i (bus_rom_rdata),
.rvalid_i (bus_rom_rvalid),
.rerror_i (2'b00),
Expand Down
2 changes: 2 additions & 0 deletions hw/ip/spi_device/rtl/spi_device.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1673,6 +1673,7 @@ module spi_device
.wdata_o (sys_sram_l2m[SysSramFwEgress].wdata),
.wmask_o (sys_sram_l2m_fw_wmask[SPI_DEVICE_EGRESS_BUFFER_IDX]), // Not used
.intg_error_o (),
.user_rsvd_o (),
.rdata_i (sys_sram_m2l[SysSramFwEgress].rdata),
.rvalid_i (sys_sram_m2l[SysSramFwEgress].rvalid),
.rerror_i (sys_sram_m2l[SysSramFwEgress].rerror),
Expand Down Expand Up @@ -1704,6 +1705,7 @@ module spi_device
.wdata_o (sys_sram_l2m[SysSramFwIngress].wdata),
.wmask_o (sys_sram_l2m_fw_wmask[SPI_DEVICE_INGRESS_BUFFER_IDX]), // Not used
.intg_error_o (),
.user_rsvd_o (),
.rdata_i (sys_sram_m2l[SysSramFwIngress].rdata),
.rvalid_i (sys_sram_m2l[SysSramFwIngress].rvalid),
.rerror_i (sys_sram_m2l[SysSramFwIngress].rerror),
Expand Down
1 change: 1 addition & 0 deletions hw/ip/spi_host/rtl/spi_host_window.sv
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ module spi_host_window (
.wdata_o(tx_data_o),
.wmask_o(bit_mask),
.intg_error_o(),
.user_rsvd_o(),
.rdata_i('0),
.rvalid_i('0),
.rerror_i('0),
Expand Down
1 change: 1 addition & 0 deletions hw/ip/sram_ctrl/rtl/sram_ctrl.sv
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ module sram_ctrl
.wmask_o (tlul_wmask),
// SEC_CM: BUS.INTEGRITY
.intg_error_o (bus_integ_error[1]),
.user_rsvd_o (),
.rdata_i (sram_rdata),
.rvalid_i (sram_rvalid),
.rerror_i ('0),
Expand Down
42 changes: 22 additions & 20 deletions hw/ip/tlul/rtl/tlul_adapter_sram.sv
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,23 @@ module tlul_adapter_sram
input mubi4_t en_ifetch_i,

// SRAM interface
output logic req_o,
output mubi4_t req_type_o,
input gnt_i,
output logic we_o,
output logic [SramAw-1:0] addr_o,
output logic [DataOutW-1:0] wdata_o,
output logic [DataOutW-1:0] wmask_o,
output logic intg_error_o,
input [DataOutW-1:0] rdata_i,
input rvalid_i,
input [1:0] rerror_i, // 2 bit error [1]: Uncorrectable, [0]: Correctable
output logic compound_txn_in_progress_o,
input mubi4_t readback_en_i,
output logic readback_error_o,
input logic wr_collision_i,
input logic write_pending_i
output logic req_o,
output mubi4_t req_type_o,
input gnt_i,
output logic we_o,
output logic [SramAw-1:0] addr_o,
output logic [DataOutW-1:0] wdata_o,
output logic [DataOutW-1:0] wmask_o,
output logic intg_error_o,
output logic [RsvdWidth-1:0] user_rsvd_o,
input [DataOutW-1:0] rdata_i,
input rvalid_i,
input [1:0] rerror_i, // 2 bit error [1]: Uncorrectable, [0]: Correctable
output logic compound_txn_in_progress_o,
input mubi4_t readback_en_i,
output logic readback_error_o,
input logic wr_collision_i,
input logic write_pending_i
);

localparam int SramByte = SramDw/8;
Expand Down Expand Up @@ -387,10 +388,11 @@ module tlul_adapter_sram
// Generate request only when no internal error occurs. If error occurs, the request should be
// dropped and returned error response to the host. So, error to be pushed to reqfifo.
// In this case, it is assumed the request is granted (may cause ordering issue later?)
assign req_o = tl_i_int.a_valid & reqfifo_wready & ~error_internal;
assign req_type_o = tl_i_int.a_user.instr_type;
assign we_o = tl_i_int.a_valid & (tl_i_int.a_opcode inside {PutFullData, PutPartialData});
assign addr_o = (tl_i_int.a_valid) ? tl_i_int.a_address[DataBitWidth+:SramAw] : '0;
assign req_o = tl_i_int.a_valid & reqfifo_wready & ~error_internal;
assign req_type_o = tl_i_int.a_user.instr_type;
assign we_o = tl_i_int.a_valid & (tl_i_int.a_opcode inside {PutFullData, PutPartialData});
assign addr_o = (tl_i_int.a_valid) ? tl_i_int.a_address[DataBitWidth+:SramAw] : '0;
assign user_rsvd_o = (tl_i_int.a_valid) ? tl_i_int.a_user.rsvd : '0;

// Support SRAMs wider than the TL-UL word width by mapping the parts of the
// TL-UL address which are more fine-granular than the SRAM width to the
Expand Down
1 change: 1 addition & 0 deletions hw/ip/usbdev/rtl/usbdev.sv
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ module usbdev
.wdata_o (sw_mem_a_wdata),
.wmask_o (), // Not used
.intg_error_o (),
.user_rsvd_o (),
.rdata_i (sw_mem_a_rdata),
.rvalid_i (sw_mem_a_rvalid),
.rerror_i (sw_mem_a_rerror),
Expand Down
3 changes: 3 additions & 0 deletions hw/ip_templates/flash_ctrl/rtl/flash_ctrl.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ module flash_ctrl
.addr_o (),
.wmask_o (),
.intg_error_o (),
.user_rsvd_o (),
.wdata_o (sw_wdata),
.rdata_i ('0),
.rvalid_i (1'b0),
Expand Down Expand Up @@ -659,6 +660,7 @@ module flash_ctrl
.wmask_o (),
.wdata_o (),
.intg_error_o (adapter_fifo_err),
.user_rsvd_o (),
.rdata_i (sw_rfifo_rdata),
.rvalid_i (adapter_rvalid | rd_no_op_q),
.rerror_i ({rd_no_op_q, 1'b0}),
Expand Down Expand Up @@ -1325,6 +1327,7 @@ module flash_ctrl
.wdata_o (),
.wmask_o (),
.intg_error_o (eflash_cmd_intg_err),
.user_rsvd_o (),
.rdata_i (flash_host_rdata),
.rvalid_i (flash_host_req_done),
.rerror_i ({flash_host_rderr,1'b0}),
Expand Down
1 change: 1 addition & 0 deletions hw/top_darjeeling/rtl/autogen/chip_darjeeling_asic.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,7 @@ module chip_darjeeling_asic #(
.wdata_o (sram_wdata),
.wmask_o (sram_wmask),
.intg_error_o(),
.user_rsvd_o (),
.rdata_i (sram_rdata),
.rvalid_i (sram_rvalid),
.rerror_i ('0)
Expand Down
1 change: 1 addition & 0 deletions hw/top_darjeeling/rtl/autogen/chip_darjeeling_cw310.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,7 @@ module chip_darjeeling_cw310 #(
.wdata_o (sram_wdata),
.wmask_o (sram_wmask),
.intg_error_o(),
.user_rsvd_o (),
.rdata_i (sram_rdata),
.rvalid_i (sram_rvalid),
.rerror_i ('0)
Expand Down
3 changes: 3 additions & 0 deletions hw/top_earlgrey/ip_autogen/flash_ctrl/rtl/flash_ctrl.sv
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ module flash_ctrl
.addr_o (),
.wmask_o (),
.intg_error_o (),
.user_rsvd_o (),
.wdata_o (sw_wdata),
.rdata_i ('0),
.rvalid_i (1'b0),
Expand Down Expand Up @@ -660,6 +661,7 @@ module flash_ctrl
.wmask_o (),
.wdata_o (),
.intg_error_o (adapter_fifo_err),
.user_rsvd_o (),
.rdata_i (sw_rfifo_rdata),
.rvalid_i (adapter_rvalid | rd_no_op_q),
.rerror_i ({rd_no_op_q, 1'b0}),
Expand Down Expand Up @@ -1326,6 +1328,7 @@ module flash_ctrl
.wdata_o (),
.wmask_o (),
.intg_error_o (eflash_cmd_intg_err),
.user_rsvd_o (),
.rdata_i (flash_host_rdata),
.rvalid_i (flash_host_req_done),
.rerror_i ({flash_host_rderr,1'b0}),
Expand Down
Loading