17 lines
417 B
VHDL
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;
|