How can I initialise values in a process???

Discussion in 'VHDL' started by MNQ, Jun 17, 2004.

  1. MNQ

    MNQ Guest

    Hi All,

    I am trying to find out how I can set my initial value of BUSY in the
    process below to '1' i.e. at T=0 for when power is first applied to my
    device (CPLD XC2C384).

    My process is as follows:-

    busy_FF : process (busy_clock, reset, buf_busy)
    begin
    if reset ='1' then
    busy <= '1';
    elsif busy_clock='1' and busy_clock'event then
    busy <= not buf_busy;
    end if;
    end process busy_FF;


    Thanks for any help

    Naveed
     
    MNQ, Jun 17, 2004
    #1
    1. Advertising

  2. In simulator ?
    Write a testbench which instantiate your component, and do a reset
    (reset=1) at start.

    JaI

    MNQ wrote:

    >Hi All,
    >
    >I am trying to find out how I can set my initial value of BUSY in the
    >process below to '1' i.e. at T=0 for when power is first applied to my
    >device (CPLD XC2C384).
    >
    >My process is as follows:-
    >
    >busy_FF : process (busy_clock, reset, buf_busy)
    > begin
    > if reset ='1' then
    > busy <= '1';
    > elsif busy_clock='1' and busy_clock'event then
    > busy <= not buf_busy;
    > end if;
    >end process busy_FF;
    >
    >
    >Thanks for any help
    >
    >Naveed
    >
    >
    >
    >
     
    Just an Illusion, Jun 17, 2004
    #2
    1. Advertising

  3. MNQ

    MNQ Guest

    Hello JaI

    Not for use in a simulator but for real life running of CPLD.

    Thanks for replying

    Naveed

    news:...
    > In simulator ?
    > Write a testbench which instantiate your component, and do a reset
    > (reset=1) at start.
    >
    > JaI
    >
    > MNQ wrote:
    >
    > >Hi All,
    > >
    > >I am trying to find out how I can set my initial value of BUSY in the
    > >process below to '1' i.e. at T=0 for when power is first applied to my
    > >device (CPLD XC2C384).
    > >
    > >My process is as follows:-
    > >
    > >busy_FF : process (busy_clock, reset, buf_busy)
    > > begin
    > > if reset ='1' then
    > > busy <= '1';
    > > elsif busy_clock='1' and busy_clock'event then
    > > busy <= not buf_busy;
    > > end if;
    > >end process busy_FF;
    > >
    > >
    > >Thanks for any help
    > >
    > >Naveed
    > >
    > >
    > >
    > >

    >
     
    Last edited by a moderator: Aug 4, 2006
    MNQ, Jun 17, 2004
    #3
  4. Hi Naveed,

    The only way ;-( that I know to ensure it, it's generate a hardware
    reset just after, or during, power up. Some different techniques work,
    for bigger circuit, then it must be possible todo it with a cpld too ;-)

    You can play with 'pull-up' transistor directly on spice netlist, but I
    am not sure that CPLD take it into account.

    Have a fun ;-)
    JaI

    MNQ wrote:

    >Hello JaI
    >
    >Not for use in a simulator but for real life running of CPLD.
    >
    >Thanks for replying
    >
    >Naveed
    >
    >news:...
    >
    >
    >>In simulator ?
    >>Write a testbench which instantiate your component, and do a reset
    >>(reset=1) at start.
    >>
    >>JaI
    >>
    >>MNQ wrote:
    >>
    >>
    >>
    >>>Hi All,
    >>>
    >>>I am trying to find out how I can set my initial value of BUSY in the
    >>>process below to '1' i.e. at T=0 for when power is first applied to my
    >>>device (CPLD XC2C384).
    >>>
    >>>My process is as follows:-
    >>>
    >>>busy_FF : process (busy_clock, reset, buf_busy)
    >>>begin
    >>> if reset ='1' then
    >>> busy <= '1';
    >>> elsif busy_clock='1' and busy_clock'event then
    >>> busy <= not buf_busy;
    >>> end if;
    >>>end process busy_FF;
    >>>
    >>>
    >>>Thanks for any help
    >>>
    >>>Naveed
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>

    >
    >
    >
    >
     
    Last edited by a moderator: Aug 4, 2006
    Just an Illusion, Jun 17, 2004
    #4
  5. MNQ wrote:
    > Hi All,
    >
    > I am trying to find out how I can set my initial value of BUSY in the
    > process below to '1' i.e. at T=0 for when power is first applied to my
    > device (CPLD XC2C384).
    >
    > My process is as follows:-
    >
    > busy_FF : process (busy_clock, reset, buf_busy)
    > begin
    > if reset ='1' then
    > busy <= '1';
    > elsif busy_clock='1' and busy_clock'event then
    > busy <= not buf_busy;
    > end if;
    > end process busy_FF;


    The normal way would be through application of the reset signal --
    that's what it's for.

    Coolrunner devices go through an initialization phase at power-up where
    they copy their flash contents to internal RAM cells. I would expect
    that you should be able to specify, somehow, what you want the register
    values to be following initialization (I don't know this for sure). I
    took a quick look at this and the answer isn't readily obvious so this
    is a question for Xilinx, or you might try in comp.arch.fpga.
    --
    Tim Hubberstey, P.Eng. . . . . . Hardware/Software Consulting Engineer
    Marmot Engineering . . . . . . . VHDL, ASICs, FPGAs, embedded systems
    Vancouver, BC, Canada . . . . . . . . . . . http://www.marmot-eng.com
     
    Tim Hubberstey, Jun 17, 2004
    #5
    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. Annie
    Replies:
    3
    Views:
    451
    Annie
    Sep 13, 2005
  2. Replies:
    1
    Views:
    449
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=
    Oct 19, 2005
  3. Nandan
    Replies:
    4
    Views:
    408
    Tor Iver Wilhelmsen
    Apr 29, 2005
  4. Yu
    Replies:
    12
    Views:
    488
    vijay
    Jul 10, 2003
  5. Arik Funke
    Replies:
    14
    Views:
    613
    Howard
    Oct 27, 2004
Loading...

Share This Page