URL
https://opencores.org/ocsvn/thor/thor/trunk
[/] [thor/] [trunk/] [FT64v5/] [rtl/] [common/] [FT64_InsLength.v] - Blame information for rev 56
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
56 |
robfinch |
// ============================================================================
|
2 |
|
|
// __
|
3 |
|
|
// \\__/ o\ (C) 2018 Robert Finch, Waterloo
|
4 |
|
|
// \ __ / 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_defines.vh"
|
29 |
|
|
|
30 |
|
|
module FT64_InsLength(ins, len);
|
31 |
|
|
input [47:0] ins;
|
32 |
|
|
output reg [2:0] len;
|
33 |
|
|
|
34 |
|
|
always @*
|
35 |
|
|
if (ins[`INSTRUCTION_OP]==`CMPRSSD)
|
36 |
|
|
len <= 3'd2;
|
37 |
|
|
else
|
38 |
|
|
case(ins[7:6])
|
39 |
|
|
2'd0: len <= 3'd4;
|
40 |
|
|
2'd1: len <= 3'd6;
|
41 |
|
|
default: len <= 3'd2;
|
42 |
|
|
endcase
|
43 |
|
|
|
44 |
|
|
endmodule
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.