1
0
SEm-Labos/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothToTriangle_studentVersion.vhd

19 lines
347 B
VHDL
Raw Normal View History

2024-02-23 13:01:05 +00:00
ARCHITECTURE studentVersion OF sawtoothToTriangle IS
2024-02-27 10:41:20 +00:00
signal mySignal : unsigned(bitNb-1 downto 0);
2024-02-23 13:01:05 +00:00
BEGIN
2024-02-27 10:41:20 +00:00
convert: process(sawtooth)
begin
if sawtooth(bitNb-1) = '1' then
mySignal <= NOT sawtooth;
else
mySignal <= sawtooth;
end if;
end process convert;
triangle <= shift_left(mySignal, 1);
2024-02-23 13:01:05 +00:00
END ARCHITECTURE studentVersion;