URL
https://opencores.org/ocsvn/thor/thor/trunk
[/] [thor/] [trunk/] [FT64v5/] [rtl/] [twoway/] [FT64_BranchPredicator.v] - Diff between revs 48 and 52
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 48 |
Rev 52 |
Line 113... |
Line 113... |
// If taking a branch in commit0 then a following branch
|
// If taking a branch in commit0 then a following branch
|
// in commit1 is never encountered. So only update for
|
// in commit1 is never encountered. So only update for
|
// commit1 if commit0 is not taken.
|
// commit1 if commit0 is not taken.
|
reg [1:0] xbits_new;
|
reg [1:0] xbits_new;
|
always @*
|
always @*
|
if (takb & wrhist) begin
|
if (wrhist) begin
|
|
if (takb) begin
|
if (bht_xbits != 2'd1)
|
if (bht_xbits != 2'd1)
|
xbits_new <= bht_xbits + 2'd1;
|
xbits_new <= bht_xbits + 2'd1;
|
else
|
else
|
xbits_new <= bht_xbits;
|
xbits_new <= bht_xbits;
|
end
|
end
|
else begin
|
else begin
|
if (bht_xbits != 2'd2)
|
if (bht_xbits != 2'd2)
|
xbits_new <= bht_xbits - {1'b0,wrhist};
|
xbits_new <= bht_xbits - 2'd1;
|
else
|
else
|
xbits_new <= bht_xbits;
|
xbits_new <= bht_xbits;
|
end
|
end
|
|
end
|
|
else
|
|
xbits_new <= bht_xbits;
|
|
|
always @(posedge clk)
|
always @(posedge clk)
|
if (rst)
|
if (rst)
|
gbl_branch_hist <= 3'b000;
|
gbl_branch_hist <= 3'b000;
|
else begin
|
else begin
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.