Motion FPGA
Motion FPGA for the MachX02-7000HE Breakout Board
tb Architecture Reference

Architecture tb of pwm_device_tb entity. More...

Functions

string   to_string ( vector: in std_logic_vector )
 Function to create string from std_logic_vector.

Processes

pr_clock  ( )
 Clock generator process.
pr_stimulus  ( )
 Stimulus process to drive PWM unit under test.

Use Clauses

rst 
 Reset input to pwm_device.

Constants

c_clk_period  time := 10 ns
 Test bench clock period.
c_stimulus  t_stimulus_array := ( ( name = > " Reset " , rst = > ' 1 ' , data_wr = > X " FFFFFFFF " , data_rd = > X " 00000000 " , percent = > ( 0 , 0 , 0 , 0 ) ) , ( name = > " Set 0 , 0 , 0 , 0 " , rst = > ' 0 ' , data_wr = > X " 00000000 " , data_rd = > X " 00000000 " , percent = > ( 0 , 0 , 0 , 0 ) ) , ( name = > " Set 255 , 255 , 255 , 255 " , rst = > ' 0 ' , data_wr = > X " FFFFFFFF " , data_rd = > X " FFFFFFFF " , percent = > ( 100 , 100 , 100 , 100 ) ) , ( name = > " Set 127 , 127 , 127 , 127 " , rst = > ' 0 ' , data_wr = > X " 7F7F7F7F " , data_rd = > X " 7F7F7F7F " , percent = > ( 50 , 50 , 50 , 50 ) ) , ( name = > " Set 0 , 85 , 170 , 255 " , rst = > ' 0 ' , data_wr = > X " FFAA5500 " , data_rd = > X " FFAA5500 " , percent = > ( 0 , 33 , 67 , 100 ) ) , ( name = > " Set 0 , 0 , 0 , 0 " , rst = > ' 0 ' , data_wr = > X " 00000000 " , data_rd = > X " 00000000 " , percent = > ( 0 , 0 , 0 , 0 ) ) )
 Test stimulus.

Types

t_percent_array ( 0 TO 3 ) integer
 Type for percentage array.
t_stimulus_array array ( natural range <> ) of t_stimulus
 Stimulus array type.

Signals

clk  std_logic
 Clock input to uut.
dat_wr_done  std_logic
 Data write done input to uut.
dat_wr_reg  std_logic_vector ( 31 DOWNTO 0 )
 Data write register input to uut.
dat_rd_reg  std_logic_vector ( 31 DOWNTO 0 )
 Data read register output from uut.
pwm_out  std_logic_vector ( 3 DOWNTO 0 )
 PWM outputs from uut.
on_rst  std_logic
 Reset input to on_percent.
on_percent  t_percent_array
 Percent output from on_percent.

Records

t_stimulus  
 Stimulus record type.
name  string ( 1 TO 30 )
 Stimulus name.
data_wr  std_logic_vector ( 31 DOWNTO 0 )
 Write data to pwm_device.
data_rd  std_logic_vector ( 31 DOWNTO 0 )
 Expected read data from pwm_device.
percent  t_percent_array
 Expected pwm percents.

Instantiations

i_uut  pwm_device <Entity pwm_device>
 Instantiate PWM device as uut.
i_on_percent  sim_on_percent <Entity sim_on_percent>
 Generate on_percent measuring entities.

Detailed Description

Architecture tb of pwm_device_tb entity.

Definition at line 20 of file pwm_device_tb.vhd.

Member Function Documentation

§ pr_clock()

pr_clock ( )

Clock generator process.

This generates the clk signal and the adv signal

Definition at line 147 of file pwm_device_tb.vhd.

147  pr_clock : PROCESS IS
148  BEGIN
149 
150  clk <= '0';
151  WAIT FOR c_clk_period / 2;
152 
153  clk <= '1';
154  WAIT FOR c_clk_period / 2;
155 
156  END PROCESS pr_clock;

Member Data Documentation

§ i_on_percent

i_on_percent sim_on_percent
Instantiation

Generate on_percent measuring entities.

Instantiate on_percent

Definition at line 142 of file pwm_device_tb.vhd.

§ rst

rst
Package

Reset input to pwm_device.

Reset input to uut.

Definition at line 31 of file pwm_device_tb.vhd.


The documentation for this class was generated from the following file: