How can I initialise values in a process???

M

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
 
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
 
Hello JaI

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

Thanks for replying

Naveed

"Just an Illusion" <illusion_to_net@yahoo.fr> wrote in message
news:40D192C1.5000306@yahoo.fr...
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
 
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

"Just an Illusion" <illusion_to_net@yahoo.fr> wrote in message
news:40D192C1.5000306@yahoo.fr...


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
 
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
 

Welcome to EDABoard.com

Sponsor

Back
Top