Why is this not a locally static choice?

Discussion in 'VHDL' started by Charles M. Elias, Jun 26, 2003.

  1. In the following code fragment Active-HDL flagged the "case oe_l is" line as an
    error because oe_l is not locally static. Why is this so? "numbuffs" is
    not going to change during execution.

    Best regards,

    Charles

    ------------------------------------------------------------------------
    library IEEE;
    use IEEE.STD_LOGIC_1164.all;
    ------------------------------------------------------------------------
    entity BiDir is
    generic( bufflength : natural := 8;
    numbuffs : natural := 4 );
    port ( oe_l : in std_logic_vector( 0 to numbuffs - 1 );
    a : inout std_logic_vector( bufflength - 1 downto 0 );
    b0 : inout std_logic_vector( bufflength - 1 downto 0 );
    b1 : inout std_logic_vector( bufflength - 1 downto 0 );
    b2 : inout std_logic_vector( bufflength - 1 downto 0 );
    b3 : inout std_logic_vector( bufflength - 1 downto 0 );
    dirab : in std_logic
    );
    end BiDir;
    ------------------------------------------------------------------------
    architecture archBiDir of BiDir is

    begin
    pio : process( oe_l, dirab, a, b0, b1, b2, b3 )
    begin
    case oe_l is
    when "0111" =>
    if dirab = '1' then
    a <= ( others => 'Z' );
    b0 <= a;
    else
    ...
    Charles M. Elias, Jun 26, 2003
    #1
    1. Advertising

  2. Since you have used a generic for numbuffs you can instantiate multiple
    entities of BiDir with different values for the generic. Therefore it is not
    'locally' static.

    If you change the line:
    oe_l : in std_logic_vector( 0 to numbuffs - 1 );
    in
    oe_l : in std_logic_vector( 0 to 3 );
    it will work.

    Notice also that the line:
    case oe_l is
    when "0111" =>
    Would give an error if the generic numbuffs is not equal to 4.

    Egbert Molenkamp

    "Charles M. Elias" <> schreef in bericht
    news:...
    > In the following code fragment Active-HDL flagged the "case oe_l is" line

    as an
    > error because oe_l is not locally static. Why is this so? "numbuffs" is
    > not going to change during execution.
    >
    > Best regards,
    >
    > Charles
    >
    > ------------------------------------------------------------------------
    > library IEEE;
    > use IEEE.STD_LOGIC_1164.all;
    > ------------------------------------------------------------------------
    > entity BiDir is
    > generic( bufflength : natural := 8;
    > numbuffs : natural := 4 );
    > port ( oe_l : in std_logic_vector( 0 to numbuffs - 1 );
    > a : inout std_logic_vector( bufflength - 1 downto 0 );
    > b0 : inout std_logic_vector( bufflength - 1 downto 0 );
    > b1 : inout std_logic_vector( bufflength - 1 downto 0 );
    > b2 : inout std_logic_vector( bufflength - 1 downto 0 );
    > b3 : inout std_logic_vector( bufflength - 1 downto 0 );
    > dirab : in std_logic
    > );
    > end BiDir;
    > ------------------------------------------------------------------------
    > architecture archBiDir of BiDir is
    >
    > begin
    > pio : process( oe_l, dirab, a, b0, b1, b2, b3 )
    > begin
    > case oe_l is
    > when "0111" =>
    > if dirab = '1' then
    > a <= ( others => 'Z' );
    > b0 <= a;
    > else
    > ...
    Egbert Molenkamp, Jun 26, 2003
    #2
    1. Advertising

  3. "Egbert Molenkamp" <> wrote in message news:<bder9n$pbt$>...
    > Since you have used a generic for numbuffs you can instantiate multiple
    > entities of BiDir with different values for the generic. Therefore it is not
    > 'locally' static.
    >
    > If you change the line:
    > oe_l : in std_logic_vector( 0 to numbuffs - 1 );
    > in
    > oe_l : in std_logic_vector( 0 to 3 );
    > it will work.
    >
    > Notice also that the line:
    > case oe_l is
    > when "0111" =>
    > Would give an error if the generic numbuffs is not equal to 4.
    >
    > Egbert Molenkamp
    >
    > "Charles M. Elias" <> schreef in bericht
    > news:...
    > > In the following code fragment Active-HDL flagged the "case oe_l is" line

    > as an
    > > error because oe_l is not locally static. Why is this so? "numbuffs" is
    > > not going to change during execution.
    > >
    > > Best regards,
    > >
    > > Charles
    > >
    > > ------------------------------------------------------------------------
    > > library IEEE;
    > > use IEEE.STD_LOGIC_1164.all;
    > > ------------------------------------------------------------------------
    > > entity BiDir is
    > > generic( bufflength : natural := 8;
    > > numbuffs : natural := 4 );
    > > port ( oe_l : in std_logic_vector( 0 to numbuffs - 1 );
    > > a : inout std_logic_vector( bufflength - 1 downto 0 );
    > > b0 : inout std_logic_vector( bufflength - 1 downto 0 );
    > > b1 : inout std_logic_vector( bufflength - 1 downto 0 );
    > > b2 : inout std_logic_vector( bufflength - 1 downto 0 );
    > > b3 : inout std_logic_vector( bufflength - 1 downto 0 );
    > > dirab : in std_logic
    > > );
    > > end BiDir;
    > > ------------------------------------------------------------------------
    > > architecture archBiDir of BiDir is
    > >
    > > begin
    > > pio : process( oe_l, dirab, a, b0, b1, b2, b3 )
    > > begin
    > > case oe_l is
    > > when "0111" =>
    > > if dirab = '1' then
    > > a <= ( others => 'Z' );
    > > b0 <= a;
    > > else
    > > ...


    Egbert,

    Thanks!

    Charles
    Charles M. Elias, Jun 26, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kenneth Johansson
    Replies:
    9
    Views:
    8,783
    Mike Treseler
    May 9, 2005
  2. Mickey Segal
    Replies:
    0
    Views:
    856
    Mickey Segal
    Feb 2, 2004
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,761
    Smokey Grindel
    Dec 2, 2006
  4. Peter
    Replies:
    9
    Views:
    4,608
    Peter
    Feb 21, 2011
  5. alb
    Replies:
    5
    Views:
    293
Loading...

Share This Page