f_ changed the topic of ##raspberrypi-internals to: The inner workings of the Raspberry Pi (Low level VPU/HW) -- for general queries please visit #raspberrypi -- open firmware: https://librerpi.github.io/ -- VC4 VPU Programmers Manual: https://github.com/hermanhermitage/videocoreiv/wiki -- chat logs: https://libera.irclog.whitequark.org/~h~raspberrypi-internals -- bridged to matrix and discord
jcea has quit [Ping timeout: 256 seconds]
CompanionCube has quit [Quit: ZNC - http://znc.in]
CompanionCube has joined ##raspberrypi-internals
jcea has joined ##raspberrypi-internals
t0mm13b has quit [Quit: ZNC - https://znc.in]
t0mm13b has joined ##raspberrypi-internals
Stromeko has quit [Quit: Going… gone.]
Stromeko has joined ##raspberrypi-internals
t0mm13b has quit [Quit: ZNC - https://znc.in]
t0mm13b has joined ##raspberrypi-internals
<f_ridge> <x​2x6_/D> All right!
<f_ridge> <x​2x6_/D> This is a benchmark of stock emmc clock with 4 data pins set up for SDR25 (high speed) mode
<f_ridge> <x​2x6_/D> This is a benchmark of stock emmc clock with 4 data pins set up for SDR25 (high speed) mode.(edited)
<f_ridge> <x​2x6_/D> This is a benchmark of stock emmc clock with 4 data pins set up for SDR25 (high speed) mode.
<f_ridge> <x​2x6_/D> First column is clock divisor in emmc register
<f_ridge> <x​2x6_/D> second table is microseconds took to read 1 megabyte (1024 * 1024)(edited)
<f_ridge> <c​lever___/D> can you change it to mhz and mbit?
<f_ridge> <c​lever___/D> for mhz, just print `200/128`
<f_ridge> <c​lever___/D> ```
<f_ridge> <c​lever___/D> float bits = 1024*1024*8;
<f_ridge> <c​lever___/D> float delta = interval;
<f_ridge> <c​lever___/D> double mbit = bits/delta;
<f_ridge> <c​lever___/D> ```
<f_ridge> <c​lever___/D> bits is how many bits i transfered, which is just 1mb converted to bits
<f_ridge> <c​lever___/D> delta is just there to convert the usec from an int to a float
<f_ridge> <c​lever___/D> and then mbit, is the math
<f_ridge> <x​2x6_/D> with open(fname, 'r') as f:
<f_ridge> <x​2x6_/D> for i in f.readlines():
<f_ridge> <x​2x6_/D> clock, dt = i.strip().split()
<f_ridge> <x​2x6_/D> clock = float(clock)
<f_ridge> <x​2x6_/D> interval_sec = int(dt) / 1000 / 1000
<f_ridge> <x​2x6_/D> bits = 1024 * 1024 * 8.0
<f_ridge> <x​2x6_/D> mega_bits = 8.0
<f_ridge> <x​2x6_/D> speed = mega_bits/interval_sec
<f_ridge> <x​2x6_/D> print(clock, speed)
<f_ridge> <c​lever___/D> ```
<f_ridge> <c​lever___/D> [clever@amd-nixos:~/Downloads]$ gnuplot
<f_ridge> <c​lever___/D> gnuplot> set term png
<f_ridge> <c​lever___/D> gnuplot> set output "new-bench.png"
<f_ridge> <c​lever___/D> gnuplot> plot "benchmark_4pin_sdr25_mbits_per_sec.txt"
<f_ridge> <c​lever___/D> gnuplot> <ctrl+d>
<f_ridge> <c​lever___/D> ```
<f_ridge> <c​lever___/D> so i can see that one bench run at 12.5mhz was slow, but most follow a linear progression
<f_ridge> <x​2x6_/D> So, what do you think?
<f_ridge> <c​lever___/D> its a bit low, but it is linear to the mhz
<f_ridge> <c​lever___/D> also, is that running at 100mhz??
<f_ridge> <c​lever___/D> that seems a bit high
<f_ridge> <x​2x6_/D> you mean the emmc clock before divisor?
<f_ridge> <c​lever___/D> i assumed this is the sd bus clock, after the divisor
<f_ridge> <c​lever___/D> it might be the whole confusing mess sdhci does, where the clock divisor isnt what you set, the lookup table
<f_ridge> <c​lever___/D> so when it says 0x80 (128), it means /256
<f_ridge> <c​lever___/D> so if thats true, then take every x axis label, and halve them
<f_ridge> <c​lever___/D> so at 50mhz (displaying 100 in graph), i would expect 200mbit, and your getting 160mbit
<f_ridge> <c​lever___/D> given how linear it is, there seems to be an overhead somewhere in your code
<f_ridge> <c​lever___/D> but i'm not sure where
<f_ridge> <x​2x6_/D> Ok, you are right about the mapping
<f_ridge> <x​2x6_/D> I was printing out the divisor itself. It did not do the mess, I just did not bother. So now it really as you assumed could be just divisded by 2
waveform has quit [Quit: No Ping reply in 180 seconds.]
waveform has joined ##raspberrypi-internals
<f_ridge> <x​2x6_/D> Anyways, I think it's good progrees, so now the lower part of sdcard communication is tuned for max performance. Now need to check the surrounding code and PLLs
<f_ridge> <c​lever___/D> the PLL's shouldnt need any tuning, those just change the emmc reference clock input
<f_ridge> <x​2x6_/D> I need to read the registers and dump a report at each boot what are the clock speeds
<f_ridge> <x​2x6_/D> Clever, where do you work?
<f_ridge> <c​lever___/D> devops at iohk