Can you implement a pull-up resistor in VHDL?

J

jidan1

Hello,

I am using Spartan-3 XC31000. You can enable on/off pull-up/pull-down
resistors with ISE; however, i would like to do this in VHDL so that i
can enable them during runtime. At first I thought these lines would
synthese, but I was wrong.


entity pullup is
port (inp_i :in std_logic;
outp_o : out std_logic);
end pullup;

architecture rtl of pullup is
signal s_inp_i : std_logic;
begin
s_inp_i <= 'H';
s_inp_i <= inp_i;
outp_o <= inp_i;
end rtl;

Any Idea how to do this?

Thanks;
JJ
 
P

Peter

Any Idea how to do this?
Hi,

I am not familiar with Xilinx software, but when designing with e.g.
Actel you instantiate a certain I/O-pad in your vhdl code.

/Peter
 
D

Dave Pollum

Hello,

I am using Spartan-3 XC31000. You can enable on/off pull-up/pull-down
resistors with ISE; however, i would like to do this in VHDL so that i
can enable them during runtime. At first I thought these lines would
synthese, but I was wrong.

entity pullup is
port (inp_i :in std_logic;
outp_o : out std_logic);
end pullup;

architecture rtl of pullup is
signal s_inp_i : std_logic;
begin
s_inp_i <= 'H';
s_inp_i <= inp_i;
outp_o <= inp_i;
end rtl;

Any Idea how to do this?

Thanks;
JJ

I don't know how to implement pull-up/pull-down, but you can't assign
values to input port "inp_i".
-Dave Pollum
 
M

Mark McDougall

I am using Spartan-3 XC31000. You can enable on/off pull-up/pull-down
resistors with ISE; however, i would like to do this in VHDL so that i
can enable them during runtime.

Are you talking about having "pull-ups" _inside_ the FPGA, which can be
turned on/off whilst the image is running?

I've done a few designs with an "open-collector" bus connecting several
internal modules, plus an external IO... each internal module uses the
"resolved" bus signal as input, and drives "oe" as an output. The
top-level "resolved" signal is computed combinatorially from the external
input plus the internal oe signals... and of course the oe's combine to
drive the I/O pin direction as well.

Regards,
 
J

jidan1

Are you talking about having "pull-ups" _inside_ the FPGA, which can be
turned on/off whilst the image is running?

Exactly. But it seems that it's unfortunatly not possible while the
FPGA is running; it has to be done during configuration ;(

JJ
 
D

Dave Pollum

And he hasn't... ?!?

Regards,

--
Mark McDougall, Engineer
Virtual Logic Pty Ltd, <http://www.vl.com.au>
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266

DOH! I missed "s_inp_i". Next time I'll be sure to wear my glasses!
-Dave Pollum
 

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

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top