mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Fixed support to allow spills and no icache.
This commit is contained in:
parent
ecd3912900
commit
861450c4d6
File diff suppressed because one or more lines are too long
@ -130,7 +130,7 @@ module ifu (
|
|||||||
assign PCNextFMux = SelNextSpill ? PCFp2[11:0] : PCNextF[11:0];
|
assign PCNextFMux = SelNextSpill ? PCFp2[11:0] : PCNextF[11:0];
|
||||||
assign PCFMux = SelSpill ? PCFp2 : PCF;
|
assign PCFMux = SelSpill ? PCFp2 : PCF;
|
||||||
|
|
||||||
assign Spill = &PCF[$clog2(`ICACHE_LINELENINBITS/32)+1:1];
|
assign Spill = &PCF[$clog2(SPILLTHRESHOLD)+1:1];
|
||||||
|
|
||||||
typedef enum {STATE_SPILL_READY, STATE_SPILL_SPILL} statetype;
|
typedef enum {STATE_SPILL_READY, STATE_SPILL_SPILL} statetype;
|
||||||
(* mark_debug = "true" *) statetype CurrState, NextState;
|
(* mark_debug = "true" *) statetype CurrState, NextState;
|
||||||
@ -159,7 +159,7 @@ module ifu (
|
|||||||
flopenr #(16) SpillInstrReg(.clk(clk),
|
flopenr #(16) SpillInstrReg(.clk(clk),
|
||||||
.en(SpillSave),
|
.en(SpillSave),
|
||||||
.reset(reset),
|
.reset(reset),
|
||||||
.d(InstrRawF[15:0]),
|
.d(`MEM_ICACHE ? InstrRawF[15:0] : InstrRawF[31:16]),
|
||||||
.q(SpillDataLine0));
|
.q(SpillDataLine0));
|
||||||
|
|
||||||
assign PostSpillInstrRawF = Spill ? {InstrRawF[15:0], SpillDataLine0} : InstrRawF;
|
assign PostSpillInstrRawF = Spill ? {InstrRawF[15:0], SpillDataLine0} : InstrRawF;
|
||||||
@ -226,6 +226,7 @@ module ifu (
|
|||||||
// 3. wire pass-through
|
// 3. wire pass-through
|
||||||
|
|
||||||
localparam integer WORDSPERLINE = `MEM_ICACHE ? `ICACHE_LINELENINBITS/`XLEN : 1;
|
localparam integer WORDSPERLINE = `MEM_ICACHE ? `ICACHE_LINELENINBITS/`XLEN : 1;
|
||||||
|
localparam integer SPILLTHRESHOLD = `MEM_ICACHE ? `ICACHE_LINELENINBITS/32 : 1;
|
||||||
localparam integer LOGWPL = `MEM_ICACHE ? $clog2(WORDSPERLINE) : 1;
|
localparam integer LOGWPL = `MEM_ICACHE ? $clog2(WORDSPERLINE) : 1;
|
||||||
localparam integer LINELEN = `MEM_ICACHE ? `ICACHE_LINELENINBITS : `XLEN;
|
localparam integer LINELEN = `MEM_ICACHE ? `ICACHE_LINELENINBITS : `XLEN;
|
||||||
localparam integer WordCountThreshold = `MEM_ICACHE ? WORDSPERLINE - 1 : 0;
|
localparam integer WordCountThreshold = `MEM_ICACHE ? WORDSPERLINE - 1 : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user