URL
https://opencores.org/ocsvn/thor/thor/trunk
[/] [thor/] [trunk/] [FT64v7/] [rtl/] [common/] [FT64_InsLength.v] - Blame information for rev 61
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
60 |
robfinch |
// ============================================================================
|
2 |
|
|
// __
|
3 |
61 |
robfinch |
// \\__/ o\ (C) 2018-2019 Robert Finch, Waterloo
|
4 |
60 |
robfinch |
// \ __ / All rights reserved.
|
5 |
|
|
// \/_// robfinch<remove>@finitron.ca
|
6 |
|
|
// ||
|
7 |
|
|
//
|
8 |
|
|
// FT64_InsLength.v
|
9 |
|
|
//
|
10 |
|
|
// This source file is free software: you can redistribute it and/or modify
|
11 |
|
|
// it under the terms of the GNU Lesser General Public License as published
|
12 |
|
|
// by the Free Software Foundation, either version 3 of the License, or
|
13 |
|
|
// (at your option) any later version.
|
14 |
|
|
//
|
15 |
|
|
// This source file is distributed in the hope that it will be useful,
|
16 |
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 |
|
|
// GNU General Public License for more details.
|
19 |
|
|
//
|
20 |
|
|
// You should have received a copy of the GNU General Public License
|
21 |
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
22 |
|
|
//
|
23 |
|
|
// Computes the length of an instruction.
|
24 |
|
|
// There are also other places in code where the length is determined
|
25 |
|
|
// without the use of this module.
|
26 |
|
|
// ============================================================================
|
27 |
|
|
//
|
28 |
|
|
`include "FT64_config.vh"
|
29 |
|
|
`include "FT64_defines.vh"
|
30 |
|
|
|
31 |
|
|
module FT64_InsLength(ins, len, pred_on);
|
32 |
|
|
input [47:0] ins;
|
33 |
|
|
output reg [2:0] len;
|
34 |
|
|
input pred_on;
|
35 |
|
|
|
36 |
|
|
always @*
|
37 |
|
|
`ifdef SUPPORT_DCI
|
38 |
|
|
if (ins[`INSTRUCTION_OP]==`CMPRSSD)
|
39 |
|
|
len <= 3'd2 | pred_on;
|
40 |
|
|
else
|
41 |
|
|
`endif
|
42 |
|
|
case(ins[7:6])
|
43 |
|
|
2'd0: len <= 3'd4 | pred_on;
|
44 |
|
|
2'd1: len <= 3'd6 | pred_on;
|
45 |
|
|
default: len <= 3'd2 | pred_on;
|
46 |
|
|
endcase
|
47 |
|
|
|
48 |
|
|
endmodule
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.