V
valentin tihomirov
Guest
Two related signals control a process. The process is launched if Sig1 or
Sig2 is active. This does not mean OR logic. I bring an illustration of a
register just to make it clear.
You have a register that can be in loaded or in empty state. It accepts data
(becomes LOADED) when is EMPTY and WRITE input is active. At a clock edage
when register is being loaded it responds with ACK signal, releasing data
provider. That is, ACK is active when WRITE and EMPTY = '1'. There are two
options when to load data FFs of the register:
- when EMPTY = '1', that is when reg. contains no valid data; or
- when ACK = '1', i.e. reg. responds the fact it loads data.
Logically, the device will function equvalently. The pseudo-code:
entity:
WRITE: in std_logic
ACK: out std_logic
DIN, DOUT: std_logic_vector;
architecture
EMPTY: std_logic;
begin
ACK <= EMPTY and WRITE;
@CLK: -- the option1:
if ACK then
DOUT <= DIN;
@CLK: -- the option2:
-- if EMPTY then
-- DOUT <= DIN;
This is dilemma that I think is very typical in HW (In SW you would use the
variable/flag that is most recently used and is most likely cached).
Preference of one signal to another does not affect behaviuor, it affects
tracing and ethernal HW considerations (size/frequency) ultimately. From
one point of view, I would choose the most frequently used signal because
its trace is broader available on PCB/PLD. On the other hand, if a signal is
frequently used this means that the greater number of destinations enforced
by its longer trace cause a high load of the signal.
Are PCB/FPGA considerations the same regarding this problem? Which general
rule do you use? Does this issue deserve any attention at all? Do you see
the issue?
Thanks.
Sig2 is active. This does not mean OR logic. I bring an illustration of a
register just to make it clear.
You have a register that can be in loaded or in empty state. It accepts data
(becomes LOADED) when is EMPTY and WRITE input is active. At a clock edage
when register is being loaded it responds with ACK signal, releasing data
provider. That is, ACK is active when WRITE and EMPTY = '1'. There are two
options when to load data FFs of the register:
- when EMPTY = '1', that is when reg. contains no valid data; or
- when ACK = '1', i.e. reg. responds the fact it loads data.
Logically, the device will function equvalently. The pseudo-code:
entity:
WRITE: in std_logic
ACK: out std_logic
DIN, DOUT: std_logic_vector;
architecture
EMPTY: std_logic;
begin
ACK <= EMPTY and WRITE;
@CLK: -- the option1:
if ACK then
DOUT <= DIN;
@CLK: -- the option2:
-- if EMPTY then
-- DOUT <= DIN;
This is dilemma that I think is very typical in HW (In SW you would use the
variable/flag that is most recently used and is most likely cached).
Preference of one signal to another does not affect behaviuor, it affects
tracing and ethernal HW considerations (size/frequency) ultimately. From
one point of view, I would choose the most frequently used signal because
its trace is broader available on PCB/PLD. On the other hand, if a signal is
frequently used this means that the greater number of destinations enforced
by its longer trace cause a high load of the signal.
Are PCB/FPGA considerations the same regarding this problem? Which general
rule do you use? Does this issue deserve any attention at all? Do you see
the issue?
Thanks.