different type of modeling in verilong

Discussion in 'Programmer's Corner' started by vead, Jan 7, 2014.

  1. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    when we design hardware in verilong we need to know the different type of modeling like behavioral ,structural modeling
    in behavioral modeling output decleared as wire and in structural output decleared as wire
    behavioral use always block structural use assign block

    I have some questions
    1) can we design one hardware with help of different modeling like structural, behavioral, data
    2)IF any one say design the hardware how to know which modeling is need to design
    3)what the meaning of behavioral and structural model

    please somebody tell me thanks in advanced
     
    Last edited: Jan 7, 2014
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    3.) Structural modeling defines the structure of a device in terms of lower level components (e.g. A full adder implemented with low-level gates).

    Behavioral, however, describes the behavior of the circuit with an abstraction from the underlying logic (an adder implemented with the line
    Code ( (Unknown Language)):
    1.  sum <= a + b;
    doesn't require explicitly implementing any gates)

    Reference

    2.) Behavioral is probably most often used, but that depends on what you are doing. It is much faster for the designer and easier to understand when the HDL describes its operations rather than seeing a series of inputs and outputs from different hierarchical blocks.

    1.) Are you asking if we can mix the different modeling options in designing a device? I'd say yes.
     
    absf likes this.
  3. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    By the way, what you probably mean is called verilog, not verilong.
     
  4. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Yes we can.


    From experience mostly. Behavorial modeling is used for most of the functionality in a design. Structural modeling is used to tie large designs together.



    Behavorial describes most of the functionality in the design. Structural typically describes how the modules are connected together, and is usually the top level model of complex designs.
     
  5. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    oh sorry for that its my mistake
     
  6. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    ok thanks for quick reply
    1) can we design only combinational circuits with help of structural model like basic gate, adder, multiplexer , encoder or may be other
    2) behavioral model is used for both combinational and sequential circuit like adder multiplexer, adder, encoder, memory shift, register ,counter
     
  7. Mark IV

    New Member

    Oct 1, 2013
    15
    1
    And I have read 'verylong'. :D:D
     
  8. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    That´s basically the same, but when I first saw the thread title I thought it was a little joke from the OP :D
     
  9. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    1.) Can you create a flip flop from discrete gates? Yes? Then you can make sequential circuits too using a structural approach...

    2.) If you can describe the behavior (within reason), you can do it with behavioral.
     
    vead likes this.
  10. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    Behavioral model- describes the behavior of the circuit
    1)what is the behavior of adder

    Structural modeling -defines the structure of a device in terms of lower level components
    2) how to connect component for adder


    can someone explain adder with behavioral and structure model
     
  11. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    This now sounds like homework, which we will not do for you.

    Here's a big hint - to do structural, create the adder circuit from gates (or lower level adders, you fall to mention what kind of adder - half adder, full adder, 26 bit adder, etc)

    For behavioral, you describe the behavior...see post # 2.

    ...it's in the name!:rolleyes:
     
    absf likes this.
  12. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    that's not homework help I am trying to understand above statement with adder logic
     
  13. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    Regardless, I think you will learn it better if you work it out yourself.

    Do you know how to make an adder from basic gates? Yes? Do that with Verilog. There, you have the structural implementation done.

    After that, describe it as simply adding the input values of the two inputs from the structural implementation.
     
  14. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    Behavioural:

    A = B + C

    Structural:

    wire A, B, C, D, E, sum, carry;

    AND(.inputA(A), .inputB(B), .output(C));
    OR(.inputA(C), .input B(B), .output(D));
    etc.

    Dataflow:

    sum = A ^ B;
    carry = A & B;
    etc.
     
    vead, kubeek and absf like this.
Loading...