Red Pitaya Notes               Peter Halverson Last update 3/13/2020
http://halverscience.net/index.html

These are Halverson's personal notes. They are unedited and there is no guarantee of accuracy.  Use at your own risk. I am making them available to you because they might actually be helpful.  If they are helpful, I would really appreciate a "thank you". 

Link to latest notes on Google Docs:
https://docs.google.com/document/d/1bq_LUhX-vD6SZdjKCj1DOzSGIcb0muBbKI6DbPMAFnE/edit?usp=sharing


SPECIFICATIONS  (Assuming I have a Red Pitaya STEMLAB 125-10)
CPU = DUAL CORE ARM CORTEX A9
FPGA= Xilinx Zynq 7010 SOC
RAM=  256MB (2Gb)
Disk= Micro SD up to 32GB


If the Red Pitaya has a static address, then connecting to it will look like this:
  To SSH to my device:  ssh root@192.168.1.101     pw=root
  To open web page on device:  http://192.168.1.101/

If the Red Pitaya has DHCP is running, then connecting to it will look like this:
  To SSH to my device: ssh root@rp-f000bd.local
  To open web page on device:  http://rp-f000bd.local/

Software in my device is currently version 0.90-149   (at least that's the version of the applications)
The version of Linux reported by uname -a is Linux redpitaya 3.9.0-xilinx #1 SMP PREEMPT Tue Feb 25 15:47:35 CET 2014 armv7l GNU/Linux

FPGA programming uses Xilinx Vivado 2017.2  (including SDK)
Red Pitaya uses Verilog and System Verilog

In the Developers guide, section 3.2.3.1.1 the following statement is made:
  Red Pitaya is developed on Linux (64bit Ubuntu 16.04), so Linux is also the only platform we support.
  Link: https://redpitaya.readthedocs.io/en/latest/developerGuide/ecosystem/ecosystem.html

 =============== HDL Notes  (HDL = Hardware Definition Language) ===============

Introduction to Verilog

https://www.bing.com/videos/search?q=verilog+hdl+tutorial&view=detail&mid=C9D79939B017E0414722C9D79939B017E0414722&FORM=VIRE

.SV files contain System Verilog code.

.XDC files contain constraints in Xilinx Design Constraints format, used in Xilinx FPGA and SOC designs.  XDC is an offshoot from Synopsys Design Constraint (SDC) format, with Xilinx customized syntax.


The main difference between Verilog and VHDL is that Verilog is based on C language while VHDL is based on Ada and Pascal languages. Both Verilog and VHDL are Hardware Description Languages (HDL). ... VHDL is an older language whereas Verilog is the latest language.


Intro to TCL:
http://zetcode.com/lang/tcl/


========================== Modelsim ============================
***** Learning environment for VHDL and Verilog:     (Free for students) ******
https://www.mentor.com/company/higher_ed/modelsim-student-edition
After putting in my info Mentor sends me an email with a unique download link.
In this case is was https://  go.mentor.com/594Q5 Each time
(Each time I ask, the link has a different number.)
Download size 347 Mb.  Its name is modelsim-pe_student_edition.exe and it is a self-extracting zip file.
ModelSim PE Student Edition 10.4a Installed OK on Windows 7 virtual machine with 1 Gb ram.  The only issue was that the extraction failed due to "insufficient disk space" which was clearly wrong.  There was plenty of disk space. I downloaded a free program called 7ZIP 
http://sevenzip.sourceforge.net/ and it extracted the installer OK.
On the Dell system, it extracted OK.  No need for 7zip.

Installation script runs and at the end it open Firefox (or whatever is default browser) and sends me to http://portal.mentor.com/d/license_request.asp where it again asks me for my info.

After ~one hour, email arrives with student_license.dat (which is valid for only 180 days).  It needs to be put into the Midelsim directory, i.e. in C:\Modeltech_pe_edu_10.4a

9/30/2019  It works but complains about the license being invalid.  After messing around I delete (actually rename) this installation of Modelsim-PE and also the Modelsim-XE (from the Xilinx CD; it didn't work).  I go through the process of getting a new download of Modelsim-PE and a new license files and.... it works!!! Yay! Time to go to bed.

Important:  It seems the Mentor is tracking where the Modelsim download requests and the License requests are coming from.  So it seems I better do both from the device that will actually run Modelsim.

Comments from the license email:
A product tutorial, is available for download from the Mentor Graphics website at http://go.mentor.com/33rqm
You can also access the ModelSim PE Student Edition Google Group at https://groups.google.com/forum/#!forum/modelsim-pe-student-edition


================ FPGA Learning Boards ============
Big list and advice:  https://joelw.id.au/FPGA/CheapFPGADevelopmentBoards

Vary basic board:  Digilent 410-328
https://www.jameco.com/z/410-328-Digilent-Cmod-A7-15T-Artix-7-FPGA-Module-Breadboard-Compatible_2283871.html

https://store.digilentinc.com/cmod-a7-breadboardable-artix-7-fpga-module/


Much faster, capable board:  471-014 (Features same FPGA as Red Pitaya, Zynq-7000)
https://www.digikey.com/product-detail/en/digilent-inc/471-014/1286-1175-ND/7652758

Also: 410-351-10
https://store.digilentinc.com/zybo-z7-zynq-7000-arm-fpga-soc-development-board/

Recommended by Digilent:  410-183 
https://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/

Getting started tutorial:
https://reference.digilentinc.com/learn/programmable-logic/tutorials/getting-started-with-fpga/start


================ Boards I inherited from JPL ===================

Xilinx CPLD Design Kit

Has two CPLDs  (Complex Programmable Logic Device).

1)   Xilinx  XC2C256-7TQG144C  CoolRunner-II    
https://www.digikey.com/product-detail/en/xilinx-inc/XC2C256-7TQG144C/122-1401-ND/949452
6000 gates ("High performance, low power")  3.3 V power for I/O and 1.8 V for internal logic (?)

2)  Xilinx  XC9572XL-10VQ44C
https://www.digikey.com/product-detail/en/xilinx-inc/XC9572XL-10VQ44C/122-1265-ND/406981?utm_adgroup=DSA%20-%20Product%20Detail%20Pages&utm_source=bing&utm_term=/product-detail/&utm_campaign=&utm_medium=cpc&utm_content=WeFazTKt_gcrid_81295162219849_gkw_/product-detail/_gmt_bb_gdv_c_slgid__ggrid_1300722292834901_gtaid_dat-2333094954664822:loc-190_&msclkid=3b5d2fe4036a1166a17c726a70b7748c

1600 gates.   3.3 V power

To program these, I want to use the old Window 7 PC and the old ISE 7.1i-Webpack software that comes with the board.  However the software is asking for a license number. To get the license number, I found this page for "legacy " licenses.
https://www.xilinx.com/member/forms/registration/10x_and_prior_regids.html

After putting in my personal info, I am granted access to this page;  https://www.xilinx.com/member/10x_and_prior_regids.html

It doesn't have the webpack licenses (Damn!)
Try again , this time starting here:
https://www.xilinx.com/support/licensing_solution_center.html

It takes me here, where node-locked licenses are "generated"
https://xilinx.entitlenow.com/AcrossUser/main.gsp?product=&tab=&req_hash=&



================ Tutorials by "nandland" =====================

NANDLAND tutorials are GREAT!!!!!   Highly recommended. The GoBoard is EASY to learn.

https://www.nandland.com/

Get Modelsim here:
https://www.mentor.com/company/higher_ed/modelsim-student-edition