Constant instantiation

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 to
Matteo
Loading thread data ...

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 snipped-for-privacy@fpga-faq.com Host for

formatting link

Reply to
Philip Freidin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.