C
Chuck McManis
Guest
If I've got two signals in VHDL :
signal pwm_thresh : std_logic_vector (31 downto 0);
signal pwm_count : std_logic_vector (31 downto 0);
and I write ...
if ( pwm_thresh > pwm_count ) then
pwm <= '1';
else
pwm <= '0';
end if;
Does it work? I've not managed to successfully simulate it yet. Perhaps if I
wrote:
if ( unsigned(pwm_thresh) > unsigned(pwm_count) ) then
--
--Chuck McManis
Email to the devnull address is discarded
http://www.mcmanis.com/chuck/
signal pwm_thresh : std_logic_vector (31 downto 0);
signal pwm_count : std_logic_vector (31 downto 0);
and I write ...
if ( pwm_thresh > pwm_count ) then
pwm <= '1';
else
pwm <= '0';
end if;
Does it work? I've not managed to successfully simulate it yet. Perhaps if I
wrote:
if ( unsigned(pwm_thresh) > unsigned(pwm_count) ) then
--
--Chuck McManis
Email to the devnull address is discarded
http://www.mcmanis.com/chuck/