Questions about single process coding style

Martin Thompson wrote:
Mike Treseler <mike_treseler@comcast.net> writes:
Let's see, that's
ISE Release 9.1.03i - xst J.33

Thanks - looks like I'll stick to Synplify for now...
The pure synthesis vendors like Synplicity and Mentor
are the best bet to avoid vendor-specific bugs like
this one. But I'm a bit of a synthesis wonk, and
enjoy testing the limits of all the tools.

And, of course, the customer is correct by
definition in the choice of devices and tools :)

-- Mike Treseler
 
yves.770905@gmail.com wrote:

For instantiating both the RTL and the netlist in the same testbench,
I just renamed the entity of the netlist to procedureTest_syn, that
was a quick and dirty solution and not having to think about writing a
configuration ;-)
Note the happy coincidence
that both ise and quartus netlists
happen to name their architectures "structure".
So I can specify that directly for the i_SYN instance
and not modify the netlist entity or testbench
for either case.

I don't even have to write a component declaration
with direct instances like this:

i_DUT: entity work.proc_demo(rtl)
-- proc_demo.vhd architecture
port map (clk => clk, -- [in]
rst => rst, -- [in]
incr => incr, -- [in]
decr => decr, -- [in]
data => data); -- [out]
------------------------------------------------
i_SYN: entity work.proc_demo(structure)
-- both ise and quartus use this architecture
port map (clk => clk, -- [in]
rst => rst, -- [in]
incr => incr, -- [in]
decr => decr, -- [in]
data => data_syn); -- [out]


Your testbench worked brilliantly, by the way.

-- Mike Treseler
 
On Jun 14, 1:01 pm, Mike Treseler <mike_trese...@comcast.net> wrote:
yves.770...@gmail.com wrote:
Hi Mike,
Another way to fix it is defining the procedures like this:

procedure increment(cnt: inout unsigned(count'range)) is
begin
cnt := cnt + 1;
end procedure;
procedure decrement(cnt: inout unsigned(count'range)) is
begin
cnt := cnt + 1;
end procedure;

Oh my.
I'm a big fan of subprograms, but having to pass
a variable to an in-scope procedure is over
my verbosity limit.

I see that this is the "work-around"
offered in the answer record but it
is not a practical one in my book.

-- Mike Treseler

From my point of view, yves's solution will be more practical in a
complex case.
For example, when there are ten variables like "cnt" in five
procedures, the if-solution
will be very hard to define. Or the procedures have statements that
have to execute at the
same time, then the if-solution is not feasible.

Thank to yves for such an good example
 
jasonL wrote:

From my point of view, yves's solution will be more practical in a
complex case.
I agree with you for a packaged procedure.

The case in question is a procedure
in process scope, which should have direct
access to variables previously declared.

Thank to yves for such an good example
I only intended to inpugn the the vendor's
suggested work-around, not Yves' rendering
of it. In fact, I said

"Thanks for the posting Yves!"

and

"Your testbench worked brilliantly"

Yves did us all a service by bringing
this problem to light.


-- Mike Treseler
 

Welcome to EDABoard.com

Sponsor

Back
Top