Project

General

Profile

Wiki » History » Version 56

Frédéric Blanc, 2025-02-12 11:17

1 9 Frédéric Blanc
h1. RedPitaya
2 1 Frédéric Blanc
3 42 Frédéric Blanc
{{toc}}
4
5 28 Frédéric Blanc
h2. Zynq-7000 SoC
6
7
The Zynq®-7000 family is based on the Xilinx SoC architecture. These products integrate a feature-rich dual-core or single-core ARM®
8
Cortex™-A9 based processing system (PS) and 28 nm Xilinx programmable logic (PL) in a single device. The ARM Cortex-A9 CPUs are
9
the heart of the PS and also include on-chip memory, external memory interfaces, and a rich set of peripheral connectivity interfaces.
10
11
AMD Zynq 7000 XC7Z010
12
13
*Vivado Select the device xc7z010clg400-1*
14
15
CLB Flip-Flops 35,200
16
Look-Up Tables (LUTs) 17,600
17
Logic Cells 28K
18
19 29 Frédéric Blanc
h2. Carte Redpitaya
20
21 32 Frédéric Blanc
!clipboard-202312041324-mzqat.png!
22 31 Frédéric Blanc
https://redpitaya.com/
23 55 Frédéric Blanc
24
*Supported I/O Standards and Terminations*
25
https://docs.xilinx.com/r/en-US/ug571-ultrascale-selectio/Supported-I/O-Standards-and-Terminations
26
27 13 Frédéric Blanc
!clipboard-202312011541-sbukm.png!
28 8 Frédéric Blanc
*Attention il existe plusieurs version de redpitaya*
29
30
STEMlab 125-14 *external clock* (The OS will *not boot* without providing an external clock.)
31
https://redpitaya.readthedocs.io/en/latest/developerGuide/hardware/125-14_EXT/top.html
32 1 Frédéric Blanc
33 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
34 1 Frédéric Blanc
35 10 Frédéric Blanc
!clipboard-202311231551-ugmwn.png!
36 12 Frédéric Blanc
!clipboard-202311271003-ym5pn.png!
37 9 Frédéric Blanc
!clipboard-202311231537-zevpq.png!
38 11 Frédéric Blanc
!clipboard-202311271000-jz8ux.png!
39 8 Frédéric Blanc
40 49 Frédéric Blanc
*connecteur E1* défini dans le fichier de contrainte *redpitaya.xdc*
41 52 Frédéric Blanc
les ports GPIO N et    P sont avec des Pullup interne (définie dans le fichier de contrainte)
42 47 Frédéric Blanc
*exp_n_tri_io* [0..7] (G18,H17,H18,K18,L15,L16,J16,M15)
43
*exp_p_tri_io* [0..7] (G17,H16,J18,K17,L14,L17,K16,M14)
44
*exp_p_trg* (M14) exp_p_tri_io[7]
45 50 Frédéric Blanc
*exp_n_alex*  [0..3] (L15,L17,J16,M15)
46 48 Frédéric Blanc
*LED*
47
*led_o* [0..7] (F16,F17,G15,H15,K14,G14,J15,J14)
48 44 Frédéric Blanc
49
exp_n_tri_io[1.1] correspond a DIO1_N
50 15 Frédéric Blanc
frequence max 464.037Mhz
51 6 Frédéric Blanc
52 53 Frédéric Blanc
h3. Code commande
53
54
*STEMLab 125-14*
55
56
Code commande RS: *127-1087*
57
https://fr.rs-online.com/web/p/oscilloscopes/1271087
58
59
Code Commande farnell: *3935507* 
60
https://fr.farnell.com/red-pitaya/izd0007/kit-de-d-m-stemlab-125-14-acq/dp/3935507
61
62
Code Commande Mouser: *892-028* 
63 54 Frédéric Blanc
https://www.mouser.fr/ProductDetail/Red-Pitaya/28?qs=iS7aw2r6gpnjFgznl4%252BAvA%3D%3D
64 53 Frédéric Blanc
65 14 Frédéric Blanc
h2. OS
66 1 Frédéric Blanc
67 56 Frédéric Blanc
h3. Monitor utility
68
69
70
71
https://redpitaya.readthedocs.io/en/latest/appsFeatures/command_line_tools/com_line_tool.html
72
73 15 Frédéric Blanc
h3. OS 1.04
74
75
Please note that you need to change the forward slashes to backward slashes on Windows.
76
77
78 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.
79 15 Frédéric Blanc
80
<pre><code class="shell">
81 17 Frédéric Blanc
scp red_pitaya_top.bit root@rp-xxxxxx.local:/root
82 15 Frédéric Blanc
</code></pre>
83
84
85 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.
86 15 Frédéric Blanc
87
<pre><code class="shell">
88 17 Frédéric Blanc
redpitaya> ls
89 15 Frédéric Blanc
</code></pre>
90
91
92 16 Frédéric Blanc
Load the red_pitaya_top.bit to xdevcfg with
93 15 Frédéric Blanc
94
<pre><code class="shell">
95 17 Frédéric Blanc
redpitaya> cat red_pitaya_top.bit > /dev/xdevcfg
96 15 Frédéric Blanc
</code></pre>
97
98 40 Frédéric Blanc
https://redmine.laas.fr/attachments/download/4691/STEMlab_125-xx_OS_1.04-18_stable.img.zip
99
100 15 Frédéric Blanc
h3. OS 2.0
101
102 25 Frédéric Blanc
sur l'ordinateur où est installer *Vivado*
103 24 Frédéric Blanc
104 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)
105
106
<pre><code class="shell">
107
echo -n "all:{ red_pitaya_top.bit }" >  red_pitaya_top.bif
108
bootgen -image red_pitaya_top.bif -arch zynq -process_bitstream bin -o red_pitaya_top.bit.bin -w
109
</code></pre>
110
111 23 Frédéric Blanc
Bootgen se trouve dans ../Vivado/2023.1/bin
112 15 Frédéric Blanc
113
Send the file .bit.bin to the Red Pitaya with the scp command.
114
115
<pre><code class="shell">
116
scp red_pitaya_top.bit.bin root@rp-xxxxxx.local:/root
117
</code></pre>
118 1 Frédéric Blanc
119 27 Frédéric Blanc
sur la *redpitaya*
120 1 Frédéric Blanc
121 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.
122 15 Frédéric Blanc
123 24 Frédéric Blanc
<pre><code class="shell">
124
ls
125 15 Frédéric Blanc
</code></pre>
126
127 1 Frédéric Blanc
128 15 Frédéric Blanc
Load the red_pitaya_top.bit.bin image into the FPGA:
129
130
<pre><code class="shell">
131 24 Frédéric Blanc
/opt/redpitaya/bin/fpgautil -b red_pitaya_top.bit.bin
132 15 Frédéric Blanc
</code></pre>
133
134
135 19 Frédéric Blanc
*autre tuto:*
136
137 20 Frédéric Blanc
Génération du fichier crypté
138 43 Frédéric Blanc
Vivado génère par défaut un fichier .bit. Le pilote s’attend à un autre format contenant un entête particulier. La
139 20 Frédéric Blanc
conversion se fait avec l’utilitaire *bootgen* fourni par le *SDK de Vivado* .
140 1 Frédéric Blanc
Cet outil attend un fichier .bif contenant :
141 20 Frédéric Blanc
142
<pre><code class="shell">
143 21 Frédéric Blanc
a l l :
144
{
145
n o m d u b i t s t r e a m . b i t
146
}
147 20 Frédéric Blanc
</code></pre>
148
149
150
qui sera ensuite fourni à bootgen :
151
152
<pre><code class="shell">
153 26 Frédéric Blanc
../bin/bootgen −image fichierbif.bif −arch zynq −processbitstream bin
154 20 Frédéric Blanc
</code></pre>
155
156
157
Suite à cette commande un fichier nom du bitstream.bit.bin est créé dans le répertoire courant.
158
159
Flasher par utilisation directe de fpga manager
160
161
Le fichier .bit.bin doit être copié/déplacé dans /lib/firmware.
162
Afin d’informer le pilote que le PL doit être flashé, et quel bitstream utiliser, la commande suivante est à utiliser :
163
164
<pre><code class="shell">
165 1 Frédéric Blanc
echo " nom_du_bitstream.bit.bin " > /sys/class/fpga manager/fpga0/firmware
166
</code></pre>
167
168
169 20 Frédéric Blanc
La ligne :
170 21 Frédéric Blanc
<pre><code class="shell">
171
fpga-manager fpga0: writing nom_du_bitstram.bit.bin to Xilinx Zynq FPGA Manager
172
</code></pre>
173 18 Frédéric Blanc
174 51 Frédéric Blanc
s’affichera en cas de succés et la LED connectée sur Prog done doit s’allumer (LED bleue sur la RedPitaya).
175 21 Frédéric Blanc
176 34 Frédéric Blanc
page 34 de document:"tuto redpitaya UdFC"
177 15 Frédéric Blanc
178 41 Frédéric Blanc
https://downloads.redpitaya.com/downloads/Unify/RedPitaya_OS_2.00-18_stable.img.zip
179
180 33 Frédéric Blanc
h3. bitstream de test
181 14 Frédéric Blanc
182 39 Frédéric Blanc
Le test est un compteur qui fait clignoter les LED du Redpitaya
183
184 38 Frédéric Blanc
https://redmine.laas.fr/attachments/download/4689/led_fred.bit
185 39 Frédéric Blanc
186
https://redmine.laas.fr/attachments/download/4690/led_fred.bit.bin
187 3 Frédéric Blanc
188
h2. pinout
189 5 Frédéric Blanc
190 3 Frédéric Blanc
!clipboard-202304261053-qqtl1.png!
191
!clipboard-202304251234-p78ss.png!
192 1 Frédéric Blanc
193 2 Frédéric Blanc
h2. Matlab Simulink HDL
194
195
h2. Xilinx Vivado
196 4 Frédéric Blanc
197
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.
198
199 7 Frédéric Blanc
[[Xilink_Vivado]]
200
201 1 Frédéric Blanc
h2. Shared RAM PS (CPU) PL (FPGA)
202 7 Frédéric Blanc
203 15 Frédéric Blanc
[[Shared_RAM_CPU_FPGA]]