Module ibex_load_store_unit
Block Diagram of ibex_load_store_unit
Name |
Default |
Description |
---|---|---|
MemECC |
1'b0 |
|
MemDataWidth |
MemECC?32+7:32 |
Name |
Type |
Direction |
Description |
---|---|---|---|
clk_i |
wire logic |
input |
|
rst_ni |
wire logic |
input |
|
data_req_o |
var logic |
output |
|
data_gnt_i |
wire logic |
input |
|
data_rvalid_i |
wire logic |
input |
|
data_bus_err_i |
wire logic |
input |
|
data_pmp_err_i |
wire logic |
input |
|
data_addr_o |
var logic [31 : 0] |
output |
|
data_we_o |
var logic |
output |
|
data_be_o |
var logic [3 : 0] |
output |
|
data_wdata_o |
var logic [MemDataWidth - 1 : 0] |
output |
|
data_rdata_i |
wire logic [MemDataWidth - 1 : 0] |
input |
|
lsu_we_i |
wire logic |
input |
signals to/from ID/EX stage write enable -> from ID/EX |
lsu_type_i |
wire logic [1 : 0] |
input |
data type word, half word, byte -> from ID/EX |
lsu_wdata_i |
wire logic [31 : 0] |
input |
data to write to memory -> from ID/EX |
lsu_sign_ext_i |
wire logic |
input |
sign extension -> from ID/EX |
lsu_rdata_o |
var logic [31 : 0] |
output |
requested data -> to ID/EX |
lsu_rdata_valid_o |
var logic |
output |
|
lsu_req_i |
wire logic |
input |
data request -> from ID/EX |
adder_result_ex_i |
wire logic [31 : 0] |
input |
address computed in ALU -> from ID/EX |
addr_incr_req_o |
var logic |
output |
request address increment for |
addr_last_o |
var logic [31 : 0] |
output |
misaligned accesses -> to ID/EX address of last transaction -> to controller |
lsu_req_done_o |
var logic |
output |
-> mtval -> AGU for misaligned accesses Signals that data request is complete |
lsu_resp_valid_o |
var logic |
output |
(only need to await final data response) -> to ID/EX LSU has response from transaction -> to ID/EX |
load_err_o |
var logic |
output |
exception signals |
load_resp_intg_err_o |
var logic |
output |
|
store_err_o |
var logic |
output |
|
store_resp_intg_err_o |
var logic |
output |
|
busy_o |
var logic |
output |
|
perf_load_o |
var logic |
output |
|
perf_store_o |
var logic |
output |
Name |
Kind |
Description |
---|---|---|
ibex_load_store_unit.IbexDataTypeKnown |
concurent assert |
disable iff((!rst_ni)!=='0)((lsu_req_i | busy_o) |-> ! $isunknown(lsu_type_i))
|
ibex_load_store_unit.IbexDataOffsetKnown |
concurent assert |
disable iff((!rst_ni)!=='0)((lsu_req_i | busy_o) |-> ! $isunknown(data_offset))
|
ibex_load_store_unit.IbexRDataOffsetQKnown |
concurent assert |
disable iff((!rst_ni)!=='0)! $isunknown(rdata_offset_q)
|
ibex_load_store_unit.IbexDataTypeQKnown |
concurent assert |
disable iff((!rst_ni)!=='0)! $isunknown(data_type_q)
|
ibex_load_store_unit.IbexLsuStateValid |
concurent assert |
disable iff((!rst_ni)!=='0)(ls_fsm_cs inside {IDLE, WAIT_GNT_MIS, WAIT_RVALID_MIS, WAIT_GNT, WAIT_RVALID_MIS_GNTS_DONE})
|
ibex_load_store_unit.IbexDataAddrUnknown |
concurent assert |
disable iff((!rst_ni)!=='0)(data_req_o |-> ! $isunknown(data_addr_o))
|
ibex_load_store_unit.IbexDataAddrUnaligned |
concurent assert |
disable iff((!rst_ni)!=='0)(data_req_o |-> (data_addr_o[1 : 0] == 2'b00))
|
Always Blocks
- always_comb @()
///////////////// BE generation // /////////////////
- always_comb @()
prepare data to be written to the memory we handle misaligned accesses, half word and byte accesses here
- always_ff @(posedge clk_i or negedge rst_ni)
register for unaligned rdata
- always_ff @(posedge clk_i or negedge rst_ni)
registers for transaction control
- always_comb @()
take care of misaligned words
- always_comb @()
sign extension for half words
- always_comb @()
sign extension for bytes
- always_comb @()
select word, half word or byte sign extended version
- always_comb @()
FSM
- always_ff @(posedge clk_i or negedge rst_ni)
registers for FSM
# |
Current State |
Next State |
Condition |
Comment |
---|---|---|---|---|
1 |
IDLE |
WAIT_RVALID_MIS |
[((lsu_req_i) && (data_gnt_i) && (split_misaligned_access))] |
|
2 |
IDLE |
WAIT_GNT_MIS |
[((lsu_req_i) && !(data_gnt_i) && (split_misaligned_access))] |
|
3 |
IDLE |
WAIT_GNT |
[(!(split_misaligned_access) && (lsu_req_i) && !(data_gnt_i))] |
|
4 |
WAIT_RVALID_MIS |
WAIT_GNT |
[(!(data_gnt_i) && (data_rvalid_i || pmp_err_q))] |
|
5 |
WAIT_RVALID_MIS |
IDLE |
[((data_rvalid_i || pmp_err_q) && (data_gnt_i))] |
|
6 |
WAIT_RVALID_MIS |
WAIT_RVALID_MIS_GNTS_DONE |
[(!(data_rvalid_i || pmp_err_q) && (data_gnt_i))] |
|
7 |
WAIT_GNT_MIS |
WAIT_RVALID_MIS |
[(data_gnt_i || pmp_err_q)] |
|
8 |
WAIT_GNT |
IDLE |
[(data_gnt_i || pmp_err_q)] |
|
9 |
WAIT_RVALID_MIS_GNTS_DONE |
IDLE |
[(data_rvalid_i)] |
Instances
- ibex_top : ibex_top
- u_ibex_core : ibex_core
load_store_unit_i : ibex_load_store_unit
Submodules
- ibex_load_store_unit
g_no_mem_data_ecc : [if !(MemECC)]
g_no_mem_wdata_ecc : [if !(MemECC)]
Flow Diagram of ibex_load_store_unit
Sub-Instances Diagram of ibex_load_store_unit
Schematic Diagram of ibex_load_store_unit
data interface