Project

General

Profile

Wiki » History » Version 41

Frédéric Blanc, 2023-12-04 13:53

1 9 Frédéric Blanc
h1. RedPitaya
2 1 Frédéric Blanc
3 28 Frédéric Blanc
h2. Zynq-7000 SoC
4
5
The Zynq®-7000 family is based on the Xilinx SoC architecture. These products integrate a feature-rich dual-core or single-core ARM®
6
Cortex™-A9 based processing system (PS) and 28 nm Xilinx programmable logic (PL) in a single device. The ARM Cortex-A9 CPUs are
7
the heart of the PS and also include on-chip memory, external memory interfaces, and a rich set of peripheral connectivity interfaces.
8
9
AMD Zynq 7000 XC7Z010
10
11
*Vivado Select the device xc7z010clg400-1*
12
13
CLB Flip-Flops 35,200
14
Look-Up Tables (LUTs) 17,600
15
Logic Cells 28K
16
17 29 Frédéric Blanc
h2. Carte Redpitaya
18
19 32 Frédéric Blanc
!clipboard-202312041324-mzqat.png!
20 31 Frédéric Blanc
https://redpitaya.com/
21 13 Frédéric Blanc
!clipboard-202312011541-sbukm.png!
22 8 Frédéric Blanc
*Attention il existe plusieurs version de redpitaya*
23
24
STEMlab 125-14 *external clock* (The OS will *not boot* without providing an external clock.)
25
https://redpitaya.readthedocs.io/en/latest/developerGuide/hardware/125-14_EXT/top.html
26 1 Frédéric Blanc
27 9 Frédéric Blanc
pour modifier une STEMlab 125-14 *external clock* en STEMlab 125-14 normale il faut souder 2 resistances 0402 de 22R sur R26 et R25 et dessouder R23 et R24
28 1 Frédéric Blanc
29 10 Frédéric Blanc
!clipboard-202311231551-ugmwn.png!
30 12 Frédéric Blanc
!clipboard-202311271003-ym5pn.png!
31 9 Frédéric Blanc
!clipboard-202311231537-zevpq.png!
32 11 Frédéric Blanc
!clipboard-202311271000-jz8ux.png!
33 8 Frédéric Blanc
34 15 Frédéric Blanc
frequence max 464.037Mhz
35 6 Frédéric Blanc
36 14 Frédéric Blanc
h2. OS
37 1 Frédéric Blanc
38 15 Frédéric Blanc
h3. OS 1.04
39
40
Please note that you need to change the forward slashes to backward slashes on Windows.
41
42
43 16 Frédéric Blanc
Send the file .bit (red_pitaya_top.bit is the default name) to the Red Pitaya with the scp command.
44 15 Frédéric Blanc
45
<pre><code class="shell">
46 17 Frédéric Blanc
scp red_pitaya_top.bit root@rp-xxxxxx.local:/root
47 15 Frédéric Blanc
</code></pre>
48
49
50 16 Frédéric Blanc
Now establish an SSH communication with your Red Pitaya and check if you have the copy red_pitaya_top.bit in the root directory.
51 15 Frédéric Blanc
52
<pre><code class="shell">
53 17 Frédéric Blanc
redpitaya> ls
54 15 Frédéric Blanc
</code></pre>
55
56
57 16 Frédéric Blanc
Load the red_pitaya_top.bit to xdevcfg with
58 15 Frédéric Blanc
59
<pre><code class="shell">
60 17 Frédéric Blanc
redpitaya> cat red_pitaya_top.bit > /dev/xdevcfg
61 15 Frédéric Blanc
</code></pre>
62
63 40 Frédéric Blanc
https://redmine.laas.fr/attachments/download/4691/STEMlab_125-xx_OS_1.04-18_stable.img.zip
64
65 15 Frédéric Blanc
h3. OS 2.0
66
67 25 Frédéric Blanc
sur l'ordinateur où est installer *Vivado*
68 24 Frédéric Blanc
69 15 Frédéric Blanc
Create .bif file (for example, red_pitaya_top.bif) and use it to generate a binary bitstream file (red_pitaya_top.bit.bin)
70
71
<pre><code class="shell">
72
echo -n "all:{ red_pitaya_top.bit }" >  red_pitaya_top.bif
73
bootgen -image red_pitaya_top.bif -arch zynq -process_bitstream bin -o red_pitaya_top.bit.bin -w
74
</code></pre>
75
76 23 Frédéric Blanc
Bootgen se trouve dans ../Vivado/2023.1/bin
77 15 Frédéric Blanc
78
Send the file .bit.bin to the Red Pitaya with the scp command.
79
80
<pre><code class="shell">
81
scp red_pitaya_top.bit.bin root@rp-xxxxxx.local:/root
82
</code></pre>
83 1 Frédéric Blanc
84 27 Frédéric Blanc
sur la *redpitaya*
85 1 Frédéric Blanc
86 24 Frédéric Blanc
Now establish an SSH communication with your *Red Pitaya* and check if you have the copy red_pitaya_top.bit.bin in the root directory.
87 15 Frédéric Blanc
88 24 Frédéric Blanc
<pre><code class="shell">
89
ls
90 15 Frédéric Blanc
</code></pre>
91
92 1 Frédéric Blanc
93 15 Frédéric Blanc
Load the red_pitaya_top.bit.bin image into the FPGA:
94
95
<pre><code class="shell">
96 24 Frédéric Blanc
/opt/redpitaya/bin/fpgautil -b red_pitaya_top.bit.bin
97 15 Frédéric Blanc
</code></pre>
98
99
100 19 Frédéric Blanc
*autre tuto:*
101
102 20 Frédéric Blanc
Génération du fichier crypté
103 18 Frédéric Blanc
Vivado g´en`ere par d´efaut un fichier .bit. Le pilote s’attend `a un autre format contenant un entˆete particulier. La
104 20 Frédéric Blanc
conversion se fait avec l’utilitaire *bootgen* fourni par le *SDK de Vivado* .
105 1 Frédéric Blanc
Cet outil attend un fichier .bif contenant :
106 20 Frédéric Blanc
107
<pre><code class="shell">
108 21 Frédéric Blanc
a l l :
109
{
110
n o m d u b i t s t r e a m . b i t
111
}
112 20 Frédéric Blanc
</code></pre>
113
114
115
qui sera ensuite fourni à bootgen :
116
117
<pre><code class="shell">
118 26 Frédéric Blanc
../bin/bootgen −image fichierbif.bif −arch zynq −processbitstream bin
119 20 Frédéric Blanc
</code></pre>
120
121
122
Suite à cette commande un fichier nom du bitstream.bit.bin est créé dans le répertoire courant.
123
124
Flasher par utilisation directe de fpga manager
125
126
Le fichier .bit.bin doit être copié/déplacé dans /lib/firmware.
127
Afin d’informer le pilote que le PL doit être flashé, et quel bitstream utiliser, la commande suivante est à utiliser :
128
129
<pre><code class="shell">
130 1 Frédéric Blanc
echo " nom_du_bitstream.bit.bin " > /sys/class/fpga manager/fpga0/firmware
131
</code></pre>
132
133
134 20 Frédéric Blanc
La ligne :
135 21 Frédéric Blanc
<pre><code class="shell">
136
fpga-manager fpga0: writing nom_du_bitstram.bit.bin to Xilinx Zynq FPGA Manager
137
</code></pre>
138 18 Frédéric Blanc
139 21 Frédéric Blanc
s’affichera en cas de succés et la LED connect´ee sur Prog done doit s’allumer (LED bleue sur la RedPitaya).
140
141 34 Frédéric Blanc
page 34 de document:"tuto redpitaya UdFC"
142 15 Frédéric Blanc
143 41 Frédéric Blanc
https://downloads.redpitaya.com/downloads/Unify/RedPitaya_OS_2.00-18_stable.img.zip
144
145 33 Frédéric Blanc
h3. bitstream de test
146 14 Frédéric Blanc
147 39 Frédéric Blanc
Le test est un compteur qui fait clignoter les LED du Redpitaya
148
149 38 Frédéric Blanc
https://redmine.laas.fr/attachments/download/4689/led_fred.bit
150 39 Frédéric Blanc
151
https://redmine.laas.fr/attachments/download/4690/led_fred.bit.bin
152 3 Frédéric Blanc
153
h2. pinout
154 5 Frédéric Blanc
155 3 Frédéric Blanc
!clipboard-202304261053-qqtl1.png!
156
!clipboard-202304251234-p78ss.png!
157 1 Frédéric Blanc
158 2 Frédéric Blanc
h2. Matlab Simulink HDL
159
160
h2. Xilinx Vivado
161 4 Frédéric Blanc
162
La carte Red Pitaya a une logique programmable faite par Xilinx et pour l'écrire pour décrire votre système numérique, vous devez utiliser le logiciel Vivado. Vivado sert à écrire votre système numérique avec un HDL et à implémenter votre système dans la logique programmable. Le résultat de la mise en œuvre d'un projet Vivado est un fichier appelé bitstream qui a une extension .bit, qui contient les informations sur les connexions des blocs logiques qui seront utilisés et les connexions entre eux.
163
164 7 Frédéric Blanc
[[Xilink_Vivado]]
165
166 1 Frédéric Blanc
h2. Shared RAM PS (CPU) PL (FPGA)
167 7 Frédéric Blanc
168 15 Frédéric Blanc
[[Shared_RAM_CPU_FPGA]]