mirror of
https://github.com/Klagarge/Cursor.git
synced 2025-07-03 07:11:11 +00:00
Initial commit
This commit is contained in:
1575
Cursor_test/hds/pulse@width@modulator_tester/interface
Normal file
1575
Cursor_test/hds/pulse@width@modulator_tester/interface
Normal file
File diff suppressed because it is too large
Load Diff
29
Cursor_test/hds/pulse@width@modulator_tester/test.vhd
Normal file
29
Cursor_test/hds/pulse@width@modulator_tester/test.vhd
Normal file
@ -0,0 +1,29 @@
|
||||
ARCHITECTURE test OF pulseWidthModulator_tester IS
|
||||
|
||||
constant clockPeriod: time := 50 ns;
|
||||
signal sClock: std_uLogic := '1';
|
||||
|
||||
constant enPeriodNb: positive := 3;
|
||||
signal sEn: std_uLogic := '0';
|
||||
|
||||
BEGIN
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- clock and reset
|
||||
--
|
||||
reset <= '1', '0' after clockPeriod/4;
|
||||
|
||||
sClock <= not sClock after clockPeriod/2;
|
||||
clock <= sClock after clockPeriod/10;
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- control signals
|
||||
--
|
||||
amplitude <= to_unsigned( 64, amplitude'length),
|
||||
to_unsigned(128, amplitude'length) after 10*256*enPeriodNb*clockPeriod,
|
||||
to_unsigned(192, amplitude'length) after 20*256*enPeriodNb*clockPeriod;
|
||||
|
||||
sEn <= '1' after (enPeriodNb-1)*clockPeriod when sEn = '0' else '0' after clockPeriod;
|
||||
en <= sEn;
|
||||
|
||||
END test;
|
Reference in New Issue
Block a user