From b8b5c00ac259ec0dab49c1dbd4281dfb843c4be6 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Tue, 27 Feb 2024 11:41:20 +0100 Subject: [PATCH] add triangle signal --- .../hdl/sawtoothToTriangle_studentVersion.vhd | 16 +++++++++++++++- .../hds/waveform@gen/struct.bd.lck | 6 ------ 2 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 01-WaveformGenerator/WaveformGenerator/hds/waveform@gen/struct.bd.lck diff --git a/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothToTriangle_studentVersion.vhd b/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothToTriangle_studentVersion.vhd index 9fa87cc..6efcaf5 100644 --- a/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothToTriangle_studentVersion.vhd +++ b/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothToTriangle_studentVersion.vhd @@ -1,4 +1,18 @@ ARCHITECTURE studentVersion OF sawtoothToTriangle IS + + signal mySignal : unsigned(bitNb-1 downto 0); + BEGIN - triangle <= (others => '0'); + + 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; diff --git a/01-WaveformGenerator/WaveformGenerator/hds/waveform@gen/struct.bd.lck b/01-WaveformGenerator/WaveformGenerator/hds/waveform@gen/struct.bd.lck deleted file mode 100644 index bf79d87..0000000 --- a/01-WaveformGenerator/WaveformGenerator/hds/waveform@gen/struct.bd.lck +++ /dev/null @@ -1,6 +0,0 @@ -EDIT_LOCK -remi.heredero -UNKNOWN -WE2330808 -2208 -27.02.2024-10:16:57.263000