1
0
SEm-Labos/01-WaveformGenerator/WaveformGenerator/hdl/sawtoothToSquare_studentVersion.vhd
2024-02-27 11:23:54 +01:00

17 lines
417 B
VHDL

ARCHITECTURE studentVersion OF sawtoothToSquare IS
signal mySignal : unsigned(bitNb-1 downto 0);
constant constOf0 : unsigned(bitNb-2 downto 0) := (others => '0');
constant myConst : unsigned(bitNb-1 downto 0) := ('1' & constOf0);
BEGIN
convert: process(sawtooth)
begin
mySignal <= sawtooth AND myConst;
end process convert;
square <= (others => sawtooth(bitNb-1));
END ARCHITECTURE studentVersion;