WEBVTT

00:00:00.000 --> 00:00:01.300
<v Chris Gammell>This is the Embarer Podcast.

00:00:03.220 --> 00:00:05.920
<v Chris Gammell>Released November 18th, 2019.

00:00:08.280 --> 00:00:10.000
<v Chris Gammell>Episode 467.

00:00:11.780 --> 00:00:13.980
<v Chris Gammell>Stories from Supercon 2019.

00:00:30.000 --> 00:00:33.780
<v Chris Gammell>All right, I am at Supercon 2019, and I'm talking to Sprite.

00:00:33.840 --> 00:00:34.360
<v Chris Gammell>How are you doing, Sprite?

00:00:34.640 --> 00:00:35.700
<v Chris Gammell>Yeah, I'm good. Thanks.

00:00:35.800 --> 00:00:37.580
<v Chris Gammell>Good to talk to you again. We've had you on the show before.

00:00:37.740 --> 00:00:37.860
<v Chris Gammell>Yep.

00:00:39.180 --> 00:00:43.780
<v Chris Gammell>And you did this badge. This thing is a work of art. I really like it.

00:00:44.140 --> 00:00:45.540
<v Chris Gammell>Yeah, it came out really well.

00:00:45.540 --> 00:00:48.860
<v Chris Gammell>Yeah. What was the genesis of, like, how did it all start?

00:00:49.340 --> 00:00:54.920
<v Super Nintendo>So, as Mike said it, like, at some point there was something in the air.

00:00:54.920 --> 00:01:02.060
<v Super Nintendo>Seemingly, multiple people already asked about, like, can we do a badge with an FPGA and maybe a RISC-V processor?

00:01:02.440 --> 00:01:05.520
<v Super Nintendo>And seemingly, I was, like, in the third or fourth or something.

00:01:05.700 --> 00:01:09.300
<v Super Nintendo>And he was like, yeah, but, you know, FPGAs are really hard.

00:01:09.300 --> 00:01:14.960
<v Super Nintendo>And are people at Supercon going to be able to understand that?

00:01:15.060 --> 00:01:17.500
<v Super Nintendo>I mean, you always have a few people who just get it.

00:01:18.240 --> 00:01:22.440
<v Super Nintendo>And it actually took me a prototype.

00:01:22.440 --> 00:01:36.760
<v Super Nintendo>I prototyped up a RISC-V emulator plus a little BASIC interpreter and some graphics bindings and effectively programmed Pong in BASIC on more or less a virtual imaginary badge.

00:01:37.560 --> 00:01:44.280
<v Super Nintendo>And at that point he was like, yeah, if you can get that to work in hardware, then we should be good.

00:01:44.700 --> 00:01:48.620
<v Super Nintendo>So, yeah, at that point I started making the very first prototype.

00:01:49.280 --> 00:01:50.280
<v Chris Gammell>Which I'm staring at right now.

00:01:50.280 --> 00:01:51.500
<v Chris Gammell>It's hand assembled.

00:01:51.600 --> 00:01:53.640
<v Chris Gammell>You said you have a 100% success rate?

00:01:53.920 --> 00:01:55.100
<v Super Nintendo>Yes, yes, I can.

00:01:55.260 --> 00:01:58.680
<v Super Nintendo>Like, in all the BGAs I soldered up to now, I soldered successfully.

00:01:59.020 --> 00:01:59.700
<v Super Nintendo>All one of them.

00:02:01.520 --> 00:02:01.880
<v Chris Gammell>Good.

00:02:02.820 --> 00:02:05.400
<v Chris Gammell>And what is the processor that's, or sorry, what's the FPGA that's on here?

00:02:06.400 --> 00:02:13.280
<v Super Nintendo>It's a Lattice ECP5 45U something.

00:02:14.200 --> 00:02:15.900
<v Chris Gammell>I saw you say 45,000 LUTs, right?

00:02:15.920 --> 00:02:17.620
<v Super Nintendo>Yeah, yeah, yeah, 45,000 LUTs.

00:02:17.620 --> 00:02:19.440
<v Chris Gammell>Yeah, that's pretty sizable, right?

00:02:19.480 --> 00:02:22.640
<v Chris Gammell>I mean, you fit two RISC-Vs and a PIC-24 in there.

00:02:22.840 --> 00:02:28.160
<v Super Nintendo>Yeah, plus a graphics subsystem that's kind of sort of on par with a Super Nintendo.

00:02:28.160 --> 00:02:32.100
<v Super Nintendo>Plus an audio subsystem that's also pretty good.

00:02:33.320 --> 00:02:34.560
<v Super Nintendo>USBs in there.

00:02:36.860 --> 00:02:37.220
<v Super Nintendo>HDMI.

00:02:38.120 --> 00:02:40.920
<v Super Nintendo>Because, of course, you put HDMI in there.

00:02:42.360 --> 00:02:44.340
<v Super Nintendo>I mean, you've got to have the first on the batch.

00:02:46.980 --> 00:02:49.680
<v Super Nintendo>An interface to 16 megabytes of RAM.

00:02:49.820 --> 00:02:50.900
<v Super Nintendo>Well, there's a lot of stuff in there.

00:02:51.860 --> 00:02:52.740
<v Chris Gammell>Yeah, that's great.

00:02:52.740 --> 00:02:56.580
<v Chris Gammell>I mean, I think that's a good measure of how big it is in general, right?

00:02:56.600 --> 00:02:58.180
<v Chris Gammell>I mean, it's just a sizable FPGA.

00:02:58.180 --> 00:02:58.760
<v Chris Gammell>Oh, for sure.

00:02:59.120 --> 00:03:01.400
<v Super Nintendo>And we're not even using all of it.

00:03:01.520 --> 00:03:04.960
<v Super Nintendo>The thing is like 61% full, if I recall correctly.

00:03:05.080 --> 00:03:05.700
<v Super Nintendo>Got it, got it.

00:03:06.040 --> 00:03:07.920
<v Chris Gammell>You know, so I've been interested in this.

00:03:08.900 --> 00:03:14.740
<v Chris Gammell>I'm kind of treating this weekend as like an opportunity to just try and get more tools in my toolkit.

00:03:15.100 --> 00:03:15.360
<v Super Nintendo>Oh, yeah.

00:03:15.360 --> 00:03:19.020
<v Chris Gammell>I think the Open, the Yosis stuff, we've had Clifford on the show.

00:03:19.580 --> 00:03:23.080
<v Chris Gammell>We've had Dave, FPGA Dave, on the show briefly.

00:03:23.860 --> 00:03:26.200
<v Chris Gammell>And, you know, the whole team that's working on all that stuff is amazing.

00:03:26.420 --> 00:03:31.660
<v Chris Gammell>But I think that like just having these as a way to deploy custom logic fast, too.

00:03:31.800 --> 00:03:32.300
<v Chris Gammell>That's another thing.

00:03:32.360 --> 00:03:36.540
<v Chris Gammell>It's like so fast to get all this stuff synthesized and onto a thing.

00:03:37.040 --> 00:03:39.400
<v Chris Gammell>It's just it feels like the future, you know?

00:03:39.660 --> 00:03:40.200
<v Super Nintendo>Oh, for sure.

00:03:40.540 --> 00:03:42.600
<v Chris Gammell>What is your take on like where you see it going?

00:03:42.600 --> 00:03:49.200
<v Super Nintendo>Where I see it going, well, I kind of hope it just improves more and more.

00:03:50.160 --> 00:04:01.040
<v Super Nintendo>I think that the team, like the idea of being the GCC for FPGAs, at least they're going pretty far in that direction with the amount of FPGAs they support.

00:04:01.320 --> 00:04:01.560
<v Super Nintendo>Yes.

00:04:01.880 --> 00:04:04.240
<v Super Nintendo>They always supported the ICE 40 series.

00:04:04.520 --> 00:04:06.740
<v Super Nintendo>They support the ECP 5 series.

00:04:06.740 --> 00:04:14.780
<v Super Nintendo>I think there's going to be a talk at the Supercon on how they support the Xilinx Series 7 FPGA series.

00:04:15.100 --> 00:04:16.120
<v Chris Gammell>That's Tim Ansell.

00:04:16.660 --> 00:04:25.180
<v Super Nintendo>I think there's already some work going on to support like Chinese FPGAs, like the GoWin things.

00:04:25.820 --> 00:04:26.600
<v Chris Gammell>I just learned about those.

00:04:26.680 --> 00:04:27.040
<v Chris Gammell>I did not.

00:04:27.600 --> 00:04:28.560
<v Chris Gammell>Those snuck up on me.

00:04:28.560 --> 00:04:29.480
<v Chris Gammell>I don't know where those came from.

00:04:29.840 --> 00:04:31.000
<v Super Nintendo>But have you been around for a while?

00:04:32.680 --> 00:04:34.860
<v Super Nintendo>The company itself has been around for a while.

00:04:34.860 --> 00:04:36.080
<v Super Nintendo>They're doing multiple things.

00:04:40.540 --> 00:04:48.600
<v Super Nintendo>I think those guys are also the guys who make the STM32 knockoffs and who make like serial flash and stuff like that.

00:04:48.720 --> 00:04:49.180
<v Chris Gammell>Giga devices.

00:04:49.400 --> 00:04:50.000
<v Super Nintendo>Giga devices.

00:04:50.160 --> 00:04:50.660
<v Super Nintendo>Yeah, yeah.

00:04:50.820 --> 00:04:51.020
<v Super Nintendo>Okay.

00:04:51.700 --> 00:04:52.900
<v Chris Gammell>Which is another thing.

00:04:53.020 --> 00:04:54.880
<v Chris Gammell>And they make a RISC-V now too.

00:04:55.260 --> 00:04:55.820
<v Super Nintendo>Yeah, they do.

00:04:56.100 --> 00:04:57.440
<v Chris Gammell>A Bumblebee core or something like that?

00:04:57.580 --> 00:04:58.100
<v Super Nintendo>Yeah, yeah, yeah.

00:04:58.100 --> 00:05:06.660
<v Super Nintendo>At least it feels like they effectively took one of their arm things, just ripped off the arm and dumped a RISC-V in there.

00:05:06.820 --> 00:05:07.280
<v Super Nintendo>Yeah, that's great.

00:05:07.300 --> 00:05:08.460
<v Super Nintendo>Which is, I mean, valid.

00:05:08.680 --> 00:05:09.200
<v Chris Gammell>Yeah, yeah.

00:05:09.400 --> 00:05:12.380
<v Chris Gammell>And then you have similar registers and see if it works.

00:05:12.460 --> 00:05:12.840
<v Chris Gammell>That's cool.

00:05:13.160 --> 00:05:15.260
<v Chris Gammell>That's an interesting future in that way, right?

00:05:15.300 --> 00:05:17.980
<v Chris Gammell>Of like this kind of swappable hardware.

00:05:17.980 --> 00:05:27.440
<v Super Nintendo>Yeah, there's, I can see multiple companies going that way, just seeing, you know, if a RISC-V core makes sense.

00:05:27.860 --> 00:05:28.260
<v Chris Gammell>Yeah.

00:05:28.840 --> 00:05:29.320
<v Chris Gammell>That's great.

00:05:29.760 --> 00:05:31.620
<v Chris Gammell>Well, speaking of cores, I mean, what's been going on?

00:05:31.660 --> 00:05:32.580
<v Chris Gammell>You're still at Expressive.

00:05:32.820 --> 00:05:32.980
<v Chris Gammell>Yep.

00:05:32.980 --> 00:05:33.700
<v Chris Gammell>What's been going on with that?

00:05:35.060 --> 00:05:37.160
<v Super Nintendo>Well, let's see.

00:05:37.300 --> 00:05:39.520
<v Super Nintendo>This year we've had an IPO, which is good.

00:05:40.120 --> 00:05:41.120
<v Chris Gammell>I did not know that, actually.

00:05:41.620 --> 00:05:42.240
<v Super Nintendo>Well, we did.

00:05:42.560 --> 00:05:43.220
<v Chris Gammell>Are you rich now?

00:05:44.800 --> 00:05:46.300
<v Super Nintendo>No, unfortunately not.

00:05:46.320 --> 00:05:47.200
<v Super Nintendo>Well, you know, there's still time.

00:05:47.200 --> 00:05:48.240
<v Super Nintendo>It's true.

00:05:50.560 --> 00:05:55.200
<v Super Nintendo>No, there's, we've also been ramping up the CPUs.

00:05:56.100 --> 00:05:58.220
<v Super Nintendo>Sorry, the chips we're making.

00:05:58.560 --> 00:06:07.920
<v Super Nintendo>We've been developing a whole bunch of stuff in the background for the last years, but it's already been a while since we introduced the ESP32.

00:06:08.360 --> 00:06:13.640
<v Super Nintendo>So we're like on the verge of introducing the ESP32 S2.

00:06:13.980 --> 00:06:16.140
<v Super Nintendo>There's already some beta silicon out there.

00:06:17.200 --> 00:06:22.280
<v Super Nintendo>And we should have the final silicon of that, I think.

00:06:22.280 --> 00:06:29.600
<v Super Nintendo>Don't pin me down on this, but I think at the start of the next year.

00:06:29.740 --> 00:06:30.020
<v Super Nintendo>Oh, great.

00:06:30.020 --> 00:06:30.320
<v Super Nintendo>Okay.

00:06:30.980 --> 00:06:34.980
<v Chris Gammell>Yeah, and people were excited about that because it's got the USB internal now.

00:06:35.160 --> 00:06:35.480
<v Chris Gammell>Yes.

00:06:35.900 --> 00:06:37.780
<v Chris Gammell>Definitely can simplify a lot of things.

00:06:37.980 --> 00:06:39.020
<v Super Nintendo>I entirely agree.

00:06:39.020 --> 00:06:44.140
<v Super Nintendo>It's, I've been working on that, like, a fair bit.

00:06:45.740 --> 00:06:49.500
<v Super Nintendo>Just to have USB in there will probably simplify a whole bunch of designs.

00:06:49.600 --> 00:06:57.240
<v Chris Gammell>It's literally like drop a chip now and it does all the things you, I was surprised that it went to single core, but that also helps with power and similar things.

00:06:57.240 --> 00:07:02.580
<v Super Nintendo>Yeah, well, it's kind of, you've got to know about the way this is put in the market.

00:07:02.800 --> 00:07:10.760
<v Super Nintendo>Like, there's a whole bunch of manufacturers who think that the ESP8266 is looking a bit old and a bit simple.

00:07:10.760 --> 00:07:24.640
<v Super Nintendo>And, you know, it's nice to add Wi-Fi functionality to something, but it's too simple to be a standalone Wi-Fi microcontroller for their purposes.

00:07:24.640 --> 00:07:31.760
<v Super Nintendo>On the other hand, ESP32 is a beast with dual cores and lots of memory, et cetera, et cetera.

00:07:31.960 --> 00:07:33.580
<v Chris Gammell>It's swung the heart the other direction, pretty much.

00:07:33.660 --> 00:07:34.060
<v Super Nintendo>Exactly.

00:07:34.420 --> 00:07:38.560
<v Super Nintendo>So, the ESP32 S2 is kind of an in-the-middle device.

00:07:39.040 --> 00:07:40.980
<v Super Nintendo>It has a little bit less RAM.

00:07:41.480 --> 00:07:42.760
<v Super Nintendo>It's only single core.

00:07:43.420 --> 00:07:49.480
<v Super Nintendo>Obviously, there have been incremental updates to our IP as well, so it does get that.

00:07:50.060 --> 00:07:51.300
<v Super Nintendo>It's got USB.

00:07:51.640 --> 00:07:54.600
<v Super Nintendo>It's got a better PS RAM interface, stuff like that.

00:07:55.280 --> 00:07:56.820
<v Super Nintendo>We've upgraded SPI.

00:07:58.720 --> 00:08:01.600
<v Super Nintendo>So, there's a bunch of incremental updates there.

00:08:02.080 --> 00:08:10.080
<v Super Nintendo>But, in general, the thing is positioned to be kind of sort of in between the A266 and the ESP32.

00:08:10.580 --> 00:08:11.020
<v Chris Gammell>Great.

00:08:11.260 --> 00:08:11.740
<v Chris Gammell>That's great.

00:08:12.560 --> 00:08:16.100
<v Chris Gammell>So, what about on the, oops, it's a little loud out there.

00:08:16.360 --> 00:08:16.940
<v Chris Gammell>Yeah, it is.

00:08:16.940 --> 00:08:21.840
<v Chris Gammell>We are in the, got a bunch of feedback during our survey this year.

00:08:21.840 --> 00:08:25.180
<v Chris Gammell>Like, well, we like when we interview people on site, but sometimes it's a little loud.

00:08:25.260 --> 00:08:26.000
<v Chris Gammell>It's like, oh, I know.

00:08:26.280 --> 00:08:26.560
<v Super Nintendo>Yeah.

00:08:26.980 --> 00:08:27.160
<v Chris Gammell>Yeah.

00:08:27.160 --> 00:08:28.460
<v Chris Gammell>It's like we're trying to run away from people.

00:08:28.500 --> 00:08:29.940
<v Chris Gammell>We're actually luckily in an office right now.

00:08:30.100 --> 00:08:30.340
<v Super Nintendo>Yeah.

00:08:30.420 --> 00:08:32.320
<v Super Nintendo>This actually really isolates well.

00:08:32.440 --> 00:08:32.640
<v Chris Gammell>Yeah.

00:08:32.640 --> 00:08:33.120
<v Chris Gammell>Yeah.

00:08:33.840 --> 00:08:35.100
<v Chris Gammell>Well, okay.

00:08:35.240 --> 00:08:38.600
<v Chris Gammell>So, you know, your handle is Sprite, and there's a lot of Sprites on here.

00:08:38.600 --> 00:08:43.800
<v Chris Gammell>I've never really done graphics stuff before, and that's been, there's been really good,

00:08:43.860 --> 00:08:46.060
<v Chris Gammell>like, kind of getting started docs and stuff like that.

00:08:46.580 --> 00:08:49.560
<v Chris Gammell>But what is, do you have background in doing all this stuff?

00:08:50.620 --> 00:08:54.000
<v Super Nintendo>Well, technically not.

00:08:54.000 --> 00:09:00.720
<v Super Nintendo>I've been interested in a whole bunch of gaming systems and how they do things and, you know,

00:09:01.160 --> 00:09:07.420
<v Super Nintendo>how something, I mean, even a Super Nintendo only has a 16-bit CPU that runs at 3-point spare

00:09:07.420 --> 00:09:08.480
<v Super Nintendo>change megahertz.

00:09:08.700 --> 00:09:09.020
<v Super Nintendo>Really?

00:09:09.180 --> 00:09:09.860
<v Super Nintendo>I didn't know that.

00:09:09.860 --> 00:09:18.300
<v Super Nintendo>So, if you have graphics done the, like, in a naive way, but just having a frame buffer,

00:09:18.420 --> 00:09:26.420
<v Super Nintendo>like every single byte in memory equals a pixel in RAM, then first of all, you need a fair amount

00:09:26.420 --> 00:09:31.140
<v Super Nintendo>of RAM, at least at that time, and secondly, you need a fair amount of CPU power in order to push

00:09:31.140 --> 00:09:31.880
<v Super Nintendo>all those pixels.

00:09:32.100 --> 00:09:32.620
<v Chris Gammell>Right, right.

00:09:32.620 --> 00:09:37.380
<v Chris Gammell>And then it's just like, and it's like, if the processor is doing it versus having, like,

00:09:37.420 --> 00:09:41.820
<v Chris Gammell>a specific device that's doing that dump or something.

00:09:42.240 --> 00:09:50.360
<v Super Nintendo>So, the specific device would be, like, in the graphics controller and in both the SNES case

00:09:50.360 --> 00:09:54.180
<v Super Nintendo>as well as on the batch case, it can do a whole bunch of stuff with regards to compositing

00:09:54.180 --> 00:09:55.620
<v Super Nintendo>and overlaying, et cetera.

00:09:57.000 --> 00:10:01.620
<v Super Nintendo>You indeed have a bunch of sprites that you can just move around, so you don't need to actually

00:10:01.620 --> 00:10:04.580
<v Super Nintendo>paint them because the graphics subsystem will take care of it.

00:10:04.820 --> 00:10:07.940
<v Chris Gammell>Yeah, so I guess when I think about, yeah, so, like, okay, so we're going to say, like,

00:10:07.980 --> 00:10:12.700
<v Chris Gammell>it's a 16, 4x4 thing, we're going to draw a checkerboard pattern, black, white, black,

00:10:12.760 --> 00:10:13.820
<v Chris Gammell>white, black, white, black, white, right?

00:10:13.880 --> 00:10:14.000
<v Chris Gammell>Yeah.

00:10:14.660 --> 00:10:19.200
<v Chris Gammell>So, in a traditional system without sprites and stuff like that, you would actually have

00:10:19.200 --> 00:10:23.260
<v Chris Gammell>to then hold all that stuff in memory, know that you're changing bit number 14,

00:10:23.680 --> 00:10:26.920
<v Chris Gammell>and then go draw bits 0 through 15 again, right?

00:10:27.040 --> 00:10:27.180
<v Chris Gammell>Yep.

00:10:27.480 --> 00:10:30.600
<v Chris Gammell>And so, the sprite allows you to basically, how does that work?

00:10:30.600 --> 00:10:37.720
<v Super Nintendo>Well, a sprite wouldn't be a good fit for this.

00:10:38.140 --> 00:10:42.020
<v Super Nintendo>So, like, for instance, take the Mario game.

00:10:42.260 --> 00:10:42.360
<v Super Nintendo>Sure.

00:10:42.820 --> 00:10:48.640
<v Super Nintendo>You've got most of your basic graphics 2D primitives for a graphics subsystem around

00:10:48.640 --> 00:10:49.360
<v Super Nintendo>that age there.

00:10:49.780 --> 00:10:52.460
<v Super Nintendo>You've got your background, your actual level.

00:10:52.460 --> 00:10:58.680
<v Super Nintendo>That's all, that's large, as in, it's larger than the screen.

00:10:58.860 --> 00:10:58.980
<v Super Nintendo>Yeah.

00:10:59.460 --> 00:11:01.780
<v Super Nintendo>And it consists of elements that are fixed.

00:11:02.000 --> 00:11:05.960
<v Super Nintendo>They won't move relative to each other.

00:11:06.620 --> 00:11:08.040
<v Super Nintendo>So, it's actually a...

00:11:08.040 --> 00:11:09.020
<v Super Nintendo>The full canvas of what you can do.

00:11:09.020 --> 00:11:09.860
<v Super Nintendo>Exactly, exactly.

00:11:10.140 --> 00:11:10.340
<v Super Nintendo>Okay.

00:11:10.340 --> 00:11:15.540
<v Super Nintendo>So, you don't want to have a full canvas image in memory, because that would be way too big.

00:11:15.640 --> 00:11:15.760
<v Super Nintendo>Right.

00:11:15.960 --> 00:11:17.520
<v Super Nintendo>So, what you do is you have tiles.

00:11:18.460 --> 00:11:25.480
<v Super Nintendo>That's, like, in little images of, in the case of the batch, 16 times 16 pixels.

00:11:25.480 --> 00:11:31.880
<v Super Nintendo>And you effectively assemble all those tiles in a raster, so to say.

00:11:32.160 --> 00:11:38.720
<v Super Nintendo>So, by giving each position in the raster its own individual tile, you can draw graphics.

00:11:39.060 --> 00:11:42.940
<v Super Nintendo>So, you will have, for instance, tiles that make up a cloud, tiles that make up, like,

00:11:43.100 --> 00:11:46.560
<v Super Nintendo>in the pipes in Mario, you will have tiles that make up the ground.

00:11:46.560 --> 00:11:51.460
<v Super Nintendo>And you can effectively use those tiles to assemble a level.

00:11:52.620 --> 00:11:52.820
<v Chris Gammell>And...

00:11:52.820 --> 00:11:55.900
<v Chris Gammell>So, then you know that the level is this big thing.

00:11:56.080 --> 00:11:56.360
<v Chris Gammell>Mm-hmm.

00:11:56.460 --> 00:12:02.760
<v Chris Gammell>But then it's, you basically are coding, like, it goes tile 1, tile 0, tile 0, tile 0, tile 2.

00:12:02.960 --> 00:12:03.360
<v Chris Gammell>Exactly.

00:12:03.540 --> 00:12:03.680
<v Chris Gammell>Okay.

00:12:03.980 --> 00:12:10.860
<v Super Nintendo>So, the amount of memory you need to store is only the memory for the unique bits of your graphics,

00:12:11.140 --> 00:12:15.320
<v Super Nintendo>plus how you repeat those in the level, so to say.

00:12:15.580 --> 00:12:15.780
<v Super Nintendo>Okay.

00:12:15.780 --> 00:12:15.900
<v Super Nintendo>Yeah.

00:12:15.980 --> 00:12:23.820
<v Super Nintendo>So, that saves a lot of RAM, and that also makes drawing it easier, because it's effectively a level of indirection.

00:12:23.880 --> 00:12:24.040
<v Super Nintendo>Right.

00:12:24.080 --> 00:12:26.240
<v Chris Gammell>You basically go out, grab that thing, bring it back.

00:12:26.700 --> 00:12:27.620
<v Super Nintendo>Yeah, more or less.

00:12:27.700 --> 00:12:28.240
<v Super Nintendo>Paste it together.

00:12:28.460 --> 00:12:28.660
<v Super Nintendo>Yeah.

00:12:28.800 --> 00:12:28.900
<v Super Nintendo>Yeah.

00:12:30.020 --> 00:12:30.100
<v Super Nintendo>Yeah.

00:12:30.100 --> 00:12:33.380
<v Super Nintendo>So, those are tile layers.

00:12:33.620 --> 00:12:38.080
<v Super Nintendo>On top of that, you have the smaller things that need to move independently.

00:12:38.080 --> 00:12:44.520
<v Super Nintendo>So, for instance, Mario, like in any Goomba that passes along, stuff like that.

00:12:44.740 --> 00:12:45.480
<v Super Nintendo>Those are sprites.

00:12:45.480 --> 00:12:54.840
<v Super Nintendo>Those are individual images, usually tiles as well, so 16 times 16, or whatever, a fixed size.

00:12:55.480 --> 00:13:02.680
<v Super Nintendo>And you can effectively just give those a position independent of the grid that the rest of the level is on,

00:13:03.080 --> 00:13:04.060
<v Super Nintendo>and you can just place it.

00:13:04.060 --> 00:13:08.320
<v Super Nintendo>But the nice thing is that the actual drawing, again, the graphics hardware does that.

00:13:08.320 --> 00:13:15.680
<v Super Nintendo>So, if you want to move Mario, then it would effectively be update the variable that states where the Mario sprite is.

00:13:15.680 --> 00:13:15.740
<v Super Nintendo>Right.

00:13:16.080 --> 00:13:18.000
<v Chris Gammell>He's jumping, and so now it's position Y.

00:13:18.060 --> 00:13:19.640
<v Chris Gammell>It goes from 0 to 20, or whatever it is.

00:13:19.640 --> 00:13:20.020
<v Super Nintendo>Exactly.

00:13:20.240 --> 00:13:22.560
<v Super Nintendo>And if you do that, the hardware will take care of the rest.

00:13:22.640 --> 00:13:26.620
<v Super Nintendo>The CPU doesn't need to think about, like, oh, this is actually a Mario image.

00:13:26.720 --> 00:13:26.840
<v Super Nintendo>Right.

00:13:26.840 --> 00:13:28.560
<v Super Nintendo>That's all the hardware that does that.

00:13:28.620 --> 00:13:30.760
<v Chris Gammell>And do I draw a green pixel here or a red pixel?

00:13:31.080 --> 00:13:31.360
<v Chris Gammell>Exactly.

00:13:31.480 --> 00:13:31.880
<v Chris Gammell>Exactly.

00:13:32.080 --> 00:13:33.260
<v Super Nintendo>That's all hardware accelerated.

00:13:33.480 --> 00:13:33.840
<v Chris Gammell>Interesting.

00:13:34.200 --> 00:13:35.980
<v Chris Gammell>And that was happening back in the 80s.

00:13:35.980 --> 00:13:38.060
<v Super Nintendo>Yeah, very much so.

00:13:38.400 --> 00:13:42.860
<v Super Nintendo>They had to because having enough memory to store the entire...

00:13:42.860 --> 00:13:43.460
<v Super Nintendo>Super expensive.

00:13:43.820 --> 00:13:46.020
<v Super Nintendo>That would cost an arm and a leg, for sure.

00:13:46.220 --> 00:13:47.240
<v Chris Gammell>Price fixing was a thing then.

00:13:48.620 --> 00:13:49.020
<v Super Nintendo>Yeah.

00:13:49.360 --> 00:13:50.460
<v Super Nintendo>Yeah, back in the day.

00:13:50.700 --> 00:13:51.100
<v Super Nintendo>Yeah.

00:13:51.100 --> 00:13:51.260
<v Super Nintendo>Yeah.

00:13:51.440 --> 00:13:51.820
<v Chris Gammell>Big money.

00:13:52.040 --> 00:13:52.360
<v Chris Gammell>Big money.

00:13:52.620 --> 00:13:54.820
<v Chris Gammell>I remember, like, opening up...

00:13:54.820 --> 00:13:56.400
<v Chris Gammell>I think it was a Game Boy.

00:13:56.640 --> 00:13:56.920
<v Super Nintendo>Mm-hmm.

00:13:57.040 --> 00:13:57.620
<v Chris Gammell>And it's just like...

00:13:57.620 --> 00:13:59.920
<v Chris Gammell>I think that one has a linear regulator on it, doesn't it?

00:14:00.920 --> 00:14:01.320
<v Super Nintendo>No.

00:14:01.320 --> 00:14:03.520
<v Super Nintendo>Actually, the Game Boy has...

00:14:03.520 --> 00:14:04.640
<v Chris Gammell>Is it a switching regulator on there?

00:14:04.660 --> 00:14:05.400
<v Super Nintendo>Yeah, it's actually a...

00:14:05.400 --> 00:14:07.120
<v Chris Gammell>I remember there was one that had, like, a linear regulator.

00:14:07.220 --> 00:14:08.140
<v Super Nintendo>I was just like, whoa.

00:14:09.060 --> 00:14:12.840
<v Super Nintendo>There's some in there, but the Game Boy is actually pretty nice.

00:14:12.980 --> 00:14:16.260
<v Super Nintendo>It actually has a separate board made by Alps, if memory serves.

00:14:16.400 --> 00:14:18.400
<v Super Nintendo>That's the switching regulator.

00:14:18.400 --> 00:14:18.880
<v Super Nintendo>Okay.

00:14:18.980 --> 00:14:26.240
<v Super Nintendo>It kind of needs that because it needs minus 20 volts or something for the display to work.

00:14:26.360 --> 00:14:26.700
<v Super Nintendo>Got it.

00:14:26.840 --> 00:14:26.960
<v Super Nintendo>Okay.

00:14:27.140 --> 00:14:33.100
<v Super Nintendo>So there were a few consoles that used a linear regulator.

00:14:33.100 --> 00:14:35.100
<v Super Nintendo>I think the...

00:14:35.100 --> 00:14:38.600
<v Super Nintendo>At least the Atari 2600 used a linear regulator.

00:14:38.900 --> 00:14:39.040
<v Chris Gammell>Yeah.

00:14:39.080 --> 00:14:40.200
<v Chris Gammell>It's wall-plugged, at least, though, right?

00:14:40.200 --> 00:14:40.760
<v Chris Gammell>Yeah, yeah, yeah.

00:14:40.760 --> 00:14:41.240
<v Chris Gammell>That helps.

00:14:41.320 --> 00:14:46.820
<v Super Nintendo>I wouldn't be surprised if, like, in anything up to the SNES used a linear regulator because,

00:14:47.000 --> 00:14:48.320
<v Super Nintendo>you know, it wasn't that power intense.

00:14:48.440 --> 00:14:49.160
<v Super Nintendo>It's super cheap, too.

00:14:49.400 --> 00:14:49.800
<v Super Nintendo>Exactly.

00:14:50.360 --> 00:14:50.480
<v Chris Gammell>Yeah.

00:14:50.480 --> 00:14:50.560
<v Chris Gammell>Yeah.

00:14:50.960 --> 00:14:56.020
<v Chris Gammell>Well, getting back to this thing, I mean, so what was your experience with the RISC-V and

00:14:56.020 --> 00:14:58.300
<v Chris Gammell>the ECP-V prior to this?

00:14:58.360 --> 00:15:00.940
<v Chris Gammell>Was it kind of just figured out it was going along or a dense project?

00:15:01.160 --> 00:15:01.320
<v Super Nintendo>Yeah.

00:15:01.440 --> 00:15:07.920
<v Super Nintendo>I had some, like, FPGA experience, like, in general.

00:15:08.120 --> 00:15:10.000
<v Super Nintendo>I've messed around with FPGAs before.

00:15:10.780 --> 00:15:14.280
<v Super Nintendo>Never got around to building an entire SOC from the ground up.

00:15:14.280 --> 00:15:19.080
<v Super Nintendo>But, you know, I knew my VACL.

00:15:19.260 --> 00:15:20.140
<v Super Nintendo>I knew my VariLog.

00:15:20.320 --> 00:15:22.180
<v Super Nintendo>So that bit I had.

00:15:22.840 --> 00:15:24.920
<v Super Nintendo>The ECP-V I had no experience with.

00:15:26.200 --> 00:15:32.840
<v Super Nintendo>Like, the first prototype you see there is actually the first ECP-V board I own.

00:15:33.680 --> 00:15:35.280
<v Super Nintendo>I don't really...

00:15:35.760 --> 00:15:36.780
<v Super Nintendo>Well, that one worked.

00:15:36.940 --> 00:15:41.740
<v Super Nintendo>So I didn't need to buy an actual, like, in dev kit for the ECP-V.

00:15:41.740 --> 00:15:42.220
<v Super Nintendo>Yeah.

00:15:44.260 --> 00:15:48.860
<v Chris Gammell>Well, in the bitstream, so bitstream for that, it went Ice40 was first and then ECP-V was

00:15:48.860 --> 00:15:49.120
<v Chris Gammell>later.

00:15:49.380 --> 00:15:49.520
<v Chris Gammell>Yeah.

00:15:49.640 --> 00:15:54.740
<v Chris Gammell>How much after the time when the ECP-V bitstream was released that you started working on this?

00:15:54.940 --> 00:15:56.180
<v Chris Gammell>It had been out for a while or?

00:15:57.420 --> 00:15:58.280
<v Super Nintendo>I don't know.

00:15:58.440 --> 00:16:05.120
<v Super Nintendo>I think I made sure that it was more or less stable and usable.

00:16:07.600 --> 00:16:10.020
<v Super Nintendo>But I don't exactly know the time span.

00:16:10.020 --> 00:16:12.240
<v Super Nintendo>It may have been a year or something or half a year.

00:16:12.560 --> 00:16:15.600
<v Super Nintendo>It's, like, yeah, pretty soon.

00:16:15.820 --> 00:16:19.220
<v Super Nintendo>But, yeah, most of it seems supported and stable.

00:16:20.020 --> 00:16:27.500
<v Super Nintendo>To be fair, at that moment, it wasn't entirely, like, it's nice how the toolchain just grows

00:16:27.500 --> 00:16:31.720
<v Super Nintendo>and improves, like, as I went along that year.

00:16:31.920 --> 00:16:32.320
<v Super Nintendo>Yeah, right, right.

00:16:32.360 --> 00:16:37.320
<v Super Nintendo>And there are still some things in the repo that are in there, but are actually workarounds

00:16:37.320 --> 00:16:40.860
<v Super Nintendo>for things that the toolchain didn't do back then.

00:16:41.000 --> 00:16:41.540
<v Chris Gammell>Ah, really?

00:16:41.540 --> 00:16:41.720
<v Super Nintendo>Yeah.

00:16:41.720 --> 00:16:47.120
<v Super Nintendo>So I could actually delete them and fix those in the more obvious way.

00:16:47.400 --> 00:16:47.860
<v Super Nintendo>Yeah, right.

00:16:48.060 --> 00:16:48.240
<v Chris Gammell>Yeah.

00:16:48.680 --> 00:16:49.140
<v Chris Gammell>That's great.

00:16:49.640 --> 00:16:51.240
<v Chris Gammell>And then, so it has two RISC-Vs in there.

00:16:51.400 --> 00:16:53.700
<v Chris Gammell>Why does it have two RISC-Vs and a PIC-24?

00:16:55.600 --> 00:16:56.700
<v Super Nintendo>PIC-16, actually.

00:16:56.840 --> 00:16:57.260
<v Super Nintendo>PIC-16.

00:16:57.400 --> 00:16:58.000
<v Super Nintendo>Oh, I thought it was PIC-24.

00:16:58.160 --> 00:17:01.420
<v Super Nintendo>It's the old school PIC-16C84.

00:17:01.860 --> 00:17:02.100
<v Super Nintendo>Got it.

00:17:02.160 --> 00:17:04.240
<v Super Nintendo>So the two RISC-Vs are in there because...

00:17:06.240 --> 00:17:08.620
<v Super Nintendo>Why did I put two RISC-Vs in?

00:17:08.760 --> 00:17:09.740
<v Super Nintendo>Oh, yeah, I know.

00:17:10.140 --> 00:17:14.260
<v Super Nintendo>So the RISC-V core that's in there is a Pico RV32 core.

00:17:15.020 --> 00:17:15.920
<v Super Nintendo>It's a really nice core.

00:17:16.020 --> 00:17:17.200
<v Super Nintendo>It's written in pure varilog.

00:17:17.200 --> 00:17:19.080
<v Super Nintendo>It's formally verified.

00:17:19.340 --> 00:17:21.200
<v Super Nintendo>It's used all over the place.

00:17:21.880 --> 00:17:23.280
<v Chris Gammell>That's the one that...

00:17:23.280 --> 00:17:23.820
<v Chris Gammell>What's his name?

00:17:24.040 --> 00:17:24.600
<v Chris Gammell>Yeah.

00:17:24.720 --> 00:17:25.080
<v Chris Gammell>Did, right?

00:17:25.280 --> 00:17:25.680
<v Super Nintendo>Exactly.

00:17:26.500 --> 00:17:28.580
<v Chris Gammell>Formally verified probably because of Symbiosis.

00:17:28.800 --> 00:17:29.440
<v Chris Gammell>Oh, yeah, for sure.

00:17:29.440 --> 00:17:30.180
<v Chris Gammell>Right at EDA.

00:17:30.340 --> 00:17:32.800
<v Super Nintendo>But it's really nice and simple.

00:17:33.240 --> 00:17:37.440
<v Super Nintendo>And my idea for the batch would be that it's something that people should be able to hack.

00:17:37.440 --> 00:17:48.160
<v Super Nintendo>And if I use, like, in three different high-level languages only for the FPGA load, then it's probably going to be too much for people to just try to read up in one weekend.

00:17:48.360 --> 00:17:55.820
<v Super Nintendo>So I wanted to have something that's very log-based and is simple and, you know, there's some documentation out there.

00:17:56.380 --> 00:17:58.340
<v Super Nintendo>So Pico RV32.

00:17:58.340 --> 00:18:02.340
<v Super Nintendo>The problem with the Pico RV32 is that it's...

00:18:03.020 --> 00:18:06.080
<v Super Nintendo>Well, the implementation as is on the FPGA is slow.

00:18:06.680 --> 00:18:14.580
<v Super Nintendo>It's a CPU that is meant to have a high clock speed.

00:18:14.840 --> 00:18:19.000
<v Super Nintendo>And in this FPGA, it only gets, like, in a medium clock speed.

00:18:19.000 --> 00:18:26.080
<v Super Nintendo>But in order to get a high clock speed, the trade-off is that it has a lot of cycle per instruction.

00:18:28.060 --> 00:18:39.340
<v Super Nintendo>So even something as simple as a load, it takes, like, three or four cycles, where most normal CPUs would take, give or take, one cycle per instruction.

00:18:40.040 --> 00:18:42.300
<v Super Nintendo>So there's a lot of slowdown.

00:18:42.420 --> 00:18:47.380
<v Super Nintendo>And that causes the memory bus, for instance, not to be utilized to the maximum.

00:18:47.380 --> 00:18:52.720
<v Super Nintendo>So my idea was, okay, I'll just plunk in a second RISC-V core because the memory bus can handle it.

00:18:53.000 --> 00:18:54.860
<v Super Nintendo>And that way, we get twice the speed.

00:18:55.300 --> 00:18:55.820
<v Chris Gammell>Yeah, right.

00:18:56.180 --> 00:18:57.640
<v Chris Gammell>And so I remember you were showing...

00:18:57.640 --> 00:19:02.220
<v Chris Gammell>So you were showing this morning, you were showing some of the gotchas and, like, how the access works.

00:19:02.280 --> 00:19:03.380
<v Chris Gammell>And I remember you said that there was...

00:19:04.060 --> 00:19:08.560
<v Chris Gammell>You said there was the four-bit access to the bus, but that was because of 32-bit.

00:19:08.900 --> 00:19:10.100
<v Super Nintendo>Yeah, there's...

00:19:10.100 --> 00:19:12.700
<v Super Nintendo>Well, that's actually a standard thing.

00:19:12.780 --> 00:19:14.600
<v Super Nintendo>It's just something that you need to know about the bus.

00:19:14.600 --> 00:19:20.540
<v Super Nintendo>Like, the RISC-V is a 32-bit processor, so it has a 32-bit bus to the memory.

00:19:21.560 --> 00:19:22.600
<v Super Nintendo>But it can...

00:19:23.120 --> 00:19:26.100
<v Super Nintendo>I mean, obviously, it can also read and write 16 and 8-bit values.

00:19:26.400 --> 00:19:37.500
<v Super Nintendo>And the way it implements it is it'll send a 32-bit value over, but it'll tell you using the right strobe, oh, I only want to write this byte of the 32-bit value.

00:19:37.620 --> 00:19:38.660
<v Super Nintendo>You can ignore the rest.

00:19:38.780 --> 00:19:40.460
<v Super Nintendo>And that's the trick, more or less.

00:19:40.620 --> 00:19:40.820
<v Chris Gammell>Right.

00:19:40.820 --> 00:19:42.280
<v Chris Gammell>So instead of doing masking...

00:19:42.280 --> 00:19:43.260
<v Super Nintendo>Exactly, exactly.

00:19:43.400 --> 00:19:44.940
<v Chris Gammell>Yeah, that helps with instructions.

00:19:45.580 --> 00:19:45.740
<v Super Nintendo>Yeah.

00:19:46.100 --> 00:19:52.940
<v Chris Gammell>So I remember something about, in that part you were talking about, there was something that felt like it was like two 32-bit...

00:19:52.940 --> 00:19:54.280
<v Chris Gammell>It was like two reads or two writes?

00:19:54.460 --> 00:19:55.480
<v Chris Gammell>I thought there was something in there.

00:19:55.600 --> 00:19:58.260
<v Chris Gammell>Is that out there talking on the bus, or is there a...

00:19:58.260 --> 00:20:07.700
<v Super Nintendo>Yeah, there's actually where you would normally, if you go back to the Z80 days and stuff, you would only have one bus, and that would be bi-directional.

00:20:07.940 --> 00:20:15.360
<v Super Nintendo>So if you read from a peripheral, the data goes over the same bus as if you write to a peripheral, which is really nice.

00:20:15.360 --> 00:20:19.200
<v Super Nintendo>But FPGAs, well, it needs tri-stating.

00:20:19.520 --> 00:20:27.340
<v Super Nintendo>Like, if the CPU speaks, then the peripherals should shut up and tri-state their bus.

00:20:27.400 --> 00:20:27.640
<v Super Nintendo>That's right.

00:20:28.280 --> 00:20:31.980
<v Super Nintendo>But FPGAs don't really do that, at least not nowadays.

00:20:32.100 --> 00:20:35.000
<v Super Nintendo>There used to be silenced processors way, way back that could do that.

00:20:35.120 --> 00:20:38.720
<v Super Nintendo>But because of a variety of reasons, they don't do that anymore.

00:20:38.720 --> 00:20:43.580
<v Super Nintendo>So a lot can only have an output or only have an input.

00:20:44.660 --> 00:20:47.040
<v Super Nintendo>So in order to make that work, you need two buses.

00:20:47.360 --> 00:20:57.520
<v Super Nintendo>Like, in one bus from the master to all the peripherals, and then from all the peripherals, there's like a separate bus that goes into a multiplexer that goes back into the master.

00:20:57.720 --> 00:20:58.900
<v Super Nintendo>Just because you can't do that.

00:20:59.160 --> 00:20:59.460
<v Super Nintendo>Got it.

00:20:59.640 --> 00:20:59.940
<v Super Nintendo>Got it.

00:21:00.100 --> 00:21:00.500
<v Super Nintendo>That's cool.

00:21:00.740 --> 00:21:00.900
<v Super Nintendo>Okay.

00:21:02.100 --> 00:21:03.740
<v Chris Gammell>So what else should we know about the badge?

00:21:03.800 --> 00:21:07.100
<v Chris Gammell>I mean, there's going to be obviously a lot of hacking that happens over this weekend.

00:21:07.100 --> 00:21:07.500
<v Chris Gammell>Sure.

00:21:07.500 --> 00:21:09.900
<v Super Nintendo>It's really open.

00:21:11.560 --> 00:21:14.840
<v Super Nintendo>People can hack so much with it from the hardware.

00:21:15.140 --> 00:21:17.140
<v Super Nintendo>I mean, you can solder to the badge, obviously.

00:21:17.440 --> 00:21:18.340
<v Chris Gammell>Oh, that cartridge thing?

00:21:18.520 --> 00:21:18.880
<v Chris Gammell>That's cool.

00:21:18.880 --> 00:21:19.540
<v Chris Gammell>Yeah, yeah, yeah.

00:21:19.740 --> 00:21:21.020
<v Super Nintendo>We have a nice cartridge.

00:21:22.100 --> 00:21:23.960
<v Chris Gammell>To explain what it looks like, maybe, too.

00:21:24.020 --> 00:21:24.960
<v Chris Gammell>That helps for people listening.

00:21:25.360 --> 00:21:26.340
<v Super Nintendo>Yeah, audio only, right?

00:21:26.380 --> 00:21:26.780
<v Super Nintendo>Yeah, that's right.

00:21:26.860 --> 00:21:26.940
<v Super Nintendo>Yeah.

00:21:27.280 --> 00:21:35.640
<v Super Nintendo>So the cartridge is a PCB that slots into the back of the badge.

00:21:35.640 --> 00:21:41.780
<v Super Nintendo>Like, the badge kind of looks like a Game Boy, and the cartridge would be like the cartridge, as in the game cartridge.

00:21:41.780 --> 00:21:47.360
<v Super Nintendo>The cartridge that you get with the badge is effectively a prototyping board.

00:21:47.360 --> 00:21:53.740
<v Super Nintendo>So it has lots of pads in there that are connected, and you can just solder your own random stuff on there.

00:21:53.740 --> 00:21:57.620
<v Super Nintendo>And it also has a little bit of flash on there.

00:21:57.700 --> 00:21:58.400
<v Chris Gammell>I really like that.

00:21:58.520 --> 00:21:59.260
<v Chris Gammell>And it shows up.

00:21:59.520 --> 00:22:02.400
<v Chris Gammell>Also, it enumerates and shows up when you plug in the USB.

00:22:02.560 --> 00:22:03.100
<v Super Nintendo>Yeah, yeah, yeah.

00:22:03.100 --> 00:22:03.340
<v Super Nintendo>Exactly.

00:22:03.340 --> 00:22:05.100
<v Chris Gammell>It's super easy to just drop an application on there.

00:22:05.100 --> 00:22:05.780
<v Super Nintendo>Yeah, yeah, yeah.

00:22:05.880 --> 00:22:13.000
<v Super Nintendo>The entire idea was that, like, previous years, the batches varied a little bit in programmability.

00:22:13.560 --> 00:22:20.180
<v Super Nintendo>They went all the way from, I think, the first or the second batch, also just enumerated as a USB mass storage device.

00:22:20.500 --> 00:22:26.040
<v Super Nintendo>But later on, either you needed a pick kit or something else, and I never really liked that.

00:22:26.140 --> 00:22:32.380
<v Super Nintendo>I mean, especially since I'm also a Linux user, and most of that embedded stuff tends to be slightly Windows-focused.

00:22:32.380 --> 00:22:33.780
<v Super Nintendo>It's getting better, honestly.

00:22:33.960 --> 00:22:35.180
<v Chris Gammell>A lot of the tools are getting better.

00:22:35.260 --> 00:22:35.940
<v Super Nintendo>True, true, true.

00:22:36.100 --> 00:22:37.460
<v Super Nintendo>It's still not entirely there, though.

00:22:37.480 --> 00:22:37.860
<v Super Nintendo>Yeah, I agree.

00:22:37.900 --> 00:22:40.060
<v Super Nintendo>So I was like, for the batch, simple and stupid.

00:22:40.280 --> 00:22:43.060
<v Super Nintendo>There are USB protocols that are, like, standardized.

00:22:43.500 --> 00:22:47.860
<v Super Nintendo>So you have DFU for the low-level stuff that you want to update.

00:22:48.200 --> 00:22:50.080
<v Super Nintendo>And for the rest, there's a file system.

00:22:50.540 --> 00:22:53.680
<v Super Nintendo>If you plug the batch in, it looks like a USB stick.

00:22:53.820 --> 00:22:55.660
<v Super Nintendo>Tiny USB stick, but still a USB stick.

00:22:56.800 --> 00:22:58.020
<v Chris Gammell>Oh, 14 megabytes.

00:22:58.120 --> 00:22:58.280
<v Chris Gammell>Okay.

00:22:58.280 --> 00:22:58.640
<v Chris Gammell>Yeah.

00:22:58.640 --> 00:23:03.620
<v Super Nintendo>And the cartridge, yeah, just enumerates as a second USB stick.

00:23:03.680 --> 00:23:07.420
<v Super Nintendo>And you can just drag and drop your files and your programs onto there.

00:23:07.720 --> 00:23:12.080
<v Super Nintendo>And the idea of also putting some memory on the cartridge is that, well, first of all,

00:23:12.700 --> 00:23:21.700
<v Super Nintendo>even if you don't use the prototyping space, it's probably fun just to be able to give your game

00:23:21.700 --> 00:23:23.960
<v Super Nintendo>or your whatever to someone else by just passing the cartridge.

00:23:23.960 --> 00:23:24.960
<v Super Nintendo>Yeah, that's totally awesome.

00:23:24.960 --> 00:23:32.760
<v Super Nintendo>But also, if you do put stuff on there, say, like, in the canonical example would be if you were to put, for instance,

00:23:32.860 --> 00:23:42.440
<v Super Nintendo>a bunch of DACs on there and a front end to make a scope, you can put both the bitstream that has the interface to the DACs,

00:23:42.440 --> 00:23:49.540
<v Super Nintendo>like in hardware, you can put that on the flash, plus you can put the application that actually shows you the scope user interface,

00:23:49.600 --> 00:23:50.740
<v Super Nintendo>you can put that on the flash.

00:23:51.260 --> 00:23:58.340
<v Super Nintendo>And that way you can turn any random batch into a scope by just inserting the cartridge and booting from the cartridge.

00:23:58.340 --> 00:23:58.660
<v Super Nintendo>Right.

00:23:58.780 --> 00:24:02.420
<v Chris Gammell>So it makes the entire thing, the entire batch is reconfigurable with a cartridge.

00:24:02.580 --> 00:24:02.860
<v Chris Gammell>Exactly.

00:24:02.860 --> 00:24:03.780
<v Chris Gammell>Which is pretty crazy.

00:24:04.040 --> 00:24:04.260
<v Chris Gammell>Yeah.

00:24:05.420 --> 00:24:07.860
<v Chris Gammell>Yeah, that'll be interesting to see what people do with that.

00:24:08.220 --> 00:24:11.760
<v Super Nintendo>Yeah, I haven't got time for it, but one of the things you could do is, for instance, take,

00:24:12.320 --> 00:24:19.100
<v Super Nintendo>there's some IP out there, for instance, from people who converted, like in a Game Boy to Verilog,

00:24:19.160 --> 00:24:20.460
<v Super Nintendo>so you can put it in an FPGA.

00:24:20.460 --> 00:24:20.500
<v Super Nintendo>Right.

00:24:21.680 --> 00:24:29.240
<v Super Nintendo>Theoretically, what you could do is build an interface cartridge with the cartridge connector for the badge on one side

00:24:29.240 --> 00:24:32.900
<v Super Nintendo>and an interface for a Game Boy cartridge on the other side.

00:24:33.540 --> 00:24:37.080
<v Super Nintendo>And if you slot it in and then slot a Game Boy cartridge in there, you affect the...

00:24:37.080 --> 00:24:38.260
<v Chris Gammell>A cartridge-in-cartridge kind of thing?

00:24:38.440 --> 00:24:38.880
<v Super Nintendo>Exactly.

00:24:39.180 --> 00:24:44.560
<v Super Nintendo>And then you can play that Game Boy game because the FPGA all of a sudden becomes a Game Boy

00:24:44.560 --> 00:24:48.800
<v Super Nintendo>and it can read the original Game Boy cartridge through the interface logic.

00:24:48.800 --> 00:24:55.800
<v Chris Gammell>Right, and in theory, if there was a Sega Game Gear Verilog, you could then plug in a different cartridge.

00:24:56.020 --> 00:24:56.280
<v Chris Gammell>Exactly.

00:24:56.280 --> 00:24:59.040
<v Chris Gammell>It then becomes a Game Gear and you could play a Sonic or whatever.

00:24:59.520 --> 00:24:59.860
<v Chris Gammell>Exactly.

00:25:00.140 --> 00:25:01.920
<v Chris Gammell>Yeah, that's, you know, it's really hard.

00:25:02.480 --> 00:25:05.500
<v Chris Gammell>I remember the first time I started, like, learning and thinking about FPGAs.

00:25:05.640 --> 00:25:10.260
<v Chris Gammell>It's so hard to visualize at first, you know, and it's hard to remember what that feeling is like,

00:25:10.740 --> 00:25:13.800
<v Chris Gammell>especially coming from, like, a microcontroller background and things like that.

00:25:14.060 --> 00:25:15.240
<v Super Nintendo>Yeah, it's so flexible.

00:25:15.240 --> 00:25:15.640
<v Chris Gammell>Yeah.

00:25:15.640 --> 00:25:21.980
<v Super Nintendo>I actually have one line in the Verilog code that I really like.

00:25:21.980 --> 00:25:28.000
<v Super Nintendo>It's something like a parameter CPU count equals two.

00:25:29.340 --> 00:25:37.900
<v Super Nintendo>And the nice thing is that if you look at that line naively without knowing anything about programming,

00:25:38.180 --> 00:25:39.900
<v Super Nintendo>then you make a certain assumption.

00:25:40.500 --> 00:25:44.480
<v Super Nintendo>And then if you know how to program, you're like, nah, that's probably wrong.

00:25:44.560 --> 00:25:45.980
<v Super Nintendo>That's just a constant for something.

00:25:46.180 --> 00:25:46.320
<v Super Nintendo>Yeah.

00:25:46.320 --> 00:25:49.420
<v Super Nintendo>But in this case, your initial assumption would actually be right.

00:25:49.420 --> 00:25:56.040
<v Super Nintendo>If I put a three in there, there would be an extra core that shows up in the FPGA.

00:25:56.540 --> 00:25:57.080
<v Super Nintendo>Oh, really?

00:25:57.300 --> 00:25:57.600
<v Super Nintendo>Yes.

00:25:57.740 --> 00:25:59.480
<v Super Nintendo>It's just a, literally just a variable.

00:25:59.620 --> 00:26:03.440
<v Super Nintendo>It literally sets the amount of cores that you have in your SoC.

00:26:03.680 --> 00:26:03.860
<v Super Nintendo>Right.

00:26:04.020 --> 00:26:07.140
<v Super Nintendo>And it errors out when you put in 64 because you...

00:26:07.140 --> 00:26:09.560
<v Super Nintendo>Well, yeah, you wouldn't have the space.

00:26:09.560 --> 00:26:16.660
<v Super Nintendo>And in general, above a certain count, it doesn't make sense because the memory bus gets so constrained

00:26:16.660 --> 00:26:18.380
<v Super Nintendo>that all the CPUs are waiting on each other.

00:26:18.580 --> 00:26:21.560
<v Chris Gammell>But in theory, that's the flexibility of it all.

00:26:21.560 --> 00:26:22.020
<v Chris Gammell>Yeah.

00:26:22.020 --> 00:26:22.040
<v Chris Gammell>Right.

00:26:22.180 --> 00:26:22.320
<v Super Nintendo>Yeah.

00:26:22.380 --> 00:26:28.220
<v Super Nintendo>Just the fact that you can write such a line and it does actually what you think it might do is weird.

00:26:29.140 --> 00:26:35.000
<v Chris Gammell>I mean, well, I mean, the idea of like, if you say you could take it to a large number, right,

00:26:35.000 --> 00:26:39.500
<v Chris Gammell>and they actually did work and you had the memory for it and everything, like, then you have that many CPUs,

00:26:39.520 --> 00:26:40.780
<v Chris Gammell>you basically become a GPU, right?

00:26:40.860 --> 00:26:44.860
<v Chris Gammell>And that kind of like the idea of like, I mean, in theory of like having lots of parallel...

00:26:44.860 --> 00:26:45.820
<v Super Nintendo>Yeah, yeah, yeah, for sure.

00:26:46.280 --> 00:26:47.100
<v Super Nintendo>Yeah, you can do that.

00:26:47.260 --> 00:26:47.420
<v Chris Gammell>Yeah.

00:26:47.900 --> 00:26:51.540
<v Chris Gammell>So that's, yeah, it's just, there's the parallel nature of it.

00:26:51.620 --> 00:26:55.120
<v Chris Gammell>Like, that's one thing that I think is hard, was always hard for me to wrap my head around.

00:26:55.120 --> 00:26:56.000
<v Super Nintendo>Oh, yeah, for sure.

00:26:56.160 --> 00:26:59.940
<v Chris Gammell>And then, and that's, I always try and like talk about like streaming data and like thinking about like,

00:27:00.580 --> 00:27:04.500
<v Chris Gammell>like putting data through a pipe, but then there's like little release valves and it, you know,

00:27:04.500 --> 00:27:06.180
<v Chris Gammell>it's trying to do stuff as it's still streaming.

00:27:06.280 --> 00:27:07.640
<v Chris Gammell>It has to still be moving through the pipe.

00:27:07.800 --> 00:27:11.700
<v Super Nintendo>Yeah, it's, it's, it's, it's more like mechanics than it is like programming actually.

00:27:11.900 --> 00:27:12.480
<v Super Nintendo>Yeah, right, right.

00:27:12.540 --> 00:27:14.800
<v Super Nintendo>The way everything happens in parallel.

00:27:14.940 --> 00:27:16.040
<v Super Nintendo>It's a Rube Goldberg machine, right?

00:27:16.160 --> 00:27:16.800
<v Super Nintendo>Yeah, for sure.

00:27:17.340 --> 00:27:17.580
<v Chris Gammell>Yeah.

00:27:17.860 --> 00:27:18.040
<v Chris Gammell>Yeah.

00:27:18.520 --> 00:27:19.860
<v Chris Gammell>Continuous Rube Goldberg machine.

00:27:20.160 --> 00:27:20.560
<v Chris Gammell>Yeah.

00:27:20.920 --> 00:27:25.640
<v Chris Gammell>It's, it's, it's, it's tough to think about, but then I think the, the, the fact that then,

00:27:25.980 --> 00:27:31.660
<v Chris Gammell>okay, then they're also, you're also able to put logic on there that, you know, is a CPU.

00:27:31.820 --> 00:27:33.460
<v Chris Gammell>It's like another layer.

00:27:33.460 --> 00:27:37.900
<v Chris Gammell>There, I finally remembered what the name of the, I used to work on the Microblaze.

00:27:38.040 --> 00:27:38.620
<v Chris Gammell>Do you ever use those?

00:27:38.800 --> 00:27:40.240
<v Super Nintendo>Oh yeah, that's Xilinx, right?

00:27:40.380 --> 00:27:40.480
<v Super Nintendo>Yeah.

00:27:40.620 --> 00:27:43.320
<v Chris Gammell>Xilinx and then Neos is the Altera one someone was talking about earlier.

00:27:44.040 --> 00:27:49.540
<v Chris Gammell>And they're always like, they're, it's been possible for a while to do this kind of thing.

00:27:49.620 --> 00:27:50.080
<v Chris Gammell>Oh yeah, certainly.

00:27:50.080 --> 00:27:53.320
<v Chris Gammell>It's a new thing, but it feels like this is better.

00:27:53.620 --> 00:28:00.580
<v Super Nintendo>So, so the nice thing about RISC-V, like there have been, if you, if you go to opencores.org,

00:28:00.620 --> 00:28:03.380
<v Super Nintendo>you can download like in CPUs and all shapes and forms.

00:28:03.380 --> 00:28:04.500
<v Super Nintendo>Yeah, you can get an M0, right?

00:28:04.500 --> 00:28:05.220
<v Super Nintendo>You can get like a.

00:28:05.880 --> 00:28:07.320
<v Super Nintendo>Nowadays you can get an M0.

00:28:07.400 --> 00:28:07.540
<v Super Nintendo>Yeah.

00:28:07.540 --> 00:28:18.620
<v Super Nintendo>But at least before RISC-V was there, I feel it was really hard to get an IP that was unencumbered

00:28:18.620 --> 00:28:25.360
<v Super Nintendo>by, if I use this in a product that grows anywhere near big, then I will have Intel or ARM or whatever.

00:28:25.360 --> 00:28:27.120
<v Super Nintendo>Or open a can of lawyers.

00:28:27.420 --> 00:28:27.660
<v Super Nintendo>That's right.

00:28:28.300 --> 00:28:28.480
<v Super Nintendo>Yeah.

00:28:28.660 --> 00:28:31.240
<v Super Nintendo>So, or, or was actually usable.

00:28:31.240 --> 00:28:37.800
<v Super Nintendo>Like you would have a few CPU cores that were really nice, but they were made by one random

00:28:37.800 --> 00:28:44.180
<v Super Nintendo>guy who also developed the ISA and there is a GCC, you know, fork that never has been

00:28:44.180 --> 00:28:46.860
<v Super Nintendo>mainlined, that has been updated like 10 years ago.

00:28:46.960 --> 00:28:47.120
<v Super Nintendo>That's right.

00:28:47.260 --> 00:28:47.360
<v Super Nintendo>Yeah.

00:28:47.800 --> 00:28:50.980
<v Super Nintendo>That, that, that, that, that's all, you know, those were the choices you had.

00:28:50.980 --> 00:28:55.140
<v Super Nintendo>Or like the third choice was to go with something antique like a Z80 and.

00:28:55.140 --> 00:28:55.320
<v Super Nintendo>Right, right.

00:28:55.700 --> 00:28:59.620
<v Chris Gammell>8051 with, you know, hopefully again, the GCC is all set up for it.

00:29:00.220 --> 00:29:01.160
<v Super Nintendo>Exactly, exactly.

00:29:02.160 --> 00:29:12.060
<v Super Nintendo>But the thing that RISC-V has done is allow, so just as a user, what I see is that there's

00:29:12.060 --> 00:29:17.800
<v Super Nintendo>an explosion of RISC-V processors in all shapes and forms from, from really small to, to, to

00:29:17.800 --> 00:29:23.840
<v Super Nintendo>really large and most of them I can just download and plunk in my design and all of them are

00:29:23.840 --> 00:29:24.280
<v Super Nintendo>RISC-V.

00:29:24.500 --> 00:29:29.760
<v Super Nintendo>So I can just go and download the RISC-V GCC thing, which is actively being developed on

00:29:29.760 --> 00:29:33.480
<v Super Nintendo>by a lot of people, which is stable, which is, you know, solid.

00:29:33.480 --> 00:29:35.320
<v Chris Gammell>Well defined and open and yeah.

00:29:35.520 --> 00:29:35.960
<v Super Nintendo>Exactly.

00:29:36.300 --> 00:29:40.200
<v Super Nintendo>And, and, and because everything is open and just given away for free, I don't have to worry

00:29:40.200 --> 00:29:43.480
<v Super Nintendo>about like in a can of lawyers ending up at my front door.

00:29:43.600 --> 00:29:43.700
<v Super Nintendo>Yeah.

00:29:43.700 --> 00:29:47.220
<v Super Nintendo>So that's, that's the big advantage that I think RISC-V has.

00:29:47.400 --> 00:29:47.460
<v Super Nintendo>Yeah.

00:29:47.680 --> 00:29:47.900
<v Chris Gammell>Right.

00:29:48.020 --> 00:29:50.520
<v Chris Gammell>It's like agency and it's also like, uh, yeah.

00:29:51.160 --> 00:29:51.800
<v Chris Gammell>Freedom to.

00:29:52.160 --> 00:29:52.820
<v Chris Gammell>Yeah, for sure.

00:29:52.960 --> 00:29:55.540
<v Super Nintendo>It's, it's, yeah, you get choice.

00:29:55.620 --> 00:29:59.540
<v Super Nintendo>You get, uh, like in the freedom to pick something because there are actually multiple choices

00:29:59.540 --> 00:30:01.620
<v Super Nintendo>there and, and you get good tool change support.

00:30:01.920 --> 00:30:02.140
<v Chris Gammell>Yeah.

00:30:02.220 --> 00:30:06.120
<v Chris Gammell>And I think that's another thing too, is like having focus too, of like having focus from

00:30:06.120 --> 00:30:08.180
<v Chris Gammell>the community, having, you know, people working on it.

00:30:08.380 --> 00:30:11.040
<v Chris Gammell>It's like this weird kind of like buzz that's kind of like behind you.

00:30:11.040 --> 00:30:14.480
<v Chris Gammell>Like, oh, well it's probably going to be okay versus like, you know, like otherwise it's

00:30:14.480 --> 00:30:19.060
<v Chris Gammell>like you talk to a bunch of vendors and then it's like a feeling of like, well, it seems

00:30:19.060 --> 00:30:23.140
<v Chris Gammell>like they're supporting their customers and I'm paying a lot to pay for their support.

00:30:23.320 --> 00:30:23.780
<v Chris Gammell>And, you know, like.

00:30:24.360 --> 00:30:24.520
<v Super Nintendo>Yeah.

00:30:24.620 --> 00:30:30.920
<v Super Nintendo>It's, it's like, you know, the other thing is that it's not, not, not unprecedented that

00:30:30.920 --> 00:30:35.960
<v Super Nintendo>for instance, a, an architecture has been mainlined in GCC and then drops out because,

00:30:36.240 --> 00:30:37.960
<v Super Nintendo>you know, there's, there's no one around.

00:30:37.960 --> 00:30:38.180
<v Super Nintendo>Falls in favor.

00:30:38.680 --> 00:30:39.580
<v Super Nintendo>Yeah, exactly.

00:30:39.580 --> 00:30:43.340
<v Super Nintendo>And, and, and, and the manufacturer doesn't really care about the CPU thing.

00:30:43.440 --> 00:30:46.760
<v Super Nintendo>So it doesn't send any patches and it kind of sort of erodes away.

00:30:46.920 --> 00:30:51.440
<v Super Nintendo>And at some point the maintainers just go like, yeah, it's not going to be in the next

00:30:51.440 --> 00:30:51.720
<v Super Nintendo>release.

00:30:51.840 --> 00:30:52.320
<v Super Nintendo>Right, right.

00:30:52.500 --> 00:30:55.580
<v Chris Gammell>It's a natural selection for, for processors.

00:30:55.940 --> 00:30:56.580
<v Super Nintendo>Yeah, more or less.

00:30:56.760 --> 00:30:56.940
<v Chris Gammell>Yeah.

00:30:57.020 --> 00:30:57.580
<v Chris Gammell>That's crazy.

00:30:58.320 --> 00:30:59.600
<v Chris Gammell>Well, Sprite, thank you for this great badge.

00:30:59.640 --> 00:31:00.240
<v Chris Gammell>This has been great.

00:31:00.300 --> 00:31:00.880
<v Chris Gammell>It's good to see you.

00:31:01.020 --> 00:31:02.660
<v Chris Gammell>It's good hearing about everything you're doing.

00:31:02.920 --> 00:31:04.220
<v Chris Gammell>And thanks for telling us about the badge.

00:31:04.460 --> 00:31:04.960
<v Chris Gammell>Hey, you're welcome.

00:31:04.960 --> 00:31:05.960
<v Super Nintendo>Hello.

00:31:05.960 --> 00:31:06.960
<v Chris Gammell>Hello.

00:31:06.960 --> 00:31:13.260
<v Chris Gammell>We're back from a, in a very quiet room at, at Supply Frame during a Supercon 2019, thankfully.

00:31:13.260 --> 00:31:13.960
<v Chris Gammell>And I'm here with...

00:31:13.960 --> 00:31:15.340
<v Dave Jones>Sylvain Minot.

00:31:15.340 --> 00:31:16.340
<v Chris Gammell>Sylvain Minot.

00:31:16.340 --> 00:31:17.340
<v Chris Gammell>Sylvain.

00:31:17.340 --> 00:31:18.340
<v Chris Gammell>Sylvain.

00:31:18.340 --> 00:31:19.340
<v Chris Gammell>And what, what are you working on here?

00:31:19.340 --> 00:31:23.020
<v Dave Jones>Um, so I'm doing great at the moment.

00:31:23.020 --> 00:31:24.020
<v Dave Jones>Sylvain Minot.

00:31:24.020 --> 00:31:30.680
<v Dave Jones>And I'm helping with the FPGA badge workshop, um, that are, you know, helping people hack

00:31:30.680 --> 00:31:33.800
<v Dave Jones>on the, the brand new FPGA.

00:31:33.980 --> 00:31:34.840
<v Dave Jones>This thing is beautiful.

00:31:35.220 --> 00:31:35.900
<v Chris Gammell>It's really nice.

00:31:36.040 --> 00:31:36.640
<v Dave Jones>It's really nice.

00:31:36.760 --> 00:31:36.940
<v Dave Jones>Yeah.

00:31:37.300 --> 00:31:38.580
<v Dave Jones>And it's very powerful as well, so.

00:31:38.780 --> 00:31:39.100
<v Chris Gammell>Yeah.

00:31:39.280 --> 00:31:40.540
<v Chris Gammell>Well, so we just, I just talked to Sprite.

00:31:40.720 --> 00:31:41.940
<v Chris Gammell>I just did an interview with him.

00:31:42.320 --> 00:31:43.500
<v Chris Gammell>And, uh, it's big.

00:31:43.600 --> 00:31:46.400
<v Chris Gammell>I mean, like 45,000 LUTs is like not a small part.

00:31:46.760 --> 00:31:47.160
<v Dave Jones>No, no.

00:31:47.160 --> 00:31:55.040
<v Dave Jones>It's definitely, um, a very decently sized FPGA, um, and half of it is still free despite

00:31:55.040 --> 00:31:57.160
<v Dave Jones>everything we've crammed on it.

00:31:57.160 --> 00:32:00.120
<v Dave Jones>So, which means that if people want to do, like, advanced applications, stuff like that,

00:32:00.280 --> 00:32:03.160
<v Dave Jones>they won't run into, um, like, space limitation.

00:32:03.340 --> 00:32:03.520
<v Chris Gammell>Yeah.

00:32:03.680 --> 00:32:04.240
<v Chris Gammell>Anytime soon.

00:32:04.420 --> 00:32:07.500
<v Chris Gammell>And you did the, uh, the DFU for this thing?

00:32:07.760 --> 00:32:08.200
<v Dave Jones>So, yeah.

00:32:08.380 --> 00:32:11.860
<v Dave Jones>Uh, so what I did for this badge is, uh, the DFU bootloader.

00:32:12.560 --> 00:32:12.840
<v Dave Jones>Um.

00:32:13.040 --> 00:32:14.020
<v Dave Jones>What does DFU stand for?

00:32:14.040 --> 00:32:14.280
<v Dave Jones>Oh, yeah.

00:32:14.320 --> 00:32:17.080
<v Dave Jones>So, uh, DFU is, uh, device firmware upgrade.

00:32:17.160 --> 00:32:17.440
<v Dave Jones>I think.

00:32:17.800 --> 00:32:22.560
<v Dave Jones>Uh, which is just a standard way to, um, upload new firmwares onto the badge, basically.

00:32:22.560 --> 00:32:29.600
<v Dave Jones>So, it's, uh, what allow people to replace the FPGA bitstream and the, um, the, uh, soft

00:32:29.600 --> 00:32:34.000
<v Dave Jones>core application that is running on the badge with hopefully minimal risk of actually breaking

00:32:34.000 --> 00:32:37.080
<v Dave Jones>the badge and needing a JTAG adapter to restore it.

00:32:37.620 --> 00:32:37.920
<v Dave Jones>That's good.

00:32:38.060 --> 00:32:38.180
<v Chris Gammell>Yeah.

00:32:38.220 --> 00:32:40.360
<v Chris Gammell>I think I've used some particle devices that have that.

00:32:40.400 --> 00:32:42.420
<v Chris Gammell>There's a bunch of devices that are in the market that have that.

00:32:42.480 --> 00:32:43.400
<v Chris Gammell>But it's like, hold a button.

00:32:43.600 --> 00:32:44.640
<v Chris Gammell>It goes into some blinky mode.

00:32:44.680 --> 00:32:45.660
<v Chris Gammell>And you're like, okay, now we're good.

00:32:45.800 --> 00:32:46.160
<v Chris Gammell>Exactly.

00:32:46.360 --> 00:32:46.540
<v Chris Gammell>Yeah.

00:32:46.900 --> 00:32:47.100
<v Dave Jones>Yeah.

00:32:47.160 --> 00:32:47.760
<v Dave Jones>And, um.

00:32:48.020 --> 00:32:51.120
<v Chris Gammell>So, what did that take to actually write that for, for this, uh, scenario?

00:32:51.580 --> 00:33:00.100
<v Dave Jones>Well, um, not that much because I, so I, I'd previously written a USB device core for FPGA,

00:33:00.360 --> 00:33:03.680
<v Dave Jones>which is actually the device, the USB core which is used in the main firmware as well.

00:33:03.800 --> 00:33:03.980
<v Dave Jones>Okay.

00:33:03.980 --> 00:33:14.900
<v Dave Jones>Um, and so I already had, uh, this, uh, USB core and a DFU enabled firmware for another device

00:33:14.900 --> 00:33:16.900
<v Dave Jones>for an ice 40, uh, FPGA.

00:33:17.120 --> 00:33:17.500
<v Dave Jones>Oh, okay.

00:33:17.500 --> 00:33:20.700
<v Dave Jones>And so I mostly had to adapt to, you know, uh, and so I mostly had to adapt a few things

00:33:20.700 --> 00:33:27.880
<v Dave Jones>for the ECP5, um, and then try to optimize it for the badge, uh, basically make it faster.

00:33:28.180 --> 00:33:28.360
<v Dave Jones>Okay.

00:33:28.360 --> 00:33:31.400
<v Dave Jones>Try to minimize the, uh, the flash time.

00:33:31.780 --> 00:33:32.020
<v Chris Gammell>Okay.

00:33:32.180 --> 00:33:32.500
<v Chris Gammell>Yeah.

00:33:32.640 --> 00:33:32.780
<v Chris Gammell>Yeah.

00:33:32.780 --> 00:33:32.880
<v Chris Gammell>Yeah.

00:33:32.880 --> 00:33:33.320
<v Chris Gammell>Yeah.

00:33:33.320 --> 00:33:33.940
<v Chris Gammell>That's interesting.

00:33:33.940 --> 00:33:38.600
<v Chris Gammell>So, so this is like a piece of IP that you had that you use on other projects.

00:33:38.780 --> 00:33:39.020
<v Dave Jones>Yes.

00:33:39.140 --> 00:33:40.140
<v Chris Gammell>And it was repurposable.

00:33:40.620 --> 00:33:40.820
<v Dave Jones>Yeah.

00:33:40.880 --> 00:33:41.040
<v Dave Jones>Yeah.

00:33:41.160 --> 00:33:42.280
<v Chris Gammell>So what does that process look like?

00:33:42.320 --> 00:33:46.740
<v Chris Gammell>Because like that is kind of the promise of, I mean, I guess it's the promise of even C and

00:33:46.740 --> 00:33:49.880
<v Chris Gammell>writing, you know, being able to, you know, retarget devices and, you know, port stuff.

00:33:49.880 --> 00:33:52.320
<v Chris Gammell>But like FPGAs kind of take that to another level.

00:33:52.820 --> 00:33:52.900
<v Dave Jones>Yeah.

00:33:52.980 --> 00:33:53.140
<v Dave Jones>Yeah.

00:33:53.140 --> 00:33:53.400
<v Dave Jones>Definitely.

00:33:53.920 --> 00:34:00.720
<v Dave Jones>So what it took, uh, in this specific instance, um, is there are a few, um, so you, you described

00:34:00.720 --> 00:34:04.400
<v Dave Jones>your, you know, your, uh, your hardware in, uh, HDL, right?

00:34:04.400 --> 00:34:05.340
<v Dave Jones>In this case, Verilog.

00:34:05.840 --> 00:34:11.100
<v Dave Jones>Um, most of it is generic and, uh, the synthesis tool is going to do the work of translating that

00:34:11.100 --> 00:34:14.600
<v Dave Jones>generic description into, uh, hardware specific, um, primitives.

00:34:15.000 --> 00:34:19.860
<v Dave Jones>Uh, but for some of them, um, the tool isn't really ready yet to do it.

00:34:19.880 --> 00:34:20.600
<v Dave Jones>Perfectly.

00:34:20.740 --> 00:34:24.420
<v Dave Jones>And so you help him, you help the tool by instantiating primitives.

00:34:24.800 --> 00:34:31.080
<v Dave Jones>Uh, in this case, the, the two things that were instantiated manually were, um, block ramps.

00:34:31.080 --> 00:34:37.640
<v Dave Jones>So in the FPGA, you have a, uh, like a small amount of ramps, um, that you can use that they're

00:34:37.640 --> 00:34:41.420
<v Dave Jones>really small memory, like four kilobits or 16 kilobits and that kind of stuff.

00:34:41.760 --> 00:34:44.960
<v Dave Jones>And these are, uh, vendor specific.

00:34:45.600 --> 00:34:46.240
<v Dave Jones>Uh, right.

00:34:46.240 --> 00:34:49.940
<v Dave Jones>And so I just had to replace the specific primitive that I was using in the, for the

00:34:49.940 --> 00:34:52.740
<v Dave Jones>ICE 40 by the equivalent for the ECP5.

00:34:53.520 --> 00:34:53.920
<v Dave Jones>Um.

00:34:54.260 --> 00:34:57.320
<v Chris Gammell>And when you say primitive, is this almost like a reserved word in C or something?

00:34:57.320 --> 00:34:57.780
<v Dave Jones>Yeah, exactly.

00:34:58.000 --> 00:34:59.100
<v Dave Jones>It's, it's like, uh.

00:34:59.100 --> 00:35:03.300
<v Chris Gammell>It's like a magic word to just use what the Xilinx version is or the Lattice version is.

00:35:03.300 --> 00:35:07.580
<v Dave Jones>It's basically, uh, like, you know, Verilog, it's a, it's a bunch of modules that you connect

00:35:07.580 --> 00:35:08.140
<v Dave Jones>together, right?

00:35:08.140 --> 00:35:09.840
<v Dave Jones>And you describe those modules.

00:35:10.360 --> 00:35:15.020
<v Dave Jones>And some, some of these modules, you actually, they are actually like black boxes that will

00:35:15.020 --> 00:35:17.820
<v Dave Jones>just get converted to actual blocks in the hardware.

00:35:18.000 --> 00:35:18.360
<v Dave Jones>Yeah, right.

00:35:18.360 --> 00:35:19.120
<v Dave Jones>They're just there.

00:35:19.200 --> 00:35:19.640
<v Dave Jones>They exist.

00:35:19.860 --> 00:35:20.020
<v Chris Gammell>Right.

00:35:20.200 --> 00:35:21.040
<v Dave Jones>You don't have to describe it.

00:35:21.040 --> 00:35:22.320
<v Chris Gammell>It's like an API for existing hardware.

00:35:22.320 --> 00:35:22.600
<v Chris Gammell>Exactly.

00:35:22.800 --> 00:35:22.940
<v Chris Gammell>Yeah.

00:35:23.220 --> 00:35:27.900
<v Dave Jones>And so the kind of hardware block that you would find in the FPGA are, well, mostly the

00:35:27.900 --> 00:35:28.280
<v Dave Jones>RAMs.

00:35:28.620 --> 00:35:31.460
<v Dave Jones>You also have, like, a DSP block, like hardware multipliers.

00:35:31.460 --> 00:35:31.760
<v Dave Jones>Max, right?

00:35:31.760 --> 00:35:32.160
<v Dave Jones>I remember those.

00:35:32.340 --> 00:35:33.560
<v Dave Jones>Yeah, multiply, accumulates, right?

00:35:33.560 --> 00:35:34.020
<v Dave Jones>Multiply, accumulates.

00:35:34.100 --> 00:35:34.220
<v Dave Jones>Yeah.

00:35:34.220 --> 00:35:39.680
<v Dave Jones>Um, and, and the other one that I had to deal with here is the IO blocks, like how to

00:35:39.680 --> 00:35:45.880
<v Dave Jones>talk to the outside world is often, um, specific to a, to an FPGA family.

00:35:46.180 --> 00:35:48.600
<v Dave Jones>Um, and so that was really minor adaptations.

00:35:49.080 --> 00:35:50.200
<v Dave Jones>Um, and yeah.

00:35:50.320 --> 00:35:55.100
<v Dave Jones>And the rest was, you know, dealing with the specificity of the badjack, which pins, you

00:35:55.100 --> 00:35:56.020
<v Dave Jones>know, connected to the flash.

00:35:56.100 --> 00:35:56.240
<v Dave Jones>Right, right.

00:35:56.280 --> 00:35:57.820
<v Dave Jones>The mapping to the pin that it is.

00:35:58.220 --> 00:36:01.100
<v Dave Jones>Mostly it's dealing with the external, external world.

00:36:01.440 --> 00:36:01.680
<v Chris Gammell>Right.

00:36:01.800 --> 00:36:03.640
<v Chris Gammell>Whatever sprite decided the pin would be hooked up to.

00:36:03.640 --> 00:36:03.820
<v Chris Gammell>Exactly.

00:36:03.820 --> 00:36:04.120
<v Chris Gammell>Yeah.

00:36:04.700 --> 00:36:04.780
<v Chris Gammell>Yeah.

00:36:04.780 --> 00:36:05.040
<v Chris Gammell>Okay.

00:36:05.200 --> 00:36:05.480
<v Chris Gammell>Interesting.

00:36:06.260 --> 00:36:06.400
<v Chris Gammell>Yeah.

00:36:06.560 --> 00:36:10.000
<v Chris Gammell>And the, uh, what's the other, oh, CERT is the other one that I've, I've, I think I've

00:36:10.000 --> 00:36:10.660
<v Chris Gammell>worked on in the past.

00:36:10.700 --> 00:36:12.120
<v Chris Gammell>Isn't that like usually like a targetable block?

00:36:12.280 --> 00:36:13.860
<v Chris Gammell>Like a S-E-R-D-E-S?

00:36:14.300 --> 00:36:14.520
<v Chris Gammell>A serial?

00:36:14.520 --> 00:36:14.840
<v Chris Gammell>Oh, yeah, yeah.

00:36:14.840 --> 00:36:15.000
<v Chris Gammell>A serial serial.

00:36:15.000 --> 00:36:15.280
<v Chris Gammell>A serial serial.

00:36:15.280 --> 00:36:17.320
<v Dave Jones>It's actually part of the IO.

00:36:17.640 --> 00:36:17.760
<v Dave Jones>Yeah.

00:36:17.880 --> 00:36:18.160
<v Dave Jones>Oh, right.

00:36:18.160 --> 00:36:23.760
<v Dave Jones>Most of the, most of the time the IO, they can, um, you know, just take a signal and put

00:36:23.760 --> 00:36:29.380
<v Dave Jones>it to the outside, or they can also, um, have a flip-flop directly inside the IO to kind

00:36:29.380 --> 00:36:33.240
<v Dave Jones>of guarantee the, the, uh, the timing, you know, so you have guaranteed a set

00:36:33.240 --> 00:36:34.560
<v Dave Jones>up at all times.

00:36:34.700 --> 00:36:34.840
<v Dave Jones>Right.

00:36:34.840 --> 00:36:35.760
<v Dave Jones>Uh, that kind of stuff.

00:36:35.760 --> 00:36:40.960
<v Dave Jones>And then sometimes you want to take multiple bits and serialize them very fast.

00:36:41.080 --> 00:36:45.700
<v Dave Jones>So you input eight bits and then the, the IO block will basically serialize them into,

00:36:45.700 --> 00:36:47.300
<v Dave Jones>uh, eight sequential bits for you.

00:36:47.420 --> 00:36:48.540
<v Dave Jones>That's the, that's kind of stuff.

00:36:48.540 --> 00:36:48.760
<v Dave Jones>Uh-huh.

00:36:48.760 --> 00:36:49.120
<v Chris Gammell>Yeah.

00:36:49.240 --> 00:36:49.800
<v Chris Gammell>That's great.

00:36:50.040 --> 00:36:50.400
<v Dave Jones>That's great.

00:36:50.660 --> 00:36:53.400
<v Dave Jones>That's what's used on the badge for the HDMI, for instance, I think.

00:36:53.580 --> 00:36:53.720
<v Dave Jones>Right.

00:36:53.840 --> 00:36:53.980
<v Dave Jones>Right.

00:36:54.100 --> 00:36:54.260
<v Dave Jones>Yeah.

00:36:54.660 --> 00:36:55.020
<v Chris Gammell>Okay.

00:36:55.400 --> 00:36:57.580
<v Chris Gammell>And so you do, you do this professionally too?

00:36:58.080 --> 00:36:58.340
<v Dave Jones>Yes.

00:36:58.360 --> 00:36:58.620
<v Dave Jones>Yes.

00:36:58.620 --> 00:36:59.160
<v Dave Jones>I do that.

00:36:59.280 --> 00:37:02.600
<v Dave Jones>Um, it's actually my, my first job was, uh, doing FPGA stuff.

00:37:02.600 --> 00:37:06.900
<v Chris Gammell>Um, so, so in a commercial context, I mean, we don't need to talk about the specifics

00:37:06.900 --> 00:37:11.180
<v Chris Gammell>of your companies, but like they, uh, but do you use the open tool chains for that?

00:37:11.240 --> 00:37:14.580
<v Chris Gammell>Or what is, um, what is your take on the industry with FPGA?

00:37:15.020 --> 00:37:21.280
<v Dave Jones>So at the moment, uh, I don't use this, the, the open tool chain, uh, synthesis, uh, for

00:37:21.280 --> 00:37:26.720
<v Dave Jones>my work because I mostly work on Xilinx and the tool chain is currently not, not there,

00:37:26.800 --> 00:37:30.180
<v Dave Jones>not in a state that I can, uh, uh, use it professionally.

00:37:30.180 --> 00:37:37.980
<v Dave Jones>I do use, um, iVerilog, for instance, like for simulation, um, I use that because, well,

00:37:38.020 --> 00:37:39.980
<v Dave Jones>honestly, model sim just costs too much money.

00:37:40.160 --> 00:37:40.260
<v Dave Jones>Yeah.

00:37:40.400 --> 00:37:40.560
<v Dave Jones>True.

00:37:41.160 --> 00:37:43.440
<v Dave Jones>And iVerilog is perfectly suitable for my needs.

00:37:43.560 --> 00:37:44.480
<v Dave Jones>And so I use that.

00:37:45.080 --> 00:37:53.640
<v Dave Jones>Um, but if I, um, the state of the tool chain for the ICE 40 and for the ECP5 is starting

00:37:53.640 --> 00:37:58.980
<v Dave Jones>to reach a point where it would actually be usable for, uh, some commercial projects.

00:37:58.980 --> 00:38:02.220
<v Chris Gammell>Right. So if you had a commercial project that was, had a lattice part on it.

00:38:02.640 --> 00:38:08.580
<v Dave Jones>There are, there are, you know, something it doesn't handle yet, um, perfectly. Um, mostly

00:38:08.580 --> 00:38:14.080
<v Dave Jones>there are very advanced features like dealing with multiple, uh, multiple clock domains.

00:38:14.180 --> 00:38:19.040
<v Dave Jones>You have to be able to constrain, uh, the, the paths between different clock domains.

00:38:19.140 --> 00:38:23.220
<v Dave Jones>At the moment, the tool will report them, but doesn't allow you to constrain them.

00:38:23.220 --> 00:38:29.700
<v Dave Jones>Uh, and the other thing is IO timing. Uh, so when you have a, um, signal inside the FPGA,

00:38:30.000 --> 00:38:33.280
<v Dave Jones>you need to know, you know, how many nanoseconds it's going to get to the outside.

00:38:33.400 --> 00:38:33.520
<v Dave Jones>Yeah.

00:38:33.540 --> 00:38:37.000
<v Dave Jones>Uh, that kind of stuff, uh, when you're talking with, uh, high speed interfaces.

00:38:37.000 --> 00:38:46.360
<v Dave Jones>Um, and for that step, we actually still have to, um, rely either on the proprietary tools,

00:38:46.360 --> 00:38:49.560
<v Dave Jones>um, or just open.

00:38:49.660 --> 00:38:50.480
<v Chris Gammell>Take a shot. Yeah.

00:38:50.600 --> 00:38:54.720
<v Chris Gammell>Yeah. Right. That's, that's a tough, tough selling business, right? Where you're like,

00:38:54.820 --> 00:38:56.000
<v Chris Gammell>no, this needs, this needs to work.

00:38:56.000 --> 00:38:56.740
<v Chris Gammell>Yeah, exactly.

00:38:56.740 --> 00:39:04.240
<v Chris Gammell>Yeah. Yeah. That's true. Hmm. Well, uh, it's interesting. Like one of the things that's

00:39:04.240 --> 00:39:07.740
<v Chris Gammell>going to be happening this weekend is Tim's going to give a talk about, um, Tim Ansel.

00:39:08.020 --> 00:39:08.240
<v Chris Gammell>Yeah.

00:39:08.320 --> 00:39:09.780
<v Chris Gammell>We'll be giving a talk about design links.

00:39:10.180 --> 00:39:10.440
<v Chris Gammell>Yeah.

00:39:10.580 --> 00:39:13.100
<v Chris Gammell>Seven is, uh, seven series. I don't actually know.

00:39:13.240 --> 00:39:13.380
<v Chris Gammell>Yeah.

00:39:13.440 --> 00:39:13.960
<v Chris Gammell>The seven series.

00:39:14.100 --> 00:39:14.240
<v Chris Gammell>Yeah.

00:39:14.240 --> 00:39:17.380
<v Dave Jones>I mean, I think, or the architecture for the seven series is pretty similar.

00:39:17.600 --> 00:39:17.840
<v Chris Gammell>Okay.

00:39:17.920 --> 00:39:22.760
<v Dave Jones>And so I think they're targeting one specific part at the moment, but most of it will be applicable

00:39:22.760 --> 00:39:23.500
<v Dave Jones>to translate.

00:39:23.500 --> 00:39:23.820
<v Dave Jones>Yeah.

00:39:23.820 --> 00:39:24.020
<v Dave Jones>Yeah.

00:39:24.180 --> 00:39:24.540
<v Chris Gammell>Okay.

00:39:24.880 --> 00:39:25.100
<v Chris Gammell>Okay.

00:39:25.760 --> 00:39:25.980
<v Chris Gammell>Huh.

00:39:25.980 --> 00:39:32.020
<v Chris Gammell>So what does it look like then when you're, um, so now you're switching back and forth

00:39:32.020 --> 00:39:34.420
<v Chris Gammell>between like open tools and proprietary tools.

00:39:34.500 --> 00:39:38.140
<v Chris Gammell>What does that look like then for you? Is it, is it kind of just you're used to it or what

00:39:38.140 --> 00:39:38.600
<v Chris Gammell>does it feel like?

00:39:38.600 --> 00:39:44.400
<v Dave Jones>Yeah. I'm kind of used to it because, um, ever since I've been, uh, using the, um, so I'm

00:39:44.400 --> 00:39:49.440
<v Dave Jones>using mostly the design tools, uh, for, uh, work, but I never use the GUI.

00:39:49.560 --> 00:39:54.280
<v Dave Jones>Like my flow was always make file based and using the command line tool and stuff like

00:39:54.280 --> 00:40:01.600
<v Dave Jones>that. So except for the fact that, um, it takes a little more time to build. Uh, it's pretty

00:40:01.600 --> 00:40:04.900
<v Dave Jones>much the same. Like I just type make at the end. I've got my bit stream, right?

00:40:04.900 --> 00:40:05.120
<v Dave Jones>Yeah.

00:40:05.120 --> 00:40:10.620
<v Dave Jones>It's just, uh, yeah. I, you only don't, yeah, I need a license basically. That's, that's,

00:40:10.620 --> 00:40:15.760
<v Dave Jones>that's, that's, and I need to download like what 80 gigabyte. I think that is still a

00:40:15.760 --> 00:40:21.760
<v Dave Jones>thing. Um, but other than that, it's, it's fairly similar, um, at the moment, at least

00:40:21.760 --> 00:40:27.760
<v Dave Jones>for me, it, it, the setup is much, you know, if you start from nothing, it's much easier

00:40:27.760 --> 00:40:34.640
<v Dave Jones>with the open source, uh, tools, I think, uh, because getting a working make file based

00:40:34.640 --> 00:40:42.300
<v Dave Jones>flow for the, um, the propria tool was, uh, yeah, it took some time at the beginning,

00:40:42.300 --> 00:40:47.680
<v Dave Jones>but no, I have it and it works. Um, if you're familiar, if you're familiar with, uh, TCL, it

00:40:47.680 --> 00:40:50.440
<v Dave Jones>might actually be easier for you to use Xalings because everything is TCL based.

00:40:50.440 --> 00:40:52.320
<v Dave Jones>That's right. So it kind of depends.

00:40:52.320 --> 00:40:55.580
<v Chris Gammell>It's TCL for people that haven't seen that before. Yeah. It's, I remember the first time

00:40:55.580 --> 00:41:00.140
<v Chris Gammell>it was like TK, TCL, what, what the hell is this? You know? Yeah. And, uh, but that's

00:41:00.140 --> 00:41:01.680
<v Chris Gammell>like the scripting language that a lot of the FGA uses.

00:41:01.680 --> 00:41:05.920
<v Dave Jones>Exactly. Everything is based, uh, and it's, yeah. It's like a whole, it's not a holdover,

00:41:06.000 --> 00:41:08.360
<v Chris Gammell>but it's just a, it's the chip industry in general uses it a lot.

00:41:08.360 --> 00:41:12.600
<v Dave Jones>I think, I think so. I mean, I'm not, I've only been in the chip industry starting with

00:41:12.600 --> 00:41:17.140
<v Dave Jones>Xilinx, so I've only done then, but I've been told that, yeah, it's, uh, like a

00:41:17.140 --> 00:41:22.520
<v Dave Jones>historic thing that just continues up to today. Right. Well, I mean, yeah, there's

00:41:22.520 --> 00:41:27.840
<v Chris Gammell>so much invested stuff there, so that makes sense. True. So when I saw, I saw you at, uh,

00:41:27.840 --> 00:41:33.020
<v Chris Gammell>CCC camp or CC camp, I guess, um, you were doing some Osmo comm stuff there too. Um, uh,

00:41:33.020 --> 00:41:36.720
<v Dave Jones>yes. Oh, this camp? Yeah. Yeah. Yeah. We saw each other there briefly. Yeah. Sure. Yeah.

00:41:36.720 --> 00:41:40.660
<v Chris Gammell>Of course. I think you were working on some of the, um, the cell service stuff, right? That

00:41:40.660 --> 00:41:45.780
<v Dave Jones>was there. Yes. So, uh, well, I wasn't directly involved in running the cell service, the cell

00:41:45.780 --> 00:41:52.500
<v Dave Jones>service at, uh, at camp that was handled by, uh, another team. Um, I was just working on

00:41:52.500 --> 00:41:57.140
<v Dave Jones>different, uh, projects. Actually one of the projects I'm working on at the moment for

00:41:57.140 --> 00:42:04.120
<v Dave Jones>Osmo comm is sort of related with the CP five. It's, uh, we're trying to use the CPRI radio

00:42:04.120 --> 00:42:11.020
<v Dave Jones>heads. Uh, so, um, in modern cell networks, you will have a, what's called the radio head,

00:42:11.100 --> 00:42:15.260
<v Dave Jones>which is basically the software defined radio that you're going to Mount near the antenna.

00:42:15.260 --> 00:42:20.140
<v Dave Jones>Oh, okay. And then it has like a fiber connection to the base band unit, which does all the protocol

00:42:20.140 --> 00:42:25.760
<v Chris Gammell>stuff. Oh, okay. Okay. And so it's basically piping already encoded data. Exactly. It's, it's

00:42:25.760 --> 00:42:30.920
<v Dave Jones>piping IQ data basically, uh, through fiber. Oh, wow. Um, and then the radio amplification

00:42:30.920 --> 00:42:36.060
<v Chris Gammell>and all the, the putting it into amplifier. Well, I guess that whole signal chain is, is

00:42:36.060 --> 00:42:39.800
<v Dave Jones>the radio head. Exactly. Okay. And so we're trying to use those radio heads on the, on

00:42:39.800 --> 00:42:45.540
<v Dave Jones>their own and talking to them, uh, using an, uh, an ECP five. Wow. Um, and CPRI is, is, is

00:42:45.540 --> 00:42:51.400
<v Dave Jones>the standard to do that. And it specifies a standard, um, like sample format for the IQ

00:42:51.400 --> 00:42:57.780
<v Dave Jones>data. But of course there is also the encapsulated vendor specific commands. Okay. Because, um,

00:42:58.060 --> 00:43:02.020
<v Dave Jones>like to start up the radio at Talib, uh, what power to transmit, uh, what frequency to transmit

00:43:02.020 --> 00:43:06.260
<v Dave Jones>on. All of that is not specified, which I knew we actually need to find a way to sniff

00:43:06.260 --> 00:43:11.380
<v Dave Jones>a multi gigabit link to, uh, see exactly how do this. Right. Right. Cause you could just

00:43:11.380 --> 00:43:14.400
<v Dave Jones>copy the package you're saying. Exactly. You need to see what they are first. We have both

00:43:14.400 --> 00:43:20.480
<v Dave Jones>side and we're trying to basically sniff the link between using the ECP five. For that gigabit

00:43:20.480 --> 00:43:25.900
<v Dave Jones>link to the, yeah. Wow. I mean, the ECP five is a variant, uh, with gigabit transceivers.

00:43:26.280 --> 00:43:32.780
<v Dave Jones>And so we basically plug one SFP on one side, one SFP on the other, plug both. That's the

00:43:32.780 --> 00:43:36.200
<v Dave Jones>theory. I mean, at the moment we haven't actually tried it yet. We're, we're, we're trying to

00:43:36.200 --> 00:43:41.220
<v Dave Jones>get the, uh, the third S up and running with the correct rate and everything to get the link

00:43:41.220 --> 00:43:48.540
<v Dave Jones>up. Wow. And, uh, sorry, SFP is SFP is, uh, like a small fact pluggable. It's like those

00:43:48.540 --> 00:43:53.040
<v Dave Jones>small fiber modules like that are standard that you just plug off the shelf. Yeah. They're

00:43:53.040 --> 00:43:58.620
<v Dave Jones>off the shelf thing. You can buy them for like five bucks on eBay. Okay. They, they take

00:43:58.620 --> 00:44:04.000
<v Chris Gammell>the electrical signal and convert it to the optical thing. Cool. That's great. How'd you

00:44:04.000 --> 00:44:09.180
<v Dave Jones>get involved in that? Uh, oh wow. I can't remember. Uh, in a smoke home or in the, in the, in

00:44:09.180 --> 00:44:13.220
<v Dave Jones>that particular. Well, either one. Yeah. Yeah. So, um, that particular project, honestly,

00:44:13.220 --> 00:44:18.260
<v Dave Jones>I don't remember. Um, I think I was just curious about how the CPRI radio heads work

00:44:18.260 --> 00:44:25.300
<v Dave Jones>because they, they became the, the great radios because they, they have like, uh, powerful

00:44:25.300 --> 00:44:31.180
<v Dave Jones>amplifiers, great filters, like a, it's a very good hardware. Yeah. That sounds like you

00:44:31.180 --> 00:44:33.740
<v Chris Gammell>could do any, I mean, software defines, you could do a lot of things with it. And you

00:44:33.740 --> 00:44:38.620
<v Dave Jones>can buy them used for like 200 bucks or something. Oh wow. Yes. And for that, you get like an 80

00:44:38.620 --> 00:44:43.900
<v Dave Jones>watt amplifier that can transmit with, wow. And like multi gig kind of like multi gigahertz

00:44:43.900 --> 00:44:49.080
<v Dave Jones>kind of. Yeah, exactly. That's a, with like a wide bandwidth. I think the, some have like

00:44:49.080 --> 00:44:55.600
<v Dave Jones>up to 80. You could really make the FCC upset. Yes. I mean, it's good you don't. I mean, yeah. But,

00:44:55.680 --> 00:45:00.540
<v Dave Jones>uh, yeah, our goal is obviously to be able to use those radio heads with the, the open source

00:45:00.540 --> 00:45:05.860
<v Dave Jones>base station we have for GSM, LTE, like a SRS, LTE, that kind of stuff. Yeah. Cause if people

00:45:05.860 --> 00:45:10.980
<v Chris Gammell>don't know at a chaos camp and then one year at tour camp, I think as well, they have maybe

00:45:10.980 --> 00:45:14.540
<v Dave Jones>at Congress too, do they have this? At Congress we do GSM. Yeah. Yeah. Yeah. So it's like

00:45:14.540 --> 00:45:20.560
<v Dave Jones>a totally on its own network, right? Yeah. Yeah. We, we run, uh, um, GSM network for several

00:45:20.560 --> 00:45:27.680
<v Dave Jones>years. Uh, for a couple of years now, we also run a 3G network and for the first time at a

00:45:27.680 --> 00:45:32.460
<v Dave Jones>camp this year, we actually run an LTE network in addition. So we had 2G, 3G and 4G coverage

00:45:32.460 --> 00:45:38.460
<v Dave Jones>at the camp. That's trippy, man. Uh, using, um, yeah, open source, uh, software. Yeah.

00:45:38.520 --> 00:45:43.060
<v Chris Gammell>But not 5G because in my opinion, 5G doesn't exist yet. Well, I haven't, I haven't, yeah,

00:45:43.060 --> 00:45:48.140
<v Chris Gammell>I haven't seen anything yet. Uh, yeah. Yeah. Sorry. I just love 5G. Yeah. It just doesn't

00:45:48.140 --> 00:45:52.180
<v Chris Gammell>exist. It's just not a thing yet. I know it's a thing, but like, I haven't seen it yet.

00:45:52.180 --> 00:46:01.300
<v Chris Gammell>Yeah. Right. Right. Right. Uh, yeah, that's, that's cool though. Um, so, uh, I lost my train

00:46:01.300 --> 00:46:06.900
<v Chris Gammell>of thought already. Uh, Osmocom. Oh, that was what it was. So Osmocom, I had first been

00:46:06.900 --> 00:46:13.460
<v Chris Gammell>introduced to that through, I think HackRF also ties into that. Um, so wait, I mean, there

00:46:13.460 --> 00:46:17.020
<v Chris Gammell>was some of like the, I think maybe it's the receiver. They have a driver. The driver.

00:46:17.020 --> 00:46:25.160
<v Dave Jones>So the, the story behind, uh, that is a, it's a little funny. So a long time ago, um,

00:46:25.160 --> 00:46:30.480
<v Dave Jones>or some people in Osmocom, they, we wanted to make like a very cheap receiver only SDR.

00:46:30.880 --> 00:46:37.200
<v Dave Jones>Okay. That's what that was called Osmo SDR. Okay. And that was, uh, like, uh, an arm with

00:46:37.200 --> 00:46:43.720
<v Dave Jones>an external ADC and an Elenix tuner or something. Yeah. And we've, we were working on that, the

00:46:43.720 --> 00:46:50.740
<v Dave Jones>firmware for it and a new radio driver for it. And not long after, I mean, not actually

00:46:50.740 --> 00:46:56.680
<v Dave Jones>at the same time, like roughly the same, in same timeframe. Um, uh, Steve, uh, Steve

00:46:56.680 --> 00:47:05.540
<v Dave Jones>McGrath, um, actually, uh, you know, made, um, actual SDR basically. Oh yeah. Yeah. So

00:47:05.540 --> 00:47:10.300
<v Dave Jones>it's like finding those. Yeah, exactly. And so at that point that kind of made the Osmo

00:47:10.300 --> 00:47:14.780
<v Dave Jones>SDR project a little bit irrelevant because there was no way we were going to compete in

00:47:14.780 --> 00:47:20.260
<v Dave Jones>price. 20 bucks or whatever it is. Yeah. With, with, with that. Yeah. And although the,

00:47:20.260 --> 00:47:26.000
<v Dave Jones>the receiver was better, the ratio, you know, price performance wasn't, uh, quite there.

00:47:26.000 --> 00:47:29.500
<v Chris Gammell>So that, uh, yeah, it says, I mean, like even just a distribution kind of thing where you

00:47:29.500 --> 00:47:33.780
<v Dave Jones>have all of these DVB tuners that are out there. And they, at the time they were using

00:47:33.780 --> 00:47:37.880
<v Dave Jones>the ATLS, yeah, we're using the same two tuners, the E4000 that we were using. Oh really?

00:47:37.880 --> 00:47:45.660
<v Dave Jones>Okay. Yeah. So, um, so yeah, in the end, uh, um, the, the, the new radio driver that we

00:47:45.660 --> 00:47:52.640
<v Dave Jones>made that was called GR Osmo SDR, uh, uh, uh, Dmitry Stolnikov, uh, basically added an

00:47:52.640 --> 00:47:57.680
<v Dave Jones>option in it so that it could use either the Osmo SDR hardware or the RTL SDR. Uh-huh.

00:47:57.680 --> 00:48:03.080
<v Dave Jones>Uh, and then some people, yeah. And then people started using that in the new radio project,

00:48:03.120 --> 00:48:07.400
<v Dave Jones>right? To interface with the hardware. Yeah. And then some other SDR came out. I think possibly

00:48:07.400 --> 00:48:13.020
<v Dave Jones>the ACRF right after that to be able to reuse all the same, uh, flow graphs and applications

00:48:13.020 --> 00:48:17.720
<v Dave Jones>that were already existing. It just added ACRF support into GR Osmo SDR. Yeah. And then

00:48:17.720 --> 00:48:21.740
<v Dave Jones>basically every SDR that came after that, they just, yeah, the Lime and all of those.

00:48:21.920 --> 00:48:25.520
<v Dave Jones>But it always kept the name GR Osmo SDR and. That's good. That's branding right there.

00:48:25.520 --> 00:48:30.460
<v Dave Jones>Yeah, exactly. Um, yeah. And, uh, and what's funny is that for a long time, I don't know

00:48:30.460 --> 00:48:34.800
<v Dave Jones>if it still does that, but for a long time, like when you installed it with the, uh, new

00:48:34.800 --> 00:48:41.640
<v Dave Jones>radio, uh, like installer or the, it actually still pulled the, the library and driver for

00:48:41.640 --> 00:48:48.120
<v Dave Jones>the Osmo SDR hardware. Oh yeah. That five people in the world have, but everybody has

00:48:48.120 --> 00:48:52.020
<v Chris Gammell>support for it. Yeah. That's great. Well, you know, if it ever makes a resurgence, you

00:48:52.020 --> 00:48:56.020
<v Chris Gammell>know, it'll be, yeah. Smart people will just target it and pretend it's that thing and then

00:48:56.020 --> 00:48:59.360
<v Chris Gammell>it's good to, good to go. Yeah. That's pretty much a tie between. So what, what does Osmo

00:48:59.360 --> 00:49:04.040
<v Chris Gammell>come in the first place? I don't actually know the genesis of the group. So it kind of

00:49:04.040 --> 00:49:12.920
<v Dave Jones>started with, um, Harold, well, and it is par like, um, I think it was at, uh, our, so

00:49:12.920 --> 00:49:18.520
<v Dave Jones>the, uh, uh, hacking at random, I think it's 2009 or something. Okay. They, they created this

00:49:18.520 --> 00:49:26.760
<v Dave Jones>project called open BSC, which was using the BS 11 base station to run the first like open

00:49:26.760 --> 00:49:32.500
<v Dave Jones>source based GSM network at a hacker conference. Um, it was kind of, you know,

00:49:32.660 --> 00:49:35.880
<v Dave Jones>compared to what we have today, it was really primitive code and it was barely

00:49:35.880 --> 00:49:40.140
<v Dave Jones>initializing the BTS and allowing calls or SMS. I don't, I wasn't there, so I don't

00:49:40.140 --> 00:49:47.680
<v Dave Jones>remember. Um, and then meeting up with, um, with Harold, uh, I think I met him at

00:49:47.680 --> 00:49:53.240
<v Dave Jones>2063 at the Congress. Um, wow, that's almost 10 years ago.

00:49:53.240 --> 00:49:58.920
<v Chris Gammell>Does that make you feel old? Yeah. Yeah. It keeps hitting me. You know, with 2020, like

00:49:58.920 --> 00:50:03.280
<v Chris Gammell>creeping around the corner, I'm like, Oh, I was like, you know, remember when they were

00:50:03.280 --> 00:50:08.940
<v Chris Gammell>playing Prince's 1999 and everyone's like, Oh God, this song is so old. That was 20 frigging

00:50:08.940 --> 00:50:13.260
<v Chris Gammell>years ago. You know, I'm just like, Oh God. Anyways, sorry. Go on.

00:50:13.260 --> 00:50:20.500
<v Dave Jones>Yeah. Yeah. So yeah, I met him there and, um, we, I started working on open BSC and, you

00:50:20.500 --> 00:50:24.240
<v Dave Jones>know, improving things and adding support for other features. I don't remember exactly

00:50:24.240 --> 00:50:30.740
<v Dave Jones>what I worked on at that time. And another project was started, uh, that was targeting

00:50:30.740 --> 00:50:36.140
<v Dave Jones>the kind of the other side, which is like making an open source baseband firmware, sort

00:50:36.140 --> 00:50:42.160
<v Dave Jones>of the phone side. Yeah. And at that point, uh, we were looking for a, for a name kind of,

00:50:42.160 --> 00:50:47.860
<v Dave Jones>uh, to, to put all of these like, uh, open source telecom project, uh, under like an umbrella

00:50:47.860 --> 00:50:51.960
<v Dave Jones>brand. And we came up with the name, uh, open source mobile communication, which is like

00:50:51.960 --> 00:50:56.440
<v Dave Jones>Osmocom. Yeah. That's, that's where the name came from. And originally it was like open BSC

00:50:56.440 --> 00:51:02.420
<v Dave Jones>and then, uh, Osmocom BB, that Osmocom baseband. Right. And then other project came and, uh,

00:51:02.440 --> 00:51:06.940
<v Dave Jones>were added on top and under the same umbrella. Now, if you go to osmocom.org, you have like

00:51:06.940 --> 00:51:12.140
<v Dave Jones>a bunch of projects. The most active ones are still the GSM and core network kind

00:51:12.140 --> 00:51:18.080
<v Dave Jones>of, uh, things, but we have, uh, we worked on Tetra. We worked on GMR one, which is like

00:51:18.080 --> 00:51:23.640
<v Dave Jones>satellite phones. We, uh, worked on a bunch of, uh, it's always interesting to me because

00:51:23.640 --> 00:51:27.260
<v Chris Gammell>it's like, it feels like telecom is such a closed off industry. Obviously there's people

00:51:27.260 --> 00:51:31.100
<v Chris Gammell>working on it, but like the people that are willing to talk about it and like, it feels

00:51:31.100 --> 00:51:34.340
<v Chris Gammell>like a ton of reverse engineering because you have to, you're not going to get someone

00:51:34.340 --> 00:51:38.720
<v Chris Gammell>to be like, Hey, what were you doing there? No, I'm not telling you that. That was actually

00:51:38.720 --> 00:51:45.480
<v Dave Jones>one of the goal of, uh, of Harald is that, um, he, there was a lot of people working on,

00:51:45.480 --> 00:51:49.660
<v Dave Jones>you know, um, like wifi stuff, basically like wifi security and that kind of stuff.

00:51:49.660 --> 00:51:55.980
<v Dave Jones>And nobody looking at, uh, a ton of other telecom protocol that are used by, you know,

00:51:56.340 --> 00:52:01.180
<v Dave Jones>millions, billions of people. Uh, and nobody was looking at them. And I remember the first

00:52:01.180 --> 00:52:05.460
<v Chris Gammell>year this, the, the, the towers got spoofed at DEF CON or something like that. Everyone's

00:52:05.460 --> 00:52:08.860
<v Chris Gammell>like, what? Oh no, you can, you can get our cell phones too.

00:52:09.860 --> 00:52:15.120
<v Dave Jones>Yeah. A lot of things that people don't realize. And, uh, and so, yeah, the, I think the goal

00:52:15.120 --> 00:52:19.880
<v Dave Jones>was mostly to get people to looking at that, uh, because a lot of those protocols, they're

00:52:19.880 --> 00:52:28.820
<v Dave Jones>not actually, um, more complicated or, um, or secure or, and a lot of them are actually

00:52:28.820 --> 00:52:32.860
<v Dave Jones>documented. Like, because you have to have interoperability and between and thing, you can

00:52:32.860 --> 00:52:36.800
<v Dave Jones>actually, uh, most of the time the standard are available freely. Sometimes you have

00:52:36.800 --> 00:52:40.600
<v Dave Jones>to like buy them, but it's just like a few hundred bucks. And.

00:52:40.600 --> 00:52:42.940
<v Dave Jones>Oh really? Okay. It's like standards body that you buy.

00:52:42.940 --> 00:52:46.320
<v Dave Jones>Yeah, exactly. You have to interpret the legalese or whatever's in there, right?

00:52:46.320 --> 00:52:49.940
<v Dave Jones>Yeah. That kind of stuff. Uh, I'm not, yeah, I don't really look at the details.

00:52:49.940 --> 00:52:51.600
<v Dave Jones>You don't read that for fun on like a weekend or?

00:52:51.600 --> 00:52:57.980
<v Dave Jones>Not really. Um, and so, yeah, that, that was really the goal is to basically encourage people

00:52:57.980 --> 00:53:02.920
<v Dave Jones>to look at, um, that kind of stuff and provide tools to be able to analyze them.

00:53:02.920 --> 00:53:03.220
<v Dave Jones>Yeah.

00:53:03.220 --> 00:53:09.340
<v Dave Jones>Because previously for GSM, like if you wanted to, to like, uh, first your, um,

00:53:09.340 --> 00:53:14.900
<v Dave Jones>Wi-Fi card, you know, you could find like monitor firmware, that kind of stuff to inject

00:53:14.900 --> 00:53:19.540
<v Dave Jones>raw packets, that kind of stuff. And the goal was to develop that, the same kind of tool for

00:53:19.540 --> 00:53:22.740
<v Dave Jones>GSM and then for 3G and then for other protocols.

00:53:22.980 --> 00:53:26.640
<v Chris Gammell>Right. Right. Much than this. Yeah. Like you said, uh, make things actually safer,

00:53:26.640 --> 00:53:31.680
<v Chris Gammell>right? I mean, that's, that's always the thing that the first time I remember like being exposed

00:53:31.680 --> 00:53:34.520
<v Chris Gammell>to the security industry, I'm like, why are they doing this? It feels like it's so like malicious

00:53:34.520 --> 00:53:38.280
<v Chris Gammell>and it's like, no, you have to have attack tools to make defense tools basically.

00:53:38.520 --> 00:53:44.680
<v Dave Jones>Yeah. I mean, if you look at GSM, some of the attack that we, uh, demonstrated for, uh, like real,

00:53:45.320 --> 00:53:51.360
<v Dave Jones>I mean, they were known for a while and, but nobody, okay. Yeah. Everybody, the response was,

00:53:51.360 --> 00:53:55.820
<v Dave Jones>uh, always okay. Yeah, but it's not doable in practice. You, you can't, it's a theoretical attack

00:53:55.820 --> 00:53:59.740
<v Dave Jones>or you can't pull it off unless you have a gigantic budget or that kind of stuff.

00:53:59.740 --> 00:54:01.240
<v Dave Jones>Right. Right. And then like, uh,

00:54:01.240 --> 00:54:04.420
<v Dave Jones>Basically someone's screaming, Hey hackers, come try this right now.

00:54:04.540 --> 00:54:09.820
<v Dave Jones>Yeah, exactly. And then, you know, we prove, okay, we can listen to a phone call with like, uh,

00:54:09.820 --> 00:54:13.280
<v Dave Jones>a $25 mobile phone of which we've replaced the firmware. Wow.

00:54:13.420 --> 00:54:16.400
<v Dave Jones>You know, how much cheaper and how much practical do you need?

00:54:16.440 --> 00:54:16.840
<v Dave Jones>Yeah, exactly.

00:54:16.840 --> 00:54:19.500
<v Dave Jones>So that you fix your stuff, right? Uh, that kind of stuff.

00:54:19.500 --> 00:54:26.060
<v Chris Gammell>That's great. Man, it says a lot of, uh, security implications, I suppose. It's yeah. Yeah,

00:54:26.060 --> 00:54:31.660
<v Dave Jones>it does. And, um, and of course the, uh, besides the security, there's also just, uh, making

00:54:31.660 --> 00:54:37.180
<v Dave Jones>technology, uh, just more available where at places where, where it wouldn't be, uh, because

00:54:37.180 --> 00:54:42.060
<v Dave Jones>sometimes operators don't have, uh, like the financial incentive to provide coverage in,

00:54:42.060 --> 00:54:48.540
<v Dave Jones>you know, if you have a huge area to cover, but not many subscriber, uh, you might need a solution

00:54:48.540 --> 00:54:51.740
<v Dave Jones>that is much cheaper than what you can buy from Erexon, for instance.

00:54:51.740 --> 00:54:55.180
<v Chris Gammell>Right, right, right. And if it's accessible and people can, you know, it's not necessarily easy,

00:54:55.180 --> 00:54:59.100
<v Chris Gammell>but it's accessible and like people can learn their way into the system and stuff like that.

00:54:59.100 --> 00:55:02.220
<v Chris Gammell>Yeah, that's great. I think there was, I think it was actually more on the fiber side, but there

00:55:02.220 --> 00:55:06.860
<v Chris Gammell>was like people setting up ISPs and like, like downtrodden communities and like some of the

00:55:06.860 --> 00:55:10.780
<v Chris Gammell>inner cities of the states that like, no one was gonna, I think it was Detroit, maybe it was

00:55:10.780 --> 00:55:14.300
<v Chris Gammell>like nobody was gonna give them service there. Maybe it was even self service too. I don't know.

00:55:14.300 --> 00:55:19.900
<v Dave Jones>Yeah. Uh, I mean, um, at least I've heard it for the self service, uh, for the self service,

00:55:19.900 --> 00:55:26.700
<v Dave Jones>sorry. Um, in some places, I, I don't remember the specifics, but it was like in the, in the UK

00:55:26.700 --> 00:55:31.420
<v Dave Jones>or something like a, like a particular zone, like there would be no coverage and no operator would be

00:55:31.420 --> 00:55:35.180
<v Dave Jones>interested. And so they had to provide self service, self service for themselves. Right.

00:55:35.180 --> 00:55:38.700
<v Dave Jones>Basically. Right. Right. Uh, cause they're still commercial enterprise. It's not like national.

00:55:38.700 --> 00:55:43.820
<v Dave Jones>Yeah. And it's always, it's like, it's in the UK, it's not in, in like, uh, you know,

00:55:44.380 --> 00:55:49.100
<v Chris Gammell>Yeah. Subterranean Africa with like, yeah, it's a user area to cover. Right. It's still like a

00:55:49.100 --> 00:55:54.780
<v Chris Gammell>somewhat decent, uh, yeah, you, well, you would expect, you know, somewhat decent, uh, population

00:55:54.780 --> 00:55:57.340
<v Chris Gammell>density, I should fix that thought. Not somewhere. Yeah, no, no, no, no, no, no, no, no, no, no,

00:55:57.340 --> 00:56:02.940
<v Dave Jones>yeah, exactly. Um, yeah, somewhere. Yeah. Well, you would expect self service to be a bit. Yeah. Right. Right.

00:56:02.940 --> 00:56:08.940
<v Dave Jones>Um, yeah. I don't remember the details, but it was an Osmo.com talk at some point. Yeah.

00:56:08.940 --> 00:56:12.540
<v Dave Jones>That's great. That's, I mean, like that's, that's a feel good project too. Yeah. Yeah,

00:56:12.540 --> 00:56:16.220
<v Chris Gammell>definitely. Yeah. That's great. Well, what else are your interests these days? I mean, what else

00:56:16.220 --> 00:56:21.980
<v Chris Gammell>do you, I mean, Oh, you worked on the cube too with, uh, Peter, right? Uh, yes, yes. So yeah.

00:56:21.980 --> 00:56:28.540
<v Dave Jones>Uh, the LED cube, I should say. Sorry. Uh, I mean, it's basically the ice for the dev board. Um,

00:56:28.780 --> 00:56:32.860
<v Dave Jones>how did I come to work on that? Uh, Peter bugs you and he bugs you and

00:56:32.860 --> 00:56:35.980
<v Dave Jones>when you, yeah, but I don't remember how did I meet Peter? Like that's, that's the question.

00:56:35.980 --> 00:56:40.220
<v Dave Jones>I don't remember Congress a couple of years ago, maybe. Did I meet it in my Congress?

00:56:40.220 --> 00:56:44.860
<v Chris Gammell>It's possible. I don't. This is Peter as in Temsky who we've had before. He's our, uh,

00:56:44.860 --> 00:56:49.740
<v Chris Gammell>our, uh, roaming correspondent at Congress. I think I'm going to try and talk him into recording

00:56:49.740 --> 00:56:54.220
<v Chris Gammell>again this year. So we'll see how that goes. But anyways, I mean, basically I was working.

00:56:54.220 --> 00:57:02.700
<v Dave Jones>Oh yeah. No, I remember it was, um, I was, uh, on, uh, the open FPGA, uh, IC channel.

00:57:02.700 --> 00:57:08.140
<v Dave Jones>Okay. And I was trying to get, uh, I was working on my USB stack actually. Okay.

00:57:08.140 --> 00:57:14.140
<v Dave Jones>Oh no, no. I wasn't working yet on my USB stack. I was trying to get the, uh, tiny, uh, so Luke's

00:57:14.140 --> 00:57:22.540
<v Dave Jones>Valenti tiny FPGA, uh, USB thing, uh, working on the UP5K, the, the, the ultra plus, uh, FPGA.

00:57:22.540 --> 00:57:29.660
<v Dave Jones>Uh, because before I saw that project, I didn't even imagine for a second that I could implement

00:57:29.660 --> 00:57:33.260
<v Dave Jones>USB with just FPGA IOs, right? Right. It was just that. Like they wouldn't be fast.

00:57:33.260 --> 00:57:37.980
<v Dave Jones>Yeah. And so I, I found, uh, Luke's Valenti project like, uh, amazing, but it wasn't targeted

00:57:37.980 --> 00:57:45.580
<v Dave Jones>at the FPGA that I had. Um, and so I wanted to get it working on that. And, um, I came to

00:57:45.580 --> 00:57:52.460
<v Dave Jones>discover the icebreaker, uh, bit C board, which is actually a yet unreleased board that Peter, uh,

00:57:52.460 --> 00:58:00.140
<v Dave Jones>worked on. Um, and yeah, acted so that, uh, I managed to, in the end, I managed to get it to

00:58:00.140 --> 00:58:05.740
<v Dave Jones>run and I saw a couple of streams that, uh, Peter did, uh, we tried to assemble that board and make

00:58:05.740 --> 00:58:10.060
<v Dave Jones>it work, that kind of stuff. And I think I met it at the Congress afterward and he started the

00:58:10.060 --> 00:58:17.420
<v Dave Jones>icebreaker, um, board and he sent me a, like a prototype, I think. And, uh, yeah, I, uh,

00:58:17.420 --> 00:58:23.900
<v Dave Jones>uh, that was actually at, uh, at Supercon last year. Yeah. That was, that was at Supercon last year.

00:58:23.900 --> 00:58:29.460
<v Dave Jones>Okay. Yeah. Uh, no, I remember because, uh, I didn't have any lead panels before and he had a

00:58:29.460 --> 00:58:35.220
<v Dave Jones>couple with him and, uh, I, he, he gave me one and the, uh, associated P mod and I just basically

00:58:35.220 --> 00:58:43.180
<v Dave Jones>started working on a, uh, uh, a lead driver using as reference because I had no idea to drive those

00:58:43.180 --> 00:58:46.940
<v Dave Jones>either. Yeah. Right. And so I watched a video by, uh, Mike Harrison.

00:58:46.940 --> 00:58:51.900
<v Dave Jones>Mm-hmm. Which explained how to, like a binary coded modulation and how to drive those lead panels.

00:58:52.120 --> 00:58:52.860
<v Dave Jones>Yeah. And.

00:58:52.860 --> 00:58:55.620
<v Chris Gammell>Because those things are like, there's a ton of LEDs on those things.

00:58:55.900 --> 00:58:59.600
<v Dave Jones>Yeah. Yeah. So yeah, there's a very specific way to drive them efficiently, basically. There's

00:58:59.600 --> 00:59:05.820
<v Dave Jones>a ton of ways you can drive them, but there's only so many ways you can drive them well. Um,

00:59:06.480 --> 00:59:13.020
<v Dave Jones>and yeah, I basically developed, um, uh, a core to drive that that was generic enough that

00:59:13.020 --> 00:59:18.020
<v Dave Jones>apparently a bunch of people decided to use that. Oh, great. To drive, uh, the LED cube.

00:59:18.300 --> 00:59:22.780
<v Dave Jones>Oh, that's cool. So I wrote the. Is that what Greg Devel's using too? So yeah, Greg Devel uses a

00:59:22.780 --> 00:59:27.880
<v Dave Jones>heavily modified version. Okay. Because his, his lead panels don't really look like up 75. Yeah.

00:59:27.940 --> 00:59:31.360
<v Dave Jones>He had to do a bunch of hacks. Oh, that's right. So he's, yeah, you were, you were, uh, these

00:59:31.360 --> 00:59:33.200
<v Chris Gammell>are the off the shelf. Yeah. Yeah. Exactly.

00:59:33.200 --> 00:59:37.300
<v Chris Gammell>The panels that you guys were working with. Yes. And then he developed his own, he developed

00:59:37.300 --> 00:59:42.900
<v Dave Jones>his own, uh, made of driving them, um, like optimized for his form factor and his custom,

00:59:42.900 --> 00:59:48.860
<v Dave Jones>um, thing. And so he had to, he took my code, modified it. Um, I don't know. I, yeah, I think

00:59:48.860 --> 00:59:52.380
<v Dave Jones>he uses it in also in not his cube. It's, um, what is it?

00:59:52.640 --> 00:59:56.280
<v Chris Gammell>Decorhedrin. Yeah. That, that, that thing. It's like, it looks like a 26 sided die pretty

00:59:56.280 --> 00:59:59.080
<v Chris Gammell>much. I don't know what the, I don't know what the true shape is. It looks like a, yeah.

00:59:59.080 --> 01:00:04.760
<v Dave Jones>Okay. Yeah. This one, um, I think he uses an even more modified version of it because

01:00:04.760 --> 01:00:09.200
<v Dave Jones>that's not square anymore. Whatever works. Whatever works. Yeah. So, yeah. But yeah.

01:00:09.480 --> 01:00:15.740
<v Chris Gammell>Oh, cool. And so to go back to the USB thing real fast. Yeah. So you said that you couldn't

01:00:15.740 --> 01:00:21.920
<v Chris Gammell>use, so like I think about, you know, microcontrollers I use, they have transceivers on board. Those

01:00:21.920 --> 01:00:28.660
<v Chris Gammell>are effectively differential special inputs, right? That are taking in USB signals and then

01:00:28.660 --> 01:00:34.080
<v Dave Jones>translating those, right? The thing is like USB, you know, um, so low speed and full speed,

01:00:34.160 --> 01:00:38.200
<v Dave Jones>which is always support on the badge and on the thing. It's not really different. I mean,

01:00:38.200 --> 01:00:41.380
<v Dave Jones>it's different in the sense that most of the time the signal are opposite of each other,

01:00:41.420 --> 01:00:45.820
<v Dave Jones>but that's only most of the time. Like sometimes they're both low. Yeah. Okay. So it's not true

01:00:45.820 --> 01:00:48.860
<v Dave Jones>differential and you don't actually need a differential receiver. You can just look at

01:00:48.860 --> 01:00:52.260
<v Chris Gammell>each signal independently. Oh, I see. Okay. So you just take one pin and you say, well,

01:00:52.300 --> 01:00:56.180
<v Dave Jones>if I can detect a high and low, fine. Yeah. I mean, usually, usually you take both and you did,

01:00:56.180 --> 01:01:01.880
<v Dave Jones>you detect, uh, all four state possible, which is both zero. Right. And transitioning.

01:01:01.880 --> 01:01:06.180
<v Dave Jones>Both one is a narrow condition that shouldn't happen. Okay. Okay. And then you have the J and

01:01:06.180 --> 01:01:11.560
<v Dave Jones>K state, which are like a, one is DP positive and the other is negative. Uh-huh. Yeah. Yeah.

01:01:11.920 --> 01:01:16.460
<v Dave Jones>And so you do, you extract those three states from there. Okay. Huh. Okay. And then,

01:01:16.500 --> 01:01:19.300
<v Dave Jones>so then that's enough though. You're saying that you didn't need specialized hardware. Exactly.

01:01:19.540 --> 01:01:24.180
<v Dave Jones>If you want to go to like, uh, the high speed things, which is like 480 megabits, uh,

01:01:24.180 --> 01:01:29.820
<v Dave Jones>uh, there you need true differential receiver and you need also a five because I mean 480 megabits,

01:01:29.820 --> 01:01:34.500
<v Dave Jones>uh, like you can't, you can't do that with. Yeah. It's kind of, it's kind of fast. It is fast.

01:01:34.500 --> 01:01:40.200
<v Dave Jones>And so you need to take a dedicated hardware. Yeah. Um, that translate that. So it's usually like a

01:01:40.200 --> 01:01:45.220
<v Dave Jones>ULPI fee and then that this realize essentially this into eight bits in part of that thing.

01:01:45.280 --> 01:01:49.520
<v Chris Gammell>Would it be possible to put USB into like a certas at some point to do, cause it's doing a serial

01:01:49.520 --> 01:01:55.360
<v Dave Jones>to do, to parallel kind of thing. Um, I don't know. Oh, you do, because you need to do the

01:01:55.360 --> 01:02:00.400
<v Dave Jones>clock recovery as well. And I don't know if they're going to do that. Um, at a certain point,

01:02:00.400 --> 01:02:05.160
<v Dave Jones>it makes sense to have external hardware. Yeah, exactly. Uh, I mean, this helps you can do that.

01:02:05.160 --> 01:02:11.300
<v Dave Jones>You can, you can do USB three with this, with the, the gigabit set us off the CP five. You can do

01:02:11.300 --> 01:02:16.360
<v Dave Jones>USB three. Okay. Does that have it on here? No, the badge doesn't have them. It's a special,

01:02:16.360 --> 01:02:23.080
<v Dave Jones>uh, it's the dash something. Yeah. Dash dollars. And you need, there is no like high speed rated

01:02:23.080 --> 01:02:28.140
<v Chris Gammell>connection on the badge anyway. Uh, because yeah. Right. You need a bunch of firmware on top to

01:02:28.140 --> 01:02:32.180
<v Chris Gammell>handle all that stuff too. Right. Yeah. Yeah. I think, um, well, what does this do then? So how

01:02:32.180 --> 01:02:37.740
<v Chris Gammell>much can it do? A 1.1 can do what? A couple of megabits. It's 12 megabits. Yeah. So that's still

01:02:37.740 --> 01:02:43.080
<v Chris Gammell>good for a lot of stuff. Right. And it shows up as, yeah, sure. I mean, you can, it only, it only

01:02:43.080 --> 01:02:46.940
<v Dave Jones>has like nine megabyte of flash. So it's, it's not like you can, you need a lot of time.

01:02:46.940 --> 01:02:50.860
<v Dave Jones>Even if you, if you were writing the entire flash every time. Right. It doesn't take that

01:02:50.860 --> 01:02:57.400
<v Dave Jones>long. And to do things like, um, you know, USB console or that kind of stuff, it's, or firmware

01:02:57.400 --> 01:03:02.880
<v Dave Jones>update. It's, it's perfectly appropriate. Yeah. Yeah. Cool. Well, thank you for telling

01:03:02.880 --> 01:03:06.900
<v Chris Gammell>about us all about all this stuff. This is, this is, I mean, I love this hardware. It's

01:03:06.900 --> 01:03:11.800
<v Chris Gammell>great. Um, how, what do you think the best? So, you know, you've been doing FPGA stuff

01:03:11.800 --> 01:03:17.120
<v Chris Gammell>for a while now. Yeah. What is your, your favorite way? How do you think people should

01:03:17.120 --> 01:03:23.500
<v Chris Gammell>get started with FPGAs and then kind of continue the practice? Wow. That's a really hard question.

01:03:24.180 --> 01:03:29.180
<v Dave Jones>Um, that's what I'm here for. I ask the difficult questions on the empire. I would actually start

01:03:29.180 --> 01:03:38.920
<v Dave Jones>with either, um, Verilog or VHDL. I tend to lean toward Verilog because, uh, most of the open

01:03:38.920 --> 01:03:44.920
<v Dave Jones>source tools, um, use Verilog more than VHDL. So you, you will have more choices. I won't

01:03:44.920 --> 01:03:50.160
<v Dave Jones>lie. Like the learning curve is, is rather steep, but, um, I think it will allow you to

01:03:50.160 --> 01:03:58.660
<v Dave Jones>go, um, further basically, um, because of all the existing code, all the existing examples.

01:03:58.660 --> 01:04:03.540
<v Dave Jones>All the cores are usually Verilog too, right? Yeah. I mean, there's a lot of VHDL ones as

01:04:03.540 --> 01:04:11.920
<v Dave Jones>well. Uh, yeah, there are. Um, but yeah, I, I started, you know, doing FPGA using VHDL,

01:04:12.040 --> 01:04:17.300
<v Dave Jones>but I switched to Verilog basically when I started working with US companies and when doing, um,

01:04:18.060 --> 01:04:25.080
<v Dave Jones>open source work, uh, yeah, with the open source tool, I mean, um, so yeah, it's, it's not

01:04:25.080 --> 01:04:31.440
<v Dave Jones>necessarily easy, but at least you won't be limited. Yeah. Another good option would be, um,

01:04:32.680 --> 01:04:38.780
<v Dave Jones>and my gen. Oh yeah. Uh, which is basically using Python as, uh, other description language.

01:04:39.780 --> 01:04:44.780
<v Dave Jones>Um, so it's kind of a taste thing, but at least it was in my gen. You won't be limited either.

01:04:45.560 --> 01:04:52.360
<v Dave Jones>Um, yeah, it's, it's really new. Like I think it's version 0.1 has been released, like, uh,

01:04:52.360 --> 01:04:59.520
<v Dave Jones>uh, not so long ago. So documentation is probably not, um, great at the moment. Um,

01:05:00.300 --> 01:05:04.880
<v Dave Jones>so yeah, it's, is there a good project kind of that you usually tell people to start with?

01:05:05.560 --> 01:05:10.960
<v Dave Jones>Not really. A good project is whatever is going to keep you motivated. I think, you know, choose

01:05:10.960 --> 01:05:15.020
<v Dave Jones>something you want to do. Uh, that would be for instance, like kind of hard to do with a

01:05:15.020 --> 01:05:19.480
<v Dave Jones>microcontroller, but that you heard would be easy with an FPGA. That's a good point. Um,

01:05:19.480 --> 01:05:23.600
<v Dave Jones>usually driving is probably a great example of that. Exactly. Exactly. Because, uh,

01:05:23.680 --> 01:05:31.720
<v Dave Jones>if you want to do it, um, like perfectly or like fast and parallel, it's, it's tight timings that are

01:05:31.720 --> 01:05:35.980
<v Dave Jones>really deterministic, that kind of stuff, which is hard to guarantee on a microcontroller.

01:05:36.240 --> 01:05:41.840
<v Dave Jones>Interrupts. Uh, yeah, exactly. And, and, and like trivial on a FPGA. So that's really a very good

01:05:41.840 --> 01:05:48.360
<v Dave Jones>project. Um, and it's not, it's not too hard. It's easy to simulate. Uh,

01:05:48.360 --> 01:05:53.160
<v Dave Jones>that's actually the other thing that I would recommend for people is to learn to simulate

01:05:53.160 --> 01:05:57.340
<v Dave Jones>first. You said use iVerilog for that? Yeah, I use iVerilog for that. Um,

01:05:57.940 --> 01:06:02.140
<v Dave Jones>people have had good success with Verilator as well. Okay. Um,

01:06:02.900 --> 01:06:06.660
<v Chris Gammell>yeah, I'm not using either of those. I've used, I've used the Model Sim in the past, but. Yeah,

01:06:06.660 --> 01:06:12.980
<v Dave Jones>I use Model Sim as well. Yeah, right. But, uh, it's, uh, it's expensive and most likely for a lot of

01:06:12.980 --> 01:06:18.300
<v Dave Jones>projects, you know, if you're simulating a giant FPGA and you need to simulate like billions,

01:06:18.300 --> 01:06:23.480
<v Dave Jones>of cycles. Yeah. The speed advantage of Model Sim makes sense. Yeah. But if you're simulating

01:06:23.480 --> 01:06:29.120
<v Dave Jones>like a driving in a LCD panel for a few milliseconds, it's really doesn't matter. Yeah. Um,

01:06:29.860 --> 01:06:37.120
<v Dave Jones>and yeah, simulate, simulate, simulate because, uh, debugging hardware inside an FPGA. Well,

01:06:37.120 --> 01:06:41.880
<v Dave Jones>I have one LED I could blink. So that helps. Yeah, it helps. Uh, I mean, connecting like a logic

01:06:41.880 --> 01:06:47.180
<v Dave Jones>analyzer outside is, and, and on the, on some bigger FPGA, you can actually instantiate like an internal

01:06:47.180 --> 01:06:52.980
<v Dave Jones>logic analyzer. Yeah. Yeah. As it is. But, uh, the tools to do that with the open source,

01:06:52.980 --> 01:07:00.480
<v Dave Jones>uh, are not yet as convenient as the open source, uh, to gen. And then depending on the FPGA that you

01:07:00.480 --> 01:07:06.800
<v Dave Jones>use, like the S4, it's such a small FPGA. Yeah. That it could consume a lot of resources. Yeah. Um,

01:07:06.800 --> 01:07:13.240
<v Dave Jones>simulating on the other hand, it doesn't cost you anything. And, um, you can inspect every single

01:07:13.240 --> 01:07:18.400
<v Dave Jones>signal in your design at any point in time. Yeah. Uh, it's pretty trippy. It's, it's really great.

01:07:18.400 --> 01:07:22.380
<v Chris Gammell>Um, to debug stuff. Yeah. Great. All right. Well, thanks for joining us today. I appreciate it. Well,

01:07:22.380 --> 01:07:28.080
<v Chris Gammell>thank you for having me. Yeah. All right. We are back at Supercon 2019. We've been interrupted a

01:07:28.080 --> 01:07:32.180
<v Chris Gammell>couple of times here, but we're, we're going to get it this time. I'm here with Matt Venn. Matt,

01:07:32.180 --> 01:07:38.220
<v Chris Gammell>how are you doing? Yeah, I'm doing great. Thanks, Chris. Yeah. So, um, you do FPGA stuff. Yeah. How did you get into

01:07:38.220 --> 01:07:44.600
<v Chris Gammell>that? I got into that through a interesting technology strategy boards, uh, grant, which

01:07:44.600 --> 01:07:51.200
<v Chris Gammell>is like an English system that the government makes available money to do projects. And I was

01:07:51.200 --> 01:07:56.380
<v Chris Gammell>working for a company at the time called the Arcola theater, which also had like a technical incubator

01:07:56.380 --> 01:08:03.560
<v Chris Gammell>attached to it. Really? And they were doing hydrogen powered stuff. Really? Okay. It was quite

01:08:03.560 --> 01:08:07.800
<v Chris Gammell>hydrogen powered theater. Yeah. Like the direct very far afield. Yeah. Yeah. The director,

01:08:08.220 --> 01:08:13.640
<v Chris Gammell>of the theater was a, like did a PhD in hydrogen fuel cell stuff. So he was like interested in

01:08:13.640 --> 01:08:17.340
<v Chris Gammell>looking at the merge between. It sounds like someone who's like, I've got money and I'm spending

01:08:17.340 --> 01:08:22.260
<v Chris Gammell>it exactly how I want to. No, they never had money. Well, I mean some kind of grant money though. Yeah.

01:08:22.260 --> 01:08:29.560
<v Chris Gammell>He was like interested in the world of like super controlled engineering and how everything takes a

01:08:29.560 --> 01:08:35.840
<v Chris Gammell>long time and is very controlled. And then also theater where like, it doesn't matter if it's not

01:08:35.840 --> 01:08:40.040
<v Chris Gammell>ready, you show must go on. Right. And he was like interested in looking at if it was possible to

01:08:40.040 --> 01:08:44.860
<v Chris Gammell>kind of do a merge of those things. I'm glad that there's not hydrogen fuel cells that are just,

01:08:44.960 --> 01:08:49.080
<v Chris Gammell>well, we'll figure it out. It has to go. So we'll just blow that stuff up. Yeah. Right. Right.

01:08:49.480 --> 01:08:54.580
<v Chris Gammell>So, uh, yeah, actually you overheard when we were talking with Ted earlier, but, um, this was for a,

01:08:54.580 --> 01:09:03.860
<v Chris Gammell>a project to detect if a, um, a high pressure tank of hydrogen was being damaged through being filled

01:09:03.860 --> 01:09:08.820
<v Chris Gammell>by listening to the sounds that it makes. Right. Um, yeah, you're doing like filtering and

01:09:08.820 --> 01:09:15.000
<v Chris Gammell>application and, uh, that guy, that project was being worked on by another engineer who had to

01:09:15.000 --> 01:09:20.300
<v Chris Gammell>leave due to health reasons. And he, uh, asked if I could do it. And I was like, yeah, sure. Why not?

01:09:20.300 --> 01:09:24.960
<v Chris Gammell>Yeah. And then I had to kind of learn how to do everything, take over from that project,

01:09:25.080 --> 01:09:34.020
<v Chris Gammell>which at the time was a beagle bone and an FPGA together, um, listening to ADCs. And so that was

01:09:34.020 --> 01:09:39.180
<v Chris Gammell>like my first, that's a, that's a deep end dive right there. Yeah. And it was, uh, okay. I did that

01:09:39.180 --> 01:09:44.020
<v Chris Gammell>totally classic thing of coming at it completely from the software side and thinking it's like each

01:09:44.020 --> 01:09:50.920
<v Chris Gammell>line of, it was VHDL. Oh, sure. It was like a sequential program. And, uh, yeah, just, and then,

01:09:51.020 --> 01:09:55.100
<v Chris Gammell>uh, I don't know how to like, so I've been, you know, I've had two other guests on so far and I'm

01:09:55.100 --> 01:10:00.080
<v Chris Gammell>not sure what order I'm going to post them in, but, um, it's hard to like try and it's like,

01:10:00.160 --> 01:10:02.720
<v Chris Gammell>you can't, you don't know the matrix until you see it. You know what I mean? Like, it's like,

01:10:02.760 --> 01:10:08.040
<v Chris Gammell>it's really hard to, to remember what it felt like before understanding that switch over,

01:10:08.180 --> 01:10:12.520
<v Chris Gammell>you know, it's hard to explain that to someone. Yeah. You just have to kind of do it a little bit.

01:10:12.520 --> 01:10:18.740
<v Chris Gammell>Have you ever, uh, worked with kids, uh, doing computer programming? I have not, no. Okay.

01:10:18.740 --> 01:10:22.880
<v Chris Gammell>There's this, um, software system called scratch. Okay. I've heard of that. I've heard of that. So

01:10:22.880 --> 01:10:28.620
<v Chris Gammell>that's quite interesting because in the UK with the, uh, new, um, computing curriculum,

01:10:28.620 --> 01:10:33.020
<v Chris Gammell>there's like this sequence of software that kids often use. And the classic thing is they start on

01:10:33.020 --> 01:10:38.140
<v Chris Gammell>scratch and then they move to other things and end up in Python or something. Okay. And with scratch,

01:10:38.140 --> 01:10:42.680
<v Chris Gammell>everything is happening in parallel. You make a new, really, I didn't know right. Yeah. And then

01:10:42.680 --> 01:10:46.900
<v Chris Gammell>you give it some instructions and it starts doing, and then you make another sprite and you give it

01:10:46.900 --> 01:10:49.920
<v Chris Gammell>some instructions. Yeah. It's like the incredible machine kind of thing, right? Everything is going

01:10:49.920 --> 01:10:54.380
<v Chris Gammell>on at once and it's just very, very simple and straightforward. And then they transition to

01:10:54.380 --> 01:10:57.960
<v Chris Gammell>Python and they want to make something like they've done in scratch with things happening at

01:10:57.960 --> 01:11:03.540
<v Chris Gammell>the same time. So they should switch to FPGA as you're saying? Maybe. Yeah. Wow. But yeah. So then

01:11:03.540 --> 01:11:09.000
<v Chris Gammell>it's interesting that like scratch works in a very parallel way. Yeah. Right. You have to work hard

01:11:09.000 --> 01:11:13.540
<v Chris Gammell>to make things work. Like you need to use a library, like pie your game or something like that to get

01:11:13.540 --> 01:11:17.020
<v Chris Gammell>some multi-threaded stuff going on. Yeah. Wow. I didn't know that. And then with electronics,

01:11:17.340 --> 01:11:23.440
<v Chris Gammell>I started with, you know, firmware and C and doing everything step by step. And then with FPGAs,

01:11:23.500 --> 01:11:30.420
<v Chris Gammell>it's like, no, it's actually like someone's given you a huge bag of those one by one by one Lego blocks.

01:11:30.420 --> 01:11:36.060
<v Chris Gammell>Right. You can make anything you want. Or a lot of 74 series logic. Yeah. Yeah. Like, um, like, uh,

01:11:36.240 --> 01:11:44.400
<v Chris Gammell>Pepin who did the, um, he did the, uh, the little LED blinky that was wrote the Verilog and then

01:11:44.400 --> 01:11:49.620
<v Chris Gammell>synthesized it to 74 series logic. Oh, that's right. Yeah. Yeah. Yeah. Yeah. Okay. Yeah. That's great.

01:11:49.780 --> 01:11:55.620
<v Chris Gammell>Yeah. Yeah. It's tough. I mean, it's just a tough mental switch. I think, I think it's tough for kids

01:11:55.620 --> 01:12:00.100
<v Chris Gammell>in general just because the abstraction kind of stuff that's happening in ways, but yeah. Um,

01:12:00.420 --> 01:12:04.660
<v Chris Gammell>okay. So that's how you, that's the first project you got into or that was the first exposure I had

01:12:04.660 --> 01:12:11.520
<v Chris Gammell>to FPGAs and that was before the open source tools and that project's like being, it's a kind of R and D

01:12:11.520 --> 01:12:16.480
<v Chris Gammell>ongoing project. Okay. And then I made the switch to using the open source tools, which for me was

01:12:16.480 --> 01:12:24.900
<v Chris Gammell>great because, um, like you, I work kind of in a, uh, it, I want that really tight feedback loop so I can

01:12:24.900 --> 01:12:28.660
<v Chris Gammell>learn quickly because I learn better through application rather than textbook. Right.

01:12:28.900 --> 01:12:33.800
<v Chris Gammell>And having a 30 second synthesis to bit stream to programming. Right.

01:12:35.000 --> 01:12:37.000
<v Chris Gammell>Even though you're not really meant to do it.

01:12:37.000 --> 01:12:41.000
<v Chris Gammell>Like, we should probably think through things. Yeah.

01:12:43.140 --> 01:12:48.660
<v Chris Gammell>Um, yeah, it's good to have that very fast and that's what makes it possible for the, you know,

01:12:48.660 --> 01:12:52.860
<v Chris Gammell>the badge hacking workshops, the open source tool, like, cause you can install this stuff.

01:12:52.860 --> 01:12:56.860
<v Chris Gammell>It only takes up a hundred meg or something and then you can run that whole process and

01:12:56.860 --> 01:13:00.780
<v Chris Gammell>well, the tool chain takes up more than that. Right. Yeah, probably. I was just thinking I

01:13:00.780 --> 01:13:05.260
<v Chris Gammell>downloaded, well, I downloaded the, um, badge hacking toolkit. That was 300 meg. Yeah.

01:13:05.260 --> 01:13:10.140
<v Chris Gammell>Yeah. Tar GZ. But compared to like a, you know, yeah. And that includes the risk five tools.

01:13:10.140 --> 01:13:12.860
<v Chris Gammell>Right. Right. Yeah. Yeah. Yeah. Yeah.

01:13:12.860 --> 01:13:18.140
<v Chris Gammell>Yeah. So it's that tight feedback loop that I think is a helpful for, uh, when you're beginning,

01:13:18.140 --> 01:13:22.540
<v Chris Gammell>but then as things grow in complexity, then you've got to learn how to do the simulation. Right. Right.

01:13:22.540 --> 01:13:27.340
<v Chris Gammell>Otherwise you're going to crank. It's just horrible. You end up in FPGA hell is Dan

01:13:27.340 --> 01:13:33.500
<v Chris Gammell>Gisselquist calls it. What, uh, what, what is FPGA hell? It's where your, uh, your design doesn't

01:13:33.500 --> 01:13:37.740
<v Chris Gammell>work and you've got no idea why not. Oh, you're waiting, you're like cargo culting it. You're like,

01:13:37.740 --> 01:13:42.620
<v Chris Gammell>well, if I touch my ear and I hold my elbow like this, then, then it works this time. Otherwise it

01:13:42.620 --> 01:13:47.580
<v Chris Gammell>doesn't. Yeah. Yeah. That's, that's tough. I think any kind of thing where it's like a new,

01:13:47.580 --> 01:13:51.020
<v Chris Gammell>a new field like that, you're just trying to figure out what works, you know, sometimes it

01:13:51.020 --> 01:13:56.860
<v Chris Gammell>really helps to have that working example to start from, but you know, for new projects,

01:13:56.860 --> 01:14:02.460
<v Chris Gammell>you just don't, don't always have that, you know? Yeah. So you made the switch to open, uh, open, uh,

01:14:02.460 --> 01:14:07.580
<v Chris Gammell>tools and which we've obviously been highlighting a lot here, but now you also work on symbiotic EDA.

01:14:07.580 --> 01:14:15.500
<v Chris Gammell>Yeah. So that was, um, that was just, I mean, that was just a kind of lucky coincidence really,

01:14:15.500 --> 01:14:19.420
<v Chris Gammell>because as I was doing more stuff with the FPGA stuff and with the open source tools and

01:14:20.300 --> 01:14:25.500
<v Chris Gammell>following Clifford and the other guys involved in developing the tool chain, I would like sometimes

01:14:25.500 --> 01:14:30.220
<v Chris Gammell>see some tweet that they'd written about fixing a bug or something new thing or some documentation,

01:14:30.220 --> 01:14:34.540
<v Chris Gammell>whatever. And I was stuck on some problem and I was like, I'm going to go back and search. And you

01:14:34.540 --> 01:14:38.620
<v Chris Gammell>know how awful Twitter is to find anything that's happened. It's like even five minutes ago.

01:14:38.620 --> 01:14:41.500
<v Chris Gammell>Yeah. So I was searching through Clifford's tweets and then saw like a,

01:14:42.540 --> 01:14:47.340
<v Chris Gammell>a job offer posting. Wow. Like we need more people to get involved in the FPGA stuff. Right.

01:14:47.340 --> 01:14:50.700
<v Chris Gammell>And we should say that's Clifford Wolf who started the Oasis project and now

01:14:51.420 --> 01:14:54.300
<v Chris Gammell>project iStorm. Yeah. Yeah. Oh, iStorm. Sorry. Yeah. So I, um,

01:14:55.180 --> 01:14:59.020
<v Chris Gammell>I applied for that, but it was like a year and a half out of date. Oh really? Oh, wow.

01:14:59.020 --> 01:15:03.020
<v Chris Gammell>But they said, oh, we need somebody to help with the education and the workshops and the

01:15:03.020 --> 01:15:07.500
<v Chris Gammell>trainings. Yeah. And, um, although I do, uh,

01:15:09.260 --> 01:15:15.420
<v Chris Gammell>like quite straightforward engineering stuff, I'm also, uh, really interested in science communication.

01:15:15.420 --> 01:15:23.580
<v Chris Gammell>Yeah. In general. So same. Yeah. So, um, this is a really good opportunity because I can work with a

01:15:23.580 --> 01:15:31.180
<v Chris Gammell>team of absolute FPGA masters and learn a lot from them. Yeah. And, and when I think it's a,

01:15:31.180 --> 01:15:34.940
<v Chris Gammell>I think it's, it's a bit of a cliche, but people say, you know, to learn something, you have to teach

01:15:34.940 --> 01:15:39.900
<v Chris Gammell>it. Yes. And I think, um, like certainly with the formal verification side, like it's taken me,

01:15:40.940 --> 01:15:47.020
<v Chris Gammell>I don't know, like six or eight months to feel like I can explain the concepts of that. Okay.

01:15:47.020 --> 01:15:50.540
<v Chris Gammell>You have 30 seconds to go. So how, what is, what is formal verification?

01:15:50.540 --> 01:16:00.060
<v Chris Gammell>Put me on the spot. Oh, totally. Yeah. Yeah. Um, so formal verification is, uh, a different way to

01:16:00.060 --> 01:16:10.460
<v Chris Gammell>verify your, um, your projects, mostly FPGA, because it's, um, for it to work, you need quite a limited

01:16:10.460 --> 01:16:16.620
<v Chris Gammell>space of opportunities for things to happen. So with an FPGA design, you've got limited width registers and

01:16:16.620 --> 01:16:22.220
<v Chris Gammell>limited things that things, the state, like the total number of flip-flops in your design is small

01:16:22.220 --> 01:16:27.020
<v Chris Gammell>compared to like a Python or C program where every, like in Python, you make something, you make a

01:16:27.020 --> 01:16:32.460
<v Chris Gammell>variable and it's actually an object and it could be a 64 bit float and it's like just huge. Yes.

01:16:32.460 --> 01:16:35.500
<v Chris Gammell>What it could encompass all the values that it could, yeah, I hold in there. Yeah.

01:16:36.060 --> 01:16:40.460
<v Chris Gammell>Um, and then how that propagates through the system. Yeah. So if you were like testing like a C program,

01:16:40.460 --> 01:16:46.460
<v Chris Gammell>you might like write a test bench that exercises it. And then it has to be like a strategic and smart.

01:16:46.460 --> 01:16:51.820
<v Chris Gammell>Yeah. Hopefully. But it depends on, uh, the imagination of the person that writes the test.

01:16:51.820 --> 01:16:56.060
<v Chris Gammell>That's right. Yeah. Yeah. That's a smart piece. Yeah. Yeah. Yeah. Whereas formal verification works

01:16:56.060 --> 01:17:02.860
<v Chris Gammell>in a different way. It's like you say what would be bad for you, a bad state to get into. And then you

01:17:02.860 --> 01:17:09.660
<v Chris Gammell>give that whole thing to something called a sat solver. And the sat solvers job is to find a way of,

01:17:09.660 --> 01:17:15.740
<v Chris Gammell>uh, like progressing from an initial state to a state that is broken, that violates your properties.

01:17:15.740 --> 01:17:20.380
<v Chris Gammell>And if it can do that, then it kind of wins and it writes you out the trace of how it got there

01:17:20.380 --> 01:17:24.940
<v Chris Gammell>and then say fail. And then you open up that trace. And that's cool because

01:17:24.940 --> 01:17:30.300
<v Chris Gammell>I'd actually did. I had not, I, the way I remembered it from, I think when Clifford was talking about it,

01:17:30.300 --> 01:17:36.140
<v Chris Gammell>maybe after that, even was the idea of you try, you could try every combination of every bit

01:17:36.140 --> 01:17:40.220
<v Chris Gammell>in your entire system, or there's a subset of those bits that will cover everything.

01:17:40.220 --> 01:17:43.100
<v Chris Gammell>And so you just do that instead. But that doesn't sound like what you've just said.

01:17:43.100 --> 01:17:44.860
<v Chris Gammell>I think it's related.

01:17:44.860 --> 01:17:45.500
<v Chris Gammell>Okay.

01:17:45.500 --> 01:17:49.260
<v Chris Gammell>Um, but it's like, this sounds like a constraint that you're putting on the system.

01:17:49.260 --> 01:17:53.820
<v Chris Gammell>Yeah. So there's, there's a few different ways. Like, um, you have your properties,

01:17:53.820 --> 01:17:59.660
<v Chris Gammell>uh, um, like your safety properties, where you say, I assert that this thing must never happen.

01:17:59.660 --> 01:18:00.060
<v Chris Gammell>Okay.

01:18:00.060 --> 01:18:04.300
<v Chris Gammell>And then the solver, the sat solver will try and find a way of getting your design into that state.

01:18:04.300 --> 01:18:04.700
<v Chris Gammell>Huh.

01:18:04.700 --> 01:18:09.500
<v Chris Gammell>And if it can, it will write out a trace that you can then load up. And it's usually very short,

01:18:09.500 --> 01:18:14.540
<v Chris Gammell>which makes it easy to trace your bugs. Then you fix your code if it's a bug, or you might think,

01:18:14.540 --> 01:18:18.860
<v Chris Gammell>yeah, but my code could never have got into that state because that's kind of outside the,

01:18:18.860 --> 01:18:24.540
<v Chris Gammell>and then you would limit your search space by using a different operator. So the sat solver,

01:18:24.540 --> 01:18:28.460
<v Chris Gammell>though, how is it actually, is it just varying input like randomly?

01:18:28.460 --> 01:18:32.060
<v Chris Gammell>I can explain how it works. That's still like the magic side for me.

01:18:32.060 --> 01:18:37.100
<v Chris Gammell>Yeah. Okay. Um, that's okay though. I mean like, but it's doing something that is getting it to that

01:18:37.100 --> 01:18:42.060
<v Chris Gammell>state. So yeah. So the, one of the examples I use when I'm explaining it on like the videos and stuff

01:18:42.060 --> 01:18:48.620
<v Chris Gammell>is that I use a Python library called pySMT, which is just like a wrapper for these sat solvers. Okay.

01:18:48.620 --> 01:18:53.500
<v Chris Gammell>And you can do something like the example I use is you take the letters in hello,

01:18:53.500 --> 01:18:58.940
<v Chris Gammell>H E L L O and the letters in world, W R O L D. And you say to the sat solver,

01:18:58.940 --> 01:19:05.100
<v Chris Gammell>if you assign them all a value from one to 10 in those letters, hello, in those letters,

01:19:05.100 --> 01:19:11.740
<v Chris Gammell>world, and they both got to add up to 25 and they've both got to equal each other. Okay.

01:19:11.740 --> 01:19:16.780
<v Chris Gammell>Can you come up with a way of assigning the numbers that satisfy those constraints? Okay.

01:19:16.780 --> 01:19:20.700
<v Chris Gammell>Another classic one is like solving Sudokus. You know, you give it these certain things,

01:19:20.700 --> 01:19:25.580
<v Chris Gammell>those puzzles, animators, and then it will go away and it will find, it will find if it's possible or not.

01:19:25.580 --> 01:19:31.580
<v Chris Gammell>But the interesting thing about them is they never come back and say, I don't know. They say either

01:19:31.580 --> 01:19:37.340
<v Chris Gammell>yes or no. There's no kind of in between. Like if you might decide to get to the end and it's like,

01:19:37.340 --> 01:19:40.940
<v Chris Gammell>you know, I've tried everything. That's not possible. Right. Maybe it's, there's too many

01:19:40.940 --> 01:19:46.380
<v Chris Gammell>combinations and it is just, it's running for three or four or five days and you decide, okay,

01:19:46.380 --> 01:19:51.100
<v Chris Gammell>I need to limit my space a bit. You stop that job and you change it a bit and you run it again.

01:19:51.100 --> 01:19:55.500
<v Chris Gammell>Yeah. But it's never going to come back and say, no, there's no way. But actually there was a way.

01:19:55.500 --> 01:20:00.060
<v Chris Gammell>Right. Right. Yeah. So that's the kind of the power of the formal tools is you can say like,

01:20:01.020 --> 01:20:05.180
<v Chris Gammell>we used it recently in this machine learning accelerator, which has got a single ported

01:20:05.980 --> 01:20:11.660
<v Chris Gammell>memory with a pipeline to control the kind of accelerated multiplications. And it was important

01:20:11.660 --> 01:20:17.660
<v Chris Gammell>that you can't read or and write to the single ported memory at one time. So you can just write one

01:20:17.660 --> 01:20:24.300
<v Chris Gammell>assertion that you just say, I assert that only one or the other of those lines can be true at once.

01:20:24.300 --> 01:20:28.460
<v Chris Gammell>And that's all you need to do. Then you run the formal tools on that. And then it will try and find

01:20:28.460 --> 01:20:33.340
<v Chris Gammell>any way at all to give the input to the pipeline in a way that messes it up and gets it to read and

01:20:33.340 --> 01:20:39.580
<v Chris Gammell>write at once. So if it says no, you're guaranteed that your design is good in a mathematical way,

01:20:39.580 --> 01:20:44.540
<v Chris Gammell>a mathematical certainty, which it would be very difficult to get that kind of certainty from a test bench,

01:20:44.540 --> 01:20:48.060
<v Chris Gammell>right? Because how could you test every combination? Of course, of course. Right.

01:20:48.060 --> 01:20:52.860
<v Chris Gammell>And it's like the test bench is like, well, your input is now five, your inputs now, you know,

01:20:52.860 --> 01:20:58.460
<v Chris Gammell>or your inputs five from five to 27. Right. You could say that as like a test bench. Yeah.

01:20:58.860 --> 01:21:03.180
<v Chris Gammell>But I might not think to make my input. Again, it's up to the imagination of the test.

01:21:03.180 --> 01:21:06.540
<v Chris Gammell>Yeah. But if you've got something with too many combinations to test and you'll never get all the

01:21:06.540 --> 01:21:10.300
<v Chris Gammell>corner cases. Right. Right. Right. Huh. But there's things that it's no good for, like

01:21:10.860 --> 01:21:14.380
<v Chris Gammell>multiplication. Again, that's not something I can explain right now. That's like,

01:21:14.380 --> 01:21:16.700
<v Chris Gammell>on one of my ongoing questions. To the TVD. Yeah.

01:21:16.700 --> 01:21:23.100
<v Chris Gammell>To be able to explain that. Yeah. But much better to do something in like with Verilator or like C++,

01:21:23.100 --> 01:21:28.060
<v Chris Gammell>you write something that just exercises the entire space, checks all the inputs and the output is

01:21:28.060 --> 01:21:32.780
<v Chris Gammell>correct and run it. And it takes 20 minutes to test. Verilator is the Verilog simulator, right?

01:21:32.780 --> 01:21:38.700
<v Chris Gammell>Yeah. It's like a, it's like a C wrapper for simulating your Verilog code. Okay. Yeah.

01:21:39.740 --> 01:21:44.060
<v Chris Gammell>Okay. Yeah. It's hard. Yeah. This is definitely hard to wrap my head around.

01:21:44.060 --> 01:21:50.700
<v Chris Gammell>Yeah. But yeah, you should watch my videos. I've watched one. Sorry. Well, here's, I guess that's a

01:21:50.700 --> 01:21:55.340
<v Chris Gammell>good question then. Who would be using this? I mean, like, so is this chip companies and,

01:21:56.140 --> 01:21:59.820
<v Chris Gammell>you know, like industrial companies, like people, who needs to use formal verification?

01:22:00.380 --> 01:22:06.940
<v Chris Gammell>Well, I think historically it's been people that can't tolerate failures. Okay. So space shuttles.

01:22:06.940 --> 01:22:13.340
<v Chris Gammell>Or when the failures are too expensive. So if you build an ASIC and I was talking to an ASIC engineer

01:22:13.340 --> 01:22:18.860
<v Chris Gammell>recently and they were like, one of the things that terrifies us is that we build a state machine

01:22:18.860 --> 01:22:24.460
<v Chris Gammell>into the ASIC that ends up getting stalled or blocked. Oh. And then there's no way of unblocking

01:22:24.460 --> 01:22:30.940
<v Chris Gammell>that. And we have to do a new spin. Yeah. New mask. A huge amount of cost on that. Yeah. 10 million dollars. Yeah. Yeah.

01:22:30.940 --> 01:22:37.900
<v Chris Gammell>So people like that, where they've got this huge investment or like you said, like space or

01:22:37.900 --> 01:22:41.020
<v Chris Gammell>aeronautics and stuff like that. Right. No coming back from it kind of thing. Yeah.

01:22:41.020 --> 01:22:49.420
<v Chris Gammell>And typically the price of the tools is reflected like that kind of niche area. Yeah. And the one

01:22:49.420 --> 01:22:53.420
<v Chris Gammell>thing that we're trying to do here is as well as the tools being open source so that you can

01:22:54.300 --> 01:23:02.380
<v Chris Gammell>download and compile and start using them at no cost. Yeah. We're selling licenses that kind of come

01:23:02.380 --> 01:23:07.340
<v Chris Gammell>with the backup, the technical support of. Yeah. Yeah. It's a service contract. Yeah. That kind of thing.

01:23:07.340 --> 01:23:15.100
<v Chris Gammell>Yeah. And or being able to buy online hours so you can try it out quite cheaply. Yeah. Like I think

01:23:15.100 --> 01:23:22.460
<v Chris Gammell>the cheapest license is maybe a thousand dollars a month. Probably a lot cheaper than a former tool.

01:23:22.460 --> 01:23:26.780
<v Chris Gammell>Oh, God. Yeah. It's unbelievable. It sounds so niche and so like important that I can imagine

01:23:26.780 --> 01:23:32.460
<v Chris Gammell>a six figure type of. Yeah. I think there's a lot of room for people that

01:23:32.460 --> 01:23:39.980
<v Chris Gammell>have never heard of it or have heard of it and think it's too hard or heard of it and think it's too

01:23:39.980 --> 01:23:49.660
<v Chris Gammell>hard and it's too expensive. Yeah. And it's yeah, I think it's another valuable tool in the toolbox to

01:23:49.660 --> 01:23:55.980
<v Chris Gammell>at least know is there and occasionally use it. Yeah. I don't like I think also some people have the

01:23:55.980 --> 01:24:02.380
<v Chris Gammell>impression that you have to like formally verify everything or nothing. But again, like a couple of

01:24:02.380 --> 01:24:07.500
<v Chris Gammell>properties in the occasional file to like the bits where you're confused or you think what's going to

01:24:07.500 --> 01:24:12.060
<v Chris Gammell>happen if this I just can't look at I'll just write my one formal property that says the state machine

01:24:12.060 --> 01:24:18.540
<v Chris Gammell>must never get to this state. Yeah. Okay. So let's run with that example real quick. I know that this is a

01:24:18.540 --> 01:24:22.700
<v Chris Gammell>stupid question before you even ask it. But like there is no stupid. There's a stupid question. I'm about to ask it.

01:24:22.700 --> 01:24:27.660
<v Chris Gammell>How long would that take? Now, I know that that's a stupid question because that's an undefined problem,

01:24:27.660 --> 01:24:31.500
<v Chris Gammell>right? To write or to run it. To run it. So you said sometimes they take three or four to five days,

01:24:31.500 --> 01:24:36.300
<v Chris Gammell>right? But maybe let's constrain the problem, right? Like, so we've got an ECP 5 badge, right?

01:24:37.100 --> 01:24:42.140
<v Chris Gammell>I want to have the state machine example you talked about earlier. Yeah. How many inputs could it even

01:24:42.140 --> 01:24:46.540
<v Chris Gammell>have? Like how long would that take to simulate that or to verify that sort of thing?

01:24:46.540 --> 01:24:57.180
<v Chris Gammell>Uh, it's really an open question because you can have, you can have, um, uh, like a proof that can

01:24:57.660 --> 01:25:04.300
<v Chris Gammell>run in seconds and be done. Okay. Um, because, uh, because there's only like a couple of branch

01:25:04.300 --> 01:25:08.860
<v Chris Gammell>points that could, yeah. Like if you imagine you have like a register and you're saying this register

01:25:08.860 --> 01:25:13.740
<v Chris Gammell>must never equal zero and you set it to one when the program starts, but then there's no logic in the,

01:25:13.740 --> 01:25:20.300
<v Chris Gammell>um, in the design that would ever set it to zero. Oh, right. Then the, the, the, the formal tools

01:25:20.300 --> 01:25:25.900
<v Chris Gammell>would just immediately see there's no way of ever being changed and just be like finished, done.

01:25:26.540 --> 01:25:34.460
<v Chris Gammell>But if you had that as say, the output of an ADC or something, there's a 16 kilobyte block ram and the out,

01:25:34.460 --> 01:25:39.900
<v Chris Gammell>the, when you're reading an address, the output must never be more than 200. Yeah. Then that's a

01:25:39.900 --> 01:25:43.580
<v Chris Gammell>different problem. You've got to kind of approach that in a bit of a different way. Yeah. So I know

01:25:43.580 --> 01:25:47.180
<v Chris Gammell>that this is going to lead me back to asking you how it works under the hood, which I realized you

01:25:47.180 --> 01:25:52.380
<v Chris Gammell>said was a thing that you're still a bit magical. Yeah. Yeah. Yeah. But it's like, it feels like it's

01:25:52.380 --> 01:25:56.780
<v Chris Gammell>like almost like a sensitivity analysis. The way you've talked about, it's like almost a sensitivity

01:25:56.780 --> 01:26:02.380
<v Chris Gammell>analysis of like, like how much, what could change, like how, like how powerful is this knob that you're

01:26:02.380 --> 01:26:07.820
<v Chris Gammell>trying to test? Right. So, uh, sensitivity analysis, the way that I think about it is you kind of back

01:26:07.820 --> 01:26:16.140
<v Chris Gammell>calculate to say, I want to know if I turn the knob for, uh, I don't know, voltage gain, right? How

01:26:16.140 --> 01:26:21.020
<v Chris Gammell>much does it change the output way, way over there? Right. And if it changes a lot, the sensitivity

01:26:21.020 --> 01:26:24.940
<v Chris Gammell>is very high. If it changes a little sensitivity is low. Yeah. And it sounds like it's that, but then

01:26:24.940 --> 01:26:30.060
<v Chris Gammell>back calculating it for all of the digital and the combinatorial stuff, which is why the, which is

01:26:30.060 --> 01:26:36.060
<v Chris Gammell>why I think that the multiply stuff is more difficult for a formal proof. Because there's so many,

01:26:36.060 --> 01:26:40.220
<v Chris Gammell>a state machine is easier because there's only a certain number of ways of transitioning from

01:26:40.220 --> 01:26:45.260
<v Chris Gammell>state to state. I see. So you talked about constraining the problem space. Yeah. What

01:26:45.260 --> 01:26:51.020
<v Chris Gammell>did you call that? Yeah. So like this, the search. So if your design has got a thousand flip-flops in it,

01:26:51.020 --> 01:26:56.860
<v Chris Gammell>Yeah. So it's got that combination of all those different. So if you looked at all the possible

01:26:56.860 --> 01:27:03.420
<v Chris Gammell>states your design could have, it would be two to the thousand. Uh huh. So it's a really big space. Yeah.

01:27:03.420 --> 01:27:10.380
<v Chris Gammell>But if you can constrain the space that the solver is working within, then you can also make things

01:27:10.380 --> 01:27:16.140
<v Chris Gammell>work faster. So you can use this as a keyword, an operator called assume, where you can just say,

01:27:16.700 --> 01:27:22.700
<v Chris Gammell>for the sake of this problem, assume that this entire area of the state is never going to change,

01:27:22.700 --> 01:27:26.140
<v Chris Gammell>or is always going to be like this. Okay. And then it will only ever consider.

01:27:26.140 --> 01:27:32.140
<v Chris Gammell>So do you ever start tests where they're so constrained that you know it's going to be super

01:27:32.140 --> 01:27:39.100
<v Chris Gammell>short? Well, that's one of the, uh, that's one of the, um, uh, the dangers is for like, for example,

01:27:39.100 --> 01:27:44.060
<v Chris Gammell>you could say, okay, I've got my property set up. The state machine must never enter this state here.

01:27:44.060 --> 01:27:50.940
<v Chris Gammell>And then you've got an assumption that says, um, assume reset equals high. And then actually your design

01:27:50.940 --> 01:27:57.180
<v Chris Gammell>never moves forwards because the reset is always high and the design can't change. So the tools

01:27:57.180 --> 01:28:01.260
<v Chris Gammell>will finish immediately and say your design passes. Right. And you go, woohoo, I'm getting beer.

01:28:01.260 --> 01:28:06.460
<v Chris Gammell>But actually you made an assumption that prevented your design from ever working. Right. So that's, um,

01:28:07.020 --> 01:28:13.100
<v Chris Gammell>so the, the formal tools aren't some kind of magic bullet. They're only as good as the properties and to

01:28:13.100 --> 01:28:20.140
<v Chris Gammell>write good, well-meaning properties that cover the important stuff is the work of getting to be good at

01:28:20.140 --> 01:28:26.300
<v Chris Gammell>using the tools. Huh? But there, it seems like there's a balance point between like something

01:28:26.300 --> 01:28:31.900
<v Chris Gammell>that is super under constrained and it runs forever and super over constrained where it finishes.

01:28:31.900 --> 01:28:37.660
<v Chris Gammell>Right. Yeah. So how do you strike that balance? I think, um, that's again, part of the,

01:28:39.340 --> 01:28:44.540
<v Chris Gammell>this is what orange you the big bucks. Yeah. If you can answer that question. Well, it's yeah.

01:28:44.540 --> 01:28:51.660
<v Chris Gammell>Knowing what stuff is the important stuff to test and how to test that. And sometimes it's very

01:28:51.660 --> 01:28:57.340
<v Chris Gammell>straightforward what the answer is like in the example I used earlier about the, um, the memory

01:28:57.340 --> 01:29:07.580
<v Chris Gammell>access, because, um, I like, I, I could do a lot of work on how the, um, the bit that dispatches

01:29:08.140 --> 01:29:13.660
<v Chris Gammell>commands into the pipeline works. But actually the only thing I care about is that the read and the

01:29:13.660 --> 01:29:18.700
<v Chris Gammell>right line are never high at the same point. So I just put one assertion there. And then if there

01:29:18.700 --> 01:29:26.540
<v Chris Gammell>is a bug that leads me to the problem in the dispatch for the pipeline, but then other designs

01:29:26.540 --> 01:29:33.340
<v Chris Gammell>are not that near straight forwards to work out what properties you need to fully understand it.

01:29:33.340 --> 01:29:39.180
<v Chris Gammell>Like to, to formally verify a FIFO, uh, there's like a few different things you've got to do. You've

01:29:39.180 --> 01:29:44.220
<v Chris Gammell>got to like say that, um, when you make a read at a certain address and a certain bit of data goes

01:29:44.220 --> 01:29:51.260
<v Chris Gammell>in, when you make it right, then the data ends up inside the FIFO and then it doesn't get lost.

01:29:51.260 --> 01:29:56.700
<v Chris Gammell>And then there's a little bit of kind of construction you need to do. Like sometimes you have to build

01:29:57.580 --> 01:30:03.900
<v Chris Gammell>a state machine that, uh, handles the formal testing of, Oh, okay.

01:30:03.900 --> 01:30:09.900
<v Chris Gammell>Okay. Of another state machine. So that different assumptions or assertions are made depending on

01:30:09.900 --> 01:30:17.660
<v Chris Gammell>the current operating state. Yeah. Well, that's good. I mean, it, I guess, you know, it's not like,

01:30:18.220 --> 01:30:24.300
<v Chris Gammell>I don't think anyone listening to this expects FPGAs to be a panacea, you know, like to like solve all

01:30:24.300 --> 01:30:30.380
<v Chris Gammell>digital problems and that, but I think tools like this also make it a little bit more accessible as

01:30:30.380 --> 01:30:35.020
<v Chris Gammell>well. Right. Cause you can run a lot more tests and, and this is honestly what people are doing

01:30:35.020 --> 01:30:39.260
<v Chris Gammell>when they verify like an ARM core as well. Right. Like that's just kind of all pre-done for you.

01:30:39.820 --> 01:30:42.300
<v Chris Gammell>ARM, someone at ARM is running similar testing.

01:30:42.300 --> 01:30:42.700
<v Chris Gammell>You hope so, yeah.

01:30:42.700 --> 01:30:44.140
<v Chris Gammell>Well, yeah, I actually don't know.

01:30:46.140 --> 01:30:47.660
<v Chris Gammell>Is that, is that a thing that they do?

01:30:47.660 --> 01:30:49.420
<v Chris Gammell>Um, I don't know.

01:30:49.420 --> 01:30:52.860
<v Chris Gammell>Well, maybe a better question is who, who are your clients?

01:30:52.860 --> 01:30:58.860
<v Chris Gammell>Well, I had a great conversation, um, with a guy who works at, um,

01:30:59.740 --> 01:31:01.980
<v Chris Gammell>a particle accelerator in the States.

01:31:01.980 --> 01:31:02.540
<v Chris Gammell>Oh, cool.

01:31:02.540 --> 01:31:04.700
<v Chris Gammell>Just trying to remember that, uh,

01:31:04.700 --> 01:31:05.100
<v Chris Gammell>Fermi?

01:31:05.100 --> 01:31:12.220
<v Chris Gammell>No, it's, um, ALS, advanced light source. I think that's it.

01:31:12.940 --> 01:31:19.900
<v Chris Gammell>Um, and they used, um, Clifford's Pico RV 32, which is the same thing I've got two of in there.

01:31:19.900 --> 01:31:20.140
<v Chris Gammell>Yeah.

01:31:20.140 --> 01:31:21.020
<v Chris Gammell>It's in the conference match.

01:31:21.020 --> 01:31:21.340
<v Chris Gammell>Yeah.

01:31:21.340 --> 01:31:26.060
<v Chris Gammell>Um, and I was interested in, I'm interested in big science anyway.

01:31:26.060 --> 01:31:26.300
<v Chris Gammell>Yeah.

01:31:26.300 --> 01:31:28.540
<v Chris Gammell>And I was asking like, what, like, why did you choose this?

01:31:28.540 --> 01:31:30.140
<v Chris Gammell>And was it important that it was formally verified?

01:31:30.140 --> 01:31:34.540
<v Chris Gammell>And they use it for the interlocks for the RF safety system.

01:31:34.540 --> 01:31:36.540
<v Chris Gammell>I think you might've mentioned this when he was on the show.

01:31:36.540 --> 01:31:36.860
<v Chris Gammell>Right.

01:31:36.860 --> 01:31:38.380
<v Chris Gammell>There was someone, there was someone at a particle.

01:31:38.380 --> 01:31:39.660
<v Chris Gammell>I thought it was CERN, but maybe it was someone.

01:31:39.660 --> 01:31:39.660
<v Speaker ?>

01:31:39.660 --> 01:31:41.100
<v Chris Gammell>He also, they're used in CERN as well.

01:31:41.100 --> 01:31:41.660
<v Chris Gammell>They're used in CERN too.

01:31:41.660 --> 01:31:41.660
<v Speaker ?>

01:31:41.660 --> 01:31:41.980
<v Chris Gammell>Okay.

01:31:41.980 --> 01:31:43.740
<v Chris Gammell>But the guy that I interviewed was in, unless.

01:31:43.740 --> 01:31:43.980
<v Chris Gammell>Oh, great.

01:31:43.980 --> 01:31:44.300
<v Chris Gammell>Great.

01:31:44.300 --> 01:31:51.180
<v Chris Gammell>Um, and yeah, it would, it kind of gave them confidence that by using a formally verified

01:31:51.180 --> 01:31:56.460
<v Chris Gammell>processor to control the safety features of their accelerator.

01:31:56.460 --> 01:31:56.860
<v Chris Gammell>Yeah.

01:31:57.100 --> 01:31:59.900
<v Chris Gammell>Gave them confidence that it was going to do the right thing.

01:31:59.900 --> 01:32:00.300
<v Chris Gammell>Yeah.

01:32:00.300 --> 01:32:00.380
<v Chris Gammell>Yeah.

01:32:00.860 --> 01:32:02.100
<v Chris Gammell>The code could still mess up.

01:32:02.200 --> 01:32:02.460
<v Chris Gammell>Just saying.

01:32:02.680 --> 01:32:02.820
<v Chris Gammell>Yeah.

01:32:03.080 --> 01:32:03.540
<v Chris Gammell>Yeah.

01:32:03.540 --> 01:32:03.660
<v Chris Gammell>Yeah.

01:32:03.660 --> 01:32:03.860
<v Chris Gammell>Yeah.

01:32:03.960 --> 01:32:04.340
<v Chris Gammell>Absolutely.

01:32:04.580 --> 01:32:06.060
<v Chris Gammell>But I guess that's one less thing you have to worry about.

01:32:06.100 --> 01:32:06.220
<v Chris Gammell>Yeah.

01:32:06.220 --> 01:32:08.620
<v Chris Gammell>Like weird bugs happening.

01:32:08.620 --> 01:32:09.180
<v Chris Gammell>Yeah.

01:32:09.180 --> 01:32:12.380
<v Chris Gammell>And having it open source means that you can check it for yourself.

01:32:12.620 --> 01:32:12.840
<v Chris Gammell>Yeah.

01:32:13.500 --> 01:32:13.860
<v Chris Gammell>Okay.

01:32:14.020 --> 01:32:15.420
<v Chris Gammell>So that's, yeah, definitely.

01:32:16.540 --> 01:32:21.260
<v Chris Gammell>Well, I mean, uh, are there other people out there that should think about, do I guess

01:32:21.260 --> 01:32:22.200
<v Chris Gammell>I kind of already asked that though.

01:32:22.200 --> 01:32:34.880
<v Chris Gammell>I would say that, um, uh, if you were getting started with, uh, the FPGA stuff, then hold

01:32:34.880 --> 01:32:35.460
<v Chris Gammell>off a little bit.

01:32:35.460 --> 01:32:41.540
<v Chris Gammell>Um, well, you're going to, uh, probably just immediately want to get your hands dirty.

01:32:41.540 --> 01:32:41.900
<v Chris Gammell>Yeah.

01:32:41.900 --> 01:32:42.300
<v Chris Gammell>Like I did.

01:32:42.420 --> 01:32:47.080
<v Chris Gammell>And like do a bunch of examples and you load them onto the FPGA and you're taking a bit

01:32:47.080 --> 01:32:48.440
<v Chris Gammell>of the cargo cult stuff like you mentioned.

01:32:48.440 --> 01:32:48.660
<v Chris Gammell>Yeah.

01:32:48.660 --> 01:32:51.940
<v Chris Gammell>And then stuff's going to stop working and you're going to be an FPGA help.

01:32:52.100 --> 01:32:52.460
<v Chris Gammell>Got it.

01:32:52.580 --> 01:32:56.540
<v Chris Gammell>And you're going to, uh, you're going to ask somebody and they'll say, well, have you simulated

01:32:56.540 --> 01:32:56.980
<v Chris Gammell>the design?

01:32:57.060 --> 01:32:57.980
<v Chris Gammell>What happens when this happens?

01:32:58.040 --> 01:32:59.080
<v Chris Gammell>And you'll say, no, what simulation?

01:32:59.360 --> 01:33:01.540
<v Chris Gammell>And then you'll have to learn how to do simulation.

01:33:01.700 --> 01:33:02.220
<v Chris Gammell>And I would say.

01:33:02.300 --> 01:33:03.200
<v Chris Gammell>Down the rabbit hole you go.

01:33:03.200 --> 01:33:11.700
<v Chris Gammell>At that point, uh, then it's also worth checking out, uh, some basic formal verification stuff

01:33:11.700 --> 01:33:13.600
<v Chris Gammell>because it's always an hour free to experiment.

01:33:13.600 --> 01:33:13.880
<v Chris Gammell>Yeah.

01:33:14.080 --> 01:33:14.200
<v Chris Gammell>Yeah.

01:33:14.300 --> 01:33:23.000
<v Chris Gammell>And, um, one of the, they, they can help you accelerate the time to find and fix bugs.

01:33:23.400 --> 01:33:25.700
<v Chris Gammell>So, you know, like test driven software.

01:33:25.920 --> 01:33:26.120
<v Chris Gammell>Yeah.

01:33:26.240 --> 01:33:26.420
<v Chris Gammell>Right.

01:33:26.480 --> 01:33:26.780
<v Chris Gammell>That's a great.

01:33:26.780 --> 01:33:27.840
<v Chris Gammell>You write your test first.

01:33:27.880 --> 01:33:28.060
<v Chris Gammell>Yeah.

01:33:28.060 --> 01:33:30.780
<v Chris Gammell>And then you write the, so you write your formal properties first.

01:33:30.780 --> 01:33:32.860
<v Chris Gammell>Like when this thing happens, then this thing must happen.

01:33:32.860 --> 01:33:37.740
<v Chris Gammell>Then you write your Verilog and you run the formal proof and it just says, no, it didn't

01:33:37.740 --> 01:33:38.000
<v Chris Gammell>work.

01:33:38.020 --> 01:33:41.560
<v Chris Gammell>And then you, you get your trace back and you're like, oh yeah, because if resets high

01:33:41.560 --> 01:33:43.600
<v Chris Gammell>when that's low, then it can end up in this state.

01:33:43.720 --> 01:33:45.760
<v Chris Gammell>And then you write that extra bit and that stops that.

01:33:45.800 --> 01:33:46.480
<v Chris Gammell>And then you run it again.

01:33:46.820 --> 01:33:47.600
<v Chris Gammell>It fails again.

01:33:47.640 --> 01:33:51.180
<v Chris Gammell>And it says, oh yeah, because if it was in this state when the bus was like that, then

01:33:51.180 --> 01:33:51.980
<v Chris Gammell>this is going to happen.

01:33:52.080 --> 01:33:53.140
<v Chris Gammell>I'd write the thing that does that.

01:33:53.140 --> 01:33:54.940
<v Chris Gammell>And then it passes and you're like, okay, cool.

01:33:55.300 --> 01:33:56.420
<v Chris Gammell>Now I've got a bit more confidence.

01:33:56.900 --> 01:33:58.600
<v Chris Gammell>And you probably do simulation as well.

01:33:58.940 --> 01:33:59.140
<v Chris Gammell>Yeah.

01:33:59.260 --> 01:34:02.400
<v Chris Gammell>Well, I used to just simulate FPJs actually back in the day, but it was always very visual.

01:34:02.680 --> 01:34:06.140
<v Chris Gammell>And that's interesting too, because this is decidedly not visual, right?

01:34:06.560 --> 01:34:08.700
<v Chris Gammell>Well, it can be, I'm sure, but it's visual.

01:34:09.260 --> 01:34:11.660
<v Chris Gammell>If, um, do you mean like looking at waveforms?

01:34:11.680 --> 01:34:11.820
<v Chris Gammell>Yeah.

01:34:12.080 --> 01:34:12.240
<v Chris Gammell>Yeah.

01:34:12.280 --> 01:34:12.460
<v Chris Gammell>Yeah.

01:34:12.460 --> 01:34:15.840
<v Chris Gammell>It's visual when it fails because then it writes you out your trace.

01:34:16.080 --> 01:34:16.380
<v Chris Gammell>Yeah.

01:34:16.380 --> 01:34:20.380
<v Chris Gammell>I meant more like looking at charts of highs and lows and highs and lows and highs.

01:34:20.380 --> 01:34:20.520
<v Chris Gammell>Yeah.

01:34:20.520 --> 01:34:25.160
<v Chris Gammell>Because that's, uh, you know, if you've got like, um, like a hundred megabytes of traces

01:34:25.160 --> 01:34:30.400
<v Chris Gammell>and you've got your bug in there somewhere, that is, that can be really eye-watering to

01:34:30.400 --> 01:34:31.920
<v Chris Gammell>work your way through all of that.

01:34:32.040 --> 01:34:36.400
<v Chris Gammell>So one of the things I love about working with the formal tools is that I'll probably, all

01:34:36.400 --> 01:34:40.820
<v Chris Gammell>my traces will be 20 clocks long and it will just go from a running state to a failed

01:34:40.820 --> 01:34:42.780
<v Chris Gammell>state and I can just see how it happened.

01:34:43.820 --> 01:34:45.040
<v Chris Gammell>What is a trace?

01:34:45.120 --> 01:34:46.160
<v Chris Gammell>I guess I don't know what that is.

01:34:46.800 --> 01:34:49.600
<v Chris Gammell>Um, it traces like the steps that it's going through.

01:34:49.600 --> 01:34:49.940
<v Chris Gammell>Yeah.

01:34:49.940 --> 01:34:50.440
<v Chris Gammell>Like imagine.

01:34:50.720 --> 01:34:50.920
<v Chris Gammell>Yeah.

01:34:50.980 --> 01:34:56.380
<v Chris Gammell>So it's like, um, each waveform shows you the state of the flip flop for each of the

01:34:56.380 --> 01:35:00.220
<v Chris Gammell>flip flops and you could like load all of them at once and see how the state of the

01:35:00.220 --> 01:35:01.780
<v Chris Gammell>design is changing all the time.

01:35:01.780 --> 01:35:07.200
<v Chris Gammell>But maybe you just have the clock, the reset, what state the state machine is in, what is

01:35:07.200 --> 01:35:08.180
<v Chris Gammell>going on on the data bus.

01:35:08.180 --> 01:35:11.320
<v Chris Gammell>And you see these things changing as the design progresses through.

01:35:11.320 --> 01:35:11.800
<v Chris Gammell>Okay.

01:35:11.960 --> 01:35:16.480
<v Chris Gammell>So you run your simulation and it dumps like a VCD file, value change dump.

01:35:16.720 --> 01:35:16.840
<v Chris Gammell>Uh-huh.

01:35:16.840 --> 01:35:21.400
<v Chris Gammell>And then you load that up in a program like GTK wave and that's got all the, the traces.

01:35:21.580 --> 01:35:22.080
<v Chris Gammell>The stuff that I'm used to.

01:35:22.220 --> 01:35:22.400
<v Chris Gammell>Yeah.

01:35:22.580 --> 01:35:22.720
<v Chris Gammell>Yeah.

01:35:23.120 --> 01:35:24.260
<v Chris Gammell>Looks like a logic analyzer.

01:35:24.340 --> 01:35:24.580
<v Chris Gammell>Yeah.

01:35:24.680 --> 01:35:24.880
<v Chris Gammell>Yeah.

01:35:24.880 --> 01:35:25.480
<v Chris Gammell>That's what I was thinking.

01:35:25.600 --> 01:35:25.740
<v Chris Gammell>Okay.

01:35:25.960 --> 01:35:26.180
<v Chris Gammell>Okay.

01:35:26.500 --> 01:35:26.700
<v Chris Gammell>Cool.

01:35:26.700 --> 01:35:27.560
<v Chris Gammell>I call it traces, but.

01:35:28.140 --> 01:35:28.940
<v Chris Gammell>Yeah, that's cool.

01:35:29.120 --> 01:35:29.420
<v Chris Gammell>That's cool.

01:35:30.480 --> 01:35:32.580
<v Chris Gammell>Well, uh, where can people find out more about this stuff?

01:35:32.580 --> 01:35:39.480
<v Chris Gammell>Um, for formal verification, uh, you can get in touch with me, Matt at symbioticeda.com

01:35:39.480 --> 01:35:41.180
<v Chris Gammell>to arrange a demo.

01:35:41.680 --> 01:35:41.920
<v Chris Gammell>Demos.

01:35:42.220 --> 01:35:46.720
<v Chris Gammell>If you want to do like a demo, um, if you don't want to do a demo, but you want to watch some

01:35:46.720 --> 01:35:49.780
<v Chris Gammell>videos, check out and subscribe to our YouTube channel.

01:35:49.780 --> 01:35:50.460
<v Chris Gammell>Hit that bell.

01:35:50.520 --> 01:35:51.360
<v Chris Gammell>Hit that bell.

01:35:51.720 --> 01:35:52.300
<v Speaker ?>Ding, ding.

01:35:54.500 --> 01:35:57.260
<v Chris Gammell>Search YouTube for symbioticeda.

01:35:57.820 --> 01:35:58.500
<v Chris Gammell>Symbioticeda.

01:35:58.500 --> 01:36:02.700
<v Chris Gammell>Um, I'm just, I just published my second video.

01:36:02.940 --> 01:36:06.860
<v Chris Gammell>I did like a series on how the open source FPGA tool chain works.

01:36:07.060 --> 01:36:07.200
<v Chris Gammell>Yeah.

01:36:07.280 --> 01:36:11.420
<v Chris Gammell>And now I'm doing a series on like an introduction to formal verification.

01:36:11.600 --> 01:36:11.800
<v Chris Gammell>Great.

01:36:11.940 --> 01:36:13.680
<v Chris Gammell>I just published the second one working on the third one.

01:36:13.760 --> 01:36:14.020
<v Chris Gammell>Awesome.

01:36:14.400 --> 01:36:16.540
<v Chris Gammell>So, um, yeah.

01:36:16.560 --> 01:36:19.280
<v Chris Gammell>And we've got a webinar coming up in one week time.

01:36:19.320 --> 01:36:20.300
<v Chris Gammell>I don't know when this is going to go up.

01:36:20.300 --> 01:36:21.620
<v Chris Gammell>I don't like webinars, but you know.

01:36:21.640 --> 01:36:22.200
<v Chris Gammell>You don't like them?

01:36:22.440 --> 01:36:22.800
<v Chris Gammell>I don't.

01:36:22.920 --> 01:36:24.120
<v Chris Gammell>I don't like the word, honestly.

01:36:24.120 --> 01:36:27.860
<v Chris Gammell>Like the idea of like someone like being there, like teaching me, like transferring knowledge.

01:36:27.860 --> 01:36:29.040
<v Chris Gammell>I just wish it was a different name.

01:36:29.180 --> 01:36:29.340
<v Chris Gammell>Yeah.

01:36:29.440 --> 01:36:29.760
<v Chris Gammell>Webinars.

01:36:29.960 --> 01:36:30.640
<v Chris Gammell>Never liked the name.

01:36:30.700 --> 01:36:30.840
<v Chris Gammell>Yeah.

01:36:30.840 --> 01:36:31.500
<v Chris Gammell>I agree with you.

01:36:31.820 --> 01:36:32.520
<v Chris Gammell>We're trying it out.

01:36:32.600 --> 01:36:36.400
<v Chris Gammell>I don't know how well it's going to, we think we've got maybe 30 or 40 people registered

01:36:36.400 --> 01:36:36.860
<v Chris Gammell>so far.

01:36:37.000 --> 01:36:38.680
<v Chris Gammell>Like live video lecture.

01:36:39.120 --> 01:36:39.260
<v Speaker ?>Yeah.

01:36:39.700 --> 01:36:39.920
<v Chris Gammell>Okay.

01:36:39.960 --> 01:36:40.100
<v Chris Gammell>Yeah.

01:36:40.100 --> 01:36:41.440
<v Chris Gammell>We've got a live video lecture.

01:36:41.580 --> 01:36:42.380
<v Chris Gammell>Oh, I'm so interested.

01:36:42.480 --> 01:36:42.620
<v Chris Gammell>Yeah.

01:36:42.720 --> 01:36:42.900
<v Chris Gammell>Yeah.

01:36:43.080 --> 01:36:44.280
<v Chris Gammell>You can sign up.

01:36:44.880 --> 01:36:45.520
<v Chris Gammell>On our web list.

01:36:45.640 --> 01:36:46.640
<v Chris Gammell>On our mailing list.

01:36:46.780 --> 01:36:46.880
<v Chris Gammell>Yeah.

01:36:47.020 --> 01:36:48.340
<v Chris Gammell>On our Webber tweet.

01:36:49.800 --> 01:36:50.160
<v Chris Gammell>Yeah.

01:36:50.680 --> 01:36:56.180
<v Chris Gammell>Um, and that's going to be like, uh, me and Clifford Wolf talking about getting started with

01:36:56.180 --> 01:36:56.820
<v Chris Gammell>the formal tools.

01:36:56.940 --> 01:36:57.160
<v Chris Gammell>It's great.

01:36:57.160 --> 01:36:57.740
<v Chris Gammell>Yeah.

01:36:57.740 --> 01:36:58.040
<v Chris Gammell>Cool.

01:36:58.580 --> 01:36:58.840
<v Chris Gammell>All right.

01:36:58.880 --> 01:36:59.280
<v Chris Gammell>Well, thanks, man.

01:36:59.680 --> 01:37:00.080
<v Chris Gammell>You're welcome.

01:37:00.520 --> 01:37:00.940
<v Chris Gammell>Thank you.
