Design Notation VHDL or Verilog?

(snip, I wrote)

As far as I know, currently if something can be done either with an FPGA or a small microcontroller, or even DSP processor, the choice is often for the processor. With the price of smaller FPGAs coming down, that might change, but also there are more people who know how to program such processors than HDL design.

Given that, I would expect some overlap between FPGA/HDL applications and processor/software applications, depending on the speed required at the time. Some applications might initially be developed in software, debugged and tested, before moving to an FPGA/HDL implementation.

Maybe the question isn't whether scaled fixed point is useful in HDL, but why isn't it useful, enough that people ask for it in an HLL, in software! Why no scaled fixed point datatype in C or Java?

(snip)

(snip)

As I said above, if for no other reason, then to test and debug the applications that will later be implemented in scaled fixed point VHDL.

Well, there are two applications that D. Knuth believes should always be done in fixed point: finance and typesetting. As we know, it is also often used in DSP, but Knuth likely didn't (doesn't) do much DSP work. (It was some years ago he said that.)

(snip)

Maybe so. In the past, the cost and size kept people away from using FPGAs when conventional processors would do. With the lower prices of smaller (but not so small) FPGAs that might change.

(snip)

Yes. If I determine the shifts and rounds, then I don't need VHDL to do it for me. I can do it using integer arithmetic in C, (easier if I can get all the product bits from multiply), and in HDL.

(snip)

Well, the desire to run almost any computational problem faster certainly isn't unique to me. But yes, I know the problems that I work on better than those that I don't. But if you can't process data faster than a medium sized conventional processor, there won't be much demand, unless the cost (including amortized development) is less.

True, but for floating point number crunching, in the teraflop or petaflop scale, it is scientific programming. With the size and speed of floating point in an FPGA, one could instead use really wide fixed point. Given the choice between 32 bit floating point and 64 bit or more fixed point for DSP applications, which one is more useful?

In general, fixed point is a better choice for quantities with an absolute (not size dependent) uncertainty, floating point for quantities with a relative uncertainty.

-- glen

Reply to
glen herrmannsfeldt
Loading thread data ...

There are several nice features like interfaces (which are bi-directional unlike record bundles in VHDL). There's also enum's, always_comb, always_ff, always_latch to tell the synthesis tool what you're trying to do, $left, $right, etc. similar to 'left, 'right in VHDL.

I took a link at some of the links posted here previously, it looks nice and it's an improvement. But as far as I could tell it lacked polymorphism and inheritance. However, I have to study VVM further.

//Petter

--
.sig removed by request.
Reply to
Petter Gustad

Quite a few tools actually. DC, Synplify, and Quartus has pretty good SV support. XST does not, but hopefully that will change with Rodin¹.

//Petter ¹

formatting link

--
.sig removed by request.
Reply to
Petter Gustad

Record bundles can be bi-directional in VHDL!

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

That's great news as I've always used one record type as input and another one as output. Care to share some examples? And how do you swap them like you do with modports in SV.

//Petter

--
.sig removed by request.
Reply to
Petter Gustad

Just declare the port as inout. Its simple as that.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

glen herrmannsfeldt wrote: [snip]

You may as well ask why we're not using slide rules instead of calculators. Once you have floating point arithmetic with reasonable performance, fixed-point becomes of little value. If you really want to keep track of your binary point instead of letting the floating point package do it for you, you can always use integer types. Anyone who has worked on fixed point FFT logic knows just what a pain it can be to keep track of scaling. I don't know many C or Java programmers willing to take on that task. At my company, the only person who ever wrote fixed point code for processing had a background in microcoding and his whole job was just to create accellerated image processing libraries.

Obviously for hardware floating point is a huge resource hog, but when you're using a microprocessor that already has it built in there's no big incentive not to use it.

-- Gabor

Reply to
Gabor

That's the problem; every element of a VHDL bidirectional record port is bidirectional. You have to use resolved types for each element, and remember to assign benign driven values to elements you want to be input only. It can be done, but it gets ugly.

Sometimes (especially testbenches) it is worth the work, but it would be worth even more to be able to define custom record modes for record port types (e.g. master, slave, observer, etc modes for a record port representing a bus interface, each defining different individual in/ out/inout/etc modes on individual record elements).

Andy

Reply to
Andy

Actually, being built around VHDL protected types, it has some amount of both. Not nearly as clean or capable as SV though.

Andy

Reply to
Andy

I never had that problem when synthesizing for Xilinx devices.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

Did you simulate your RTL using bidirectional ports? That's where the default driver problem arises, on inout ports that are only read (from the inside).

Synthesis can take a lot of liberty with your RTL description because of the static nature of the analysis of the code, and the fact that unknowns are don't cares in synthesis, which means the synthesis tool can do as it pleases, which is usually what pleases the most customers most of the time.

Andy

Reply to
Andy

I didn't simulate that particular code. It was back in the days that simulation software wasn't available if you wanted to keep your arms and legs.

AFAIK: for RTL to synthesize each signal needs one driver. Even if it would drive the signal tristate. It probably depends on the tools. My experience is limited to Xilinx.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

Most synthesis tools will convert multiple tri-state drivers on a signal into multiplexers, since most FPGAs do not support internal tri- state busses any more. They assume that the various tri-state enables are mutually exlusive (how else would the tri-state bus have worked?), so a prioritlyless multiplexer is constructed. This can be a handy way of specifying a distributed priorityless mux.

Most synthesis tools will convert default 'U' drivers to "undriven" (nothing), which is different behavior from the SL resolution function in simulation (they issue a warning about that).

Andy

Reply to
Andy

That might cause some problems. I've seen some tool which did not like inouts other than at the top level (can't remember which, it might have been some LSI or IBM tool). This is many years ago and might not be the case in more recent versions. Also you'll miss the compile static check of only one driving the signal.

//Petter

--
.sig removed by request.
Reply to
Petter Gustad

The synthesizer will most likely complain about that.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

I was thinking about simulator compile checks. Which typically can be checked quickly, e.g. can be done from the editor and prior to revision control commits etc. Synthesis usually takes longer.

//Petter

--
.sig removed by request.
Reply to
Petter Gustad

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.