Home    Bloggers    Messages    Webinars    Resources   
Tw  |  Fb  |  In  |  Rss
Max Maxfield

Ask Max: Verilog & VHDL, Part 3

Max Maxfield
Page 1 / 4 Next >
Page 1 / 7   >   >>
jandecaluwe
jandecaluwe
2/18/2013 3:57:05 AM
User Rank
Blogger
Re: What we need is a library of short examples.
@Jezmo "Jan, If you are going to tell people to use software design ideas in the realm of FPGA design at least explain to them the problems of converting untimed c/c++ constructs rather than just waving your arms about saying its all good"

Yes, let's change subjects quickly.

Please do listen carefully now.

I am an RTL guy. I think it's going to be the lingua franca of digital design in the coming decade. RTL gives me exactly the control I need over area, timing and power that I need for the designs I do for my customers.

My ambitions are modest. All I want is better RTL. RTL is not living up to its potential now. I want to save it from "experts" like you with their irrational response whenever someone mentions the word "software" or a simple concept like "variable".

So if you want a real design challenge, revisit my Thinking Software article. I can't really explain it much better than that. Here we have a well-known design problem, which is simple and small from all angles: a few lines of RTL, clear code that directly expresses an algorithm, and just 14 Altera LUTs and 9 FFs for the 8-bit version.

It's a great solution - yet no "conventional wisdom" expert like you would ever come up with it because you think variables are harmful, or optional, or a solution in search of a problem, or whatever else I have heard.

Try to do better. Post your reasoning and your code.

Let's stop the cheap talk and the half-baked philosophy - it's time for action.

 

 

100%
0%
JezmoSSL
JezmoSSL
2/17/2013 3:49:42 PM
User Rank
Blogger
Re: What we need is a library of short examples.
Jan, If you are going to tell people to use software design ideas in the realm of FPGA design at least explain to them the problems of converting untimed c/c++ constructs rather than just waving your arms about saying its all good

0%
100%
jandecaluwe
jandecaluwe
2/17/2013 12:34:13 PM
User Rank
Blogger
Re: What we need is a library of short examples.
@Jezmo "The problem with telling to people to treat HDL design as if its simply a variant of software design is you end up with designs which look like they have been written by software people, and then they have to be rewritten so that they work."

If you are still talking about my MyHDL example here, be careful with whom you are targetting. Look at the MyHDL code. It is almost identical to @hamster's original VHDL code. (That was also the intention, get it?)

(Except that I used some sophistication to generate the "Hello World" pattern. But this is just embedded scripting to set up the lookup table outside the actual hardware description.)

You don't want to accuse a hardware buddy of yours to think like a software engineer, do you?

100%
0%
jandecaluwe
jandecaluwe
2/17/2013 12:19:31 PM
User Rank
Blogger
Re: What we need is a library of short examples.
@Jezmo "Anyway I managed to fix the code produced by the method that jan champions, and it now runs at 300% of the original speed using 50 % of the logic, so ner ner ner ner :p~~~~~~~~~~"

What is this again? What do you think you are "fixing"? 

The goal of this quick modeling experiment was simply to have something equivalent to @hamster's original VHDL code in MyHDL, to demonstrate what is possible. The goals was not timing or area optimization.

As I said clearly in the notes, I didn't even simulate it and so there may (will) be functional bugs. So if you want to do something meaningful, simulate it first and check if it does the same as @hamster's code. If not, I will fix it. 

Then check whether there is a significant synthesis difference between the two. I don't expect that, but I may be wrong and then we can look into it.

 

 

 

100%
0%
JezmoSSL
JezmoSSL
2/17/2013 12:05:33 PM
User Rank
Blogger
Re: What we need is a library of short examples.
The problem with telling to people to treat HDL design as if its simply a variant of software design is you end up with designs which look like they have been written by software people, and then they have to be rewritten so that they work

0%
100%
JezmoSSL
JezmoSSL
2/17/2013 11:40:17 AM
User Rank
Blogger
Re: What we need is a library of short examples.
Anyway I managed to fix the code produced by the method that jan champions, and it now runs at 300% of the original speed using 50 % of the logic, so ner ner ner ner :p~~~~~~~~~~

0%
100%
JezmoSSL
JezmoSSL
2/17/2013 11:30:22 AM
User Rank
Blogger
Re: What we need is a library of short examples.
Jan, There is a problem with using signed or unsigned types at interfaces if you want to use something like viewlogic which will only let you use std_logic at the top level. But that's another battle I've got to fight at work It another reason I don't like schematic entry tools for FPGA design

50%
50%
hamster
hamster
8/16/2012 3:03:48 PM
User Rank
Blogger
Re: What we need is a library of short examples.
Just looking at it now. I'm very impressed!

100%
0%
jandecaluwe
jandecaluwe
8/16/2012 12:33:08 PM
User Rank
Blogger
Re: What we need is a library of short examples.
> I've switched it to IEEE.NUMERIC_STD. Don't know if I did it the right way by using lots of conversion functions, but it implements.

I feel guilty of causing all these conversion functions :-)

No, the trick to avoid conversion functions in VHDL is to go all the way and use the "right" types for signals/variables to start with. E.g. there is no problem with using signed/unsigned at interfaces.

> Cut and paste the lines into a text editor, and replace all the 0s with spaces. The mystery will be solved.... :-)

I had figured the message out, just didn't understand the logic behind the case choices. Now I understand that is how the message if positioned vertically.

I had some fun doing this in MyHDL, and you can find the draft version here:

http://www.myhdl.org/doku.php/cookbook:helloworld

50%
50%
Adam Taylor
Adam Taylor
8/16/2012 12:26:32 PM
User Rank
Blogger
Re: I believe the view presented here is flawed.
@Kenwick that is not quite true, you just need the correct licence 

Section 1, rifles, long baralled pistols / revolvers and certain shot guns 

Section 2, shotguns

Section 5 , self loading rifles and pistols and revolvers 

Section 7 historic firearms (ones that have ammunition still in production ) 

Air rifles and pistols do not require a licence as long as they are below certain power limits.

 

 

50%
50%
Page 1 / 7   >   >>
More Blogs from Max Maxfield
I am shocked and horrified. It appears that those little scamps at Planet Analog are writing blogs pertaining to field-programmable issues.
This week's live online chat takes place on Thursday, May 23, 2013, at 1:00 p.m. ET.
Would you class these as adages, aphorisms, axioms, dictums, epigrams, maxims, precepts, saws, truisms, or... well, what?
In part 3 of this epic tale we consider how we might use tri-state buffers, leading up to the legendary bi-directional buffer.
Design West 2013 was one of the best conferences and exhibitions Max has attended in terms of interesting presentations and fun events.
flash poll
follow us on twitter
follow Xilinx on twitter
like us on facebook
like Xilinx on facebook
All Programmable Planet     About Us     Contact Us     Help     Register     Twitter     Facebook     RSS