Constant instantiation

M

Matteo

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.
 
P

Philip Freidin

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
(e-mail address removed)
Host for WWW.FPGA-FAQ.COM
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top