1
0
SEm-Labos/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothToTriangle_studentVersion.vhd
2024-02-27 11:41:20 +01:00

19 lines
347 B
VHDL

ARCHITECTURE studentVersion OF sawtoothToTriangle IS
signal mySignal : unsigned(bitNb-1 downto 0);
BEGIN
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);
END ARCHITECTURE studentVersion;