Questions about single process coding style

M

Mike Treseler

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
 
M

Mike Treseler

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
 
J

jasonL

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
 
M

Mike Treseler

jasonL said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top