M
minkowsky
Guest
"Jonathan Bromley" <jonathan.bromley@doulos.com> wrote
at me
<snip>
I sure would like some kind of preprocessor thing to tweak things depending
on the weather, my mood and of course the target platform and testbenches.
<snip>
other.
I realize maybe in real life, the truth is they usually play
paper-cisor-stone to determine who will be master and slave...
At one point I was even considering learning langages like ruby to generate
my code automagically with template files and all.
And I'm a complete newbie (hadn't known anything about vhdl 2 months ago),
so my first move was to buy a study board and try things on it. then came
the ISE and the whole environment... I discover new things every day.
I did some simming at first, because I had no way of talking to my fpga. But
now, I'm really happy he and I can start communicate. Doing things in
simland really seemed like building things in a vacuum... not concrete. And
also I suspected that in some way the sim wasn't really like real life's
test. As it turned out to be the first time my whole chip began overheating
(or seemed to) because of what I suspect is metastability.
Another guy here told me to turn back to simming.
I believe I'll really have to each time the board acts in an unexpected (and
most of all, incomprehensible way).
I really wanted to check that I really could achieve a GUI on my pc that
could reflect the internal state of my board, before dwelling further in
simland (after all, there might have been things I just couldn't do -lack of
knowledge, time, skill, whatever...).
that's all I had to test things). Turned out it was too big by itself, that
I made some assumptions that turned out to be wrong and that my comms
component added more slices to the thing. I finaly managed to make
something that fitted in my spartan. Only to find out the comms didn't
behave as expected. Debugging with the pc GUI was easy enough to understand
where the problem laid and feed the beast with test data.
Now I have the comms working fine, I also found out that metastability in
the rest of the design would impair the correct functionning of my usb
comms. Now I'm back to having my reworked payload work according to specs
and fit in the same box as the comms.
So I guess sooner or later, I'll have to take a deep look at what is going
on inside my chip, step by step and I'm sure the
sim will be the main debugging tool.
Another thing that confused me at first was that some instructions that were
functionning inside the "check syntax" of ISE weren't allowed in the sim...
then that some syntax allowed in the sim wasn't allowed in the final
compilation. That's why at one point I felt reluctant to use the sim (I
don't like depending on some syntaxic construct that ends up not being
allowed in the last few meters).
lets say a std_logic_vector (63 downto 0), all I need to do is wire it
between the components. No preset to ZZZ depending of in which state each
component is... (again, I felt that if "the outside" needed to know what
state the inside was in to function, "the outside" belonged inside).
Now I _did_ find out the hard way that if I didn't sync things with the same
clock, some nasty things (ie: that I couldn't grasp) would happen to my
design. So maybe I end up using too many clock synchronizations in my
design... I don't really know (the books I read tell me to sync to death to
avoid metastability).
I didn't use that many types... (mainly std_logic stuffs)
<snip>
guess... (looks like a chicken and egg debate to me ;-)...)
doing things, it means we can't be totally wrong ;-)...
Regards,
Mink.
Oki... no problem then. Thought for a second that you wanted to have a bite"minkowsky" <mink@darkcube.nospam.com> wrote
"your object-oriented ivory tower " ?? wow. Did I crush your finger,
stepped
on your lawn?
Nope. Just gave me an opportunity to make fun of a cultural
difference.
at me
<snip>
I'll be waiting in line too, then...Many
of us are looking forward to a hardware description language
(VHDL-200x, perhaps) that pushes that likeness much, much further.
I sure would like some kind of preprocessor thing to tweak things depending
on the weather, my mood and of course the target platform and testbenches.
<snip>
lol :-DLook at everything around you: components with standardized interfaces
are
everywhere, from power outlets, window frames, car parts, airplanes,
etc...
And, dare I say it, bidirectional buses.
Yes... Something like that did cross my mind.I can only guess here, but
I suspect that our mutual misunderstanding is partly because you
are in some way hoping for an inout port (or, more specifically,
two inout ports linked by a signal) to form a self-sufficient
bidirectional communications link.
That's what happens each time you have two same device talking to eachThe reality is that such a link
can be implemented only with the help of some additional control and
synchronisation signals. This larger ensemble of signals CAN be
treated as a standardised, self-contained interface - although for
practical reasons it's normal to make it somewhat asymmetric, with
one end acting as master and the other as slave. It is possible
to build distributed, symmetrical arbitration schemes, but it's
tricky and usually inappropriate.
other.
I realize maybe in real life, the truth is they usually play
paper-cisor-stone to determine who will be master and slave...
Yep... The lack of pre processor/template processor really seemed odd to me.VHDL is not perfect for this, since it lacks any kind of type
parameterisation (type templates). However, something close
to this goal can be achieved using packages to tweak the
data type of the payload part of your interface.
At one point I was even considering learning langages like ruby to generate
my code automagically with template files and all.
Well, I like to see my leds light upThis is what I do: "while not (perfect) do {modifs, compile, upload
into
hardware, test}"... no simming AT ALL.
I find that a strange strategy.
And I'm a complete newbie (hadn't known anything about vhdl 2 months ago),
so my first move was to buy a study board and try things on it. then came
the ISE and the whole environment... I discover new things every day.
I did some simming at first, because I had no way of talking to my fpga. But
now, I'm really happy he and I can start communicate. Doing things in
simland really seemed like building things in a vacuum... not concrete. And
also I suspected that in some way the sim wasn't really like real life's
test. As it turned out to be the first time my whole chip began overheating
(or seemed to) because of what I suspect is metastability.
Another guy here told me to turn back to simming.
I believe I'll really have to each time the board acts in an unexpected (and
most of all, incomprehensible way).
I really wanted to check that I really could achieve a GUI on my pc that
could reflect the internal state of my board, before dwelling further in
simland (after all, there might have been things I just couldn't do -lack of
knowledge, time, skill, whatever...).
Well, my payload was already working as expected in the sims (at the time,Simulation gives you vastly better
control and visibility of the design than hardware prototyping,
and therefore more reliable and productive debugging. Hardware
prototyping has its place, particularly later in the design cycle
where (a) you want to push large amounts of data through the
design very quickly and (b) you want the design to interact with
real running software on a real running machine. But it's much
less helpful early in the process.
that's all I had to test things). Turned out it was too big by itself, that
I made some assumptions that turned out to be wrong and that my comms
component added more slices to the thing. I finaly managed to make
something that fitted in my spartan. Only to find out the comms didn't
behave as expected. Debugging with the pc GUI was easy enough to understand
where the problem laid and feed the beast with test data.
Now I have the comms working fine, I also found out that metastability in
the rest of the design would impair the correct functionning of my usb
comms. Now I'm back to having my reworked payload work according to specs
and fit in the same box as the comms.
So I guess sooner or later, I'll have to take a deep look at what is going
on inside my chip, step by step and I'm sure the
sim will be the main debugging tool.
Another thing that confused me at first was that some instructions that were
functionning inside the "check syntax" of ISE weren't allowed in the sim...
then that some syntax allowed in the sim wasn't allowed in the final
compilation. That's why at one point I felt reluctant to use the sim (I
don't like depending on some syntaxic construct that ends up not being
allowed in the last few meters).
No pre treatment means that If I need to give some info to the component,My way of seeing things is that once the interface of my component is
set,
once the contract is made, the outside components should just rely on
the
fact that they give the interface the correct data (with no pre
treatment)
and expect the contract to be fulfilled.
I reckon that's my way of seeing things too, but I'm not quite sure
what you mean by "with no pre treatment"; in hardware you ALWAYS need
some kind of synchronisation signal, strobe, clock or the like in
order to push data into a port, or out of it. In every other sense
I totally agree with you.
lets say a std_logic_vector (63 downto 0), all I need to do is wire it
between the components. No preset to ZZZ depending of in which state each
component is... (again, I felt that if "the outside" needed to know what
state the inside was in to function, "the outside" belonged inside).
Now I _did_ find out the hard way that if I didn't sync things with the same
clock, some nasty things (ie: that I couldn't grasp) would happen to my
design. So maybe I end up using too many clock synchronizations in my
design... I don't really know (the books I read tell me to sync to death to
avoid metastability).
I wasn't aware of that... thanks for the info.Once you've achived this, you've decoupled both components to the max.
The discussion was about INOUT ports between components. My point was
that
those kind of ports encourage bad practise because they force you to
have
code on both side of the interface to deal with what is happening on the
other side of the interface (through the use of ZZZZs and OEs and stuffs
on
both side). Both sides must be in sync (operational wise).
Yes, and there are a few synchronisation signals forming part of the
interface, so that the interface remains fully defined and no component
needs magical knowledge of the behaviour of any other - except what it
can see at its own interface. In this regard VHDL has a significant
weakness: although you can make signals of record type, you can't
easily use this feature to encapsulate the various data and control
signals that form a bidirectional interface, because every element
of a record port must have the same direction (in, out or inout).
I didn't use that many types... (mainly std_logic stuffs)
Right! exactly the kind of stuff I expected.If this were not so, you could make an "interface class" that
could be instantiated on a port, which would be good.
Ho well... as long as I don't have to reinvent the whole thing... why not.In the absence
of such facilities, we must be content with an interface that is
made up of several distinct signals that, sadly, we cannot
encapsulate.
<snip>
You must be right, since I suppose that hardware existed before software, Iall
those ivory tower stuffs you dislike ;-) ).
Tee hee. Hardware people spend large fractions of their working
lives building bridges between disparate standardised interfaces.
I'm afraid we got there before you
guess... (looks like a chicken and egg debate to me ;-)...)
And that's fortunate: both our different universe have evolved a same way ofThanks for rattling my cage. It's always good to have your
long-standing assumptions challenged. But I think that, in the
end, we will be seen to have a remarkably similar approach.
doing things, it means we can't be totally wrong ;-)...
Regards,
Mink.