Risc-V Micropython Repl
32:14
Күн бұрын
Risc-V Bare Metal C Hello World!
21:37
RiscV Logisim Load Datapath
57:26
RISC-V Logisim Brancher
8:37
2 ай бұрын
RISC-V Logisim Immediate Generator
29:39
RISC-V Logisim ALU
23:35
2 ай бұрын
RISC-V Logisim Register File
25:48
RISC-V Logisim Program Counter
7:23
Пікірлер
@lonecoder_cro
@lonecoder_cro 2 күн бұрын
You sound like youtube.com/@patrickhooddaniel?si=gh9AGQ465hQfIloo
@minirop
@minirop 4 күн бұрын
in C, volatile and const are called qualifiers. As for the order during link time, it is important (at least for gcc). I've been bitten by it several times with libraries, if libA uses a symbol defined in libB you need to do -lB -lA. But I wonder why we don't have that issue with basic C code, since multiple .o files can cross-reference symbols and you never get linker errors. (or is it just main that has the "issue"?)
@chuckbenedict7235
@chuckbenedict7235 4 күн бұрын
Qualifiers...thanks. I'm edge of genx, so recall is fading ;-) I think this is related to optimization, but, full disclosure...I used chatgpt to help me figure out a solution. Re your C code comment...yeah. This is why I was confused in the first place. I did enjoy playing around with C3... chatgpt.com/share/2c82d6fe-913e-4bca-9819-e28dfaf57788
@pjf7044
@pjf7044 11 күн бұрын
Dude you are good… keep at it channel will be huge one day
@chuckbenedict7235
@chuckbenedict7235 11 күн бұрын
I appreciate that!
@sometard8156
@sometard8156 12 күн бұрын
The whole playlist is a goldmine, thanks for not charging us! you got a bright future if you continue
@chuckbenedict7235
@chuckbenedict7235 12 күн бұрын
Glad you like it. Thanks.
@AMith-lv2cv
@AMith-lv2cv 15 күн бұрын
waiting for more videos
@chuckbenedict7235
@chuckbenedict7235 15 күн бұрын
Well, I put this out over the weekend...so pretty recent. I have two streams going...Risc-V Logisim SOC build and Risc-V bare metal sw. I am working on a bare-metal MicroPython with a REPL over serial and flash boot, at the moment. I stopped the Logism stream for a time but am planning to pick them back up. Which type are you hoping for?
@challangour5557
@challangour5557 17 күн бұрын
this is simply awesome
@chuckbenedict7235
@chuckbenedict7235 17 күн бұрын
Thanks!
@challangour5557
@challangour5557 17 күн бұрын
i really enjoyed this, thank you so much
@chuckbenedict7235
@chuckbenedict7235 17 күн бұрын
Glad you enjoyed it!
@Aplysia
@Aplysia 18 күн бұрын
As a person learning c and microcontrollers, this was very informative. The way you organized the lecture also made it easy to follow. I now understand a little better how a computer boots and runs the main function.
@chuckbenedict7235
@chuckbenedict7235 18 күн бұрын
Thanks for the kind words.
@MariusHeier1
@MariusHeier1 20 күн бұрын
Awesome. Nice work spreading knowledge ❤
@chuckbenedict7235
@chuckbenedict7235 20 күн бұрын
Thanks for the kind words.
@ruffianeo3418
@ruffianeo3418 20 күн бұрын
2 questions: Is that linker file stuff working the same way if using clang instead of gcc? Also, will you show how it is done with Rust and Zig in future videos? Bonus question :) in riscv assembler with gcc is it mov <target>, <source> or mov <source>, <target>? Since GCC for x86 keeps insisting to use that AT&T notation or however it is called... Bonus remark: It has been a few decades since I did UART16550 programming. But the way your uart_putchar() function is written, you do not really use the FIFO. There is a way to check if the FIFO can still hold one more character. You, in turn check if the FIFO is empty.
@chuckbenedict7235
@chuckbenedict7235 20 күн бұрын
Since the GNU linker is used by both, the syntax should port no problem. What the compilers emit may differ, however, plus the platform matters too, and so I suspect that's why a generalized linker script is so freakin' complicated. Running `riscv64-unknown-elf-ld --verbose` is educational. Re other languages, I am working on Python right now. Thinking about Go. I actually ported a version of Java to run bare metal on rPi years ago. I thought about revisiting that project for Risc-V. I've never used Rust or Zig. But sure, why not? Funny enough, there is no mov instruction for Risc-V. There is a mv psuedo instruction, `mv rd, rs`, which translates to `addi rd, rs, 0`, with the destination register being first. I find the green sheets helpful, for example: www.cs.sfu.ca/~ashriram/Courses/CS295/assets/notebooks/RISCV/RISCV_GREEN_CARD.pdf The FIFO is actually used, it's just never filled. THRE clears before the shift register finishes munching on its data. I wanted to show a technique that would prevent data from being dropped, not optimize throughput. But your point is valid. I was not clear in the video. Great questions. Thanks!
@minirop
@minirop 7 күн бұрын
LLVM’s lld is a drop in replacement for GNU ld, so it should be identical. Rust and Zig are using LLVM so again, same scripts. (Zig wants to get rid of LLVM) There is also mold which is also a drop-in replacement. So you can use the same script with any of those three linkers.
@CompressedSoup
@CompressedSoup 22 күн бұрын
why the fake typing sound
@chuckbenedict7235
@chuckbenedict7235 22 күн бұрын
silence instead?
@raccoon1160
@raccoon1160 22 күн бұрын
Very helpful. Thanks for posting!
@chuckbenedict7235
@chuckbenedict7235 22 күн бұрын
My pleasure. I always learn something when I do these.
@esra_erimez
@esra_erimez 23 күн бұрын
That was awesome. Now, we just need a RISC-V CPU that can perform as well as a Snapdragon X Elite
@chuckbenedict7235
@chuckbenedict7235 22 күн бұрын
Agreed! I'm working on another rendition of this explainer, but for C instead. Should be out next few days.
@DavidLatham-productiondave
@DavidLatham-productiondave Ай бұрын
Im curious about the call to invert when nx is true. Isnt negating acheived by inverting all the bits and then adding one?
@DavidLatham-productiondave
@DavidLatham-productiondave Ай бұрын
Oh ignore me. I figured it out.
@chuckbenedict7235
@chuckbenedict7235 18 күн бұрын
I am glad you did. I did that work some time ago and the answer was not readily apparent. I should have said as much. Care to share?
@DavidLatham-productiondave
@DavidLatham-productiondave 18 күн бұрын
@@chuckbenedict7235 lol. Now you have me on the back foot. I recall looking again at the alu design and thinking about it again. I've since bought the book. I think (and I'm s bit hazy on this) it's because for x-y we negate y and then negate the output. Something about how the two negates work.. ? Maybe. 🤣🤣
@DavidLatham-productiondave
@DavidLatham-productiondave 18 күн бұрын
I did model it at the time in logisim and proved that the approach of inverting and adding one doesn't work with the hack alu.
@AbhishekKumar-yx6gz
@AbhishekKumar-yx6gz Ай бұрын
what is the name of the simulator you are using ?
@chuckbenedict7235
@chuckbenedict7235 Ай бұрын
Logisim Evolution. You can download it here: github.com/logisim-evolution/logisim-evolution
@rjones8508
@rjones8508 Ай бұрын
In load byte should the selected byte reflect the default little Indian integer format (count bytes from the right)? Also, instead of all the shift mechanics, can one of 4 byte mixes be used instead?
@chuckbenedict7235
@chuckbenedict7235 Ай бұрын
I assumed that words are stored big endian in RAM. The spec says it can be done either way. It's easier to demo imho. Regarding use of mux for byte extraction...interesting. How would you propose? My hw implementation was based on me writing some pseudo code (which I did off camera), and shifting is what I envisioned.
@rjones8508
@rjones8508 Ай бұрын
Maybe 8 4-bit muxes with the 1st mux inputs on input b0,b8,b16,b24 outputting to b0, 2nd on b1,b9,b17,b25 outputting to b1 etc. The 2 bit selects are common to all 8 muxes. I think its the same or similar technique you used for the half word but not sure. The mux effectively performs the 0,8,16 or 24 bit byte shift depending on the select.
@umdead1716
@umdead1716 Ай бұрын
hello idk if u will see me but i kinda dont rly understand what is risc v i understand that it is somekind of a cpu i think
@chuckbenedict7235
@chuckbenedict7235 Ай бұрын
RISC-V is an open source instruction set architecture developed by UC Berkley. RISC means reduced instruction set computer...meaning that the CPU contains a small number of simple instructions. It is an ideal platform for learning more about CPUs. My Logisim series demonstrates how to go about building a functional CPU that can be synthesized on to an FPGA.
@umdead1716
@umdead1716 Ай бұрын
​@@chuckbenedict7235oh ty
@legobuildingsrewiew7538
@legobuildingsrewiew7538 Ай бұрын
this seems like i will come back to it one day.
@sietsevenema4666
@sietsevenema4666 2 ай бұрын
I’ve got the same problem with my DBX. I don’t have the equipment to do this, but I will find someone who can thank you for this video. I’m sure this will solve the problem with mine DBX to
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Sorry to hear. You can get a new hot air rework station for under $80 from Ali Express. Get flux as well. Probably can get a used one for less on eBay. You could also try a local college...they have labs they might let you use, or fix it days.
@norliegh
@norliegh 2 ай бұрын
pretty cool video! i really hope you make more. ❤
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Thank you, I will
@NaterNorris
@NaterNorris 2 ай бұрын
Interesting but I dont understand whats going on. Very specific usage. This is for programming basically an OS or interface that you can communicate with? Definately interesting, just a little too high level i think for most viewers. Like for example, what are we doinfgwirh thw bit values ect. And how are we using this?
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
I am building modules step by step, that will be combined into a design, which will implement a RISC-V system on a chip, in Logisim. The immediate generator acts upon RISC-V immediate instruction types, which contain hard-coded values within the instruction. Those immediate values are then needed by other modules (such as the ALU). Perhaps I did not add enough context at the beginning of the video. Have you have seen other videos in the series? I am about to deploy content on control logic, which pulls these modules together. Thanks for the question.
@RRAAPillai
@RRAAPillai 2 ай бұрын
Very good!
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Thanks! Check out my RISC-V I32 series. I'm working on the next installment today.
@sidharthbatchu6128
@sidharthbatchu6128 2 ай бұрын
its Kinda hard to comprehend sir
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Have a specific question that I can clear up?
@ajax123z
@ajax123z 2 ай бұрын
This is really good content. Keep it up dude. Honestly kinda crazy that you only have 200 subs. The quality of your videos is just so much better than mine. The youtube algorithm be just hatin sometimes.
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Thanks for the kind words. My last series on the Hack CPU was a limited niche. I am not surprised at the limited uptake to date. RISC-V has broader appeal. So I expect the channel will grow. Or not. I do this because it helps reinforce my learning, with the hope that others will benefit. I do have bigger plans for this series...from building a compiler, to application of machine learning to Logisim. Cheers.
@ajax123z
@ajax123z 2 ай бұрын
@chuckbenedict7235 I'll definitely watch your risc-v series as you make it. I started learning about computers about a year ago, and I was surprised by that lack of detailed how-to videos. I, too, have made quite a few logic related and cpu building videos in the hopes of making it easier to learn for other people who get into computer building.
@sananjabrayilov5349
@sananjabrayilov5349 2 ай бұрын
Thanks man and keep it goin on
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Thanks, will do!
@artstechnology7809
@artstechnology7809 2 ай бұрын
you are honest and accept the limits of your knowledge. Thank you
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
I try to put in as much of the learning and trials I had along the way. Kind words appreciated.
@vishwasp9817
@vishwasp9817 2 ай бұрын
Sir do u have any suggestions for books about manufacturing components like resistors, capacitors,inductors etc...
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Sorry, I do not.
@vishwasp9817
@vishwasp9817 2 ай бұрын
@@chuckbenedict7235 ok sir , thanks for responding 🙏🙏🙏
@whatisuser
@whatisuser 3 ай бұрын
Hey dude! Your series doesn't seem to be getting the love it deserves but please note that it is a great series! People don't really find interest in this field of electronics and maybe because of that your videos haven't been doing super well but there are people that love this content. I am currently following the nand2tetris course in coursera and this has been a great resource in visualizing the circuits. Granted my implementation is definitely different from yours, but you have done a great job regardless! Hope you have a great day Chuck!
@chuckbenedict7235
@chuckbenedict7235 3 ай бұрын
I didn't do it for clicks...I just had an interest. But I do appreciate the feedback and am glad you find it useful. Is there anything else you might find helpful if I were to start another series?
@whatisuser
@whatisuser 3 ай бұрын
​ @chuckbenedict7235 That is such a difficult question haha. I personally would love to see a series on GPUs but that wouldn't really cater to a larger audience I think. You could try out hardware implementation of the hack architecture and maybe build a PCB surrounding it. The learning process itself is amazing. I too am working on the same thing and I plan to show it at our college exhibition in like a year. I have barely barely started with it (the parts aren't really very easy to find where I live) but I do hope to at least get far enough.
@pranavnag509
@pranavnag509 4 ай бұрын
bro you a legend
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Thank you. Hope you find the content helpful.
@eZaFJDUBB
@eZaFJDUBB 7 ай бұрын
really love your videos! I recreated this circuit, however logisim gives me an "oscillation apparent" error. it seems related to the 16 bit increment chip. In order to follow a long, I made my inc16 chip with the stock adder chip switched to 16 data bits and then a 0 value bus attached, which seemed to be working fine, however now when it's used in this circuit is having an issue. Either way, this helped me understand the program counter function much better, completely missed the OR gate implementation on my own
@chuckbenedict7235
@chuckbenedict7235 18 күн бұрын
That error usually is because of feedback but I cannot specifically answer without a circ to study.
@hamzakourta4509
@hamzakourta4509 8 ай бұрын
I know it's out of context, but am I the only one who can't find the Reference of any of the libraries below the input/output library in the help section???
@uonliaquat7957
@uonliaquat7957 8 ай бұрын
Is there any way I can get the pdf of second edition of this book? Can't find it on internet.
@chuckbenedict7235
@chuckbenedict7235 8 ай бұрын
Not legally as far as a know. I do see it available used on Amazon for $28. It is a good value for what is learned IMHO (I have nothing to do with the book btw).
@sddaqwe709
@sddaqwe709 9 ай бұрын
Nice video Thank you
@chuckbenedict7235
@chuckbenedict7235 2 ай бұрын
Belated...you are welcome!
@Nurtastube
@Nurtastube 10 ай бұрын
Great video!
@chuckbenedict7235
@chuckbenedict7235 10 ай бұрын
Thanks!
@questoesmat.concurso7354
@questoesmat.concurso7354 Жыл бұрын
Thanks
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
You're welcome
@questoesmat.concurso7354
@questoesmat.concurso7354 Жыл бұрын
Very good
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Thanks!
@Artixou
@Artixou Жыл бұрын
Great stuff! I recommended this channel and video series on another video that has to do with low-level topics.
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Awesome, thank you!
@vishwasp9817
@vishwasp9817 Жыл бұрын
I am very glad I found this channel,it has been a good journey watching and experimenting the hackcomputer myself My respects , for posting this great informational videos🙏🙏🙏
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
It has been educational for me putting it together. I am happy it has helped you. Thanks for the support.
@bofrederiksen292
@bofrederiksen292 Жыл бұрын
I don't think you need the second and-gate. It is already in the half-adder. Just connect the half-adders carry output directly to the lower input of the or-gate.
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Correct. Thx!
@Artixou
@Artixou Жыл бұрын
Great :)
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Thank you!
@cylian91
@cylian91 Жыл бұрын
Good video
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Thanks!
@Artixou
@Artixou Жыл бұрын
Great videos thank you Chuck. Managed to make a couple of my own CPU designs thanks to you and the book. Still trying to understand input and output, but getting there. These VGA videos certainly help understanding output. Will you touch on input such as keyboards in the future? Thanks again
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
I am glad you are finding them useful. I have one more video to go for VGA to show the driver working under HackCPU control. Then yes...a keyboard driver will be next. I intend to start with PS2 since it is simple. I have sights set on a USB HID host, but it will take some time...how about HDMI?
@Artixou
@Artixou Жыл бұрын
@@chuckbenedict7235 That's awesome, I was only really expecting PS2 so hearing we might get some USB videos in the future is fantastic.
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Now that VGA is working I'll be turning to PS2 input...stay tuned for a first drop in the next week or two. I hope that Pong will then work.
@Artixou
@Artixou Жыл бұрын
@@chuckbenedict7235 Awesome! I can't wait to see how you do it. I couldn't help myself and started learning about data and address bussing, but I really can't wait to see how it's done with the HackCPU
@Artixou
@Artixou Жыл бұрын
Thanks, very neat. Shame comments are disabled on the last two videos!
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Oops...my bad and thanks for the tip.
@go4peanut471
@go4peanut471 Жыл бұрын
Definitely going to burn a bunch of time trying to recreate Ben Eaters 6502 project in a single chip now. Thanks!
@teejay872
@teejay872 Жыл бұрын
Should be easier than building it with TTL chips. :-)
@notgartificial8591
@notgartificial8591 5 ай бұрын
dude i built it already
@oats7924
@oats7924 Жыл бұрын
Hey man. Good job with this. I tried to create the entire computer out of just NAND gates.
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
I am glad you found value from the series. I continue to add to the collection.
@Artixou
@Artixou Жыл бұрын
I don't get where in the book it shows which c bit corresponds to which ALU operation. Why is bit 11 of the instruction (ie c1) corresponding to zx?
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Cross reference page 37 with page 67. I struggled with this too until I made the connection. There is an important one-liner in the last sentence of the Figure 4.3 caption: "Note the similarity between this instruction set and the ALU specification given in figure 2.6". I wrote, in my copy of the book, the bit descriptions over the c(x) columns on page 67. I have the earlier edition, by the way...
@Artixou
@Artixou Жыл бұрын
@@chuckbenedict7235 Thank you very much
@Artixou
@Artixou Жыл бұрын
invaluable videos, thank you
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
My pleasure!
@Artixou
@Artixou Жыл бұрын
thank you
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Welcome!
@KapPetrov
@KapPetrov Жыл бұрын
please continue
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
I intend to...I have been away for a time, but am working on more content right now. My goal is to assemble a complete working computer with a display and keyboard, with an assembler monitor application. What would you like to see?
@KapPetrov
@KapPetrov Жыл бұрын
@@chuckbenedict7235 I would like a tutorial on just like what you said you are working on, in Logisim of course. If you can't though, its fine! :D just continue this series if you can. No pressure man!
@oats7924
@oats7924 Жыл бұрын
@@KapPetrov Yeah I'd like to see that too. Yah know, if this could be created in logism, this can be created in real life. That would be soo cool don't you think Kap Petrov?
@KapPetrov
@KapPetrov Жыл бұрын
@@oats7924 well yes! Im actually into breadboards now, im gonna buy one today. Obsessed with breadboards now! you should check it out too.
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
If you have not seen yet...I have VGA content posted and am working on the testing video today.
@yradhan5487
@yradhan5487 Жыл бұрын
what shall we do if the fans have no screw to remove them as on the Club 3D R9 280X?
@chuckbenedict7235
@chuckbenedict7235 Жыл бұрын
Most cards are reference designs, so I'd be surprised...snap in maybe? They have to attach somehow. I have not seen the model you reference.