mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-19 11:54:46 -04:00
Make index/tag assignments parametric in store_buffer and load_unit.
This commit is contained in:
parent
efce57f1c4
commit
3a4c2c413e
2 changed files with 8 additions and 4 deletions
|
@ -63,9 +63,11 @@ module load_unit (
|
|||
assign in_data = {lsu_ctrl_i.trans_id, lsu_ctrl_i.vaddr[2:0], lsu_ctrl_i.operator};
|
||||
// output address
|
||||
// we can now output the lower 12 bit as the index to the cache
|
||||
assign req_port_o.address_index = lsu_ctrl_i.vaddr[11:0];
|
||||
assign req_port_o.address_index = lsu_ctrl_i.vaddr[ariane_pkg::DCACHE_INDEX_WIDTH-1:0];
|
||||
// translation from last cycle, again: control is handled in the FSM
|
||||
assign req_port_o.address_tag = paddr_i[55:12];
|
||||
assign req_port_o.address_tag = paddr_i[ariane_pkg::DCACHE_TAG_WIDTH +
|
||||
ariane_pkg::DCACHE_INDEX_WIDTH-1 :
|
||||
ariane_pkg::DCACHE_INDEX_WIDTH];
|
||||
// directly output an exception
|
||||
assign ex_o = ex_i;
|
||||
|
||||
|
|
|
@ -128,9 +128,11 @@ module store_buffer (
|
|||
assign req_port_o.tag_valid = 1'b0;
|
||||
|
||||
// those signals can directly be output to the memory
|
||||
assign req_port_o.address_index = commit_queue_q[commit_read_pointer_q].address[11:0];
|
||||
assign req_port_o.address_index = commit_queue_q[commit_read_pointer_q].address[ariane_pkg::DCACHE_INDEX_WIDTH-1:0];
|
||||
// if we got a new request we already saved the tag from the previous cycle
|
||||
assign req_port_o.address_tag = commit_queue_q[commit_read_pointer_q].address[55:12];
|
||||
assign req_port_o.address_tag = commit_queue_q[commit_read_pointer_q].address[ariane_pkg::DCACHE_TAG_WIDTH +
|
||||
ariane_pkg::DCACHE_INDEX_WIDTH-1 :
|
||||
ariane_pkg::DCACHE_INDEX_WIDTH];
|
||||
assign req_port_o.data_wdata = commit_queue_q[commit_read_pointer_q].data;
|
||||
assign req_port_o.data_be = commit_queue_q[commit_read_pointer_q].be;
|
||||
assign req_port_o.data_size = commit_queue_q[commit_read_pointer_q].data_size;
|
||||
|
|
Loading…
Add table
Reference in a new issue