Generate sub-module (or not)

Discussion in 'VHDL' started by Niv, Oct 24, 2006.

  1. Niv

    Niv Guest

    I'm designing a flash memory controller which will have a sub-block
    dedicated to a special function.
    I want to use a generic to either generate the sub-module or not, and
    to tie what were sub-module outputs (inputs to the main flash mem
    controller block) to a default level.

    Is this possible?

    I've only used generate (a long time ago, 1992!) to create a
    daisy-chain of JTAG modules which were always wanted.

    Not sure how to do what I want, but something like:

    IF gen_special GENERATE
    special_inst: special PORT MAP (...............);
    ELSE -- illegal?

    END GENERATE;

    I could have a "null" sub-module with the required default port levels,
    but how do I then generate either/or?

    TIA, Kev P.
     
    Niv, Oct 24, 2006
    #1
    1. Advertising

  2. Niv

    Niv Guest

    Niv wrote:
    > I'm designing a flash memory controller which will have a sub-block
    > dedicated to a special function.
    > I want to use a generic to either generate the sub-module or not, and
    > to tie what were sub-module outputs (inputs to the main flash mem
    > controller block) to a default level.
    >
    > Is this possible?
    >
    > I've only used generate (a long time ago, 1992!) to create a
    > daisy-chain of JTAG modules which were always wanted.
    >
    > Not sure how to do what I want, but something like:
    >
    > IF gen_special GENERATE
    > special_inst: special PORT MAP (...............);
    > ELSE -- illegal?
    >
    > END GENERATE;
    >
    > I could have a "null" sub-module with the required default port levels,
    > but how do I then generate either/or?
    >
    > TIA, Kev P.


    Sorted it myself (eventually).

    Ta anyway,
    Kev P.
     
    Niv, Oct 24, 2006
    #2
    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. THY
    Replies:
    1
    Views:
    411
    Steve C. Orr, MCSD
    Aug 19, 2003
  2. Kathy Burke
    Replies:
    3
    Views:
    417
    Kathy Burke
    Nov 24, 2003
  3. Tee
    Replies:
    2
    Views:
    854
  4. Ben
    Replies:
    2
    Views:
    954
  5. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    2,166
    Lawrence D'Oliveiro
    May 20, 2011
Loading...

Share This Page