Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Constant instantiation

Reply
Thread Tools

Constant instantiation

 
 
Matteo
Guest
Posts: n/a
 
      10-06-2004
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.
 
Reply With Quote
 
 
 
 
Philip Freidin
Guest
Posts: n/a
 
      10-06-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Explicit instantiation of STL vector demands explicit instantiation of all the templates it using internally. krunalbauskar@gmail.com C++ 1 12-25-2006 03:51 PM
pointers to constant characters and constant pointers to characters sam_cit@yahoo.co.in C Programming 4 12-14-2006 11:10 PM
len(var) is [CONSTANT] equal to len(var) == [CONSTANT]? Tor Erik Soenvisen Python 14 11-23-2006 09:57 PM
"Non-constant" constant can't be used as template argument Martin Magnusson C++ 2 10-08-2004 08:41 AM
Understanding How To Use #ifdef Constant #define Constant Sequence In Multible Files Christopher M. Lusardi C++ 1 09-02-2004 07:43 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57