RISC-V Pseudoinstructions (li, la, call, lb, sb,...)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 31

  • @landspide
    @landspide 2 ปีที่แล้ว +6

    This is so well explained, very impressive John!

    • @JohnsBasement
      @JohnsBasement  2 ปีที่แล้ว

      Thank you for such a kind review!

  • @grad1_10
    @grad1_10 2 ปีที่แล้ว +1

    FINALLY THE VIDEO I WAS LOOKING FOR!! You are so talented at teaching things in an easy way to understand! Thanks alot!!

    • @JohnsBasement
      @JohnsBasement  2 ปีที่แล้ว

      Thanks! I'm glad you like it.

    • @JohnsBasement
      @JohnsBasement  2 ปีที่แล้ว

      Oh... make sure that you grab a new copy of RVALP. I can see that I have updated some of the figures based on some student feedback.

  • @jchidley
    @jchidley ปีที่แล้ว +2

    This series continues to be excellent

    • @JohnsBasement
      @JohnsBasement  ปีที่แล้ว

      Thanks! Many of these comments are excellent as well! 😇

  • @mytechnotalent
    @mytechnotalent 9 หลายเดือนก่อน

    I love your series the most comprehensive on RISC-V. I am programming in bare-metal assembler for the ESP32c3 chip using the esp32-c3 technical reference manual and managed to blink an led with no RTOS now trying to get a button setup for input but am a bit lost. I wish there was a series on ESP32c3 including input including interrupt button input, and UART that would be incredible but I know you have other things but wanted to ask. Thank you for your time John.

    • @JohnsBasement
      @JohnsBasement  9 หลายเดือนก่อน

      Thanks! I've never used an ESP32c3. But the manual looks promising. www.espressif.com/sites/default/files/documentation/esp32-c3_technical_reference_manual_en.pdf

    • @mytechnotalent
      @mytechnotalent 9 หลายเดือนก่อน +1

      That what I have been using to write a blinky so far so good but struggling beyond that for input I see the registers but something I am missing I am sure I will figure it out as I wrote an all assembler book on the STM32F401@@JohnsBasement

  • @naruhitoabiku9451
    @naruhitoabiku9451 10 หลายเดือนก่อน +3

    If I were to ever see you in a bar, I would pay for all of your drinks.

  • @El_Croc
    @El_Croc 2 ปีที่แล้ว +1

    Thanks for the clear explanation, saved me a lot of wasted time. lui faff around with 20 bit - I get why they did it now, but it's put me off bothering.

    • @JohnsBasement
      @JohnsBasement  2 ปีที่แล้ว +1

      I'm glad I could help!

    • @El_Croc
      @El_Croc 2 ปีที่แล้ว

      @@JohnsBasement I'll be focusing on ARM I think.

    • @mikafoxx2717
      @mikafoxx2717 10 หลายเดือนก่อน

      It seems inelegant, but it sure looks really nice from a CPU design perspective. In the end, it just turns into two instructions that the assembler fixes up the math for you. Would really only get complicated if you wanted to do self modifying code, which usually isn't an excellent idea these days. The compilers don't really care either, just simple math. Plus an architectural implementation can actually take those two operations and fuse them into one single op if transistor count/performance makes it sensible to do so.

  • @shairkhan2279
    @shairkhan2279 2 ปีที่แล้ว +2

    Great effort Sir.

  • @horacepoon7044
    @horacepoon7044 5 หลายเดือนก่อน

    Thanks for your explanation. It is very clear and helpful.

    • @JohnsBasement
      @JohnsBasement  5 หลายเดือนก่อน

      You're welcome! Glad it helped!

  • @khurram-malik
    @khurram-malik ปีที่แล้ว +1

    Dear John,
    Is it possible to obtain a copy of the PDF document / book you use in your videos?
    Btw your way of explaining has helped me immensely

    • @JohnsBasement
      @JohnsBasement  ปีที่แล้ว

      Read the description. Link in there.

  • @sherifabdelfadil7886
    @sherifabdelfadil7886 2 ปีที่แล้ว +4

    wouldn't (constant >>U 12)+(constant & 0x00000800 ? 1 : 0) be better represented as ((constant + 0x00000800)>>U 12) ? it's more compact and contains no conditional arithmetic.

    • @JohnsBasement
      @JohnsBasement  2 ปีที่แล้ว

      🤣 I was JUST talking to my students of making that EXACT change! I believe it would indeed!
      It is on my todo list.

  • @Tightt-r5e
    @Tightt-r5e 11 หลายเดือนก่อน

    Very good stuff to learn ,Just writing CPU project and your book explain almost everything in green card.

  • @7alken
    @7alken ปีที่แล้ว

    so li would be expanded into LUI+ORI but that la and far mem access needs really that addi -4 substraction, right?

    • @JohnsBasement
      @JohnsBasement  ปีที่แล้ว

      All immediate operands are sign extended. You don't want to use ORI to set the low bits after a LUI... Because if the high immediate but is set you'd end up with all 1s in the high bits!

  • @bitflogger
    @bitflogger ปีที่แล้ว

    I'm still confused. I'm using the pseudo assembler rv. I can run "li 0xffffffff", I cannot see how that expands, it just works. Trying to assemble "lui a0, 0xfffff" followed by "addi a0,a0, 0xfff" does not work. Using "addi a0,a0, 0x7ff" works, but leaves a 7 nibble in the result. Adding one to 0xfffff does not seem to be useful.

    • @JohnsBasement
      @JohnsBasement  ปีที่แล้ว +1

      That's because it expands to addi a0,zero,0xfff
      If you want to lui first then do: lui a0,0; addi a0,a0,0xfff

    • @bitflogger
      @bitflogger ปีที่แล้ว

      @@JohnsBasement I see it now. Thanks!