 Greetings, RISC-5 friends. If you looked at the live streams that I recorded over the past week, you'll see that I did some conversion of the abstract logic in the sequencer to actual chips, not physically but essentially simulated chips, and I ran it through formal verification, and it worked just fine. So this is very good because it means that I can essentially translate the logic of the sequencer into actual chips and be pretty sure that things are going to work out okay. So one of the things that I did, and this wasn't in the live stream, but this was actually after the live stream, is if you look at this section here, so this is the equivalent of this. So this is the abstract logic here, and this is basically selecting what goes next into the program counter. So you can see that in general there's an if and then a load statement, right, an else if and a load statement, and so on and so forth. So in converting this to a chip, two chips, I wrote this simple function called multiplex to reg, and the idea behind multiplex to reg, and I'll draw this out in the moment, is that there are these selectors, and these are the same selectors as above from here. There are these selectors, and there are also these signals, and the idea is that when one of the selectors is active, then that signal is loaded into the register. That's basically it, and if none of these selectors are active, then the register retains its previous value. Now I explained during the live stream that there are two ways that you can do this. One way is to simply route the output of the register back into one of the inputs of the multiplexer, and just say, well that is one of the selection possibilities, and the advantage of that is that then you get to clock the register on every single clock cycle without having to pass the clock signal through any logic. So the idea would be that actually let's just go to the drawing and take a look at it. Okay, so here we are in the drawing pad, and what I'll do is I will show a register here. Let's select a marker, and here is a register, and it's going to be a 32-bit register, right? And it's got an output, and it's got an input, and it's got a clock. So one of the ways that you can do this is you can stick a multiplexer in front of the register, and let's suppose there are four possible inputs, and there are four selectors. And the idea is that if none of those selectors are selected, well then you just sort of gate the register's clock. So here's the clock input, and here's the actual select. So the idea is that you gate the register's clock with the selection signals, so that you don't clock it when none of the selectors are active. So there's a little bit of a problem with this. So here is a positive edge, and let's suppose that positive edge is the edge on which you will load your register. Well, the idea is that we want to make sure that that positive edge doesn't make it to the register when there is nothing being selected. So let's suppose we have a signal which goes high when any one of the selectors is active. So we would want to do something like this. So when you and these together, you get something like that, and there's the edge. Now, that's going to work fine except when your clock looks something like this. When it's high all the time except there's sort of a low pulse, and you're going to be clocking on the positive edge. So in this particular case, here's your gating signal. So you need to be sure that your gating signal changes its value during that pulse because if it doesn't, if it changes its value before that pulse like right over here, like let's suppose your gating value looks like that, then the problem is that when you and these two together, you end up with a gating signal that looks like this, which actually has two positive edges, which is not really great. And the reason that this might happen is that this gating signal may actually be generated from another clock. So for example, you know, maybe you have two clock phases, here's one clock phase, and here's the other clock phase. And this clock phase generates the gating signal, which is going to be used for this clock phase. So that's not really great. So the alternative. So let's call that the unsafe version, because you really have to think to make sure that you know when your selection signals are going to be changed relative to the clock that you want to clock the register on. So the safe way is to simply take your register, there's your clock, there's your output, there's your input, and there is your multiplexer. And then instead of four inputs, for example, you have five inputs, and that input comes straight from the register's output. And then you have a clock, which now is unencumbered by logic, it's just the straight clock, because now you're clocking it on every single cycle. And your selection is going to be, well, one of these four, and if it's none of those four, then it's going to be this top one. And that's really all there is to it. And this way, you know, you can have your signal be, you know, wherever you want it to be. Let's suppose this is your selector, and you know, one of it goes high, well, it's still not going to get clocked until the positive edge of the clock signal. So you don't have to worry about when your select signals go high or go active relative to your clock pulse. So that's why I kind of like the safe version. And yes, it does involve increasing your multiplexer size by one. But I think overall, it's, you know, it's safer, it's less prone to error. So let's just use that. So that's what in the code, that's what multiplex to chips multiplex to reg actually does. So if none of these are high. So let's see how many selectors we have one, two, three, four, five. So this actually sets up a six input multiplexer. And it automatically routes the output of this register here. Am I showing the right thing? Yeah, it automatically outputs this register here to one of the inputs of the multiplexers. The register is always clocked on this clock. So in this case, it's phase one. There's the program counter. And there are the five possible inputs right over here. Plus, of course, the register itself, that makes six. So what I wanted to do today is see how viable that is to actually convert to hardware. So I'm going to be using Kycat, I'm going to be slapping down some chips and, you know, routing some things together and, you know, see if I can, I can make this this program counter register. Now, here's one of the ideas that I had for this program counter register. So let's oppose that on the main sequencer board. We have a 32 bit bus for the PC. We know that these are all the other inputs that can go to the program counter. So there's the program counter plus four, the X bus, the Z bus, the mem address and the mem data. And all those are 32 bit buses. And then we have the controls. And basically, the controls are going to select one of these six inputs, or, you know, one of these five inputs. And if none of them are selected, then it's going to select the sixth input, whatever, we'll figure out that logic later. So this is going to have at least five lines, if not six, probably five. So the idea that I wanted to try out is looking out at the side view, let's suppose this is the printed circuit board for the sequencer, there would be a bunch of headers over here. And that's what these things represent. These are all headers. Let me put another header over here. And each of these headers is connected to these 32 bit buses. And this header over here is for the selectors. So from a side profile looks kind of like that. And then you would stick the program counter board on top of it. And that would be that, you know, maybe a long thin board. I don't know. It's a thought. And I just want to explore it. So then the question is, well, what do these connectors look like? Well, obviously, I need 32 signals. Plus I need some grounds, because of course, you want a signal to go next to ground so that the impedance between the signal and its return path is low enough. And you know, I could use your standard 0.1 inch headers here. Yes, that means that ground and signal will be separated by 0.1 inches. But yeah, okay. There's also the possibility of using those PCIe slots. But the problem with the PCIe slots is that they're card edge connectors. So, you know, in that case, if this were the PCIe slot, then my card would have to go up like that, which doesn't make sense because it has to sort of span a whole bunch of connectors. The other possibility is that I can instead of laying these out along, say, the x-axis, I can, you know, maybe do them along the y-axis like this and then have the card span this. But then the problem is that my PC is going to have to run like this, PC plus four, x, z, and so on. And then I'm going to have to have more card edge connectors like that. That's another possibility. The problem is that I don't like the fact that these PCIe connectors are now sort of perpendicular to the signal path because now the distance between these buses is pretty large, you know, as opposed to maybe something like this, where the connector is actually parallel to the bus. So, I can stuff them a lot closer so that the bus to bus distance is a lot lower. So, I'm going to try this and see what happens. Okay, now, I am actually using, if you can see down here, I'm actually using one of the latest nightlies of KiCad. And the reason I'm doing that instead of the production version is that this has kind of a few nice features, which I kind of want to explore. You can see that the user interface looks slightly different. So what I'm going to do is I'm going to slap down some hierarchical schematics. And I have already one built. So let's create one here. Okay, so here we can see the sheet properties. So I'm just going to call this, let's see. So we know that we're going to need to feed the PC. Let's start with the register. Okay, so RegPC. And I have already created a schematic for that. That's called Reg32. All right, so let's zoom in a bit. So there is our RegPC. If we go in, we can see that this is formed out of two 16 bit registers. These are 16374s. I chose the FCT logic family, just, you know, because I needed to select something. Actually, there is a particular reason, and I'm not sure it's still valid. But when you have two buffers, and you connect their outputs, the question is, if you disable one buffer and enable the other buffer, what is the disable time versus the enable time? Because if the disable is slower than the enable, then you're going to end up with two buffers enabled at the same time. And then their outputs are going to fight, and you're going to have a problem. But if you disable faster than you're enable, then both buffers will be disabled, and then one buffer will come up and be enabled. So, and I looked at the FCT datasheet, and it seemed to imply that the disable time was always faster than the enable time. The disadvantage is that FCT is a five volt logic series. It's not 3.3 volts. So when I looked at something like the LVT series, it wasn't so clear because at some voltages it was faster, and at some voltages it was slower. So I don't know what I'm going to do about that. But let's just stick with the FCT parts. So in any case, this is my 32 bit register, right? I've got the data coming in, I've got the data coming out, I've got an output enable, which I'm always going to tie to ground, because that's the way the multiplexing register actually works. And that's the way the sequencer works. You never disable the output of a register. And it's got a clock, and all the clocks are tied together, and all the output enables are tied together. Okay, great. Let's go up one. And let's go ahead and import the signals. And this is something that the nightlies have. So this is probably familiar to you when you actually use a hierarchical sheet in the production version. So you may have seen this. You can actually put signals on any edge now, which is kind of neat. All right, this is Q, which will go on the outside. This is D, which will go on the inside. And then we've got the output enable, which I'll stick over here. Notice something else, that the labels that are buses are blue, just like buses should be. So that's kind of nice to. All right, let's go ahead and resize this. So to resize, and the key binding also changed a bit. So I have to click this, and then I can drag like that. Okay, so that's my register. Let's stick a buffer down. So let me start another hierarchical sheet. Let's make it just as big. Oh, wait, there's a clock that I forgot. Let me just stick that in. There's the clock. Okay. So now let me get a hierarchical sheet. Let me call it a buffer. Okay, so this is going to be the buffer for the PC. And the idea is that the multiplexer is just going to be made out of buffers with their outputs put together. And again, I have already pre created a 32 bit buffer. Okay, so if we look at that, oops. That's not what I wanted. So if you look at that, it's basically to 16244s with all of their output enables tied together 32 bits in 32 bits out. And the idea is that you just put a whole bunch of these together in parallel and tie their outputs together. And you know, the output enables are your selectors. And that's it. You're done. So um, let's go ahead and put the signals into here. So there's output enable, there's a that's your input and why that's your output. And there aren't any more, right? No more. Okay. Let's move this down more. So the idea is that you're going to have a bunch of these, right? So I'm going to grab this and control C for copy, control V for paste, control V for paste. So how many of these are we going to have? Six, right? Because there are six inputs. So one, two, three, just copy this, put that there. Okay, let's rename the sheets, rename the sheets. So this is buff PC. Can I use plus plus four? This is there was an X in there. There was a Y. Oops. Y. Okay. What? That's weird. Try again. There was a mem address. And address. And there was a mem data. Okay. So those are our six buffers. Let me go ahead and maybe move this down here. Okay. So the idea is that I just want to take a bus and connect it up to the input of the register. And all the outputs of all the buffers get tied together. Okay. And then the output here goes to this input there. Okay. And now we just have be paste, paste, paste, and paste. So these are our five other inputs and the output enables will work on a little later. The output enable here is going to be tied to ground. So let's just go ahead and do that right now. Grab a power symbol. Okay. It's ground. Let's just use that symbol. And the reason that I want to use this symbol instead of ground ref is that electrical rule checking sort of throws up a warning when the chip has ground has a ground has its power called GND and you connect it to GND ref. I just don't want to see that. So I also don't like the fact that the cursor is this big thick cursor and I sort of have to zoom in now. So maybe they'll change that. Maybe they won't whatever. Okay. So now we have this clock signal that's going to go out to the output. That that's sorry, that's that's going to go out to a connector. So on the sequencer, of course, you know, we have all the clock signals. So this has to go on to a connector. Okay, let's go ahead and move this a little bit. Okay. So the next thing that I want to do is put some connectors in here, right? So at this point, I don't know whether I want to use a 2x32 connector or maybe a 4x16 connector or, you know, maybe I'll do something which is a little bit more clever like I'll have ground signal signal ground signal signal ground so that any signal can couple to at least to one ground. But that sort of, you know, tightens things up. In fact, let's draw that out. Okay, let's move all this out of the way. And let's take a look at what something might look like. So here is one of the pins of the connector and we'll just connect it to a signal. And then we're going to put a ground here. And if I put another signal next to it, well, that signal can couple to this ground and this signal can couple to this ground. And yeah, you know, the return path is going to be composed of both of the signals returns return path. But, you know, it should be a relatively low impedance signal, which basically means that hopefully that the two things won't interfere. Well, that means that I can just put another signal over here, another ground over here and another signal over here. And the interesting thing is that if you look at the 16244 chips, they do exactly the same thing. They have two signals and separated by a ground, two signals a ground, two signals a ground. And in fact, in the middle of the chip, they actually have four signals for whatever reason. So anyway, if we do that signals, let's count the number of signals here zero, one, two, three, four, and then ground, and then signal five and signal six and ground and signal seven. So that's eight signals right there. So how many, how many pins is that? That's five, 10, 12, that's 12 pins. So notice that I that these are eight signals. So I didn't have to, if I interspersed ground between every single signal, then that would be 16 pins rather than the 12 over here. So, you know, I could just repeat this and then end up with a two by 24 connector. Or I can make it a little more compact. And let's suppose I have four rows. So a four by 12 connector maybe, because that'll be half as short, which is kind of nice. I don't know what I'm going to do at this point. So let's just let's just go with a four by 28 with a two by 28 connector. And you know, I can maybe change it later on. I just want to try something. Okay, connectors. So let's see, I have created this sheet here. Okay, so it's basically just a two by 24 connector. So there are 48 pins total. So there are the signals grouped into two sections. And the the data lines don't go down and then up or down and then down, but they go, you know, odd, even, odd, even, odd, even. So, okay. And what I can do then is just, you know, copy this and let's go ahead and import my pin. Great. And let's resize this doesn't need to be so big. Well, it's going to be big because of this thing. Can I, yeah, I can make that invisible. Oh, okay, that's that's convenient. All right, so here is my connector. I'm just going to stick it right over here. Well, okay, let me leave some rooms that I can name this bus, copy, copy these. And I am going to still need a connector for that, because that's going to be the PC output really. And then one down here for this input. Okay. How do I, how do I grab a bunch? I don't know how to grab a bunch. Again, they're changing the key bindings. So maybe it's right click. No, middle click. No, control click. No, shift click. No, alt click. No. Um, yeah, I don't know how to, how to grab all the end points for, for a bunch of wires. So I guess I'll just do this, like an animal. Okay. Oh, and I need a bus for this. Okay, let's go ahead and rename these sheets. I believe that in the production version, you can actually name the sheets all the same thing. But here, when you copy a sheet, it immediately adds a number to it. So, you know, maybe we should name all the sheets differently. So, oh, on PC plus four. Yeah, I don't like that when you hit enter. The sheet name goes away. That doesn't make too much sense to me. Oh, wow. Okay. Yeah, actually, it's a multi-line input. Wow. Okay. I'm not sure I like that. Okay, edit. Oh, this should be connector for x connector for x connector for y. Do I have to do like alt enter? No, control enter. Yeah, control enter apparently hits the okay button. So this is now mem address, mem data. And this one is PC now. Okay, so that's pretty good. I am going to need another connector now for the different output enables and the clock. So let's see. Well, I could just leave the output enables out and not like decode them through like a 74138, which is a three signal to eight signal decoder, which I could do because that means that then I only need three signal lines instead of six signal lines, which could be significant. So maybe I should do that. Yeah, why not? Maybe I should do that that way. If the if the selection is zero, then I'm going to decode it to to retain. Otherwise, this is one, two, three, four, five. And then of course, six and seven are are illegal values, which is kind of unfortunate. But maybe I can somehow or them together to to fall back into zero, maybe. I don't know. Okay, so let's go ahead and grab a 74138. I hate these symbols so much. These are like the very old style symbols. This is like totally totally incorrect for the for the current standard. But I'm going to go with it anyway. So let's just stick that down here somewhere. And let's see. So we want a wire to go up to zero. And the 138 is nice because all the outputs are negated, which is exactly what we need for these output enables, which are also negated as 34. Okay. So the question is, what do we do with these with these other outputs? So I could just leave them unconnected. Do I want to put it? No, I'm just, all right, I'm just going to make them disconnected and just say, well, you know, if if your if your input is six or seven, you deserve what you can't, I guess. Okay, so we have this now. Insert still works. That's nice. Let's go ahead and copy these. Okay. Actually, no, that's not what I want to do. So these are the various enables, which are highly useful for additional decoding, since we don't need any additional decoding. We are just going to tie the active low signals to ground and the active high signal to power. Let's go in here and grab me this five volt thing. Copy, paste. And I'm just going to leave the capacitors out, the decoupling capacitors out, because again, I'm just interested in sort of the layout of this thing. So there's ground. All right, so all right, that is our circuit with the exception of the other connector that we're going to want. So we have three inputs here. Here's the fourth input. And we're going to want power and ground. So assuming that ground is going to be... Yeah, okay, so basically six inputs. And we're going to multiply that by two so that we can have adequate return paths grounding for the signals, especially the clock. I mean, that's going to be kind of important. So what I'm going to do is I am just going to grab a connector and it's going to be an O2 by O6, odd even, because that's the way the pins are on the physical form factors. So we have this. That's nice. Let me move that down, maybe. Move that down a bit. And let me move the entire thing up a little so that I have some room at the bottom to route some signals. So here we go with the selections. And then we're going to have a... Let's put the ground here and then the clock. All right, so the clock is sort of nicely sandwiched between the grounds here, here, and here. There's clock. Okay, so this is going to be ground. So let me first remove that value since we know what it is. Copy, oops, copy, paste that to there. And this is going to be our five-volt connector. So copy and paste. Why don't I just connect these together? Well, because that that way, if I need to move this, I can just move it without having to worry about redoing the connection. And these are like that. Okay, so because the spacing is the same vertically and horizontally, we get coupling across the connector like this. So we don't really strictly need grounds between each of these. So that's it. The other thing that you typically need to do is add power flags to any power inputs. So power flag. And that just lets the design rule checker or electrical rule checker know that these signals actually generate power. Because the chips here, these are defined as power input. So there needs to be a power output somewhere. So if we just tie this net to a power output, that works. So let me grab this, copy and paste and rotate this so that it's upside down. And there are our two power flags. So let's just run a quick electrical check. So where is the design rule check? First, I have to annotate all of the things so that they all get numbers. Okay, save. And here's the electrical rule check. Let's run ERC. We got 148 warnings. And the warnings are right. This is what I was saying, where ground and ground ref are attached to the same items. And ground is going to be used in the net list. I'm fine with that. Same thing with plus five volts in VCC. And those are all the warnings. Yeah, I don't see anything else. But without the warnings, there are no errors. So that's good. Okay, let's name these buses. So we're going to name the buses. So this is going to be PC 0 to 31. Okay, now this is going to be, this is really the output of the multiplexer. So I'm just going to call it, well, not, maybe not why because we do have a Y bus. I'm just going to call it M, M for multiplex. Okay, and now I could also name these buses. So this is PC plus four, zero to 31. Nice that I can do that. I'll just stick that there. This is X. So this is X, zero to 31. This is Y, zero to 31. And the reason that you have to specify it like this for a bus is that I believe Kycat is going to match up the numbers, I think. So, you know, I don't know what would happen if you had like, let's suppose we had a 64 bit signal and we had two of these. If I did like PC, like X, zero to 31 going to one of these and X, 32 to 63 going to another one of these, if it's just going to apply it consecutively or if it actually matches the numbers, I don't know. And I guess I don't really care because I'm not doing that. So, all right, this is mem address. So I'm just going to call this MA, zero to 31. And then here, this is going to be mem data, MD, zero to 31. Zero, zero, zero to 31. I guess I can move these all over and then move the labels over because that would probably make more sense. Okay. Now, I just want to label these things. So I'm just going to label this S zero for for the selector. So S zero, S one. Yeah, I can just hit insert for S two. This is the clock. So I'm just going to call it clock. Okay. And then we've got each one of these lines. And I do like to label almost every net. So that when I go to the printed circuit board, I can, you know, the net appears right on the on the trace. So this one, I'm going to call negative select zero. Okay, doesn't look great, but okay. Negative select one, negative select two, negative select three, negative select four, kind of running out of space here. And negative select five. Sure, that'll do. Okay, that is that's the entire thing. Okay, so now I can move on to creating the printed circuit board. So let's see what that's going to look like. So let's grab the printed circuit board. And it's going to open up probably way too big. Okay, so before we go to the printed circuit board, we do have to assign footprints to each of things. So let's go ahead. Okay, so here we go, assigning footprints. So all right, so we need to pull out the connectors. So I'm just going to use the generic connectors, the pin header connectors that are point that are 2.54 millimeters or point one inches. And that is four. It's going to be two by six vertical. Okay, now for these, these are also going to be two by 24 vertical. And these have already had their things assigned. I'm using a SOP, which is fairly small. Although you want to use the same library, because one of them is the old style library, and one of them is the new style library, and they're going to look different on the 3D view. So is it housings or package? I think it's package that we want to use now. So where's package package SO. And it's going to be the one that's seven and a half by 15.9. So it's going to be this one. So I'll select these two and replace it with those. Okay. And then the 74 LS 138. I think I'm just going to use an SOIC. And which one is it going to be? I think it's going to be this small one. So we have SOIC 16 and SOP 16. We also have SOP 16 and TS SOP 16. Now, normally I would go to like Digikey or Mauser or wherever I'm buying it from and look up the right dimensions. At this point I don't care. So I'm just going to select that. Okay. All right. Now I can save and go to the printed circuit board. So let's go to the printed circuit board. All right. And going to import from the from the schematic. And there are all the parts. So these are all the parts that we have to fit in. If we scroll in, you can see the labels here. Labels on each of the pins and so on. So let's turn off the rats nest for now. So these are all the things that are going to make up our printed circuit board. Okay. So let's see. So the plan was to basically space out the connectors. Where's the where's the other connector? I thought there was a two by six connector somewhere in here. Okay. Let's go back to the PCB and see why that is. Yeah. Did I there we go. Okay. That looks a little weird. But okay. Let's just roll with it. But in any case, yeah, I I miss assigned the import. So now that's the right footprint. Okay. So as I was saying, the idea is that we want to space these out and put the chips between them. So just grab these and move them out of the way for now. Okay. So what I like to do with the headers is space them out is space them out on a point on a point one inch grid. And as you can see, this is not actually on the pins themselves are not on a point one inch grid. Well, they are in this direction, but not in this direction. So select this and move. Okay, there we go. So I'm just going to stick this here. I'm not going to make a board outline yet. Yeah, this is one inch right here. And then the question is, can we fit the chip in between? Yeah, we can with some room to spare. I'm not convinced that that's going to be enough room. So I'm just going to grab this and move it over point two. And then I'll just do the same thing with the others. Okay, so now that I have them all spaced out. Let's see which one is PC. Okay, PC is this one down here. So the thing about the PC is that I'm going to need both buffers and registers somewhere in here. So, well, I guess, you know, luckily I can stick maybe the registers on one side and the buffers on the other. So I guess I'm kind of lucky in that respect. So let's just go with that. All right, what have we got here? We've got M and M. So for the Ms. So I'm a little unhappy with the placement of the registers because it means that, you know, if I have a register for like, let's see, what is this? This is PC plus four. What's this? MD. This is memory data. And this is memory address, I think. Well, one of these is memory address. So yeah, here it is. So if I want to do the same thing for a card where the registers are for the memory address, where the memory address could get the PC, well, you know, the problem is where do I put those registers? Maybe I can just put the registers on the end because no, I can't put the registers on the end because the outputs of the registers have to go to the inputs of that particular buffer, which means that I would have to stick them like in here somewhere, which could mean that I have to put these chips up here somewhere. So let's just do that exercise. So I'm just going to move this down this up so that it's right next to it. So let's suppose that that's the way we're going to orient things. So we've got the register here. In fact, since I want things to be a little symmetrical, I'm going to take this chip here and this chip here, right. So the idea is that we have buffer register buffer register. Okay, right. And then this connector, we're just going to move it like here, say, and this thing, I guess we can just, you know, put wherever we want. Let's just put it over there. Okay. So let me grab these and move them out to here. There we go. All right, my pins are on the grid. Excellent. So like I said, I'm not going to put down any of the capacitors. I'm just interested to see if the routing is going to work out on this. And the spacing in here is a little bit unsymmetric. Let's see what happens if I do that. So if that works, then I can shave off a few tenths of an inch. So what I'm going to do, let's see, see, I don't know how much room I'm going to need in here on the top layer. So I'm just going to leave it like this. And I'm going to route these signals over to these signals here on the connector. And we'll see how it ends up in terms of space. So if I need more space, I'll just move everything over. If I don't need that much space, then I'll just move everything a little closer together. Okay, so that's where we are right now. Now, before we actually start routing things, I do need to set up the number of layers and the design rules. So how thick, how wide the traces can be, what the spacing is, how small a hole you can drill. And I typically use JLCPCB for my printed circuit boards. So I'm just going to go with their design rules. So let's take a look at those. All right, so here are their capabilities. So we can see that they can go up to six layers. And if we look at, let's see, what do we want to see? So first of all, the minimum trace in space, right? So we can see that for four and six layers, the trace width is 3.5 mil, 3.5 mil. So that's what we're going to do, because I definitely go at least four layers, because that way you can have signal, power, ground, and signal. So that way you don't have to route ground and power on the same layers as signal. And four layers is cheap enough. There is a jump in price when you go to six layers. So with six layers, what I typically do is signal, ground, signal, power, ground, signal, like that. And normally, you know, you see something like, you know, signal, ground, signal, signal, ground, signal, or something like that with power in there somewhere. But because of the thicknesses of the various layers, you don't get really good coupling between signal and ground that way. So it's just signal, power, signal, power, signal, power, sorry, signal, power, signal, power, power, signal, something like that. Okay. So that's the minimum trace in spacing. Let's take a look at the drill size. So what we want to do is look at the vias, or vias. Here we go. So for multi-layer PCB, the minimum via is 0.45 millimeters across. So that's what we're going to deal with. And the via hole size is 0.2 millimeters. So that's what we're going to have. Let's see. What else? We have annular ring. So annular ring is just the size of this part for plated through holes. So we're not going to look at that. Minimum clearance is the distance between things. So we can see that the distance between a via to a track, oddly enough, they have it between the track and the hole, which doesn't make a whole lot of sense to me, but okay. It looks like they're pretty consistent with that. So it's 0.254 millimeters, which I think translates to 10 mils. Yeah. Oh yeah, and here's pad to track 0.2 millimeters. Okay. So we need to set all this up. So let's do that. Okay. So here's our board setup. So what we're going to want to do is let's start off with six layers because we can always remove the layers afterwards. So copper layers goes down to six. And I know you can't see the drop downs. That's just OBS doing its OBS thing. So it's going to be signal, power plane, signal, and then two power planes, and then signal. All right. Physical stack up. We don't really care about that. I'm not too concerned about the sizes of things. Okay. So tracks and vias. Okay. So for the tracks, we're going to add. So the tracks are 3.5 mil. So let me go ahead and add a 3.5 mil. Oh, this is in inches. Okay. Let me just change that. Okay. So what I've so what I've done is I've gone ahead and changed the measurements to mills because some of the measurements are in mills and some of the measurements are in millimeters. Um, actually, even even the traces are in millimeters, but typically space and trace is in mills. So it's three and a half mills trace in space. So let's go ahead set up the board again. So now when we add this, we can say 3.5 tracks. Okay. And that's design rules. No constraints. Yeah constraints minimum clearance is I think 3.5 mils minimum track width 3.5 mils minimum annular width. We saw that. Let me see what that was 0.13 millimeters now. So I'm going to need to change back to millimeters. Okay. So 0.13. Now the via diameter is 0.45. And the minimum through hole is 0.2. And the whole to whole clearance is, well, it's via to via clearance for the same net is 0.254. But for different nets, it's 0.5. It looks like it's 0.5 millimeters. So let's just say it's 0.5 millimeters. Okay. And now we can go back to tracks and vias and add the default via size 0.45. What was it 0.45 with the drill of 0.2 millimeters. Okay. So I just got an error. You can't see it because OBS. But it's saying that the diameter and the drill leave via annulus less than the minimum of 0.13. So I can either increase the drill size the via size to 0.46. Does that work? Yeah. Okay. So now so now you can see up here that I've got my track and via size set. Now these can actually be set depending on the net class. So you can make some traces thicker than others, some holes bigger than others. But we're just going to work with this right here. Okay. Now the next thing that we're going to do is start routing some signals. So I'm going to take my grid and I'm going to change it to the lowest possible setting. And so let's just we're supposed to have some we're supposed to have six layers here. Did that not take? Okay. So I just had to set up the layers again because I forgot to save that. So here we have the smallest possible grid. And we're going to start routing on the front face front layer. And here's our routing. So what I can do is I can simply say, okay, there's MA0. And now I'm just going to route like that. That's really small, isn't it? That's 3.5 mils right there. So that's pretty cool because I think it means that I can probably maybe squeeze two signals in between each of these. Well, I guess we'll find out. Here's MA1 and MA2 goes right here. And here's MA3, MA4, MA5. And you can see that that this is actually going to be pretty easy to do. And it looks like I've got plenty of space. I mean, with a trace in space of 3.5 mils, which is 0.09 millimeters, that's really easy to do. And the thing is that JLCPCB does automatic electrical testing. So it will test from point to point electrically automatically. So any boards that have cracks in the traces or whatever, they're going to fail electrical testing and then they won't send it to me. So this is perfect. This is great. I wonder if I can fit like a trace in between. No, I guess I can't fit a trace in between these. That would be a little too much to ask for, I think. So okay, so I've squozen everything a little bit together. So from one end to the other, it's something like six inches or about 150, 160 millimeters, something like that, which is, you know, it's not bad. Here's my ruler and there's 15 inches right there. There's my pen. So it's, you know, you know, it's not it's not that bad. I can deal with it. So now the real question is will it route? And I'm pretty hopeful about this. So we've got one slight issue here. And that is if you look at this column here, you can see that for the outer layer, the trace width and the trace in space is 3.5 mils. For an inner layer, it's five and five. So this does have some restrictions on our layers. But, you know, hopefully we can stuff a lot on the top and bottom layers. And on the inner layers, you know, hopefully we won't have too many traces. And, you know, if we do, then we'll just go with five, five and five. So that's just something that we have to watch out for. All right. So, so as you can see, I've routed these 16 signals. Now the other thing that I need to do, so these are these are the inputs to the buffers. And then there are the outputs to the buffers, which all get tied together. So I think the idea is that on the bottom layer, I'm going to have just lines going straight across, right, because all of the outputs are on this side of each of the buffers. So I'm going to need vias for that. So I'm going to start with this one right over here. And I'm going to take one of the vias. I'm going to start from here. I'm going to bring this out. And I'm going to put a vias right over here. And I'm going to do the same thing with M4 like that. Now for M, now for the other ones for M2, I'm going to bring this out over here. And then for M1 on the other side. So basically, I'm going to stagger them. And the reason that I want to do that is that there's going to be a large, oops, there's going to be a large ground area here, a large ground area here, a large ground area here, because if you look at these traces, what's going to happen is on the bottom layer, I can just do like that. See on the bottom layer, we're going to have a line going straight out like that. And it's also going to go straight out here. And then, you know, probably in between here. So the idea is that all along that trace, you want to have a ground plane sitting just above it or just below it. Well, since it's the bottom, it's going to be just above it. And the only place where the ground plane is not going to be able to be right next to it is around the vias. So in other words, the return path is going to follow the line here, and then it's going to go around the vias. And unfortunately, that's going to lead to inductance, which means that your edges are going to be a little bit smeared out, which means that you won't be able to drive your circuit as fast. Now, to be fair, it's likely that the inductance caused by this via is not going to be a lot, especially if I'm just going to run this at FCT speeds, which I think is like one volt per nanosecond, which means that, you know, it's a swing from zero to five volts of five nanoseconds. So it's a five nanosecond rise time. Actually, the rise time is measured from 10% to 90%. So it's a little bit less than that. But you know, we'll just say it's roughly five nanoseconds. You know, we're not talking about sub nanosecond edges here. So we're not, you know, in the, we don't have frequency requirements in the gigahertz, you know, where we have to start worrying about stub lengths and things like that. So I think it'll be fine. But, you know, just for good practice, we do try to have plenty of ground surrounding the vias. Now, if I had all of these vias on one side, and if they were so close together that I couldn't get the ground plane in between them, then it could mean that the return path for one of these signals would have to go like this, and then it would have to go around all those vias and then come back. And that is a large area, you know, no matter how fast you're going. That's pretty huge. So that's why you really want to space out your vias so that there's enough ground plane between them. So now that I've done both the upper chip and the lower chip, what I could actually do is remove these traces from these other chips and just copy this entire section over and over and over. So I'm going to do that. Okay, so that is that taken care of. So you can see that all of these things are routed. So we've got all of our wires running across for the outputs. And we've got all of our inputs connected to the inputs of the chip chips, with the exception of the final program counter register and buffers, which probably won't be too much of an issue. So the only interesting thing is that these wires here, or these pins right here, do connect up to here. But they also connect up to here. And in addition, these m's connect over to here, but they also connect over to here. So this is going to be an interesting routing problem. I could rotate the chip by 180 degrees, which is a possibility. So that way, all of these pins and all of these pins are just connecting on this side. And that means that PC15, which is over here, would end up over here. And then I could just run wires like that. The same thing over here, m15 here would end up with m15 over here. And then I can run wires across like that. But then the problem is, how do I get these over to that side? So I could keep PC0 over here and rotate this upper chip so that PC0 is over here. But then I've got the problem of, well, PC0 has to go to here and to here. And then PC1 has to go to here and to here. And then PC2 would have to go here and to here. And if I do that, then I think I'm going to get some wires that have to cross. So that is not going to work. Because PC0 goes over to here, then well, okay, maybe I could route PC0 under the chip to here, PC1 down to here. And then I could take PC0 up to here, PC1 up to there. That could also end up working. So maybe I should try that. Let's try that. Okay, so now I've got this section routed. And now it should be a matter of doing the same thing for this other side, except of course now we've got vias in the way. So I can't really do this unless I can shove another 16 signals under here. Or I can just, let's see, I can't really route it with the green layer going up and down. Well, okay, let's just go with it and see what happens. Okay, so what I've decided to do instead is put all the vias on just one side. And yes, there is this plus five volt rail. And I would have to put a capacitor like right over here, instead of really up against the plus five volt pin. But hopefully that short distance won't make too much of a difference as long as I make the trace a little bit thicker. Then I can simply, you know, route the 16 signals underneath the chips and then run the wires on the bottom layer from here to there from here to there in parallel. So I think that'll work out. Okay, I haven't finished it. But I mean, it looks like it's it's going to work. So in fact, I was able to get away with only two signal layers. So I can use a four layer board, which is great for expense. And again, like I said, this is this is about six inches across. So I can measure this and it turns out to be 150 millimeters, which is pretty good. Let's take a look at the 3d view. Where's the 3d view? Okay, there's the 3d view. That's basically what it's going to look like. I don't know why there is no 3d model for this, but whatever. But yeah, that's kind of what it's going to look like. So if you can imagine that this is just for the program counter. So we also have, you know, one board for the temporary register, one board for the memory address register. So it's basically going to be this size, multiplied out by pretty much the number of registers that we have, which could be a lot. I know we have PC. We have temp, we have memory address, and we have memory data to write. That's four. What else do we have? Yeah. And then we've got all the CSRs. And I think the CSRs are going to be their own thing. Unfortunately, the CSRs are going to have to have their inputs multiplexed, which means that they're kind of going to look like this, which isn't that great, because there are seven CSRs that I have. So there would be, you know, like seven boards like this. So the total already is up to 11. 11 of these boards. Let's just see how long this board is. This board is about 75 millimeters. So, you know, 75. So we're talking about a meter wide board. So that's obviously not going to work. Another possibility is maybe to stack boards like this. So I know that I can get connectors that are actually stackable. So I don't have to run things in parallel. I can run things sort of up vertically. And if I do that, then maybe things go a little better. So if I have 11 registers, let's just call it 12, and I stack it four high, then I only need three across, which is, you know, something like 225 millimeters, which is doable. So that's a really interesting idea, just basically, you know, stack it in the third dimension. Yeah, I think that'll also help in terms of signal lengths, because, of course, now instead of having a signal going, you know, a meter across the board, now I just have a signal going, you know, maybe a maximum of 250 millimeters and then up, you know, a bit, you know, call it, I don't know, 50, 50 more millimeters or so, maybe a little more than that. So that's pretty good. Yeah, maybe I can do that. Okay, okay, I think, I think that's a plan for the sequencer board. Now the ALU boards and the register boards are, again, going to be their own thing, but I think I'm going to go with this and see what happens. Now the other thing on the sequencer board is, well, the sequencing itself, because all I've got right here are the multiplexers and the registers, and there's another section, which is basically the logic to control the multiplexers, and that is going to require something, and I'm not sure what, I would love it to be ROM based, but unfortunately ROMs are too slow, so that would be sort of like a very long instruction word. Or I may just build it out of some logic. I'm not really sure how it's going to work. I may end up using a whole bunch of gals, but you know, we'll see. So I think that in the next video, what we're going to do is we're going to take maybe a closer look at the actual sequencing part of things to see what sort of chips we can use for that. So until then, take care. Bye.