URL
https://opencores.org/ocsvn/raptor64/raptor64/trunk
[/] [raptor64/] [trunk/] [rtl/] [verilog/] [Raptor64_BranchHistory.v] - Diff between revs 45 and 48
Show entire file |
Details |
Blame |
View Log
Rev 45 |
Rev 48 |
Line 24... |
Line 24... |
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
//
|
//
|
//
|
//
|
//=============================================================================
|
//=============================================================================
|
//
|
//
|
module Raptor64_BranchHistory(rst, clk, advanceX, xIRvalid, xIR, pc, xpc, takb, predict_taken);
|
module Raptor64_BranchHistory(rst, clk, advanceX, xIR, pc, xpc, takb, predict_taken);
|
input rst;
|
input rst;
|
input clk;
|
input clk;
|
input advanceX;
|
input advanceX;
|
input xIRvalid;
|
|
input [31:0] xIR;
|
input [31:0] xIR;
|
input [63:0] pc;
|
input [63:0] pc;
|
input [63:0] xpc;
|
input [63:0] xpc;
|
input takb;
|
input takb;
|
output predict_taken;
|
output predict_taken;
|
Line 56... |
Line 55... |
wire [6:0] xOpcode = xIR[31:25];
|
wire [6:0] xOpcode = xIR[31:25];
|
wire isxBranchI = (xOpcode==`BEQI || xOpcode==`BNEI ||
|
wire isxBranchI = (xOpcode==`BEQI || xOpcode==`BNEI ||
|
xOpcode==`BLTI || xOpcode==`BLEI || xOpcode==`BGTI || xOpcode==`BGEI ||
|
xOpcode==`BLTI || xOpcode==`BLEI || xOpcode==`BGTI || xOpcode==`BGEI ||
|
xOpcode==`BLTUI || xOpcode==`BLEUI || xOpcode==`BGTUI || xOpcode==`BGEUI)
|
xOpcode==`BLTUI || xOpcode==`BLEUI || xOpcode==`BGTUI || xOpcode==`BGEUI)
|
;
|
;
|
wire isxBranch = xIRvalid && (isxBranchI || xOpcode==`TRAPcc || xOpcode==`TRAPcci || xOpcode==`BTRI || xOpcode==`BTRR);
|
wire isxBranch = (isxBranchI || xOpcode==`TRAPcc || xOpcode==`TRAPcci || xOpcode==`BTRI || xOpcode==`BTRR);
|
|
|
// Two bit saturating counter
|
// Two bit saturating counter
|
reg [1:0] xbits_new;
|
reg [1:0] xbits_new;
|
always @(takb or bht_xbits)
|
always @(takb or bht_xbits)
|
if (takb) begin
|
if (takb) begin
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.