L
LC
Hi,
Last time I posted about this your collective help was great
and educated me well into the use of variables versus signals
Albeit it looks that I'm destined to have issues about
that.
I have this part of code that generates pulses at the end
of write on a serial bus. It generates one "ser_valid" pulse
each transfer in addition it generates a "trig_soft" pulse
if the system is at a specific mode.
---
If sv_sr is a SIGNAL all works just fine.
If sv_sr is a VARIABLE the <number 1> works just
the same but the <number 2> doesn't (trig_soft remains at '0', always)
!!! Scratched my head and gave up...
WHY why why !!?!
(needless to say that the work progressed using a SIGNAL
but my mind is not in peace ;-)
---
soft_trigger: PROCESS (clock)
BEGIN
IF (clock='1' AND clock'EVENT) THEN
sv_sr <= sv_sr(0)&sld; -- commented if Var.
-- sv_sr := sv_sr(0)&sld; -- commented if Sig.
IF (sv_sr="10") -- number 1
THEN ser_valid <='1';
ELSE ser_valid <='0';
END IF;
IF (sv_sr="10" AND mode=SOFT_TRG) -- number 2
THEN trig_soft <='1';
ELSE trig_soft <='0';
END IF;
END IF;
END PROCESS soft_trigger;
---
Many thanks.
Luis C.
Last time I posted about this your collective help was great
and educated me well into the use of variables versus signals
Albeit it looks that I'm destined to have issues about
that.
I have this part of code that generates pulses at the end
of write on a serial bus. It generates one "ser_valid" pulse
each transfer in addition it generates a "trig_soft" pulse
if the system is at a specific mode.
---
If sv_sr is a SIGNAL all works just fine.
If sv_sr is a VARIABLE the <number 1> works just
the same but the <number 2> doesn't (trig_soft remains at '0', always)
!!! Scratched my head and gave up...
WHY why why !!?!
(needless to say that the work progressed using a SIGNAL
but my mind is not in peace ;-)
---
soft_trigger: PROCESS (clock)
BEGIN
IF (clock='1' AND clock'EVENT) THEN
sv_sr <= sv_sr(0)&sld; -- commented if Var.
-- sv_sr := sv_sr(0)&sld; -- commented if Sig.
IF (sv_sr="10") -- number 1
THEN ser_valid <='1';
ELSE ser_valid <='0';
END IF;
IF (sv_sr="10" AND mode=SOFT_TRG) -- number 2
THEN trig_soft <='1';
ELSE trig_soft <='0';
END IF;
END IF;
END PROCESS soft_trigger;
---
Many thanks.
Luis C.