Constant instantiation

Discussion in 'VHDL' started by Matteo, Oct 6, 2004.

  1. Matteo

    Matteo Guest

    Anyone know how to instantiate ( in Viewdraw ) a bus with a fixed
    value?

    I try to explain better: if for example I have to add the constant
    decimal value 7 to an incrementer every time I have a rising clock
    event, I suppose I have to enter in the incrementer with a 4-bit wide
    bus which holds the value 7 every time.

    How can I do it??

    As you see I'm very new with fpga programming, any help is very
    appreciated.

    Thanks in advance,
    Teo.
     
    Matteo, Oct 6, 2004
    #1
    1. Advertising

  2. On 6 Oct 2004 04:17:07 -0700, (Matteo) wrote:
    >Anyone know how to instantiate ( in Viewdraw ) a bus with a fixed
    >value?
    >
    >I try to explain better: if for example I have to add the constant
    >decimal value 7 to an incrementer every time I have a rising clock
    >event, I suppose I have to enter in the incrementer with a 4-bit wide
    >bus which holds the value 7 every time.
    >
    >How can I do it??
    >
    >Thanks in advance,
    >Teo.


    There are several ways to do this. The simplest is this:

    Place the following 4 symbols on your schematic:

    GND
    VCC
    BUF
    BUF

    Connect the GND to a BUF input.
    Connect the VCC to a BUF input.

    Place a net stub on the outputs of each of the BUFs

    Label the net on the output of the BUF that has its input connected to GND: "L"
    Label the net on the output of the BUF that has its input connected to VCC: "H"
    (obviously, don't include the quote characters)

    If for example you have an 8 bit adder, you can now place a bus stub
    on one of its inputs. Label this bus stub

    L,L,L,H,L,L,H,L

    And you will get the HEX constant 0x12, which is 18 decimal.


    Philip





    ===================
    Philip Freidin

    Host for WWW.FPGA-FAQ.COM
     
    Philip Freidin, Oct 6, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christopher M. Lusardi
    Replies:
    1
    Views:
    4,110
  2. Martin Magnusson
    Replies:
    2
    Views:
    517
    John Harrison
    Oct 8, 2004
  3. Tor Erik Soenvisen
    Replies:
    14
    Views:
    574
    Tim Roberts
    Nov 23, 2006
  4. Replies:
    4
    Views:
    348
    Keith Thompson
    Dec 14, 2006
  5. Replies:
    1
    Views:
    587
    Salt_Peter
    Dec 25, 2006
Loading...

Share This Page