OpenCores
URL https://opencores.org/ocsvn/altor32/altor32/trunk

Subversion Repositories altor32

[/] [altor32/] [trunk/] [rtl/] [cpu/] [altor32_dcache.v] - Diff between revs 37 and 45

Show entire file | Details | Blame | View Log

Rev 37 Rev 45
Line 138... Line 138...
reg                              req_init;
reg                              req_init;
reg                              flush_single;
reg                              flush_single;
 
 
wire [31:0]                      line_address;
wire [31:0]                      line_address;
 
 
wire [31:0]                      muxed_address = (state == STATE_IDLE) ? address_i : req_address;
 
 
 
// Current state
// Current state
parameter STATE_IDLE        = 0;
parameter STATE_IDLE        = 0;
parameter STATE_SINGLE      = 1;
parameter STATE_SINGLE      = 1;
parameter STATE_CHECK       = 2;
parameter STATE_CHECK       = 2;
parameter STATE_FETCH       = 3;
parameter STATE_FETCH       = 3;
Line 157... Line 155...
parameter STATE_FLUSH2      = 11;
parameter STATE_FLUSH2      = 11;
parameter STATE_FLUSH3      = 12;
parameter STATE_FLUSH3      = 12;
parameter STATE_FLUSH4      = 13;
parameter STATE_FLUSH4      = 13;
reg [3:0] state;
reg [3:0] state;
 
 
 
wire [31:0]                      muxed_address = (state == STATE_IDLE) ? address_i : req_address;
 
 
assign tag_entry               = muxed_address[CACHE_LINE_ADDR_WIDTH + CACHE_LINE_SIZE_WIDTH - 1:CACHE_LINE_SIZE_WIDTH];
assign tag_entry               = muxed_address[CACHE_LINE_ADDR_WIDTH + CACHE_LINE_SIZE_WIDTH - 1:CACHE_LINE_SIZE_WIDTH];
assign cache_address           = {tag_entry, muxed_address[CACHE_LINE_SIZE_WIDTH-1:2]};
assign cache_address           = {tag_entry, muxed_address[CACHE_LINE_SIZE_WIDTH-1:2]};
 
 
assign data_o                  = (state == STATE_SINGLE_READY) ? data_r : cache_data_r;
assign data_o                  = (state == STATE_SINGLE_READY) ? data_r : cache_data_r;
assign stall_o                 = (state != STATE_IDLE) | req_flush | flush_i;
assign stall_o                 = (state != STATE_IDLE) | req_flush | flush_i;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.