This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Combining the red-pitaya-notes and the stock red pitaya FPGA bit file to create a suitable package to put on the red pitaya. | |
pretty much red-pitaya-notes (for the ubuntu os) + the FPGA from the stock os. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OCM: 256kb of on-chip memory | |
?I think? it's called ps7_ram_1_S_AXI_BASEADDR in the linker scripts, but that does not work. | |
on boot, dmesg has zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x5e880000 | |
This address works. un-segmented. | |
#define COMM_BASE 0x5e880000 | |
app_cpu1: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
no malloc, so no heap? | |
def. stack size: 0x2000 == 0.008 mb | |
sizeof(actionTable_t) == 20bytes | |
400ish entries if the stack was otherwise empty? a 1mb stack would allow for < 50000 entries | |
10mb stack space perhaps? | |
#### Monday | |
Expanded stack in the linkerscript to 0xA00000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct actionTable { | |
uint64_t nanos; // ulong max 4.9secs, ull max = 584 years | |
XTime clocks; | |
uint32_t pins; | |
uint32_t a1; | |
uint32_t a2; | |
} actionTable_t; | |
(XTime = u64) | |
niave assumption: that this is of size 8 + 8 + 4 + 4 + 4 = 28 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unable to handle kernel paging request at virtual address 6528d77c | |
pgd = 5bbc0000 | |
[6528d77c] *pgd=00000000 | |
Internal error: Oops - BUG: 5 [#1] PREEMPT SMP ARM | |
Modules linked in: zynq_remoteproc remoteproc virtio virtio_ring | |
CPU: 0 PID: 1637 Comm: modprobe Not tainted 3.19.0-xilinx #1 | |
Hardware name: Xilinx Zynq Platform | |
task: 5d65c580 ti: 5bb0a000 task.ti: 5bb0a000 | |
PC is at put_pid+0x10/0x54 | |
LR is at __fput+0x11c/0x1a8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curvefit .py Problem Sheet 5 example | |
import numpy as np | |
from scipy.optimize import curve_fit | |
import matplotlib.pyplot as plt | |
def func(x, a, b, c): | |
return a*np.exp(-b*x) + c # function to generate data for curve fit | |
# The first part of this program generates a set of data that follows a particular functional form that allows us to test the curvefit routine | |
x = np.linspace(0, 4, 50) | |
y = func(x, 3.0, 1.3, 5) | |
yn = y + 0.2*np.random.normal(size=len(x)) # adding some noise to the data points |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Trivial app to change the volume of my denon reciever from my laptop. | |
""" | |
import telnetlib | |
import sys | |
if __name__ == "__main__": | |
if len(sys.argv) < 2: | |
print("""USAGE: dvol [0-100]""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(lambda __builtin__: (lambda __print, __y, __d: [[[[[[[[[[(lambda __after: (lambda __after: (lambda ___: __after(__d))(__print('Usage: python main.py inputfilename [outputfilename]')) if __d.len(__d.sys.argv)<=1 else [(lambda __after: [__after(__d) for __d.outfilename in [(__d.sys.argv[2])]][0] if __d.len(__d.sys.argv)>=3 else (lambda __after: [__after(__d) for __d.outfilename in [('.ol.py'.join(__d.infilename.rsplit('.py',1)))]][0] if '.py' in __d.infilename else [__after(__d) for __d.outfilename in [((__d.infilename+'.ol.py'))]][0])(lambda __d: (lambda ___: __after(__d))(__print(('Writing to %s'%__d.outfilename)))))(lambda __d: [[[[(lambda ___: (lambda __after: (lambda ___: (lambda ___: (lambda ___: (lambda ___: __after(__d))(__print(__d.onelined)))(__print('--- ONELINED ---------------------------------')))(__print(__d.original)))(__print('--- ORIGINAL ---------------------------------')) if __d.VERBOSE else __after(__d))(lambda __d: __after(__d)))(__d.outfi.write((__d.onelined+'\n'))) for __d.onelined in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pylab | |
from Tkinter import * | |
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg | |
from matplotlib.figure import Figure | |
from mpl_toolkits.mplot3d import Axes3D | |
from matplotlib import cm | |
import numpy as np | |
class ParticleMotion: | |
def __init__(self, master): |
OlderNewer