#5 {Error:check description} Vector and Array ||explanation with verilog code and simulation results

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 82

  • @Lucky-vm9dv
    @Lucky-vm9dv Рік тому +1

    12:10
    In second example
    Why it was written 4 rows 3columns
    Why not in opposite way
    From the 3 examples shown 1 and 2 are contradicting each other

    • @ComponentByte
      @ComponentByte  Рік тому

      Last line I am not getting what exactly you are asking. Please elaborate that contradicting part so I will be able to answer your first line

    • @Lucky-vm9dv
      @Lucky-vm9dv Рік тому +1

      ​​@@ComponentByte
      Here in 1st Example
      Matrix [2:0] [3:0]
      You have taken left one as row and right one as column
      But in 2nd example
      You have taken oppositely
      Why?
      What's the difference between these both
      Matrix [2:0][3:0]
      Reg[2:0] mem[3:0]
      Is both same?

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

      Matrix [2:0][3:0] is a vector having 3 rows and 4 column. After name indicates , 1st one is row and 2nd one is column I.e. how many rows and how many column
      REG [2:0]mem[3:0] has 4 rows and and each row has data of width 3 bit.it doesn't have any column. Before name indicates the data getting stored will be having how many number of bits
      Both are not same.

  • @SebJames55
    @SebJames55 3 роки тому +3

    3:39
    reg[0:3] a; /* isn't the comment supposed to be from "rightmost" 3 to "leftmost" 0 */

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

      Yes,Thank you for correcting the mistake. Really appreciate your learning. Thanks.

  • @preetham36
    @preetham36 Рік тому +2

    at 16:40 can't we initialize each blok of the array using loop?
    like how we do it in c or c++?

  • @andyden8501
    @andyden8501 4 роки тому +1

    It's the best explanation.thanks

    • @arafay142000
      @arafay142000 4 роки тому

      Please check FPGA made Easy youtube channel

  • @ritikbat5628
    @ritikbat5628 4 роки тому +1

    Thank u so much sir...your videos are covering almost all points. 👌👌 Very helpful

    • @ComponentByte
      @ComponentByte  4 роки тому +1

      You are welcome. Happy learning.

    • @ritikbat5628
      @ritikbat5628 4 роки тому

      Sir can u also make such videos on system verilog and tcl

    • @ComponentByte
      @ComponentByte  4 роки тому +1

      I was thinking to make Basics of System verilog but due to unavailability of proper simulator tools and shortage of time , now difficult to make tutorial on said topic. But for System verilog you can always take help of www. testbench.in website.Thanks.

  • @chintudewan1437
    @chintudewan1437 4 роки тому +1

    wow, it's a great one.

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

    Concept clear thanks

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

    sir, thanks for the lecture series....in the above video reg [2:0] mem[3:0] must be representing an array of a row containg 4 blocks with each block containing 3 bits of data,but u have mentioned it as 3x4 2-D matrix. This is according to my understanding. please correct me if i am wrong.

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

      Hello, can you please mention the timing here because I couldn't find those words. If I have said so then definitely it's not 3x4 matrix. It can be 4x3 matrix as 4 rows with each 3 bit. I appreciate every individual's learning when someone finds any mistakes in my explanation or content. Yes ,your understanding is absolutely correct .Thank you.

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

    Sir can u tell which book(with good examples) should i follow for computer organisation and architecture.
    And your videos are great.

  • @technicaldost9069
    @technicaldost9069 4 роки тому +1

    Sir, I wish you were my teacher

    • @arafay142000
      @arafay142000 4 роки тому

      Please check FPGA made Easy youtube channel

  • @bijaysah9135
    @bijaysah9135 4 роки тому +1

    Wow, thanks a lot .

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

    Thank you sir

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

    8:34 sir, if data type is simply specified as reg , what we conclude sir whether it is vector or array?

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

      Oh sorry 😅sir ,i understood that one

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

    Sir, at 12:47 reg[2:0]mem[0:3] each cell is storing 3 bit or 1 row will store 3 bit?

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

      In this example reg [2:0]mem[0:3], memory having depth of 4 means 4 rows and each row can store 3 bit.
      r0---000
      r1---001
      r2---010
      r3---011

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

      @@ComponentByte thank u sir for ur response if coloumn is there then each cell in row stores 3 bit means a[0][0]=000 like that is it right sir?

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

      reg[2:0]mem[0:3][0:4]
      mem[0][0] , [0][1] ,[0][2] , [0][3] , [0][4]---all 3 bits
      Same for other row and column.
      Yes,you are correct.

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

      @@ComponentByte thank u sir for ur fast response.if it is possible could u make vedio on divided by 5 nd 7 by using flip flop and mod counter.i saw many vedios on utube but it's not up to Mark but if u explain it then many of them will understand easily.Thanks for ur kindly gesture on students may God richly blesses ur work.

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

      Definitely I will try to upload different logic to build different types of counter.

  • @Shan-rm5yv
    @Shan-rm5yv 4 роки тому +1

    sir thankyu for yur great efforts
    but could yu please make a video on the tools available open source?
    ModelSim is commercialised and students like us could not afford sir

    • @ComponentByte
      @ComponentByte  4 роки тому

      But you can always use xilinx and students version of modelsim. It's always available. Use online simulator edaplayground

    • @Shan-rm5yv
      @Shan-rm5yv 4 роки тому

      @@ComponentByte okay sir
      thank yuu

    • @Shan-rm5yv
      @Shan-rm5yv 4 роки тому

      Sir do yu have a email id ?
      it will be greatly helpful to ask more question sir

    • @ComponentByte
      @ComponentByte  4 роки тому +1

      email2vesystem@gmail.com
      If you want you can share with me your number in the given email id and I will call you. This is the only way people contact me for their query.

  • @PriyankaKumari-zg9vd
    @PriyankaKumari-zg9vd Місяць тому

    what is the meaning of integer [0:7][2:0] count; if we write ?

    • @ComponentByte
      @ComponentByte  Місяць тому

      Each data is of size 3 bit and such 8 data's are there

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

    1:18 wire can not sotre its passes value

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

      You are correct,Wire can't store. What the statement means it's a vector net that you know already. may be this is the only video where it has been mentioned that wire stores which is not true. Please watch my reg and wire tutorial to know the difference between reg and wire.
      If those lines confused you then I am really sorry . It's my mistake. I appreciate your learning.

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

    In previous videos we haev learnt that wire doesn't store any values and reg stores value but here wire a stores a bit .
    I don't understand sir please explain

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

      Wire is like a connection or path between two terminals so it just allows data to pass through it so all terminal or port names(input and output as this is connected to some other terminal) are by default WIRE.
      Reg is like a storage or Register , so it stores data either 1 or 0. If output port stores data before it passes to other terminal then declared as REG.
      You can watch my VIDEO on REG and WIRE to learn more about it.

    • @215_raveenchandra8
      @215_raveenchandra8 3 роки тому

      @@ComponentByte
      At 3:34 we see that (written in red) wire is storing bit..
      But in earlier video you told that wire doesn't store any bit ...
      Please clear this doubt .....

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

      reg and wire tells how an object will be assigned.
      If you assign value to reg variable then it stores that value , so basically creating register hardware to store that value.(eg:counter)
      If you assign value to wire variable then it cannot store or hold that value but yes that value is assigned , so basically here we are creating a electrical path and not a Register.
      assign statements (used for wire) create a port/connection
      reg statement creates a Register.
      Think it interms of hardware
      wire a;
      Here we are creating a port or connection
      wire [3:0] a;
      Here we are creating 4 port or connection
      reg [3:0] a;
      Here we are creating a register with 4 flip flops

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

      @@ComponentByte omg 😱😱😱😱😱 thanku soo much sir...

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

    could u explain this in briefly it means , how many rows & columns it were contained reg [63:0] array_4d [15:0][7:0][7:0][255:0]; //Four dimensional array

    • @ComponentByte
      @ComponentByte  2 роки тому +2

      2D contains row and column so here 16 row and 8 column.
      3D is a cube means combination of 2D array.
      So here 8 number of 2D array which contains 16 row and 8 column
      4D is how many number of 3D or cubes.
      So here 256 number of Cubes or 3D which has 8 number of 16 rows and 8 columns.
      All the data are of 64 bits.
      I am not sure whether I could make you understand or not.

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

    great! you should use graphic tablet, they are cheap and make your lectures better.

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

      Thank you for your kind suggest but I know nothing about graphic tablet. I will try to explore the possible links.Thanks.

  • @gauravp117
    @gauravp117 2 роки тому

    In previous videos it was said that wire cant store data in this video its being told that wire can hold data im confused if wire stores data or not

    • @ComponentByte
      @ComponentByte  2 роки тому

      Wire can't store data. It drives data.
      I have given the clarification on this same topic in comment section.
      Sorry for the confusion.

  • @tukkinum
    @tukkinum 4 роки тому

    Thank you!

  • @lakshmij.l784
    @lakshmij.l784 3 роки тому +1

    Thanks for the wonderful lecture. Can i write a verilog code for storing coefficient of sparse matrix in ROM memory similar to the one you have explained here.
    eg.
    reg [2:0] mem[0:4][0:7];
    initial begin
    mem[0][0]=2'd1;
    mem[0][1]=2'd1;
    mem[0][2]=2'd3;
    ....
    end

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

      Welcome.
      You can always store coefficients in a textfile and then include the textfile where you have written your coefficients in either binary or Hex format on the top module. Please explore more about reading text file in verilog design. Hope this helps.Thanks

    • @lakshmij.l784
      @lakshmij.l784 3 роки тому

      @@ComponentByte Thanks for your reply..but if i have a large matrix with decimal value how do I read them?

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

      You can convert the decimal numbers into hex or binary using matlab tools. It's not that difficult. Because to my knowledge all the coefficient in verilog design are stored binary or Hex format.
      Even if the number of coefficients are more then also it won't be a problem.

    • @lakshmij.l784
      @lakshmij.l784 3 роки тому +2

      @@ComponentByte ok.. Thank you for the inputs

  • @syedsibteali5761
    @syedsibteali5761 4 роки тому

    Thank You very much for this generosity sir. I am having a problem while running it in xilinx with erro that module has no port. what is is mean?

    • @ComponentByte
      @ComponentByte  4 роки тому

      Hi, I think you have forgotten to write port. Module without port gives such error. If you have not got it correct then you can send me the code. Thanks.

    • @syedsibteali5761
      @syedsibteali5761 4 роки тому

      @@ComponentByte here is the code
      module Verilog(
      );
      reg [8*28:0] string;
      initial
      begin
      string = "Hello verilog World";
      $display("%s
      ",string);
      end
      endmodule

    • @ComponentByte
      @ComponentByte  4 роки тому +1

      This is a testbench code. If you synthesize the above code then you will get error in xilinx because there is no any port declared inside module() . It violates the basic rules.
      I had compiled the code using modelsim software.
      So just check the testbench result in xilinx. Don't synthesize the code.

    • @syedsibteali5761
      @syedsibteali5761 4 роки тому

      Thank You sir

    • @ComponentByte
      @ComponentByte  4 роки тому

      Welcome ! Wish you a happy learning.

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

    DEFAULT value of wire is x and reg is Z, in last video it is wrongly given. Kindly correct.

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

      You mean Default value of reg is Z and wire is X but I have given opposite in my lecture no- 4 tutorial. Is that true. Please correct me ?

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

      @@ComponentByte yes

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

      It's universal fact that wire is used for connectivity hence it gives Z(high impedance) and reg is used for storage(1/0) so it's value is unknown X by default.

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

      I don't know which simulator you are using and how you are verifying all these concepts.

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

      @@ComponentByte I also don't know the correct answer but on internet it is written so want to confirm it

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

    bro in previous lecture u say wire cant store data.......but here u saying 3:40 wire can store data

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

      Yes, wire can't store data. If I have said wire can store data then it's wrong(may be it's slip of tongue as I was new to making UA-cam video). Consider this as assigning value and not storing data technically. Sorry for the confusion.
      My intention is never to spread wrong information.
      Hope others get benifit from your comment.
      Thank you.

    • @mbcreations4158
      @mbcreations4158 2 роки тому

      @@ComponentByte pin comment

  • @pathlothvinod1818
    @pathlothvinod1818 4 роки тому

    sir, is this not requires test bench code

    • @ComponentByte
      @ComponentByte  4 роки тому

      Definitely I am going to make a tutorial for vector and array with testbennch.thanks for your comments

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

    Is wire can store a value

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

      No, wire is just a electrical path through which data flows.

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

    Sir ,Is Wire can store data

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

      No, wire can't store data. It's just an electrical path like a physical wire.

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

      @@ComponentByte oh.. ok sir😊👍

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

    In previous lecture u told wire caant store data but here youu chaange your words

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

      Wire can't store data. This is the ultimate truth.
      I have explained this on comment section. Please check it.sorry for the confusion.
      I am not a politician 😊that I will change my word.
      Thank you for pointing out the confusion.