Sunday, 2022-04-24

lkclfantastic03:02
littlebobeepSo I heard of SOCs having "default values" for registers, but as I understood it registers are volatile memory storage so are empty at poweroff, where are default values stored and how do they communicate the values to registers?07:34
littlebobeeplkcl: I don't know if this question ^ applies to libre-soc I am sorry07:34
lkcllittlebobeep, ah, right, ok.  so, what happens is, CMOS transistors come up in totally random states07:41
lkclno problem at all btw07:41
littlebobeepbinary states?07:42
lkclwhen power is applied, you have transistors arranged to create D-Flip-Flops and SR-Latches07:42
lkclhopefully binary states, yes!07:42
lkclbut all binary logic is actually implemented with analog transistors07:43
lkclwhich is something that many VLSI Engineers and Hardware Engineers, primarily trained in digital, forget07:43
littlebobeepUmmm you mean on a semiconductor IC?  binary logic on other media might have different physical form...?07:43
lkclso these D-Flip-Flops (DFFs), when powered up, you have absolutely no idea what state they start up in07:44
lkclyes.07:44
lkcla "digital" semiconductor IC is actually made from *analog* transistors07:44
lkclwhich are *used* to create digital circuits07:45
lkclso let's assume that the register r0 is made up of 64 DFFs07:45
lkclwhen it is powered up, every single one of those DFFs comes up in a completely unknown state.07:45
lkclthere is a pair of analog transistors, one is used to pull the output to a "1"07:46
lkclthe other is used to pull the output to a "0"07:46
lkclon startup you have *no idea* which one of those two transistors is going to "win"07:46
lkcland that's why all registers end up with utterly random values07:47
lkclto deal with that, you have to have a "reset" period07:47
lkclwhere the ENTIRE design has a global signal propagating right the way through it, pulling absolutely everything and i mean everything into a "known state"07:47
lkclaka07:47
lkcl"default values"07:48
lkclbottom line is, registers - aka volatile memory storage - are *not* empty at power-on and in many cases they're not empty at power-off either07:48
lkclbecause you get residual capacitance (it's all analog, remember?)07:48
littlebobeepSo what is there electricity being sent to these two analgue transistors (in equal amounts) and you don't know one "wins"?  How does one "win" what external factor determines which transistor is chosen somehow?07:49
littlebobeepI would expect them to be not empty at poweroff because they might've just been processing data moving bits around, but I did not know they are non-empty at powerup... do SRAM or DRAM also have values/data in them at init?07:51
lkclthat's the point, it's not necessarily equal, because we're talking about the power-up (startup) time07:51
lkclSRAM is also based on a pair of transistors, and DRAM is actually capacitors07:51
lkclso, logically, yes07:52
littlebobeepWhy would electricity be delivered more equally after the computer is boot compared to when it is first powered on?07:52
lkclduring power-up, everything's desperately trying to get from zero voltage to power-on-voltage (maybe 1.1v, maybe 1.8v, depends on the design)07:52
lkclthat's another very good question07:52
lkclit's down to the amount of current07:53
lkclagain, this comes down to all electronics being analog07:53
lkclevery transistor and the wires connected to it are actually capacitors (and inductors)07:53
lkclchanging a capacitor's voltage *requires* current07:53
littlebobeepDigital electronics is a field of electronics involving the study of digital signals and the engineering of devices that use or produce them. This is in contrast to analog electronics and analog signals.07:54
littlebobeepDigital electronic circuits are usually made from large assemblies of logic gates, often packaged in integrated circuits. Complex devices may have simple electronic representations of Boolean logic functions.07:54
lkclyou're always fighting against the voltage, to get the transistor to change from a low-voltage state (close to 0v) to a high-voltage state (close to 1.8v or whatever the voltage rail is) and vice-versa07:54
lkclindeed - but you have to realise and appreciate that there are no special "digital transistors"07:55
lkclyou *have* to use *analog* transistors for the *purpose* of creating "digital" circuits07:55
littlebobeepI just learned there are non-MOS transistors I did not know this07:55
lkclthose logic gates are constructed from analog transistors whose *purpose* is to create digital logic07:56
lkclyes there's i think 4 types, P N and two others.07:56
littlebobeep    Bipolar junction transistor (BJT) Darlington transistor Diffused junction transistor Field-effect transistor (FET)07:56
littlebobeep        Junction Gate FET (JFET) Organic FET (OFET) Light-emitting transistor (LET)07:56
littlebobeep        Organic LET (OLET) Pentode transistor Point-contact transistor Programmable unijunction transistor (PUT) Static induction transistor (SIT) Tetrode transistor Unijunction transistor (UJT)07:56
lkclit's down to the permutations of the chemicals.  the other two types are not very common07:57
littlebobeepI want to learn the difference between these >_<07:57
lkcli've heard of some of them, and i'll leave that up to you to work out :)07:57
lkcli know enough to be focussed on the tasks i'm doing and not get "caught out" if you know what i mean (run into difficulties because of something i'd not known could happen)07:58
littlebobeepWell those are non-MOS transistors only I don't even know how important they are07:59
littlebobeepSo this "reset" period that emits a signal inot a "known state" when is the motivation to choose a pattern for the default values, is any computation made on the basis of these default values?08:05
littlebobeep/s/inot/in08:05
littlebobeeps/when/what08:05
littlebobeepSomeone speculated that the different default values applied to registers might affect bugs in different chips of supposedly same model SOC might cause bugs like failing to suspend to RAM later on, but I do not understand why default values can cause such issues so much later on if they change right away to begin processing data like loading bootloader then kernel, etc.08:18
littlebobeepNot sure why or how the registers would change before bootloader, but I guess bootloader can be broken up into different parts technically it seems a broad term perhaps08:19
littlebobeeplkcl: So does DRAM also init with random config/data even though it is capacitors?09:14
littlebobeepThis is bizarre to me https://patents.google.com/patent/US1745175  Field effect transistor invented/conceptualized in 1925 but could not build due to lack of resources, this is over 2 decades before one was built.... reminds me of the story of Philo Farnsworth coming up with the idea of analogue television transmition in a farm field before inventing anything09:32
lkclit's the same with the electric motor.11:18
lkclthe fundamental design has not changed in 150 years: there have been no new innovations11:18
lkclit's just that designs have not been implementable due to limitations in materials science11:18
lkcle.g. the air-gap spinning between the permanent and the electro magnets has to be minimised to below thousands of a millimetre in order to be efficient11:19
lkcland that small a gap on the *entire* surface of a spinning object simply wasn't possible11:20
lkclok so we actually have something like this (default non-zero values) for PC and MSR, right now12:42
lkclthe default initialisation for MSR is 0x8000_0000_0000_000112:42
lkcl(Little-Endian, 64-bit)12:42
lkcllet's say you're running a big-endian OS12:43
lkclthat would be 0x8000_0000_0000_000012:43
lkclwhere you set MSR - and run - in memory - with MSR=0x8000_0000_0000_000012:43
lkclnow let's say you suspend, power-off, and resume.12:43
lkclwhat value, at power-up, is the hardware setting MSR to?12:43
lkclit's 0x8000_0000_0000_0001, isn't it?12:44
lkclif therefore your bootloader *forgets* to initialise MSR equal to the correct value, everything goes to shit pretty quickly12:44
lkclother registers may have more subtle effects but i picked MSR because it literally controls how the processor works.  switches on 64/32-bit mode, etc.12:46
tplatenI'm trying to get ls2 running in Verilator, When I run make ls2.v I get:13:23
tplatenFile "src/ls2.py", line 599, in __init__13:23
tplaten    latency=7) # Winbond W956D8MBYA13:23
tplatenTypeError: __init__() got an unexpected keyword argument 'name'13:23
tplatenAfter a git pull lambdasoc/periph/hyperram.py | 7 +++++-- I get13:45
tplatenAttributeError: 'list' object has no attribute 'ports'13:46
lkcltplaten, give me a second i know what that is.14:04
lkclit should be ports += list(self.hyperram[0].ports()) etc.14:04
lkcltplaten, sorted, git pull14:06
lkclVeera[m], dates in TOML are formatted YYYY-MM-DD not DD-MM-YYYY :)14:13
lkclyou should have been paid already, do update the records, add ", paid=YYYY-MM-DD" to the TOML field14:14
tplatennow it is working again14:15
lkclgreat14:20
lkcltplaten, would you like to be included on the NGI POINTER team? at least you have done the orangecrab, worked on the simulation14:20
tplatenYes, of course. I'll plan to continue working on the orangecrab/verilator simulation. And I the future I might want to work on Vulkan drivers.14:22
tplatenFrom verilator I get14:23
tplaten%Error-TIMESCALEMOD: ls2.v:5:8: Timescale missing on this module as other modules have it (IEEE 1800-2017 3.14.2.2)14:23
lkclyep no surprise there14:23
lkclok i'll cc you14:24
openpowerbot[mattermost] <lkcl> paulus: i got 30 mhz execution out of nextpnr-xilinx on microwatt.v17:03
lkclahh, good, i'm getting to the exact same point in microwatt.v17:44
lkcl[    0.000000] radix-mmu: Mapped 0x0000000000600000-0x0000000010000000 with 2.00 MiB pages17:44
lkcl <- early_setup()17:44
lkclhoorah.17:44
lkcljust enabled a bit more debug info, set the device-tree frequency to the same value17:45
lkclprogrammerjake, good call on the self-looping div20:48
lkclbecause it's the exact same principle as madded it's easily justifiable20:49
programmerjake:)20:49
programmerjakehttps://viterbischool.usc.edu/news/2022/04/usc-viterbi-led-team-wins-u-s-nsf-expeditions-in-computing-award-to-advance-superconducting-electronics-design/20:50
lkclwhy have i heard of viterbi decoders?20:50
programmerjakeafaict it's just a coincedence20:52
lkclurrr mtmsr is revealing that HV bit is set20:52
lkclThis Is Bad(tm)20:52
lkclit tells the linux kernel to enable hypervisor guest mode20:52
programmerjakewell...no wonder it broke20:52
lkclwhat the hell it's doing running the verilator run successfully but not this one is beyond me20:55
lkclbut that was appx 3 months ago. nothing should have changed, sigh20:56
lkcloff we go, another run, another memcpy from SPI flash20:57
lkclpaul mackerras had a bit of a lairy time getting the hypervisor-avoidance right20:58
lkclhad to set (or not-set) just the right bits20:58
sadoon[m]@lkcl you know how stupid I feel after realizing that I only need a tunnel to *the VM* and not my entire Talos machine? :)22:16
sadoon[m]It's much safer this way anyway22:17
sadoon[m]Especially with qemu usermode networking22:18
lkclsadoon[m], *snort*22:40
lkclya got there in the end22:41
lkclbtw small favour, just use the IRC convention "{username}:"22:41
lkclrather than the socially-media-ey "@"22:41
lkclmediawiki kicks in on mattermost and sends me a completely unnecessary email22:42
lkcl"lkcl:" results in a minor notification in hexchat, because i switched off pretty much everything, years ago, so as not to interrupt workflow22:44
sadoon[m]Good lord that's intrusive22:54
sadoon[m]Can't you disable it?22:54
sadoon[m]And of course, will do!22:56

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!