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

17 lines
417 B
VHDL
Raw Normal View History

2024-02-23 13:01:05 +00:00
ARCHITECTURE studentVersion OF sawtoothToSquare IS
2024-02-27 10:23:54 +00:00
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);
2024-02-23 13:01:05 +00:00
BEGIN
2024-02-27 10:23:54 +00:00
convert: process(sawtooth)
begin
mySignal <= sawtooth AND myConst;
end process convert;
square <= (others => sawtooth(bitNb-1));
2024-02-23 13:01:05 +00:00
END ARCHITECTURE studentVersion;