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.

[SOLVED] High 'Z'ding chosen bits of a register

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
I'm writing VHDL code for an FPGA that sits on a PCB with a design error .
The're FPGA registers that are mapped to output pins - 3 of the pins in the PCB schematics, have been accidentally shorted to a single trace...I want only one of those output pins to drive a valid logic value and the others high 'Z'.

This is the code for the output registers:
what do you think about it ?

-- memory is a 16 X 16 flipflop array
if rising edge ( clk ) then
if write_request = '1' then
if write_address = "00001111" then -- this is the register address whose 3 of his bits are shorted on the PCB
memory ( 15 ) ( 15 downto 3 ) <= internal ( 15 downto 3 ) ;
mem_out ( 15 ) ( 2 downto 1 ) <= "ZZ" ;
mem_out ( 15 ) ( 0 ) <= data ( 0 ) ;
else
mem ( to_integer ( write_address ) ) <= data ;
end if ;
end if ;
end if;
 
Last edited:

I think that is an ugly solution. Can you guarantee that the pins are ''Z before the first write?
I would define 2 of the pins as inputs, and not connect them to anything in the top entity.
Just leave mem_out(15)(2 dowto 1) as 'open' in the top entity.
 

"Can you guarantee that the pins are 'Z before the first write?"
mem_out ( 15 ) ( 2 downto 1 ) <= "ZZ" ;
if also the state at reset, so yes...

"I would define 2 of the pins as inputs"
I want the code to stay as a single vector...
 

"I would define 2 of the pins as inputs"
I want the code to stay as a single vector...
The mem_out(15)(15 downto 0) should of course be a single vector.
You should have the code as if the PCB error didn't exist. I mean that you should just not connect two of the bits to any pin in the top entity.
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
as far as I know,
any of the unconnected FPGA pins are pulled to a logic level (that is set by configuration pins...)
This may cause a problem!
I want them to be configured as High 'Z' outputs...
 

connect the bus as normal internally.
At the top level, drive 'Z' onto the problem pins all the time.
 
  • Like
Reactions: shaiko

    shaiko

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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top