forked from Github_Repos/cvw
Disabled AHB burst mode, which discovered a bug.
Multimanger bug in how back to back requests were arbitrated.
This commit is contained in:
parent
bd37a5c6dc
commit
26bfaddb25
@ -145,7 +145,7 @@ module ahbmultimanager
|
|||||||
case (CurrState)
|
case (CurrState)
|
||||||
IDLE: if (both) NextState = ARBITRATE;
|
IDLE: if (both) NextState = ARBITRATE;
|
||||||
else NextState = IDLE;
|
else NextState = IDLE;
|
||||||
ARBITRATE: if (HREADY & FinalBeat) NextState = IDLE;
|
ARBITRATE: if (HREADY & FinalBeat & ~(LSUReq & IFUReq)) NextState = IDLE;
|
||||||
else NextState = ARBITRATE;
|
else NextState = ARBITRATE;
|
||||||
default: NextState = IDLE;
|
default: NextState = IDLE;
|
||||||
endcase
|
endcase
|
||||||
@ -153,7 +153,7 @@ module ahbmultimanager
|
|||||||
// Manager needs to count beats.
|
// Manager needs to count beats.
|
||||||
flopenr #(4)
|
flopenr #(4)
|
||||||
BeatCountReg(.clk(HCLK),
|
BeatCountReg(.clk(HCLK),
|
||||||
.reset(~HRESETn | CntReset),
|
.reset(~HRESETn | CntReset | FinalBeat),
|
||||||
.en(BeatCntEn),
|
.en(BeatCntEn),
|
||||||
.d(NextBeatCount),
|
.d(NextBeatCount),
|
||||||
.q(BeatCount));
|
.q(BeatCount));
|
||||||
@ -189,6 +189,9 @@ module ahbmultimanager
|
|||||||
// basic arb always selects LSU when both
|
// basic arb always selects LSU when both
|
||||||
// replace this block for more sophisticated arbitration.
|
// replace this block for more sophisticated arbitration.
|
||||||
// Manager 0 (IFU)
|
// Manager 0 (IFU)
|
||||||
|
// this logic is all wrong.
|
||||||
|
// test by removing burst.
|
||||||
|
// 2nd want to test with slower memory.
|
||||||
assign save[0] = CurrState == IDLE & both;
|
assign save[0] = CurrState == IDLE & both;
|
||||||
assign restore[0] = CurrState == ARBITRATE;
|
assign restore[0] = CurrState == ARBITRATE;
|
||||||
assign dis[0] = CurrState == ARBITRATE;
|
assign dis[0] = CurrState == ARBITRATE;
|
||||||
|
@ -136,10 +136,12 @@ module buscachefsm #(parameter integer WordCountThreshold,
|
|||||||
// AHB bus interface
|
// AHB bus interface
|
||||||
assign HTRANS = (CurrState == ADR_PHASE & HREADY & (|RW | |CacheRW)) |
|
assign HTRANS = (CurrState == ADR_PHASE & HREADY & (|RW | |CacheRW)) |
|
||||||
(CurrState == DATA_PHASE & ~HREADY) ? AHB_NONSEQ :
|
(CurrState == DATA_PHASE & ~HREADY) ? AHB_NONSEQ :
|
||||||
(CacheAccess & |WordCount) ? AHB_SEQ : AHB_IDLE;
|
// (CacheAccess & |WordCount) ? AHB_SEQ : AHB_IDLE;
|
||||||
|
(CacheAccess & |WordCount) ? AHB_NONSEQ : AHB_IDLE;
|
||||||
assign HWRITE = RW[0] | CacheRW[0];
|
assign HWRITE = RW[0] | CacheRW[0];
|
||||||
assign HBURST = (|CacheRW) ? LocalBurstType : 3'b0;
|
// assign HBURST = (|CacheRW) ? LocalBurstType : 3'b0;
|
||||||
|
// try disabling burst as it is not working with the fpga.
|
||||||
|
assign HBURST = 3'b0;
|
||||||
|
|
||||||
always_comb begin
|
always_comb begin
|
||||||
case(WordCountThreshold)
|
case(WordCountThreshold)
|
||||||
|
Loading…
Reference in New Issue
Block a user