1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

VHDL for Efficient Testbenches pot

18 70 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p1 VHDL for Efficient Testbenches using muxAndDecEx1 combinational logic example Dr Fearghal Morgan VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p2 VHDL For Efficient Testbenches (TBs) Learning outcomes On completion of this module, you should be able to :  Apply stimulus using  Explicit stimulus application using  single process detailed in muxAndDecEx1  multiple processes course material  For loop  Array  FileIO  Generate message output during simulation  Presentation also introduces  VHDL functions and their definition in the IEEE VHDL libraries  VHDL Variables VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p3 muxAndDecEx1 Testbench & Simulation Visualise the test bench structure muxAndDecEx1 decOut decOut VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p4 Basic muxAndDecEx1 Testbench VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p5 Basic muxAndDecEx1 Testbench Simulation Waveform VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p6 Alternative Stimulus Generation Various efficient VHDL behavioural modelling language constructs are available to generate stimulus to test a VHDL model, e.g., • for loop • defining stimulus array & indexing the array to apply stimulus • reading stimulus data directly from a file Messages can also be added to testbench Remember that this type of testbench / behavioural VHDL code is not intended for logic synthesis, and normally cannot be synthesised ! Refer to muxAndDecEx1 lab files muxAndDecEx1_TB.vhd for these examples of testbench coding VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p7 Stimulus Generation using for loop muxAndDecEx1 example : use for loop to create 8 stimulus sets Convert integer loop index to a signal vector using VHDL function. VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p8 for loop Syntax Use Edit > language templates > VHDL > for loop statement For statement is synthesisable as long as the loop has a fixed range For statement is commonly used in testbench (behavioural) models VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p9 Functions in VHDL Functions (and procedures) are used widely in VHDL Conversion functions are common for example: to convert from integer type (easily manipulated using for loops) to a vector of signals, use the function CONV_STD_LOGIC_VECTOR(integerName, vectorWidth) This function converts integer value to vector of width vectorWidth Many conversion functions exist Functions can reduce VHDL model complexity VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p10 Conversion Functions in VHDL Use Edit > language templates > VHDL > conversion functions Use <= here vector size [...]... inModelsim VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p12 Conversion Functions in VHDL Use Edit > language templates > VHDL > conversion functions Function defined in arith library Function overloading : Specific function used depends on argument types Library package must be referenced in VHDL library description VHDL for efficient testbenches. .. later in the course VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p17 VHDL For Efficient Testbenches Learning outcomes (recap) On completion of this module, you should be able to : Apply stimulus using Explicit stimulus application using single process detailed in muxAndDecEx1 multiple processes course material For loop Array FileIO... Functions are applied using a VHDL assignment, e.g., . structure muxAndDecEx1 decOut decOut VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p4 Basic muxAndDecEx1 Testbench VHDL for efficient testbenches www.appliedVHDL.com Applied. logic example Dr Fearghal Morgan VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p2 VHDL For Efficient Testbenches (TBs) Learning outcomes. VHDL for efficient testbenches www.appliedVHDL.com Applied VHDL Training Course, Dr Fearghal Morgan, V2007.1 p1 VHDL for Efficient Testbenches using muxAndDecEx1

Ngày đăng: 27/06/2014, 00:20

TỪ KHÓA LIÊN QUAN