Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FPGA "conditional" pull-up or pull-down resistors

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
Is it possible to use internal pull up or pull down resistors and make them appear (or dissapear) only when a certain logic condition is satisfied ?
 

Re: FPGA "conditional" pull-up or pull-down resistors

I don't think you can do that; I believe the resistors are hard-coded in your bit file.

- - - Updated - - -

I don't think you can do that; I believe the resistors are hard-coded in your bit file.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Yes as far as I know as well, they are hard-coded in the bit file but while searching I found the following link,
may be you might get some help with this,
**broken link removed**

find the following code here and read it, I am not sure I just give a glimpse to it, but I guess you can alter the resistor value using tmp variable, by setting conditions to it...!

Code:
ARCHITECTURE str OF pulup_ex IS
COMPONENT pullup
    PORT(o : OUT std_logic);
END COMPONENT;

COMPONENT IBUF
    PORT(i : IN std_loigc;
	 o : OUT std_logic);
END COMPONENT;

SIGNAL tmp, core_in : std_logic;
BEGIN
    tmp <= inpad1;
    pu : pullup PORT MAP (tmp);
    in : ibuf PORT MAP (tmp, core_in);
END str;
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
With some FPGAs/CPLDs, you can approximate a controlled pull-up/pull-down/none circuit *if*

* Your FPGA/CPLD has a programmable output drive strength down to a low current

* You and your FPGA/CPLD can waste extra I/O current

For example, the Xilinx Spartan-3 pins can be programmed with a drive current down to 2mA. I think other devices go down to a lot lower but that's only from memory...

You can then do this in VHDL for your INPUT pin function:

Declare the pin in your entity as: iopin : inout std_logic;

iopin_in <= iopin;

iopin <= '1' when (iopin_pu = '1') else '0' when (iopin_pd = '1') else 'Z';

This is more an example of "what you can do" rather than "what's best for you to do" :) You have to weigh it all up, really.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top