-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathressources.py
More file actions
executable file
·67 lines (50 loc) · 1.74 KB
/
ressources.py
File metadata and controls
executable file
·67 lines (50 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
class Ressources:
"""
Define the ressources of the FPGA
LUT: Number of LUT
FF: Number of FF
DSP: Number of DSP
BRAM: Number of BRAM
partitioning_max: Partitioning max (usually 1024)
"""
def __init__(self):
self.sizeof = 32
### RTL
self.SLR = 1
self.factor = 1
self.partitioning_max = 1024
self.MAX_BUFFER_SIZE = 4096
self.MAX_UF = 4096
self.ON_CHIP_MEM_SIZE = 1512000
###
# self.SLR = 3
# self.factor = 0.45
# self.partitioning_max = 256
# self.SLR = 1
# self.factor = 0.10
# self.partitioning_max = 128
# self.SLR = 3
# self.factor = 0.50
# self.partitioning_max = 128
# self.SLR = 3
# self.factor = 0.50
# self.partitioning_max = 256
# self.SLR = 1
# self.factor = 0.10
# self.partitioning_max = 256
self.DSP = int(9024*self.factor)
self.BRAM = int(4032*self.factor)
self.DSP_per_SLR = int(self.DSP/self.SLR)
self.BRAM_per_SLR = int(self.BRAM/self.SLR)
self.MEM_PER_SLR = int(self.ON_CHIP_MEM_SIZE/self.SLR)
self.DSP_per_operation = {}
if self.sizeof == 32:
self.DSP_per_operation = {"+": 2, "-":2, "*": 3, "=": 0,"/":0}
elif self.sizeof == 64:
self.DSP_per_operation = {"+": 3, "-":3, "*": 8, "=": 0,"/":0}
self.IL = {}
if self.sizeof == 32:
# self.IL = {"+": 5, "*": 3, "=": 1, "-":7, "/": 12}
self.IL = {"+": 7, "*": 4, "=": 1, "-":7, "/": 12}
elif self.sizeof == 64:
self.IL = {"+": 5, "*": 6, "=": 1, "-":5, "/": 12}