-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,16 @@ | |
// - Michael Rogenmoser <[email protected]> | ||
|
||
`include "idma/typedef.svh" | ||
`include "obi/typedef.svh" | ||
|
||
module safety_island_dma import safety_island_pkg::*; #( | ||
// parameter safety_island_cfg_t SafetyIslandCfg = safety_island_pkg::SafetyIslandDefaultConfig, | ||
parameter type reg_req_t = logic, | ||
parameter type reg_rsp_t = logic, | ||
|
||
/// OBI Request and Response channel type | ||
parameter obi_pkg::obi_cfg_t ObiCfg = obi_pkg::ObiDefaultConfig, | ||
parameter type obi_a_chan_t = logic, | ||
parameter type obi_r_chan_t = logic, | ||
parameter type obi_req_t = logic, | ||
parameter type obi_rsp_t = logic | ||
) ( | ||
|
@@ -33,7 +34,10 @@ module safety_island_dma import safety_island_pkg::*; #( | |
|
||
localparam int unsigned TFLenWidth = 24; | ||
|
||
`IDMA_TYPEDEF_FULL_REQ_T(idma_req_t, logic[ObiCfg.IdWidth-1:0], logic[ObiCfg.AddrWidth-1:0], logic[TFLenWidth-1:0]) | ||
`IDMA_TYPEDEF_FULL_REQ_T(idma_req_t, | ||
logic[ObiCfg.IdWidth-1:0], | ||
logic[ObiCfg.AddrWidth-1:0], | ||
logic[TFLenWidth-1:0]) | ||
`IDMA_TYPEDEF_FULL_RSP_T(idma_rsp_t, logic[ObiCfg.AddrWidth-1:0]) | ||
|
||
typedef struct packed { | ||
|
@@ -54,6 +58,7 @@ module safety_island_dma import safety_island_pkg::*; #( | |
obi_write_a_chan_padded_t obi; | ||
} write_meta_channel_t; | ||
|
||
`OBI_TYPEDEF_REQ_T(internal_obi_req_t, obi_a_chan_t) | ||
|
||
idma_req_t backend_req; | ||
idma_rsp_t backend_rsp; | ||
|
@@ -66,6 +71,9 @@ module safety_island_dma import safety_island_pkg::*; #( | |
|
||
logic [31:0] next_id, completed_id; | ||
|
||
internal_obi_req_t internal_obi_req[1:0]; | ||
Check warning on line 74 in rtl/dma/safety_island_dma.sv GitHub Actions / verible-verilog-lint[verible-verilog-lint] rtl/dma/safety_island_dma.sv#L74
Raw output
|
||
obi_rsp_t internal_obi_rsp[1:0]; | ||
Check warning on line 75 in rtl/dma/safety_island_dma.sv GitHub Actions / verible-verilog-lint[verible-verilog-lint] rtl/dma/safety_island_dma.sv#L75
Raw output
|
||
|
||
// reg_frontend | ||
idma_reg32_1d #( | ||
.NumRegs ( 1 ), | ||
|
@@ -124,7 +132,7 @@ module safety_island_dma import safety_island_pkg::*; #( | |
.idma_rsp_t ( idma_rsp_t ), | ||
.idma_eh_req_t ( idma_pkg::idma_eh_req_t ), | ||
.idma_busy_t ( idma_pkg::idma_busy_t ), | ||
.obi_req_t ( obi_req_t ), | ||
.obi_req_t ( internal_obi_req_t ), | ||
.obi_rsp_t ( obi_rsp_t ), | ||
.read_meta_channel_t ( read_meta_channel_t ), | ||
.write_meta_channel_t( write_meta_channel_t ) | ||
|
@@ -145,13 +153,39 @@ module safety_island_dma import safety_island_pkg::*; #( | |
.eh_req_valid_i ( '0 ), | ||
.eh_req_ready_o (), | ||
|
||
.obi_read_req_o ( obi_req_o[0] ), | ||
.obi_read_rsp_i ( obi_rsp_i[0] ), | ||
.obi_read_req_o ( internal_obi_req[0] ), | ||
.obi_read_rsp_i ( internal_obi_rsp[0] ), | ||
|
||
.obi_write_req_o( obi_req_o[1] ), | ||
.obi_write_rsp_i( obi_rsp_i[1] ), | ||
.obi_write_req_o( internal_obi_req[1] ), | ||
.obi_write_rsp_i( internal_obi_rsp[1] ), | ||
|
||
.busy_o ( backend_busy ) | ||
); | ||
|
||
for (genvar i = 0; i < 2; i++) begin | ||
Check warning on line 165 in rtl/dma/safety_island_dma.sv GitHub Actions / verible-verilog-lint[verible-verilog-lint] rtl/dma/safety_island_dma.sv#L165
Raw output
|
||
obi_rready_converter #( | ||
.obi_a_chan_t( obi_a_chan_t ), | ||
.obi_r_chan_t( obi_r_chan_t ), | ||
.Depth ( 2 ), | ||
.CombRspReq ( 1'b1 ) | ||
) i_obi_rready_converter ( | ||
.clk_i, | ||
.rst_ni, | ||
.test_mode_i, | ||
|
||
.sbr_a_chan_i( internal_obi_req[i].a ), | ||
.req_i ( internal_obi_req[i].req ), | ||
.gnt_o ( internal_obi_rsp[i].gnt ), | ||
.sbr_r_chan_o( internal_obi_rsp[i].r ), | ||
.rvalid_o ( internal_obi_rsp[i].rvalid ), | ||
.rready_i ( internal_obi_req[i].rready ), | ||
|
||
.mgr_a_chan_o( obi_req_o[i].a ), | ||
.req_o ( obi_req_o[i].req ), | ||
.gnt_i ( obi_rsp_i[i].gnt ), | ||
.mgr_r_chan_i( obi_rsp_i[i].r ), | ||
.rvalid_i ( obi_rsp_i[i].rvalid ) | ||
); | ||
end | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters