OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [FT64v5/] [rtl/] [common/] [FT64_InsLength.v] - Blame information for rev 57

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 57 robfinch
`include "FT64_config.vh"
29 56 robfinch
`include "FT64_defines.vh"
30
 
31
module FT64_InsLength(ins, len);
32
input [47:0] ins;
33
output reg [2:0] len;
34
 
35
always @*
36 57 robfinch
`ifdef SUPPORT_DCI
37 56 robfinch
if (ins[`INSTRUCTION_OP]==`CMPRSSD)
38
        len <= 3'd2;
39
else
40 57 robfinch
`endif
41 56 robfinch
        case(ins[7:6])
42
        2'd0:   len <= 3'd4;
43
        2'd1:   len <= 3'd6;
44
        default:        len <= 3'd2;
45
        endcase
46
 
47
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.