summaryrefslogtreecommitdiff
path: root/rtl/core/decode/branch.sv
blob: 1dbc1ad256bbf48afdbb86f6334e556e5e876404 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
`include "core/decode/isa.sv"
`include "core/uarch.sv"

module core_decode_branch
(
	input  word  insn,

	output logic link,
	output ptr   offset
);

	logic[23:0] immediate;
	assign immediate = insn `FIELD_B_OFFSET;

	assign link = insn `FIELD_B_L;
	assign offset = {{6{immediate[23]}}, immediate};

endmodule