Buzzer

M

Merciadri Luca

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've got a buzzer which is basically an output of my entity. Say this
is buzzer BUZ: out std_logic.

Then, I want to put BUZ to 1 for just some very small amount of
time. I then tried

==
BUZ <= '1';
BUZ <= '0' after 500 ns;
==

but it is apparently not appreciated from my compiler's point of view,
which complains about tristate problems, etc.

Is there a simple solution to it?

Thanks.

- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --

If you want to judge a man's character, give him power.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkzltDQACgkQM0LLzLt8Mhxw0wCgpniL+PeT7FMkbEXnSHQmMhiQ
jVEAnRS31MQHeCe++BSxwGBPZ1/CRTUB
=fMgN
-----END PGP SIGNATURE-----
 
K

KJ

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've got a buzzer which is basically an output of my entity. Say this
is buzzer BUZ: out std_logic.

Then, I want to put BUZ to 1 for just some very small amount of
time. I then tried

==
BUZ <= '1';
BUZ <= '0' after 500 ns;
==

but it is apparently not appreciated from my compiler's point of view,
which complains about tristate problems, etc.

If you're simply trying to simulate this (but I don't think you are),
then the solution is to put the statements into a process
process(BUZ)
begin
BUZ <= '1' after 1 ns; -- Must want it to be there for *some* time
BUZ <= '0' after 500 ns;
end process;

But since you say the complaint is about tristate problems, then I
suspect the complaining compiler is a sysnthesis tool which means that
you have a few problems:
1. You can't have more than one process or more than one concurrent
statement driving any signal (almost without exception).
2. The main exception is I/O pins of the device which generally have
tristate control. But you haven't specified any tri-state control.
3. 'after xxx ns' is not synthesizable in today's typical logic
devices since those devinces don't have delay lines. This may change
in the future, but as of now, there are no delay lines so there is no
way to synthesize 'after 500 ns' so it will be ignored.

Kevin Jennings
 
A

Andy

To be more specific on #3, you will need a clock signal, and a circuit
that counts out the number of clock cycles needed to keep the signal
on.

You will need much longer than 500 ns for a human to hear a buzzer.
Try something on the order of 100 ms or more.

Andy
 
M

Merciadri Luca

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Merciadri Luca said:
Hi,

I've got a buzzer which is basically an output of my entity. Say this
is buzzer BUZ: out std_logic.

Then, I want to put BUZ to 1 for just some very small amount of
time. I then tried

==
BUZ <= '1';
BUZ <= '0' after 500 ns;
==

but it is apparently not appreciated from my compiler's point of view,
which complains about tristate problems, etc.

Is there a simple solution to it?

Thanks.
Thanks all.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --

If it's worth doing, it's worth over-doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAkzmyygACgkQM0LLzLt8MhyTrACgi7XWHu46WShb6RDnbFnMfxnQ
E9QAn28KM4/qcIkIq8sWcDFT/pKHOy2p
=eD7k
-----END PGP SIGNATURE-----
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top