Тёмный

Shifting Bits in my ALU - Superscalar 8-Bit CPU #31 

Fabian Schuiki
Подписаться 2,9 тыс.
Просмотров 1,3 тыс.
50% 1

Наука

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

 

13 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 23   
@JaenEngineering
@JaenEngineering 6 месяцев назад
That carry plexer is an elegant solution to increasing options while keeping the chip count down.
@fabianschuiki
@fabianschuiki 6 месяцев назад
Yeah I think it will come in handy a bit later. It currently has two inputs connected to the carry flag. If I swap one of them to be the sign bit of the LHS input, the ALU can do arithmetic right shifts. Need some op decoding first though 😀
@JaenEngineering
@JaenEngineering 6 месяцев назад
Could even upgrade to an 8:1 multiplexer in the future and get the full suite of shifts and rotates.
@fabianschuiki
@fabianschuiki 6 месяцев назад
Yeah great point! I hadn't considered the rotate instructions. Those could be cool to have. 🙂 It's always a battle between making the initial breadboard versions of the subcircuits feature rich, and moving faster while postponing features to future revisions.
@evugar
@evugar 6 месяцев назад
Yay, you are back!🥳
@fabianschuiki
@fabianschuiki 6 месяцев назад
😉
@moshixmainframechannel
@moshixmainframechannel 6 месяцев назад
Truly great stuff !
@fabianschuiki
@fabianschuiki 6 месяцев назад
Thanks! 🙂
@foxostro
@foxostro 6 месяцев назад
I love it! So, it is technically possible to implement right and left bit shifting with other operations. It’s not *necessary* to add additional hardware for bit shifting. However, these become pretty expensive operations that way, which is certainly unintuitive compared to pretty much any real CPU.
@fabianschuiki
@fabianschuiki 6 месяцев назад
Thanks! 🙂 Yeah good point. You could use `add x, x` to double/left-shift a value. Not sure about right shift, unless you have a divider 😁
@3osufdh4rfg
@3osufdh4rfg 6 месяцев назад
Very nice.
@fabianschuiki
@fabianschuiki 6 месяцев назад
Thanks! 🙂
@moshixmainframechannel
@moshixmainframechannel 6 месяцев назад
Where is the part where you wire up the new instruction codes ?
@fabianschuiki
@fabianschuiki 6 месяцев назад
Coming right up after this. 🙂. The video would have been 1.5h otherwise. There's quite a bit more assembly coding involved this time. 😏
@MissTrollwut
@MissTrollwut 6 месяцев назад
Again nice work! What took you so long though 😅
@fabianschuiki
@fabianschuiki 6 месяцев назад
😇
@calculus7
@calculus7 3 месяца назад
I assume your CPU will also be pipelined like James Sharmans? I agree that his ALU design is quite elegant, but since I’m designing a stepped processor, I’m thinking of not running everything through the adder. In James’ design, I believe this requires two pipeline stages before an ALU result can be obtained…not a problem for a pipelined processor. I’m not quite sure why two stages are needed but I’m thinking for my stepped processor design it might be better to keep each calculation circuit separate (add, shift, logic ops, etc) and only choose between which one to apply at the output at the final output of the ALU. Hope that makes sense. My cpu, though a stepped processor, currently takes three cycles for most operations. That’s why I’d like to minimize the number of cycles needed in the ALU.
@fabianschuiki
@fabianschuiki 3 месяца назад
Yes, at a later point I'll start adding pipeline stages in the places where they make sense. It's a good idea though to quickly sketch out on paper what kinds of chips you have feeding into each other, and then sum up the propagation delay along those paths. The adder is pretty fast, probably 1/4th of the time a ROM-based decoder would take to produce an output. AND/OR/XOR and multiplexers are going to be even faster. So you can probably rack up quite a few adders or logic chips in your ALU before they start making your CPU slower (because they overtake the decoder as criticial path). Keeping the ALU paths separate for the different functions is a nice idea! That would likely take quite a few additional chips because you have to replicate some work (XOR for subtraction in parallel to logic ops, maybe some redundancy in the logic ops?) but you should be able to get a bit more speed out of it 👍
@daisywong-ke1kz
@daisywong-ke1kz 6 месяцев назад
Great work! We'd like to offer you some boards if you need them in the upcoming content. (PCBWay Daisy) :)
@fabianschuiki
@fabianschuiki 6 месяцев назад
Thanks for the generous offer Daisy! 😊 How do I reach out once I have the next set of PCBs planned out?
@daisywong-ke1kz
@daisywong-ke1kz 6 месяцев назад
@fabianschuiki Could you pls show us your email address cuz RU-vid does not allow me to send you? 😂
@fabianschuiki
@fabianschuiki 6 месяцев назад
I have reached out to you on LinkedIn 🙂
@daisywong-ke1kz
@daisywong-ke1kz 6 месяцев назад
@@fabianschuiki cool thing. :)
Далее
Decoding ALU Micro-Ops - Superscalar 8-Bit CPU #33
45:27
How Computers Add Numbers - Superscalar 8-Bit CPU #27
50:41
Carry Flag - Superscalar 8-Bit CPU #30
52:23
Просмотров 1,5 тыс.
The world's worst video card?
32:47
Просмотров 6 млн
Why build an entire computer on breadboards?
28:43
Просмотров 3,1 млн
Is this the FASTEST and CHEAPEST 8-Bit Computer Ever?
28:43
Red Magic Gaming Tablet Pro Immersive Unboxing
0:25
Просмотров 1,5 млн
PlayStation 5 Pro Console - Reveal Trailer
1:05
Просмотров 2,2 млн
iPhone 16 Pro Max Trailer | DrTech
1:08
Просмотров 699 тыс.