Synthesizable Matrix Multiplication in VHDL

Поділитися
Вставка
  • Опубліковано 4 лис 2024
  • The VHDL code is available from my Blog : vhdlguru.blogs...
    The video simply explains the code and how it can possibly be converted for handling different sized matrices.
    I have used Modelsim SE for testing the code.
    VHDL Tutorial Blog: vhdlguru.blogsp...
    Verilog Tutorial Blog: verilogcodes.b...

КОМЕНТАРІ • 16

  • @mbuaesenju8514
    @mbuaesenju8514 Рік тому +1

    thank you for your code. I used it to learn

    • @VCodes
      @VCodes  8 місяців тому

      Thank you!

  • @KushagraMishra12
    @KushagraMishra12 7 місяців тому +1

    Can you please tell me whether this code can be used for Basys 3 FPGA?

    • @VCodes
      @VCodes  7 місяців тому

      it can be used. but not directly as inputs and outputs are 72 bits each. so you would need to write a wrapper to input numbers in multiple stages. and also show the output in multiple stages. like you set the switches, push a button and then change the switches and so on.

    • @KushagraMishra12
      @KushagraMishra12 7 місяців тому

      @@VCodes Can you provide me the code if possible?

    • @VCodes
      @VCodes  7 місяців тому

      I dont have the code readymade for this. but you can write up a state machine for this. if you attempt it, I can guide you through the process. but I do charge a fee for my time. send me an email if you want.

  • @Tio_Sam00
    @Tio_Sam00 2 роки тому +1

    hello.
    can you help me do this:
    dedicated datapath capable of multiplication
    prod = 0
    INPUT A
    INPUT B
    WHILE ( B != 0 ) {
    prod = prod + A
    B = B - 1
    }
    OUTPUT prod
    in behavioral VHDL?

    • @VCodes
      @VCodes  8 місяців тому

      Yes! There is a very similar code in this blog post: vhdlguru.blogspot.com/2010/03/how-to-do-clocked-for-loop.html

  • @srikanthchowdary7068
    @srikanthchowdary7068 6 місяців тому +1

    Hii sir how can i contact you

    • @VCodes
      @VCodes  6 місяців тому

      my email is available here: vhdlguru.blogspot.com/p/contact-me_23.html

  • @dukenuke2690
    @dukenuke2690 3 роки тому +1

    Great!! Thanks :) but could one not do it simpler ? more like in C/C++ ? for that in C in need like 40 lines only.. without state machine

    • @VCodes
      @VCodes  3 роки тому +1

      you can. but it will be hard to synthesis it.

    • @dukenuke2690
      @dukenuke2690 3 роки тому

      @@VCodes When you do the multiplication of two elements, its 8-bit unsigned x 8 bit unsigned ->> this puts out a 16bit unsigned value. Why are you storing it in a 16 bit temp-variable and then cut off 8 bits when putting it into the output matrix? Arent you loosing information, when multiplying higher numbers?
      To my first question, i wrote your matrix multiplication a little shorter, and although there are not really any matrices involved, it kinda does the same job, would you agree ? ;D
      github.com/Wale94/matrix_multiplication_vhdl.git

    • @VCodes
      @VCodes  3 роки тому +2

      @@dukenuke2690 if you are getting the correct results, and code doesnt need to be synthesisable, anything is fine. my code is simple and based on the assumption that the output matrix doesnt have numbers greater than 255. The code is done more for educative purposes which someone can play around with and learn more.

    • @dukenuke2690
      @dukenuke2690 3 роки тому

      @@VCodes :) ah ok i get it. Why would my code not be synthesizeable ? number of IO Ports could be connected to some other Core or BRAM

    • @VCodes
      @VCodes  3 роки тому

      @@dukenuke2690 Good. you have lot of questions. I can provide guidance for a fee. you can write to me at lalnitt (at) gmail (dot) com