Clock Edge notation

andyesquire@hotmail.com wrote:

A simplified example is shown below, COMB_B process contains the latch
and does some trivial calculation. Whereas COMB_A does the same
calculation, but without a latch, and a lot slower.
Signal 'latch' is missing in the sensitivity list. This could cause
differences in simulation results (RTL versus synthesis).

Or is there is a way to make XST avoid inferring two lots of (a_reg -
b_reg) logic in COMB_A? It's this logic that causes the 50Mhz hit and
why I used a latch COMB_B.
Just make it a signal, assigned by a concurrent signal assignment:

latch <= std_logic_vector(signed(a_reg) - signed(b_reg));
COMB_B : process (x_reg,a_reg,b_reg,d_reg) is
begin
if d_reg = '1' then
...

Or make it completely local (my preference) by assigning the common
expression to a variable:

COMB_B : process (x_reg,a_reg,b_reg,d_reg) is
variable a_min_b : std_logic_vector(31 downto 0);
begin
a_min_b := (others => '0'); -- Avoid latch
if (d_reg = '1') then
a_min_b := std_logic_vector(signed(a_reg) - signed(b_reg));
if (signed(x_reg) > signed(a_min_b)) then
r <= x_reg;
else
r <= a_min_b;
end if;
else
r <= (others => '0');
end if;
end process;

A further (textual) optimization would be declaring r, a_reg, b_reg,
x_reg and a_min_b as signed, in stead of std_logic_vector. This would
avoid most of the conversions. The resulting code (untested):

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity test_latch is
port (clk : in std_logic;
rst : in std_logic;
d_in : in std_logic;
a_in : in std_logic_vector(31 downto 0);
b_in : in std_logic_vector(31 downto 0);
x_in : in std_logic_vector(31 downto 0);
r_out : out std_logic_vector(31 downto 0)
);
end test_latch;

architecture Behavioral of test_latch is
signal a_reg,b_reg,x_reg : signed(31 downto 0);
signal d_reg : std_logic;
signal r : signed(31 downto 0);
begin

SEQ1 : process (clk, rst) is
begin
if rst ='1' then
a_reg <= (others => '0');
b_reg <= (others => '0');
x_reg <= (others => '0');
d_reg <= '0';
elsif rising_edge(clk) then
if d_reg = '1' then
a_reg <= signed(a_in);
b_reg <= signed(b_in);
x_reg <= signed(x_in);
d_reg <= d_in;
end if;
end if;
end process;


COMB_B : process (x_reg, a_reg, b_reg, d_reg) is
variable a_min_b : signed(31 downto 0);
begin
a_min_b := (others => '0'); -- Avoid latch
if d_reg = '1' then
a_min_b := a_reg - b_reg;
if x_reg > a_min_b then
r <= x_reg;
else
r <= a_min_b;
end if;
else
r <= (others => '0');
end if;
end process;


SEQ2 : process (clk, rst) is
begin
if rst ='1' then
r_out <= (others => '0'); -- This was missing (intentional?)
elsif rising_edge(clk) then
r_out <= std_logic_vector(r);
end if;
end process;

end Behavioral;

--
 
Neo wrote:
Oh yes, I can help you on the assignment. my charges are $1 per 10
gates.

I may down to $0.99 per gate
------------ And now a word from our sponsor ------------------
Want to have instant messaging, and chat rooms, and discussion
groups for your local users or business, you need dbabble!
-- See http://netwinsite.com/sponsor/sponsor_dbabble.htm ----
 
Laurent Gauch wrote:

Neo wrote:

Oh yes, I can help you on the assignment. my charges are $1 per 10
gates.

I may down to $0.99 per gate
I'll can go as low as €0.95 per gate... ;)
 
On 6 Apr 2005 08:39:19 -0700, khansaca@yahoo.co.in (khansa) wrote:

Please mention a tool that can accepts VHDL code and converts it into
a circuit schematic(preferably at the register transfer level or gate
level). Does ORCAD have such an option?
Any decent VHDL synthesis tool (Design Compiler from Synopsys,
Leonardo Spectrum or Precision Synthesis from Mentor,
Synplify from Synplicity, etc etc) will do this. Don't expect
it to be free though.

Altera Quartus and Xilinx XST are synthesis tools from the
device vendors that can be obtained free, at least in some
configurations. I'm not sure whether they offer schematic
viewers in the free versions, but they can definitely
create netlist outputs.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
Hi Khansa,

Mentor Graphics HDL designer has a code-to-graphics option (good for looking
at the hierarchy), for gate level most synthesis tools
(Synplify/Precision/Spectrum) have a RTL/Gatelevel schematic viewer. I am
not sure about Orcad though,

Hans.
www.ht-lab.com

"khansa" <khansaca@yahoo.co.in> wrote in message
news:1f2e1ef.0504060739.597f1af3@posting.google.com...
| Please mention a tool that can accepts VHDL code and converts it into
| a circuit schematic(preferably at the register transfer level or gate
| level). Does ORCAD have such an option?
 
Why?

"Suhani Sharma" <suhani.7911@gmail.com> wrote in message
news:1112774417.981561.163970@g14g2000cwa.googlegroups.com...
could anyone help me with VHDL or verilog code for the hardware
implementation of 8 puzzle solution using a* heristic method
 
"Weng Tianxiang" <wtx@umem.com> writes:
I appreciate if you can help me get the copy of the following two
papers:
There's this thing called a library... the cool thing about it is that
there are a whole bunch of them, scattered throughout the world...
 
jandc wrote:

Laurent Gauch wrote:

Neo wrote:

Oh yes, I can help you on the assignment. my charges are $1 per 10
gates.

I may down to $0.99 per gate

I'll can go as low as $0.95 per gate... ;)
I can go with $0.89 per 0.1 gate.
 
In article <115428oralnbe28@corp.supernews.com>,
Jim Lewis <Jim@SynthWorks.com> wrote:
There is an on-going revision of VHDL in progress. It is
adding a number of significant features (such as uncostrained
arrays of arrays - very useful in parameterized models),
generics on packages, packages for fixed and floating
point, integration of PSL, and language simplification
(case and if statements). In the area of math, VHDL will
have an advantage over Verilog/System Verilog as they don't
have their own solution for these fixed and floating point.
For more details see the papers page at:
http://www.synthworks.com/papers

In the next revision (immediately following this one) we will
be adding enhanced verification features, similar to what
System Verilog has done (such as constrained random). We will
also be using the new features of the language (specifically
generics on packages) to write packages that implement advanced
verification data structures (such as queues, FIFOS, and
memories).
Any changes planned for the scope of user defined attributes? As in will
they be accessable outside of the package they're defined in? (not being
able to do this now tends to make them not very useful). Allowing user
defined attributes on types to be accessable outside of the package
they're defined in, for example, would seem to move VHDL in a more OO
direction (which should be a good thing :)

As far as VHDL vs. Verilog popularity goes: comp.lang.vhdl seems to get
consistently more traffic then comp.lang.verilog.

Phil
 
<bybell@rocketmail.com> wrote in message
news:1112844931.780043.58350@l41g2000cwc.googlegroups.com...
Weng Tianxiang wrote:
Hi,
I appreciate if you can help me get the copy of the following two
papers:
A. D. Booth, "A signed binary multiplication technique,"
Quarterly Journal of Mechanics and Applied Mathematics, pp. 236-240,
June 1951

http://bwrc.eecs.berkeley.edu/Classes/icdesign/ee241_s00/PAPERS/

Interesting. I studied at the same institution as the eponymous Booth, I
never knew that they developed their own computer in the '50s.

Leon
--
Leon Heller, G1HSM
http://www.geocities.com/leon_heller
 
On 4 Apr 2005 00:53:26 -0700, "dwerdna" <dwerdna@yahoo.com> wrote:

What is the worst thing that will happen if I am referencing the same
address, but ONLY writing to one address at that time?? From the
Xilinx info I would suggest that I will just get an unknown value on my
read port..
You could consider "write-forwarding" around the DPRAM: add an
equality comparator that detects (write address)==(read address);
if equal, read data is taken from the write data pins instead of
from the RAM. Obviously the detailed timing needs a lot of
care, but the basic idea is straightforward enough.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
On 7 Apr 2005 08:57:11 -0700, jahaya@gmail.com wrote:


I would like to know how can we convert the Audio file(.WAV) format to
an ASCII file format. I wanted to use in audio processing using VHDL
Implementation.
Most VHDL simulators will allow you to read pure binary files
by declaring them as FILE OF CHARACTER. Each character you
read from the file can then be converted to its numeric (ASCII-code)
equivalent using CHARACTER'POS(), and you can then process it any
way you choose.

Quick description of WAV file format (this took me about 30 sec
to find with Google):

http://www.ringthis.com/dev/wave_format.htm

If you really want to convert .wav to ASCII text so you can read it
as plain-text, which is quite a sensible thing to do, then I
guess Tcl is probably your friend - its [binary scan] command
is great for that kind of thing. If you are using ModelSim
or another simulator that supports Tcl, you could do it
from within the simulator itself.

Alternatively Matlab has a .wav file reader; or you could
write a bit of C to do it. I guess there must be a pile
of freeware implementations of .wav readers out there, but
I can't be bothered looking for them - it's probably quicker
to write a Tcl script to do it.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
<jahaya@gmail.com> wrote in message
news:1112889431.451647.118200@f14g2000cwb.googlegroups.com...
Hello All,

I would like to know how can we convert the Audio file(.WAV) format to
an ASCII file format. I wanted to use in audio processing using VHDL
Implementation.

Kindly suggest me a method for the same
Get a copy of SOX (SOund eXchange). I think that can convert to ASCII. Or,
convert to binary with it and write your own program to convert to ASCII.

Leon
 
Phil,
If you have a language issue that you think needs to be
addressed, you can submit an enhancement request against
it at:
http://www.eda.org/vasg/bugrep.htm

If you have trouble remembering this, there is a link to
it at:
http://www.eda.org/vhdl-200x/


Best Regards,
Jim


In article <115428oralnbe28@corp.supernews.com>,
Jim Lewis <Jim@SynthWorks.com> wrote:

There is an on-going revision of VHDL in progress. It is
adding a number of significant features (such as uncostrained
arrays of arrays - very useful in parameterized models),
generics on packages, packages for fixed and floating
point, integration of PSL, and language simplification
(case and if statements). In the area of math, VHDL will
have an advantage over Verilog/System Verilog as they don't
have their own solution for these fixed and floating point.
For more details see the papers page at:
http://www.synthworks.com/papers

In the next revision (immediately following this one) we will
be adding enhanced verification features, similar to what
System Verilog has done (such as constrained random). We will
also be using the new features of the language (specifically
generics on packages) to write packages that implement advanced
verification data structures (such as queues, FIFOS, and
memories).



Any changes planned for the scope of user defined attributes? As in will
they be accessable outside of the package they're defined in? (not being
able to do this now tends to make them not very useful). Allowing user
defined attributes on types to be accessable outside of the package
they're defined in, for example, would seem to move VHDL in a more OO
direction (which should be a good thing :)

As far as VHDL vs. Verilog popularity goes: comp.lang.vhdl seems to get
consistently more traffic then comp.lang.verilog.

Phil

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jim Lewis
Director of Training mailto:Jim@SynthWorks.com
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
charles.elias@wpafb.af.mil wrote:
charge extra for more research. I wonder where these professors come
up with these impractical homework assignments. Is there a website:
"Vending Machines, Elevator Controls and Other VHDL Homework
Assignments for Professors Without a Clue"?
I'm sure it's either factory programmed, or handed down from professor
to student through the ages, embedded in the species memory :)

You have no idea how many damn traffic light controllers I designed when
I was back at university :) It brings to mind the shrimp quote from
Forrest Gump...

Jeremy
 
jahaya@gmail.com wrote:
Hello All,

I would like to know how can we convert the Audio file(.WAV) format to
an ASCII file format. I wanted to use in audio processing using VHDL
Implementation.

Kindly suggest me a method for the same

Regards,
Ali
Use the binary read directly on the WAV file only if your design has no
"state memory", ie, no recursive filters or something which can break
with out-of-range data (the header can cause IIR filters to go crazy).

If your design does maintain it's state, strip off the header (ignore,
say, the first few hundred bytes).

-Jim
 
On Thu, 07 Apr 2005 23:27:47 -0600, Jim George
<send_no_spam_to_jimgeorge@gmail.com> wrote:

Use the binary read directly on the WAV file only if your design has no
"state memory", ie, no recursive filters or something which can break
with out-of-range data (the header can cause IIR filters to go crazy).

If your design does maintain it's state, strip off the header (ignore,
say, the first few hundred bytes).
That's a bit fragile - some WAV files contain multiple "chunks" with
their own header information.

The link I posted includes information on a program that will
process "general" WAV files into the simpler format that works
the way you suggest.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
Thomas Fischer schrieb:
Altera Modelsim 5.8e

I'm new to modelsim and try to make a functional simulation for a
project with an
Altera Fifo (dcfifo).

I get the following simulation error:
last value in fifo cannot be read, rdempty flag toggles when last
value is tried to read.

the problem only occures, if a signal is used as the rdclk,
if the rdclk is taken directly from the entity port clk_i everything
works fine.

..
..
begin

txf_rdclk <= clk_i; -- problem if txf_rdclk is used in port map

txfifo : dcfifo0
PORT MAP (
wrclk => wrclk_i,
rdreq => txf_rdreq,
aclr => rst_i,
rdclk => txf_rdclk, -- problem if txf_rdclk is used in port map
-- rdclk => clk_i, -- this works fine
wrreq => wrreq_i,
data => data_i,
rdfull => txf_rdfull,
rdempty => txf_rdempty,
wrusedw => txf_wrusedw,
wrfull => txf_wrfull_o,
wrempty => txf_wrempty,
q => txf_q,
rdusedw => txf_rdusedw
);
..
..

why does i have problems with the signal txf_rdclk ?
I'm still learning, seems to be some sort of "delta cycle race condition"
 
Herb T wrote:

Folks,
I was talking to some electronics buffs on a chat channel, and they
were telling me that only Universities and DOD uses VHDL. I thought it
was hogwash, but wanted to find out if many commercial companies are
using the language earnestly. The resident HDL expert was saying
verilog is the language of choice these days. Is that true? I
personally prefer VHDL because the I already have too many reference
materials on how to use it.
This is a myth prepuated by some people and companies that typically
have a vested interest in Verilog or system Verilog.

I have real data from Dataquest that says VHDL is about 50/50 with
Verilog. Verilog has the advantage in ASIC space, and VHDL in FPGA
space. Note that there are MANY more FPGAs being designed than ASICs,
however ASICs are worth much more to the EDA companies than FPGAs are.
 

Welcome to EDABoard.com

Sponsor

Back
Top