BrunoLevy / learn-fpga

Learning FPGA, yosys, nextpnr, and RISC-V
BSD 3-Clause "New" or "Revised" License
2.44k stars 236 forks source link

Rv32i quark Block diagram #111

Open cicamargoba opened 11 months ago

cicamargoba commented 11 months ago

rv32i_block_diagram (1).pdf This block diagram is Right for you?

Carlos

Mecrisp commented 11 months ago

On WMASK multiplexer, the Half1 and Half2 should be 0011 and 1100. In the diagram, both are 1100. Also I think the input to loadstore_addr should be [31:0] instead of just [23:0]. True, one can synthesise the core with smaller address width; but you are using [31:0] as input for new PC in the diagram, which does not mix. The new PC multiplexer has three input lines in the diagram, but only two are annotated.

So far my first observations, there might be more I just haven't spotted on first try.

cicamargoba commented 11 months ago

rv32i_block_diagram.pdf soc_femto_block_diagram.pdf

Hello, Thanks for your feedback. I've already fix the diagram based on your review. I'm attaching the SoC block diagram. I'm teacher and I'll use your excellent RV32I description.

BrunoLevy commented 11 months ago

Hi, Nice job ! It is interesting to see these block diagrams. Here is some feedback/suggestions that comes to my mind (but I'm unsure, I may be wrong, this needs to be tested/challenged with students): to draw an easy-to-read block diagram, I'd recommend starting from a coarse level of detail with the main elements (register file, ALU, PC and address calculation, load-store and writeback), and only then start refining (by drawing the different muxes). In your block diagrams, I think that it may be "intimidating" for a student who sees them for the first time, so it may help indicating that there are some architectural elements with (rather simple) interconnections between them, and then only dive into the details of the different muxes. For instance, alignment and sign-extension for load/store may be skipped in a first overview presentation. We are not decomposing the design into modules, but it may be interesting to show the main architectural elements in different colors in the schematics.

cicamargoba commented 11 months ago

output.pdf Thanks for your comments You're right, show the whole architecture will be a bad idea for students. I'm attaching some diagrams explaining how the architecture deal with different instructions, and I add some simulations too. Very good Idea, use different colors for diagrams.