Build Your Own Logic Analyzer - Superscalar 8-Bit CPU #18

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ • 56

  • @lptf5441
    @lptf5441 Рік тому +4

    Not only beautiful animations but so beautifully spoken too. I would be really impressed if a native English speaker was this clear, concise and well spoken, but the fact that English is your second language makes it ten times more impressive! Just brilliant!

    • @fabianschuiki
      @fabianschuiki  Рік тому

      Thank you so much for the kind words! 🙂

  • @0ffGridTechClub
    @0ffGridTechClub 6 місяців тому +1

    This is the coolest thing I've ever seen ! I'm just starting to learn PCB design as well as i2c design and debugging.

    • @fabianschuiki
      @fabianschuiki  6 місяців тому

      Thanks! 🙂 It comes in pretty handy for testing more complicated behaviors of your PCBs.

  • @TomStorey96
    @TomStorey96 Рік тому +2

    You aren't living until you start using Scotch blue painters masking tape. The smell of the adhesive is 🤤

    • @fabianschuiki
      @fabianschuiki  Рік тому

      Yeah that's some pretty handy tape! I can't recall though if this actually was masking tape, or just some flexible electrical tape 🤔

  • @-r-495
    @-r-495 Рік тому +1

    Ah I really enjoy watching your content.

  • @taivas7216
    @taivas7216 5 місяців тому +1

    Bro you are like a Ben Eater clone, lol, cool video.
    btw the animations are great

    • @fabianschuiki
      @fabianschuiki  5 місяців тому

      Haha thanks, that's very high praise 😁!

  • @RelayComputer
    @RelayComputer 8 місяців тому +1

    Your content is excellent and very well presented, I really enjoy watching your videos. I made my own version of a digital circuit tester after getting some inspiration from yours, so thanks for that!

    • @fabianschuiki
      @fabianschuiki  8 місяців тому

      Thank you for the kind words 🙂! Your digital circuit tester sounds very interesting! Do yoh have a link to some PCBs or documentation that you could share?

    • @RelayComputer
      @RelayComputer 8 місяців тому +1

      @@fabianschuiki Oh, thanks. I didn't expect a reply. Yes, there's a link in my channel to the GitHub repo. I think YT does not allow to paste a link here. It's in KiCad format though. I realise now it would be desirable to have the schematics in pdf too, so more people can have a quick look at them. Will address that asap

    • @fabianschuiki
      @fabianschuiki  8 місяців тому

      Great, thanks for sharing!

  • @donwald3436
    @donwald3436 Місяць тому +1

    17:08 wait why isn't that a download from adafruit .......

    • @fabianschuiki
      @fabianschuiki  Місяць тому

      I have never checked whether they have any kind of EasyEDA footprints available for download. Was a good way to toy around with the symbol/footprint side of the software though. "Software" = "Pile of JavaScript in a Browser".

  • @RogerBarraud
    @RogerBarraud 2 роки тому +1

    PS: Merry Christmas, Fabian!
    🙂

    • @fabianschuiki
      @fabianschuiki  2 роки тому +1

      Thank you, merry christmas to you, too 🙂!

  • @mineyoucraftube1768
    @mineyoucraftube1768 2 місяці тому +1

    "we got some smidging and squeezing going on"
    SOME? i was thinking you were trying to mimic the copper pour with solder!

  • @SamuelFlint
    @SamuelFlint 2 роки тому +2

    I would upgrade this, since you're using SPI and shift registers.. to use a small OLED display for the success/fail/status, the computer could control that easily.

    • @CeDoMain
      @CeDoMain 2 роки тому +1

      Like that. But rusty leds in a cool pattern also. 😁

    • @fabianschuiki
      @fabianschuiki  2 роки тому +1

      That's a cool idea. I hadn't considered just slapping a simple serial OLED display on there. That would have a few advantages, like being able to display more details about the progress, the number of failing patterns, etc. Adding such a display would be fairly straightforward. There is an unused FT232H GPIO pin that could hook up to the OLED's chip select, which would allow you to shift data into the display.

  • @JamonTerrell
    @JamonTerrell 2 роки тому +2

    Great video, very good job explaining each step as you go. Out of curiosity, was there any particular reason you chose to go with a USB SPI/GPIO chip instead of a cheap microcontroller with USB capabilities like the Raspberry Pi Pico?

    • @CeDoMain
      @CeDoMain 2 роки тому +1

      I think it depends on the platform you wanna run your main ui on. If he want to develop a windows/mac software to visualize his readings or to control the whole thing it is easier to develop only one program instead of two (on uC and Desktop). Also if his development platform for the cpu is on a Desktop he doesnt need to move his data from there to his logic analyser uC or linux raspi (if he uses one like you ask).
      In the end it depends on your workflow i think. I would probably chose a M4 or something, with a touchscreen to make a standalone logic analyser because i am good at low level cpp and do not like a big os. If you like more linux os use an raspi. 😉

    • @fabianschuiki
      @fabianschuiki  2 роки тому +6

      Thanks 🙂! I was looking for the easiest way to control an SPI chain from a desktop PC with minimum hassle, and the FT232H combined with the wide range of drivers and language integration for the FTDI chips fit the bill quite nicely.
      You could do this in an Arduino style, where you'd just hook up an MCU to the SPI, but then you either have to write some software on the MCU that translates from UART/USB to your SPI chain, or you write custom C code to run on the MCU for every circuit that you end up attaching to the tester PCB. That all sounded like it would introduce another step of indirection into the process to me, and since I'll always have to feed the testing data from a computer anyway, using the FT232H with a fully established driver stack was the easiest approach.
      That's not to say that you couldn't use an OLED touch screen and an MCU like an Arduino or Pi Pico to craft a nice interface that you could use without even needing a computer attached. But you'd have to come up with a way to store tests on that device, since you're probably not going to use the touch screen to manually type in 10,000 lines of inputs and expected outputs to test a device. Maybe an SD Card to store test vectors, and then a touch UI to pick one of the files from the card to run a test? Lots of cool options here!

  • @lowresdan
    @lowresdan Рік тому +1

    I'm currently developing my own I/O extender (for the Pi Pico) and I came across your video. It gave me some additional ideas, thank you! When I designed my board, I added a pull-down resistor to the right-most 74HC165's serial input (MISO_NEXT), as otherwise it would be left floating if no further board is connected. Did I miss it in your schematics or is it somehow not needed?

    • @fabianschuiki
      @fabianschuiki  Рік тому +1

      Hey, glad to hear this was useful! 😀 That pull-down is indeed missing in my setup. Great move to add one! 👍

  • @RogerBarraud
    @RogerBarraud 2 роки тому +1

    Nicely done! 🙂
    You might find that a few ground connection points would have helped signal integrity.
    Did you share the project on JLCPCB?
    I might build one or more if so.
    Thanks!

    • @fabianschuiki
      @fabianschuiki  2 роки тому +1

      Thanks 🙂! You can find the project on OSHWLab (oshwlab.com/fabian_8885/pattern-tester-base) or on GitHub (github.com/fabianschuiki/superscalar-cpu). Let me know if you make any improvements! What additional ground connection points were you thinking about?

  • @RogerBarraud
    @RogerBarraud 2 роки тому +1

    I watched to the end... now the waiting begins 🙂
    Any idea how soon you'll have the next vid out?
    [No pressure ;-)]

    • @fabianschuiki
      @fabianschuiki  2 роки тому +2

      😃 It won't be too long. Needs a few more tweaks, but I have it almost ready. Probably around Christmas!

  • @RogerBarraud
    @RogerBarraud 2 роки тому +1

    If you want to (sometimes?) drive the same pins as you want to monitor the levels on, you could connect the tester's out and in pins together, tristate buffer your outputs (individually - requiring another strip of N outputs to set Z or active), and put some series R's between the innards of the LA and the probes/connectors to the DUT.
    That way you can use all connections as inputs and outputs, selected in S/W ... AND if you accidentally connect a tester O/P to a DUT O/P, the magic smoke stays in (and you could run a preliminary test before testing gets fully underway, to determine which pins are outputs, inputs or Z in the DUT.
    [DUT == Device Under Test / CUT == Circuit Under Test].

    • @fabianschuiki
      @fabianschuiki  2 роки тому +1

      Yeah this is an excellent idea! I was thinking about creating a separate expansion board that has for example 32 bidirectional pins. You'd then be able to simply attach that to the 64/64 channel base board to gain another 32 bidirectional channels. I like the suggestion of using 32 bits to set the output value, another 32 bits to control a per-bit output enable, and then 32 input bits just like on the base board. Driving through a series resistance is pretty neat to avoid damage (and you can easily detect the conflict in software by comparing the output bit, output enable, and the input bit). Very cool idea! 😎

    • @RogerBarraud
      @RogerBarraud 2 роки тому +1

      @@fabianschuiki No extra charge ;-)
      Thanks 🙂

  • @RogerBarraud
    @RogerBarraud 2 роки тому +1

    What is the blue surface board with the component wells on it, that you tape the stencil and bracing PCB's to?

    • @fabianschuiki
      @fabianschuiki  2 роки тому +1

      That's a cheap silicone soldering mat I got off of Amazon (www.amazon.de/gp/product/B092MTCMJS). It's heat-resistant, but it has the annoying tendency to bulge if heated locally with the hot air gun, so I'm not sure how much it actually adds. You might be better off with just a wooden cutting board that doesn't flex as much. The good thing about the silicone is that it isn't slippery, making it hard to accidentally knock components around.

    • @RogerBarraud
      @RogerBarraud 2 роки тому +1

      @@fabianschuiki Ah, thanks for the warning re heat 🙂
      I do like the pockets - if it's reasonably antistatic (or can be spray-coated to be so), using them to sort SMD's into could be convenient.
      I'm in the process of (spending lots of $$$ and) setting up for SMT at the moment, building some Retro! Z80 boards first (through-hole but with SD socket and V-regulator SMD's), hoping to upscale something similar to James Sharman's pipelined CPU or yours in SMT.
      I could be persuaded to spend more $$$ on a decent camera and lights (I have a green screen already :-)) and attempt to document progress on UA-cam.
      Cheers!
      R.

    • @fabianschuiki
      @fabianschuiki  2 роки тому +1

      That sounds great! CPU design is such a fascinating topic, and there are so many clever design points that are worth exploring. The more the better!

  • @JoveMalcolm
    @JoveMalcolm Рік тому +1

    What are the odds of ever making this compatible with a software package like Sigrok Pulseview? 128 channels of logic analyzer, even slow, would help one of my current projects very much.

    • @fabianschuiki
      @fabianschuiki  Рік тому

      Yeah great point. I think you could make this work with Pulseview fairly easily, if you emit the corresponding file format from the script. If I recall correctly, Pulseview has a way of loading CSV files, which might be the easiest way to get started.
      Now, you could *also* put a few SRAMs onto a PCB, and use the SRAM data pins as input/output channels. That would allow you to snapshot a short burst of a signal, 64k samples if you have a 64k memory 😏. It's not realtime, but it could be an interesting way to debug logic at reasonable speed. (The SRAMs should easily run at 20-100 MHz.) You could even allow for external clock sources, or triggers to start a snapshot. 🙂

  • @donwald3436
    @donwald3436 Місяць тому +1

    One year later UA-cam started notifying me about your videos lol, expect more troll comments!

  • @paulspark7287
    @paulspark7287 Рік тому +1

    Would this be fast enough to work with a 2MHz 6502 system? I do have a 16 channel logic analyzer but I'd really like more inputs. I'm toying with the idea of using the FT232H and just the input 74HC165s.. but just wondering if the FT232H itself would be fast enough to handle 32 channel input clocked at 2MHz?
    Ideally it would be great if I could continue to use the Saleae Logic app as well.. but I usually end up looking at 0's and 1's anyway

    • @fabianschuiki
      @fabianschuiki  Рік тому +1

      2 MHz is going to be tricky. I'm not entirely sure how fast the FT232H can go on its SPI port. But even assuming it can do, say, 10 MHz, you'll still divide that down by the number of channels you're observing. (Because you're bitshifting them out.) So you'd be at 10/16 MHz for 16 channels, or 10/64 MHz in my 64 channel build.
      There's probably a very cool extension of this tester that you can do, where you store the inputs into an SRAM. Basically snapshotting a burst of the waveform. Later on you could read that out of the SRAMs with any slow old method that's convenient. Would be a cool project 😎

    • @paulspark7287
      @paulspark7287 Рік тому +1

      @@fabianschuiki Yeah I wondered as much. That's probably why the logic analysers start getting pricey above 16 channels. It's just a shame they wouldn't daisy chain themselves. I often find myself trying to ignore certain address lines or data bits so I can squeeze everything out of 15 channels (1 being the clock signal).
      The big problem I have is that I always end up with another project when I 'm trying to isolate and fix a problem in another project. Too many rabbit holes 🙂
      An easier solution is probably for me to rip out the 16MHz crystal on the board I'm using.. but then its also using the 16Mhz signal to create the VGA sync signals.. Oh dear..
      I'm actually trying to diagnose a 6502 SBC (Anders Nielson design).. and I built that with the intention of if being more reliable to work with than my own 6502 system. :-)

    • @fabianschuiki
      @fabianschuiki  Рік тому +1

      Haha yeah, side projects all the way down! 😀 I know the feeling. But maybe good to keep in mind, if inspiration is needed someday in the future 😏

  • @RogerBarraud
    @RogerBarraud 2 роки тому +1

    Your animations are excellent - how do you produce those?
    PS: Oops, just realized this was a duplicate Q... thanks for the answer 🙂

  • @drgusman
    @drgusman 2 роки тому +1

    Nice project!
    How fast can this sample the signals? I recently created a logic analyzer with a Pico and I'm able to go up to 100Msps for 24 channels, I'm really curious on how fast this can sample 64 channels :)

    • @fabianschuiki
      @fabianschuiki  Рік тому +1

      Thanks 😃!
      Good question about the maximum sampling speed. Using a chain of shift registers is not a very good choice if you are going for sampling speed, since you have to individuall shift out the sampled bits. It's very nice for extensibility and simplicity, but at the end of the day the sampling speed is roughly the max frequency of the FT232H and the shift registers, divided by the number of bits you are sampling.
      The FT232H has an SPI clock rate of around 30 MHz according to the data sheet. This is likely already beyond what the shift registers can handle, but let's assume they can deal with that. So assuming you need absolutely no time to toggle the LOAD strobe and setup USB transfers, you'd be looking at around 30 MHz / 64 channels = 470 kHz sampling rate as a fixed upper bound. In reality this is going to be a lot lower since you need time to toggle the GPIO control signals and USB also introduces delays/latencies in the millisecond range due to it being a packet-based protocol.

  • @SantosAlbanil
    @SantosAlbanil Рік тому +1

    how fast is it?

    • @fabianschuiki
      @fabianschuiki  Рік тому

      It is likely in the 10-100 kHz range if you really push it. There are a lot of things in the design that aren't geared towards speed, but more to allow for easy extensibility and straightforward use.
      You could be a lot more clever if you fix the number of channels. For example, directly use a microcontroller with 8/16/32 bit ports to sample data in parallel at 10-20 MHz. Or if you really want to get fancy, use a small FPGA and use it to sample inputs at the hundreds of MHz the FPGA supports (assuming you can get the signals to the FPGA without too much degradation at those speeds).

    • @SantosAlbanil
      @SantosAlbanil Рік тому

      @@fabianschuiki I really don't know what is the speed I need, I just want to know what is the limit, I never worked with high frequency circuits, now I am trying to do signal analysis on microprocessors and (750Mhz-2.5Ghz), (I don't have access to JTAG at the moment), a professional-grade device costs several hundred dollars. I think I can start with something more homemade like this. Thanks for the contribution.

  • @shashankpandey570
    @shashankpandey570 7 місяців тому +1

    How you learned all this
    I'm in high school (moving to 11)
    Also want to get into it, tried multiple books but it get over my head 😕, can recommend any books, guide, etc where I can start with it and it's easy
    Thank you

    • @fabianschuiki
      @fabianschuiki  7 місяців тому +1

      Hey! I also started back in high school 🙂. One of the best ways to get started is the Arduino ecosystem. That's a small microcontroller you can program, and there are tons of great tutorials on UA-cam and expansion circuits that you can hook up to your Arduino. Also check out Sparkfun and Adafruit.