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;
|