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.

Glitch free tristate?

Status
Not open for further replies.

TQFP

Junior Member level 3
Joined
Aug 11, 2007
Messages
30
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Florida
Activity points
1,666
Greetings,

I am trying to move my two-process FSM to a single process FSM to have a "more modern" style, but code that was working is now crapping out. Will my tristate signal be solid or will it glitch when set up like this?

Thanks,
Matthew

Code:
port (
  cd : inout std_logic_vector(7 downto 0);
 . . .

architecture . . .
  signal tristate : std_logic;
  signal data_reg : std_logic_vector(7 downto 0);

  process(clk)
  begin

    tristate <= '1';
 
    case state is
      when st_2 =>
         state <= st_2;
         data_reg <= . . .

      when st_2 =>
         -- tristate enable only in st_2
         tristate <= '0';
         if other_signal = '1' then
           state <= st_3;
         else
           state <= st_2;
         end if;

      when st_3 =>
. . .
end process;

cd <= data_reg when tristate = '0' else (others => 'Z');
 

Hi,

Since your tristate signal changes on clock edge it is glitch free.

HTH
 

Look sharp! The FSM can't work, because it misses an edge-sensitive condition.
You may want to think about VHDL basics before creating a new "modern style".
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top