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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [arm/] [cortex-a15.md] - Blame information for rev 729

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
;; ARM Cortex-A15 pipeline description
2
;; Copyright (C) 2011 Free Software Foundation, Inc.
3
;;
4
;; Written by Matthew Gretton-Dann 
5
 
6
;; This file is part of GCC.
7
;;
8
;; GCC is free software; you can redistribute it and/or modify it
9
;; under the terms of the GNU General Public License as published by
10
;; the Free Software Foundation; either version 3, or (at your option)
11
;; any later version.
12
;;
13
;; GCC is distributed in the hope that it will be useful, but
14
;; WITHOUT ANY WARRANTY; without even the implied warranty of
15
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
;; General Public License for more details.
17
;;
18
;; You should have received a copy of the GNU General Public License
19
;; along with GCC; see the file COPYING3.  If not see
20
;; .
21
 
22
(define_automaton "cortex_a15")
23
 
24
;; The Cortex-A15 core is modelled as a triple issue pipeline that has
25
;; the following dispatch units.
26
;; 1. Two pipelines for simple integer operations: SX1, SX2
27
;; 2. Two pipelines for Neon and FP data-processing operations: CX1, CX2
28
;; 3. One pipeline for branch operations: BX
29
;; 4. One pipeline for integer multiply and divide operations: MX
30
;; 5. Two pipelines for load and store operations: LS1, LS2
31
;;
32
;; We can issue into three pipelines per-cycle.
33
;;
34
;; We assume that where we have unit pairs xx1 is always filled before xx2.
35
 
36
;; The three issue units
37
(define_cpu_unit "ca15_i0, ca15_i1, ca15_i2" "cortex_a15")
38
 
39
(define_reservation "ca15_issue1" "(ca15_i0|ca15_i1|ca15_i2)")
40
(define_reservation "ca15_issue2" "((ca15_i0+ca15_i1)|(ca15_i1+ca15_i2))")
41
(define_reservation "ca15_issue3" "(ca15_i0+ca15_i1+ca15_i2)")
42
(final_presence_set "ca15_i1" "ca15_i0")
43
(final_presence_set "ca15_i2" "ca15_i1")
44
 
45
;; The main dispatch units
46
(define_cpu_unit "ca15_sx1, ca15_sx2" "cortex_a15")
47
(define_cpu_unit "ca15_cx1, ca15_cx2" "cortex_a15")
48
(define_cpu_unit "ca15_ls1, ca15_ls2" "cortex_a15")
49
(define_cpu_unit "ca15_bx, ca15_mx" "cortex_a15")
50
 
51
(define_reservation "ca15_ls" "(ca15_ls1|ca15_ls2)")
52
 
53
;; The extended load-store pipeline
54
(define_cpu_unit "ca15_ldr, ca15_str" "cortex_a15")
55
 
56
;; The extended ALU pipeline
57
(define_cpu_unit "ca15_sx1_alu, ca15_sx1_shf, ca15_sx1_sat" "cortex_a15")
58
(define_cpu_unit "ca15_sx2_alu, ca15_sx2_shf, ca15_sx2_sat" "cortex_a15")
59
 
60
;; Simple Execution Unit:
61
;;
62
;; Simple ALU without shift
63
(define_insn_reservation "cortex_a15_alu" 2
64
  (and (eq_attr "tune" "cortexa15")
65
       (and (eq_attr "type" "alu")
66
            (eq_attr "neon_type" "none")))
67
  "ca15_issue1,(ca15_sx1,ca15_sx1_alu)|(ca15_sx2,ca15_sx2_alu)")
68
 
69
;; ALU ops with immediate shift
70
(define_insn_reservation "cortex_a15_alu_shift" 3
71
  (and (eq_attr "tune" "cortexa15")
72
       (and (eq_attr "type" "alu_shift")
73
            (eq_attr "neon_type" "none")))
74
  "ca15_issue1,(ca15_sx1,ca15_sx1+ca15_sx1_shf,ca15_sx1_alu)\
75
               |(ca15_sx2,ca15_sx2+ca15_sx2_shf,ca15_sx2_alu)")
76
 
77
;; ALU ops with register controlled shift
78
(define_insn_reservation "cortex_a15_alu_shift_reg" 3
79
  (and (eq_attr "tune" "cortexa15")
80
       (and (eq_attr "type" "alu_shift_reg")
81
            (eq_attr "neon_type" "none")))
82
  "(ca15_issue2,ca15_sx1+ca15_sx2,ca15_sx1_shf,ca15_sx2_alu)\
83
   |(ca15_issue1,(ca15_issue1+ca15_sx2,ca15_sx1+ca15_sx2_shf)\
84
   |(ca15_issue1+ca15_sx1,ca15_sx1+ca15_sx1_shf),ca15_sx1_alu)")
85
 
86
;; Multiply Execution Unit:
87
;;
88
;; 32-bit multiplies
89
(define_insn_reservation "cortex_a15_mult32" 3
90
  (and (eq_attr "tune" "cortexa15")
91
       (and (eq_attr "type" "mult")
92
            (and (eq_attr "neon_type" "none")
93
                 (eq_attr "mul64" "no"))))
94
  "ca15_issue1,ca15_mx")
95
 
96
;; 64-bit multiplies
97
(define_insn_reservation "cortex_a15_mult64" 4
98
  (and (eq_attr "tune" "cortexa15")
99
       (and (eq_attr "type" "mult")
100
            (and (eq_attr "neon_type" "none")
101
                 (eq_attr "mul64" "yes"))))
102
  "ca15_issue1,ca15_mx*2")
103
 
104
;; Integer divide
105
(define_insn_reservation "cortex_a15_udiv" 9
106
  (and (eq_attr "tune" "cortexa15")
107
       (eq_attr "insn" "udiv"))
108
  "ca15_issue1,ca15_mx")
109
 
110
(define_insn_reservation "cortex_a15_sdiv" 10
111
  (and (eq_attr "tune" "cortexa15")
112
       (eq_attr "insn" "sdiv"))
113
  "ca15_issue1,ca15_mx")
114
 
115
;; Block all issue pipes for a cycle
116
(define_insn_reservation "cortex_a15_block" 1
117
  (and (eq_attr "tune" "cortexa15")
118
       (and (eq_attr "type" "block")
119
            (eq_attr "neon_type" "none")))
120
  "ca15_issue3")
121
 
122
;; Branch execution Unit
123
;;
124
;; Branches take one issue slot.
125
;; No latency as there is no result
126
(define_insn_reservation "cortex_a15_branch" 0
127
  (and (eq_attr "tune" "cortexa15")
128
       (and (eq_attr "type" "branch")
129
            (eq_attr "neon_type" "none")))
130
  "ca15_issue1,ca15_bx")
131
 
132
 
133
;; We lie with calls.  They take up all issue slots, and form a block in the
134
;; pipeline.  The result however is available the next cycle.
135
;;
136
;; Addition of new units requires this to be updated.
137
(define_insn_reservation "cortex_a15_call" 1
138
  (and (eq_attr "tune" "cortexa15")
139
       (and (eq_attr "type" "call")
140
            (eq_attr "neon_type" "none")))
141
  "ca15_issue3,\
142
   ca15_sx1+ca15_sx2+ca15_bx+ca15_mx+ca15_cx1+ca15_cx2+ca15_ls1+ca15_ls2,\
143
   ca15_sx1_alu+ca15_sx1_shf+ca15_sx1_sat+ca15_sx2_alu+ca15_sx2_shf\
144
    +ca15_sx2_sat+ca15_ldr+ca15_str")
145
 
146
;; Load-store execution Unit
147
;;
148
;; Loads of up to two words.
149
(define_insn_reservation "cortex_a15_load1" 4
150
  (and (eq_attr "tune" "cortexa15")
151
       (and (eq_attr "type" "load_byte,load1,load2")
152
            (eq_attr "neon_type" "none")))
153
  "ca15_issue1,ca15_ls,ca15_ldr,nothing")
154
 
155
;; Loads of three or four words.
156
(define_insn_reservation "cortex_a15_load3" 5
157
  (and (eq_attr "tune" "cortexa15")
158
       (and (eq_attr "type" "load3,load4")
159
            (eq_attr "neon_type" "none")))
160
  "ca15_issue2,ca15_ls1+ca15_ls2,ca15_ldr,ca15_ldr,nothing")
161
 
162
;; Stores of up to two words.
163
(define_insn_reservation "cortex_a15_store1" 0
164
  (and (eq_attr "tune" "cortexa15")
165
       (and (eq_attr "type" "store1,store2")
166
            (eq_attr "neon_type" "none")))
167
  "ca15_issue1,ca15_ls,ca15_str")
168
 
169
;; Stores of three or four words.
170
(define_insn_reservation "cortex_a15_store3" 0
171
  (and (eq_attr "tune" "cortexa15")
172
       (and (eq_attr "type" "store3,store4")
173
            (eq_attr "neon_type" "none")))
174
  "ca15_issue2,ca15_ls1+ca15_ls2,ca15_str,ca15_str")
175
 
176
;; Simple execution unit bypasses
177
(define_bypass 1 "cortex_a15_alu"
178
               "cortex_a15_alu,cortex_a15_alu_shift,cortex_a15_alu_shift_reg")
179
(define_bypass 2 "cortex_a15_alu_shift"
180
               "cortex_a15_alu,cortex_a15_alu_shift,cortex_a15_alu_shift_reg")
181
(define_bypass 2 "cortex_a15_alu_shift_reg"
182
               "cortex_a15_alu,cortex_a15_alu_shift,cortex_a15_alu_shift_reg")
183
(define_bypass 1 "cortex_a15_alu" "cortex_a15_load1,cortex_a15_load3")
184
(define_bypass 2 "cortex_a15_alu_shift" "cortex_a15_load1,cortex_a15_load3")
185
(define_bypass 2 "cortex_a15_alu_shift_reg"
186
               "cortex_a15_load1,cortex_a15_load3")

powered by: WebSVN 2.1.0

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