Last visit was: Tue Sep 30, 2025 2:49 am
It is currently Tue Sep 30, 2025 2:49 am



 [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5
 Astorisc : A pipelined Risc-V from scratch ? 
Author Message

Joined: Thu Feb 25, 2021 8:27 am
Posts: 39
Location: Belgium
All my testing seems to indicate that I have indeed managed to get it working!

The first benefit is that the bypass selection is no longer performed at the beginning of a cycle, where it would have selected from pipeline registers at different stages, but rather at the end of the cycle to clock the (potentially bypassed) value into the pipeline register. That way, the next stage has an immediate access to the correct value, and the bypass selection logic is now entirely out of the critical path.

The second benefit comes from moving the logic one stage earlier, as I wrote in my previous post, and having it apply directly to the pipeline registers, meaning that the value is always the result of the previous (or second previous) instruction. If there is a multiplication that needs multiple cycles in the Execute stage, the next instruction waits in the Decode stage, where the bypass logic gets updated "for free", until the result of the multiplication is ready.
Well, except that I haven't implemented the multiplication yet :)

_________________
https://www.alrj.org/pages/Astorisc.html


Mon Aug 26, 2024 8:04 pm WWW

Joined: Thu Feb 25, 2021 8:27 am
Posts: 39
Location: Belgium
Short update to say that the project is not dead !

Progress is slow with life getting a bit in the way (and also #toomanyhobbies), but I'm still working on it.

I am still in the circuit design phase in Digital, currently working on three main tracks:

First, the CSRs and support for traps (Exceptions and Interrupts). Still not everything is entirely clear in my mind, but I feel I'm getting there.

Second, it looks like I have managed to build a 4-bit (for now) Radix4 Booth Multiplier with support for Signed and Unsigned operands. Sign is handled by simply expanding each operand to 6 bits, either with 0's to treat it as unsigned, or with the original sign bit to treat it as signed. It is expanded to 6 bits, not 5, because the Radix4 needs an even number of bits. I still have to expand it to 32x32 bits, and then see how I can integrate it in the pipeline. I'd also love to make it fuse pairs of MULH/MUL instructions so that the second instruction can just output the low 32 bits of the result computed previously!
In any case, this exercise definitely confirmed that I'm not good at converting state machines into actual circuits, this made me struggle quite a lot!

Finally, I have also started the long work of converting the whole design to something that looks more like actual available components in the 74 series, in preparation for the build. A good part of that is moving to buffers with an active low Enable signal, and that has repercussions in most of the logic because I don't want to just slap an inverter in front of it :) I'm reworking some combinatorial logic clusters as well, since the [A]LVC family provides 3-input AND and NAND gates, but no 3-input OR or NOR gates, for instance.

I'd also like to build some test circuits soon (for very large values of soon, possibly) to test the speed of the Adder and the Magnitude Comparator I intend to build. My feeling is that the adder speed will have a non-negligible impact on the final clock speed.

_________________
https://www.alrj.org/pages/Astorisc.html


Fri Sep 26, 2025 12:36 pm WWW

Joined: Mon Oct 07, 2019 2:41 am
Posts: 844
alrj wrote:
Short update to say that the project is not dead !


Finally, I have also started the long work of converting the whole design to something that looks more like actual available components in the 74 series, in preparation for the build. A good part of that is moving to buffers with an active low Enable signal, and that has repercussions in most of the logic because I don't want to just slap an inverter in front of it :) I'm reworking some combinatorial logic clusters as well, since the [A]LVC family provides 3-input AND and NAND gates, but no 3-input OR or NOR gates, for instance.

I'd also like to build some test circuits soon (for very large values of soon, possibly) to test the speed of the Adder and the Magnitude Comparator I intend to build. My feeling is that the adder speed will have a non-negligible impact on the final clock speed.


Have a GOOD power supply.
Figure out your bus , memory and I/O at this time. While not RISC, a 8 bit IO bus, will let you run slow I/o chips,
like uarts and timers.

The best I can do is about 3 Mhz for memory,1 Mhz for serial IO. (6502 memory cycle).
Part of the reason is clock oscillators only come in a few frequencies.

Design your PCB's as 4 layers. This lets really save space with the bypass caps on the vcc/gnd planes.
Plan to have a CASE and fans too keep things cool.

I picked up a 10 watt laser cutter/engraver so I could make a easy box for the case for my current computer design.
Source bulk known parts now, like bypass caps and sockets.
I get many parts from china (ebay) and you have 2 month delay with shipping.
Have a GOOD power supply.


Sun Sep 28, 2025 6:52 pm
 [ 63 posts ]  Go to page Previous  1, 2, 3, 4, 5

Who is online

Users browsing this forum: Chrome-11x-bots, Chrome-12x-bots, SemrushBot, tencent-cloud and 56 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software