Skip to content

Latest commit

 

History

History
108 lines (94 loc) · 4.53 KB

06.11.2024.md

File metadata and controls

108 lines (94 loc) · 4.53 KB

06/11/2024

Today goal:

  • create lab notebook github
  • get ZCU LED demo running -> nearly done but missing some final piece

Steps to get test stand functioning

Test stand hardware:

  • ZCU102 (maybe cheaper alternative in future). <= $3600
  • Xilinx mezzanine (car board in future)
  • Linux machine ($1k?)
  • (future) scope
  • (future) power supply
  • (future) Car board <= Euros 1200 -> will include level shifter + pulsers on it

Useful resources:

  • Adam’s Spacely-Caribou-Reference slides should get us setup nearly all the way

Install Petalinux on SD card into FPGA:

  • fill me in

Connect to FPGA:

Flash the fpga:

  • open vivado
  • open project. select file /asic/projects/C/CMS_PIX_28/testing/spacely-caribou-common-blocks/ZCU102_LED_Demo_FW/demo2_led.xpr
  • on the left hand side: Program and debug -> Open Hardware Manager -> Open Target -> Auto Connect
  • on the left hand side: Program and debug -> program device -> xczu9_0 -> program

Setup spacely:

  • git clone
  • cd /asic/projects/C/CMS_PIX_28/testing/spacely/PySpacely/
  • git clone [email protected]:Fermilab-Microelectronics/spacely-asic-config.git
  • cd /asic/projects/C/CMS_PIX_28/testing/spacely/PySpacely/requirements
  • Create virtual environment with python 3.10 which supports all of the packages inside of the requirements txt files
export PROJECT_DIR=/asic/projects/C/CMS_PIX_28/testing/
mkdir -p $PROJECT_DIR/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $PROJECT_DIR/miniconda.sh
bash $PROJECT_DIR/miniconda.sh -b -u -p $PROJECT_DIR/miniconda3
rm -rf $PROJECT_DIR/miniconda.sh
$PROJECT_DIR/miniconda3/bin/conda init bash
conda create --name spacelyvenv python=3.10
conda activate spacelyvenv
pip install -r requirements-py-libs-common.txt
pip install -r requirements-python.txt

Setup peary:

Steps to run ZCU LED demo at end of day:

Terminal 1:

  • ssh -k [email protected]
  • source ~/.bashrc
  • cd /asic/projects/C/CMS_PIX_28/testing/spacely/PySpacely
  • conda activate spacelyvenv
  • python Spacely.py

Terminal 2:

Error (I think has to do with firmware):

> ~r0
<DBG> <2024-06-11 21:13:33> Evaluating: ROUTINE_ZCU102_Demo_Game()
[5, 0]
[[2, 1], [3, 0], [9, 7]]
Traceback (most recent call last):
  File "/asic/projects/C/CMS_PIX_28/testing/spacely/PySpacely/Spacely.py", line 394, in <module>
    eval(f"{ROUTINES[routine_idx].name}()")
  File "<string>", line 1, in <module>
  File "/asic/projects/C/CMS_PIX_28/testing/spacely/PySpacely/spacely-asic-config/SPROCKET3A/SPROCKET3A_Routines.py", line 30, in ROUTINE_ZCU102_Demo_Game
    pushbutton_state = int(sg.INSTR["car"].get_memory("gpio_0_data"))
  File "/asic/projects/C/CMS_PIX_28/testing/spacely/PySpacely/src/Spacely_Caribou.py", line 116, in get_memory
    return int(self._dev.get_memory(mem_name))
  File "/asic/projects/C/CMS_PIX_28/testing/spacely/PySpacely/src/PearyClient.py", line 179, in _request
    return self._client._request('device.{}'.format(cmd), self.index, *args)
  File "/asic/projects/C/CMS_PIX_28/testing/spacely/PySpacely/src/PearyClient.py", line 99, in _request
    raise Failure(cmd, rep_status, rep_payload.decode('utf-8'))
PearyClient.Failure: Command 'device.get_memory' failed with code 20 'Command failed'
<INF> <2024-06-11 21:13:33> (Exit Handler) Freeing resources...