Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jeremy Grosser
    @JeremyGrosser
    I think the boot ROM only initializes the USB DPRAM, so the rest of SRAM should be fairly random as long as the device was completely powered off for a significant amount of time
    Daniel King
    @damaki:matrix.org
    [m]
    Oh cool, I had always sort-of assumed that RAM started up as all zeroes or something
    Jeremy Grosser
    @JeremyGrosser
    crt0.S does initialize .bss to zero, but the rest of memory remains random
    if you were targeting something like ISO 26262, then a memory test is required at startup
    Daniel King
    @damaki:matrix.org
    [m]
    Yeah, I know that the startup code initializes the allocated sections of RAM like .bss and .data, but I hadn't really had to worry about actual uninitialized RAM.
    It's an interesting use of it though
    Yes, I've written software to IEC 61508 SIL-3 before, and we were required to do memory tests for the RAM at startup and then periodically afterwards.
    We also duplicated critical variables in RAM, with a separate copy stored with an inverted bit pattern.
    Jeremy Grosser
    @JeremyGrosser
    nice
    Daniel King
    @damaki:matrix.org
    [m]
    It was very interesting working on that project.
    Jeremy Grosser
    @JeremyGrosser
    it was either a STM32 or SAMD21, I remember seeing some special hardware for doing self-tests periodically, asynchronous from the CPU
    Daniel King
    @damaki:matrix.org
    [m]
    Ours was an STM32F0, so we had a library from ST which did the ROM, flash, and CPU self-tests.
    Jeremy Grosser
    @JeremyGrosser
    makes sense
    Daniel King
    @damaki:matrix.org
    [m]
    Our software just had to orchestrate when the tests occurred.
    Jeremy Grosser
    @JeremyGrosser
    yeah, the more I run into weird hardware edge cases, the more I'm beginning to think that you should just use the vendor libraries and hope they got it right
    Daniel King
    @damaki:matrix.org
    [m]
    We did have to break up the tests though. I think we tested about 128 bytes at a time, with about a 64 ms delay between each test.
    So I think it took a few seconds for the entire RAM to be tested.
    Jeremy Grosser
    @JeremyGrosser
    it's basically impossible to write verifiable drivers without access to the HDL, imo
    Daniel King
    @damaki:matrix.org
    [m]
    Yeah that's an area I think is ripe for improvement - having a formal specification of the hardware that the software could make use of.
    Jeremy Grosser
    @JeremyGrosser
    I'm tempted to take something like NeoRV32 and try to do as much codegen of drivers from the VHDL sources as possible
    Daniel King
    @damaki:matrix.org
    [m]
    I've not heard of that processor before.
    Looks like a nice little RISC-V processor though
    I have no experience with VHDL though
    Jeremy Grosser
    @JeremyGrosser
    I've been learning a bit... it's not terribly difficult if you understand Pascal-family syntax
    Daniel King
    @damaki:matrix.org
    [m]
    Yeah I'm poking around the sources of the NeoRV32 now. Looks very similar to Ada :)
    Jeremy Grosser
    @JeremyGrosser
    a lot of the learning materials for VHDL are clearly written by hardware engineers that are completely unaware of good software engineering practices
    Daniel King
    @damaki:matrix.org
    [m]
    haha
    I think I've only known one engineer that straddled the hardware/software boundary really well. He was a great software engineer and a great hardware engineer.
    Had good mechanical engineering chops too.
    Jeremy Grosser
    @JeremyGrosser
    good engineers don't draw lines between disciplines, imo
    Daniel King
    @damaki:matrix.org
    [m]
    I think he had a welding setup in his garage at home too. Impressive stuff he did
    That's true, everyone has their own expertise which straddles different disciplines.
    DrPi
    @drpi:matrix.org
    [m]
    VHDL syntax is based on Ada syntax on purpose. But VHDL is for hardware, not software. This is completely different.
    Daniel King
    @damaki:matrix.org
    [m]
    Yeah, I know that VHDL takes a different mindset
    Operations are more parallel in VHDL, right?
    Jeremy Grosser
    @JeremyGrosser
    everything happens all at once, yes
    DrPi
    @drpi:matrix.org
    [m]
    Almost everything is parallel.
    In software, everything is sequencial. You have to do special things to parallelize.
    In hardware, this is the reverse.
    Jeremy Grosser
    @JeremyGrosser
    that's a good way to say it
    Daniel King
    @damaki:matrix.org
    [m]
    it sounds really interesting
    I'll have to add VHDL to my queue of things to learn whenever I get some time :)
    DrPi
    @drpi:matrix.org
    [m]
    I like VHDL. I think it's a good language for hardware. I'm using it for more than 20 years now.
    The fun thing is that I started to really appreciate its philosophy (strong typing) when I learned Ada few years ago 🙂
    Daniel King
    @damaki:matrix.org
    [m]
    Sounds like a good way for embedded software engineers like myself to get more of an appreciation of the hardware.
    The majority of my experience has been through interacting with the hardware through registers, etc.
    and reading schematics, datasheets, etc
    DrPi
    @drpi:matrix.org
    [m]
    Hardware design needs a completely different way of thinking.
    This is not only a matter of language.
    Daniel King
    @damaki:matrix.org
    [m]
    indeed, it's another discipline
    DrPi
    @drpi:matrix.org
    [m]
    Sure.