Don't worriy assignment, when to worry about?

V

Valentin Tihomirov

for example

--wait on clk_edage;
if cleaning = '1' then
data <= in; -- no need to keep data
end if;

Register keeps data while cleaning = '0' (cleaing variable here = NextEmpty
signal). When cleaning signal becomes active we can load the register with
fresh data. In fact, I have to assign inputs to the data only when loading
of the register is requested. That is, the following describes the logic
more precisely allowing for more degree of freedom to compiler (as well as
P&R?).

--wait on clk_edage;
if cleaning = '1' then -- becomes empty, can be loaded
if loading = '1' then -- load request
data <= in;
else
data <= 'X';
end if;
end if;

On the other hand, the latter can be much harder to read assuming that logic
can have more than two binary decision conditions (and hense much more
complex branching).
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top