Тёмный

LMARV-1 reboot part 8: Exploring layout for multiplexed registers 

Robert Baruch
Подписаться 37 тыс.
Просмотров 4 тыс.
50% 1

Now that the code is mostly cleaned up, I'm exploring how to lay out the sequencer, starting with a multiplexed register module.
nMigen exercises: github.com/RobertBaruch/nmige...
github repo for code: github.com/RobertBaruch/riscv...
RISC-V specs: riscv.org/technical/specifica...
nMigen tutorial: github.com/RobertBaruch/nmige...

Наука

Опубликовано:

 

24 дек 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 51   
@charlesdorval394
@charlesdorval394 3 года назад
Thanks for the christmas present! I was wondering when I was gonna get my RISC-V fix ;) Happy Holidays! :) Also, how many of you tried to zoom in on the schematic ? :P
@RobertBaruch
@RobertBaruch 3 года назад
Don't get me started. Sometimes I try to scroll documents that someone else is presenting in videochat :(
@JG-nm9zk
@JG-nm9zk 3 года назад
you get my best channel on youtube award.
@fredo514
@fredo514 3 года назад
Awesome project! I think staking the boards is the best solution. You could use a card edge connector in addition to stand then up on a backplane.
@hjups
@hjups 3 года назад
Another solution for your clock enable register would be to use a different clock. Instead of using one that pulses, you could use the clock that the pulses are derived from. Then you could gate it with the enable signal. However, using a re-direct mux is much safer as you said - I believe that's typically done in silicon as well. For the headers, you should be cautious... 2.54mm headers can bind very easily... First of all, a 4xN connector is a huge pain to use for anything other than small quantity Dupont connectors. So you will want to stay away from 4xN (2xN is more manageable). Second of all, the longer you make the header, the harder it will be to use (the Raspberry Pi is pretty much pushing the limits at 2x20). Third, it will be almost impossible to connect a card that spans all 6 buses via 2.54mm headers... you will probably have to plug the headers in before soldering, solder them to the board, and never remove it... Perhaps you should consider looking at HMC connectors? The Raspberry Pi CM4 uses some cheap ones DF40HC(3.0)-100DS-0.4v. Those are 2x50 and much easier to plug in since the contacts are shorter. In terms of return paths, I wouldn't worry too much about that unless you start to see noticeable noise with an oscilloscope. As long as your signals are below 50 MHz you can probably have up to 8 of them in a row without a ground between them. Practically speaking, that's probably more like less than 100 MHz and 16, but 50/8 would be safer. The whole reason the 74 logic has gnd-2-gnd-4-gnd, is because of the die inside of the package. That's a function of power new connection requirements on the die and layout (i.e. they may need 3 ground pads and only have space to fit them on the ends and between the signals). Then the pinout on the chip is arranged so that the bond wires don't have to cross each other (which can risk an electrical short). So I wouldn't make any assumptions about the signal layout on the chip except for the case where you have GHz speed signals. If you look at QFP FPGAs, they have more than 4 adjacent signals and expect signal speeds upwards of 100s of MHz. You probably shouldn't be routing with 3.5 mil traces. It's likely that many of the boards will fail during production (since that's the minimum capable width / spacing). Also, 3.5 mil traces won't be able to carry much current and will also have a high resistance / length. I would have started with at least 5 mil, and since you are connecting to a bus which will have to drive more current (10s of mA), you should probably do 8-10 mils. You may also want at least 2 power pins - you may want to do a power budget for the chips to see how much current they could draw. A few ideas for the sequencer control array. You could probably use SRAMs with an initialization cycle from a ROM (if I recall correctly, you did that in your last iteration). You could also use a small QFP FPGA or CPLD (like a Max 10 or Max 5) which is purely being used as a fast ROM (I don't think that would be cheating). Keep in mind that older computer systems did use PLAs instead of discrete logic for complex logic equations - you could also use PLAs, but those would be a pain to work with. Anyway, looking forward to the next video.
@RobertBaruch
@RobertBaruch 3 года назад
So even if the board house's capability states 3.5 mil and they electrically test, you're saying that these would likely fail after that? I'll try with 8 mil, although I'd probably be constantly cursing at the lack of space between vias.
@hjups
@hjups 3 года назад
@@RobertBaruch That's correct. Dave Jones recently did a video on that. It's basically a yield problem, where there's an area failure rate that grows as the spacing decreases. Then you multiply that rate / area by the total affected area. So if you have a few spots (like under a BGA device - which is what the 3.5 mil is meant for), then your failure rate will still be low. But if you use the minimum everywhere, then the area compounds. You would probably be fine with 5 mil width with 5 mil spacing if you need the space for vias though, but I would make any output onto the bus from the driver be at least 8 mils. Also, to clarify, you probably won't experience the failures, since the PCBFab does the electrical testing. But they may have a case where they do a panel of 5 PCBs, and only one passes the electrical test. Or worst case, none pass. It's also not just the spacing, but also the trace width. That's something that can be seen with printable electronics, where long traces at the minimum tolerances fail in both continuity and shorts. It's possible that you could mitigate that by meandering the traces (45 degree wiggles), but it's much easier to just use a wider trace with larger spacing.
@janseiffert7799
@janseiffert7799 3 года назад
@@RobertBaruch It's not only a yield problem. These Traces are soooo fine, there is always the risk they get damaged in say shipping (a little flex), so after testing. Or when you handle them to plug/stack/whatever. Don't go small "because you can", stay bigger "because you have the space".
@stubell2363
@stubell2363 3 года назад
It's time to write an FAQ. Possible subjects: 1. Why gated clocks are a bad idea. 2. Why nmigen instead of VHDL/Verilog/.... (religious argument) 3. Why hand-generation of HW schematics instead of auto-magical RTL-to-74xxx converter 4. How to write nmigen code (see the tutorial) 5. Why not use an FPGA (see title of project) 6. Why not use unit tests (see formal verification) 7. How to load (package referenced in video) 8. Windows versus Linux versus Mac (another religious argument) What other subjects seem to come up time after time from folks that don't bother looking through the long history of videos before asking questions?
@RobertBaruch
@RobertBaruch 3 года назад
"Why are you using Windows?" Every. Single. Time.
@stubell2363
@stubell2363 3 года назад
@@RobertBaruch BTW, I really enjoyed the creation of schematics and the board realization. You've reached the "oh, crap, this is big!" part of the project. The marvelous part of limits is that it forces us to be creative.
@truezulu
@truezulu 3 года назад
Come to the metric side Robert. It's just better in every way :). Marry Christmas by the way.
@RobertBaruch
@RobertBaruch 3 года назад
Io Saturnalia!
@truezulu
@truezulu 3 года назад
@@RobertBaruch Hah I'm not religious at all quite the opposite. But I appreciate the sentiment ;). For the ROM storage issue: I remember a new ROM type back in the early 00's that was quite a bit faster than previous stocks. But I'm not sure they would be fast enough for the need here... Did you consider a small flash chip? It's a bit fiddly, but the speed is definitely there :)
@jamesrivettcarnac
@jamesrivettcarnac 3 года назад
Meeeeetttttriiiicccc. I mean, it's what got NASA to mars.
@paulwratt
@paulwratt 3 года назад
for those 4 chips on the left, It would be simpler (for layout and PCB traces) if the buffers were aligned in the same way as the others, and the registers were placed inverted and (slightly) offset on the _opposite_ side of the PCB (the bottom). This would mean the bottom layer would have (super) short traces (with vias) back to the buffers on the front side, _and_ they could be placed out of the way of the buffer traces to the bus. Electrically this would be better (for the traces), as all register to buffer traces would be (approximatel) the same length, and (extremely) short (compared to the buffer to bus traces). The only issue I see with this would be in fabrication population, ie can the manufacturer do this, or is it an extra (large?) cost. I dont see a problem with stacking, as (shown on RPi) there are various height bus extenders (if inter-board chip proximity were to be an issue, say for heat (airflow?) or access (testpoint?) ). One last thought - if the chips are SMT, then wont that cause an issue for the placement of (currenty unplaced) trace capacitors (based on the current trace layout)? However, if they are socketed, then there _is_ room for them under the chips.
@RobertBaruch
@RobertBaruch 3 года назад
I came to the same conclusion :)
@JonHaa87
@JonHaa87 3 года назад
You probably should use bigger tracks by default. Using these tiny traces will probably be very fragile, cause higher resistance and more interference than necessary and make manufacturers like JLCPCB unhappy because they'll likely have a high percentage of boards that fail the test and have to be manufactured again. For example the PCIe standard recommends 5mil tracks with at least 7 mil gap in between their signal lines, and while PCIe is probably much more sensitive, I don't see a reason to go below that.
@lawrencemanning
@lawrencemanning 3 года назад
For the sequencer, instead of ROMs use some fast SRAMs programmed by a GAL from EEPROM at startup? More points for using a single large serial EEPROM. Might be overkill but I imagine preferable to unchangeable logic. Would the sequencer itself fit in a GAL? Unsure. Very interested to see how the HDL will be changed to represent the "chip design" however it's done, especially for this part. Stacking boards is a fantastic solution. Or rightangled 0.1" headers though you'd need some kind of card frame. Also, do you need power on your 48 way headers or is that coming from somewhere else?
@wChris_
@wChris_ 3 года назад
have you thought about PCIe connectors with small adapter boards connecting them vertically. tho through hole might be better for stacking more boards
@AmauryJacquot
@AmauryJacquot 3 года назад
be careful with track width and track distance, you may need 0.9mm and not 0.0889mm
@Jarni1979
@Jarni1979 3 года назад
14:35 I'm not sure the datasheet says that disable time is always shorter than enable time.
@obiwanjacobi
@obiwanjacobi 3 года назад
Ctrl+Enter activates the OK-button in a lot of KiCad dialogs [2c] Why not put the chips on both sides of the PCB? Are you gonna hand-solder them?
@RobertBaruch
@RobertBaruch 3 года назад
I'd rather avoid components on both sides, just for the routing convenience.
@LaserFur
@LaserFur 3 года назад
I would think the next board layout that connects to that is going to be a mess. What about having a single register card that fits in a vertical laptop DIMM socket and then having a array of them? This would give the next board more flexibility as to where they are placed. Just thinking smaller connectors. edit: but then again that makes the multiplexer more complicated.
@any1alive
@any1alive 3 года назад
I was thinking that or look into the m.2 'like' connectors,. though a DIMM would be nice
@gsuberland
@gsuberland 3 года назад
Just a random thought regarding the system clock - since it's distributed to pretty much every chip on every board, are you expecting to need to buffer it on each board's input, due to line loading effects? P.S. just noticed your "ALAN: In space nobody can hear you space" t-shirt. Got the same one :D
@RobertBaruch
@RobertBaruch 3 года назад
:D I also have their "X-Flies: The truth is over there" shirt. Probably all signals will be buffered on input.
@arnauddurand127
@arnauddurand127 3 года назад
Did you check JLCPCB SMT assembly? This could make your life way easier, especially if you need the same board multiple times like for registers. They have a lots of 74-series chips that can be assembled. Unfortunately, they do not assemble connectors yet.
@RobertBaruch
@RobertBaruch 3 года назад
I'm not planning to build a lot of these, so hand-soldering is sufficient.
@keyboard_toucher
@keyboard_toucher 3 года назад
1:05:25 squozen
@PETMK
@PETMK 3 года назад
What about the 47k resistors instead of REG_PC? You save the space, you save the control signal... If the mux opens it overrides input value, otherwise the register output is loaded on the clock edge
@RobertBaruch
@RobertBaruch 3 года назад
That's a really interesting idea! Although I'm not sure if 32 resistors will save space vs two buffers...
@PETMK
@PETMK 3 года назад
Can I ask you how will you increment the program counter? I understood it there will be the PC output with some adder (some combinational logic) that produces that number increased by four. If I were you I would connect 2 LSBs of the PC to the ground ( or store them in 7474 if they are needed) and use eight 74193s to store the rest of it? You'll replace six 48-pins chips by eight 16-pin chips on this board, you don't need "increaser" on the anorher board and increases the instruction address by one pulse to CU input to the counter on the LSB. It also eliminates one board to board connectro there and so on. When it jumps it will load the preset into this counter... Another saving of the chips/size may be preselect of X/Y bus by input multilplexer on the card. If they are not stored in the same time to the multiple registers it is smaller, cheaper and with less load of the buses. Now it's clear architecture but it seems there will be necessary to do some optimalizations.
@RobertBaruch
@RobertBaruch 3 года назад
@@PETMK I preferred to use an adder to a counter because if there's an interrupt or ECALL/EBREAK, I need to store the PC of the next instruction. It's possible that I can eliminate the adder, but there are a lot of parts of the code that need PC+4, and I'd rather sacrifice adding a few chips than make the architecture less clean.
@PETMK
@PETMK 3 года назад
@@RobertBaruch What about Bourns CAY16 at the bottom side?
@RobertBaruch
@RobertBaruch 3 года назад
@@PETMK Oh, I've learned to hate those :) I can never cleanly solder them without bridges. Still, it's worth thinking about.
@TomStorey96
@TomStorey96 3 года назад
Is it much of a worry if two outputs are enabled at the same time for what would be just a couple of nanoseconds? The value that has been output isn't going to be needed for 10s more nanoseconds so it will have plenty of time to stabilise before being clocked into anything else.
@TomStorey96
@TomStorey96 3 года назад
I suppose if you really need some delay you could chuck in a 74LVC1Gsomething to add a few ns of delay
@RobertBaruch
@RobertBaruch 3 года назад
My worry is just the driver-driver conflict. One buffer would be sourcing its full output, and the other buffer would be sinking its full output. That always worries me :)
@TomStorey96
@TomStorey96 3 года назад
Thinking about it some more, you could delay one buffers turn-on with an extra gate delay, but then that would also delay it's turn-off, shifting the problem.
@tomaspecl1082
@tomaspecl1082 3 года назад
I have seen one texas instruments design guide called designing with logic. ti.com.cn/cn/lit/an/sdya009c/sdya009c.pdf They have some info about bus contention but they mostly say that if it is just few tens of ns it is ok. But then they are talking about powerup times and that at such times you can get quite long driver conflicts because the system is not setup yet and bus drivers are not disabled. I recommend that you look at it.
@morthim
@morthim 3 года назад
"this board is 75 millimeters, so we are talking a meter wide board" 75 millimeters is like 3 inches. 75 millimeters is 7.5 cm and there are 2.54 cm per inch. 2.54 is roughly 2.5.
@RobertBaruch
@RobertBaruch 3 года назад
75 mm times something like 12 boards is about a meter.
@PETMK
@PETMK 3 года назад
It looks too big. It will need 0.4mm b2b connectors and passives on the bottom side... 4 layers will be enough for it
@RobertBaruch
@RobertBaruch 3 года назад
I'm very interested in the 0.4mm connectors. I'm just hesitant to use them because they are so low-profile. I would still like to stack PCBs, and if they are too short then I can't use them.
@RobertBaruch
@RobertBaruch 3 года назад
Ah, there are various height of these connectors, so I can choose a stack height that works for me... Now I just need to figure out a way to align these SMD connectors so they match when I solder them on...
@PETMK
@PETMK 3 года назад
@@RobertBaruch Alignment is challenge for maual assembly, defnitely. We had also trouble with 2.54mm pitch headers when there were more tnan three between boards :(
@RobertBaruch
@RobertBaruch 3 года назад
@@PETMK I had an idea about that -- if I can hand-solder male connectors on one board, then put the female connectors on those, put a small bit of glue or epoxy on them, and put some acrylic on top. Let dry. Now put male connectors on the glued-up female connectors, and tack the male connectors down on the next board. Lift off the template, and solder in. For the female side, place male connectors on the template as before, except glue those to another template. Now I have a male template, which I can use to align female connectors. It's a thought anyway. I'll need to experiment.
@sabriath
@sabriath 3 года назад
I'm late to the party, but can I ask, why not just make it into a cmos package? The whole thing (all registers, mux, everything) can fit into 1 chip. I'm only asking because printing out those circuit boards and taking up that much space will cost more than just doing a litho and pack. This game is amazing and allowed me to perfect my cmos skills: www.zachtronics.com/kohctpyktop-engineer-of-the-people/
@qbqbqdbq
@qbqbqdbq 3 года назад
connect with ribbon cables and stack the boards using a dvd rack, then you're COOKING
Далее
LMARV-1 reboot part 6: About CSRs and interrupts
21:32
Просмотров 3,7 тыс.
LMARV-1 reboot part 14: Chips that don't exist
37:37
LMARV-1 reboot part 5: formal verification of the CPU
54:35
How To Access Any Forked GitHub Repositories Data
9:31
Exploring Bayes' Rule in 5 Levels of Complexity
14:57
Просмотров 1,1 тыс.
LMARV-1 reboot part 12: The sequencer
1:24:29
Просмотров 1,9 тыс.
Красиво, но телефон жаль
0:32
Просмотров 1,5 млн