Re: [myhdl-list] When to use @always, @instance and @always_comb
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2012-05-03 08:38:47
|
On 05/03/2012 06:55 AM, Christopher Lozinski wrote: > This is all really about Python and MyHDL. Nothing about chips. Not > that much about computational models of circuits. And in particular, > not at all clear where chip modeling ends and other modeling begins. > Nor what kind of chips use @always, @instance and @always_comb. That is clearly not true. The section on RTL modeling starts as follows: "The present section describes how MyHDL supports RTL style modeling as is typically used for synthesizable models." Then it moves on to describe templates for "computational models" for combinatorial logic and for sequential logic. Just two, and with those two you can do everything :-) And then it shows how to describe an FSM, which is what you will be using all the time. > The focus is not on the models of digital circuits, it is on the features > of MyHDL. This is the MyHDL manual. In the RTL section, it shows you how you can use MyHDL to write models that a synthesis tool will turn into digital circuits. In the next section, it shows you can do all kinds of other interesting things at a higher level. Let me try again: I think your confusion comes from the mindset. It is wrong to look at any MyHDL construct, like Signals or decorators, and immediately worry about what the corresponding hardware implementation is. That is just not how it works. For example: the 3 decorators exist because they let you easily describe useful event-driven behaviors, *not* because they correspond uniquely to some hardware implementation. -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Python as a HDL: http://www.myhdl.org VHDL development, the modern way: http://www.sigasi.com World-class digital design: http://www.easics.com |