CWRU EECS 318 EECS 318 CAD Computer Aided Design LECTURE Simulator 2: Textio, Wait, Clocks, and Test Benches Instructor: Francis G. Wolff

Slides:



Advertisements
Similar presentations
CWRU EECS 317 EECS 317 CAD Computer Aided Design LECTURE 2: Delay models, std_ulogic and with-select-when Instructor: Francis G. Wolff
Advertisements

CWRU EECS 3221 Language of the Machine EECS 322 Computer Architecture Instructor: Francis G. Wolff Case Western Reserve University.
VHDL Lecture 1 Megan Peck EECS 443 Spring 08.
© 1998, Peter J. AshendenVHDL Quick Start1 Basic VHDL Concepts Interfaces Behavior Structure Test Benches Analysis, elaboration, simulation Synthesis.
LECTURE 4: The VHDL N-bit Adder
CWRU EECS 317 EECS 317 Computer Design LECTURE 6: State machines Instructor: Francis G. Wolff Case Western Reserve University This.
CWRU EECS 318 EECS 318 CAD Computer Aided Design LECTURE 4: Delay models & std_ulogic Instructor: Francis G. Wolff Case Western Reserve.
1 Lecture 13 VHDL 3/16/09. 2 VHDL VHDL is a hardware description language. The behavior of a digital system can be described (specified) by writing a.
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Thomson Engineering.
Lab Lecture 3 VHDL Architecture styles and Test Bench -Aahlad.
ECE 331 – Digital System Design
CSET 4650 Field Programmable Logic Devices Dan Solarek VHDL Behavioral & Structural.
L23 – Arithmetic Logic Units. Arithmetic Logic Units (ALU)  Modern ALU design  ALU is heart of datapath  Ref: text Unit 15 9/2/2012 – ECE 3561 Lect.
AND Gate: A Logic circuit whose output is logic ‘1’ if and only if all of its inputs are logic ‘1’.
1 Data Object Object Types A VHDL object consists of one of the following: –Signal, Which represents interconnection wires that connect component instantiation.
Data Flow Modeling of Combinational Logic Simple Testbenches
Design Verification VHDL ET062G & ET063G Lecture 5 Najeem Lawal 2012.
CWRU EECS 317 EECS 317 CAD Computer Aided Design LECTURE 3: Synopsys Simulator Instructor: Francis G. Wolff Case Western Reserve University.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
LECTURE 8: VHDL PROCESSES
Graduate Computer Architecture I VHDL Structure and Testing Michael Sorensen.
CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #17 – Introduction.
VHDL Project I: Introduction to Testbench Design Matthew Murach Slides Available at:
L26 – Datapath ALU implementation
CWRU EECS 318 EECS 318 CAD Computer Aided Design LECTURE Simulator 1: Synopsys Simulator Instructor: Francis G. Wolff Case Western.
LECTURE 7: VHDL Standard Cell Library Package
ENG241 Digital Design Week #8 Registers and Counters.
CWRU EECS 317 EECS 317 Computer Design LECTURE 1: The VHDL Adder Instructor: Francis G. Wolff Case Western Reserve University.
Basic Overview of VHDL Matthew Murach Slides Available at:
CWRU EECS 318 EECS 318 CAD Computer Aided Design LECTURE 5: AOIs, WITH-SELECT-WHEN, WHEN-ELSE Instructor: Francis G. Wolff Case Western.
George Mason University ECE 545 – Introduction to VHDL Variables, Functions, Memory, File I/O ECE 545 Lecture 7.
1 ECE 545 – Introduction to VHDL Dataflow Modeling of Combinational Logic Simple Testbenches ECE 656. Lecture 2.
ECE 331 – Digital System Design Single-bit Adder Circuits and Adder Circuits in VHDL (Lecture #11) The slides included herein were taken from the materials.
Hardware Description Languages Digital Logic Design Instructor: Kasım Sinan YILDIRIM.
CEC 220 Digital Circuit Design More VHDL Fri, February 27 CEC 220 Digital Circuit Design Slide 1 of 15.
1 Introduction to VHDL Part 2 Fall We will use Std_logic And, Or have same precedence See slide 8 of part 1.
Digital System Projects
CWRU EECS 318 EECS 318 CAD Computer Aided Design LECTURE 3: The VHDL N-bit Adder Instructor: Francis G. Wolff Case Western Reserve.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Data Storage VHDL ET062G & ET063G Lecture 4 Najeem Lawal 2012.
L20 – Register Set. The 430 Register Set  Not exactly a dual ported register set, but a dual drive register set.  Ref: text Unit 10, 17, 20 9/2/2012.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL VHDL Coding for Synthesis ECE 448 Lecture 12.
Introduction to VHDL Coding Wenchao Cao, Teaching Assistant Department of EECS University of Tennessee.
Apr. 3, 2000Systems Architecture I1 Introduction to VHDL (CS 570) Jeremy R. Johnson Wed. Nov. 8, 2000.
VHDL Project I: Serial Adder Matthew Murach Slides Available at:
May 9, 2001Systems Architecture I1 Systems Architecture I (CS ) Lab 5: Introduction to VHDL Jeremy R. Johnson May 9, 2001.
Explain Half Adder and Full Adder with Truth Table.
CWRU EECS 318 EECS 318 CAD Computer Aided Design LECTURE 6: State machines Instructor: Francis G. Wolff Case Western Reserve University.
1 - CPRE 583 (Reconfigurable Computing): VHDL overview 1 Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 2: 8/26/2011 (VHDL Overview.
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
1 Computer Architecture & Assembly Language Spring 2009 Dr. Richard Spillman Lecture 11 – ALU Design.
Combinational logic circuit
Systems Architecture Lab: Introduction to VHDL
Registers and Counters
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
ENG6530 Reconfigurable Computing Systems
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
ECE 545 Lecture 10 Advanced Testbenches.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
VHDL VHSIC Hardware Description Language VHSIC
Getting Started with Vivado
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
VHDL (VHSIC Hardware Description Language)
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Figure 8.1. The general form of a sequential circuit.
CprE / ComS 583 Reconfigurable Computing
Four Bit Adder Sum A Cin B Cout 10/9/2007 DSD,USIT,GGSIPU.
4-Input Gates VHDL for Loops
Digital Logic with VHDL
Presentation transcript:

CWRU EECS 318 EECS 318 CAD Computer Aided Design LECTURE Simulator 2: Textio, Wait, Clocks, and Test Benches Instructor: Francis G. Wolff Case Western Reserve University This presentation uses powerpoint animation: please viewshow

CWRU EECS 318 adder_full_tb_io.vhd: full adder test bench ENTITY adder_full_tb_io IS END; use STD.TextIO.ALL; LIBRARY IEEE; use IEEE.std_logic.all; use IEEE.std_logic_textio.all; use STD.TextIO.ALL; LIBRARY IEEE; use IEEE.std_logic.all; use IEEE.std_logic_textio.all; Note: in order to use i/o, additional libraries must be included This test bench contains no outputs

CWRU EECS 318 ARCHITECTURE adder_full_tb_io_arch OF adder_full_tb_io IS COMPONENT adder_full PORT (x,y,Cin: IN std_logic; Sum,Cout: OUT std_logic); END COMPONENT; SIGNAL x, y, Cin, Sum, Cout: std_logic; BEGIN UUT_ADDER: adder_full PORT MAP(x, y, Cin, Sum, Cout); ARCHITECTURE adder_full_tb_io_arch OF adder_full_tb_io IS COMPONENT adder_full PORT (x,y,Cin: IN std_logic; Sum,Cout: OUT std_logic); END COMPONENT; SIGNAL x, y, Cin, Sum, Cout: std_logic; BEGIN UUT_ADDER: adder_full PORT MAP(x, y, Cin, Sum, Cout); adder_full_tb_io.vhd: architecture begin

CWRU EECS 318 PROCESS VARIABLE S: LINE; --used for write line buffer BEGIN -- Test Case #1 x<= '0'; y<= '1'; Cin<= '0'; WAIT FOR 5 ns; WRITE(S,STRING'(" X="));WRITE(S, x); WRITE(S,STRING'(" Y="));WRITE(S, y); WRITE(S,STRING'(" Cin="));WRITE(S, Cin); WRITE(S,STRING'(" Sum="));WRITE(S, Sum); WRITE(S,STRING'(" Cout="));WRITE(S, Cout); WRITELINE(OUTPUT, S); PROCESS VARIABLE S: LINE; --used for write line buffer BEGIN -- Test Case #1 x<= '0'; y<= '1'; Cin<= '0'; WAIT FOR 5 ns; WRITE(S,STRING'(" X="));WRITE(S, x); WRITE(S,STRING'(" Y="));WRITE(S, y); WRITE(S,STRING'(" Cin="));WRITE(S, Cin); WRITE(S,STRING'(" Sum="));WRITE(S, Sum); WRITE(S,STRING'(" Cout="));WRITE(S, Cout); WRITELINE(OUTPUT, S); adder_full_tb_io.vhd: test case #1

CWRU EECS Test Case #2 x<= ’1'; y<= '1'; Cin<= '0'; WAIT FOR 5 ns; WRITE(S,STRING'(" X="));WRITE(S, x); WRITE(S,STRING'(" Y="));WRITE(S, y); WRITE(S,STRING'(" Cin="));WRITE(S, Cin); WRITE(S,STRING'(" Sum="));WRITE(S, Sum); WRITE(S,STRING'(" Cout="));WRITE(S, Cout); WRITELINE(OUTPUT, S); -- Test Case #2 x<= ’1'; y<= '1'; Cin<= '0'; WAIT FOR 5 ns; WRITE(S,STRING'(" X="));WRITE(S, x); WRITE(S,STRING'(" Y="));WRITE(S, y); WRITE(S,STRING'(" Cin="));WRITE(S, Cin); WRITE(S,STRING'(" Sum="));WRITE(S, Sum); WRITE(S,STRING'(" Cout="));WRITE(S, Cout); WRITELINE(OUTPUT, S); adder_full_tb_io.vhd: test case #2

CWRU EECS 318 ASSERTFALSE REPORT "Simulation Done” SEVERITY ERROR; END PROCESS; END ARCHITECTURE; CONFIGURATION adder_full_tb_io_cfg OF adder_full_tb_io IS FOR adder_full_tb_io_arch END FOR; END CONFIGURATION; ASSERTFALSE REPORT "Simulation Done” SEVERITY ERROR; END PROCESS; END ARCHITECTURE; CONFIGURATION adder_full_tb_io_cfg OF adder_full_tb_io IS FOR adder_full_tb_io_arch END FOR; END CONFIGURATION; adder_full_tb_io.vhd: configuration

CWRU EECS 318 VHDL Simulator: running the test bench # run Unix> vhdlan -NOEVENT adder_full.vhd Unix> vhdlan -NOEVENT adder_full_tb_io.vhd Unix> vhdlsim WORK.adder_full_tb_io_cfg # ls ADDER_FULL_TB_IO STANDARD ATTRIBUTES STD_LOGIC_1164 _KERNEL X=0 Y=1 Cin=0 Sum=1 Cout=0 X=1 Y=1 Cin=0 Sum=0 Cout=1 10 NS Assertion ERROR at 10 NS in design unit ADDER_FULL_TB_IO(ADDER_FULL_TB_IO_ARCH) from process /ADDER_FULL_TB_IO/_P0: "Simulation Done" # quit

CWRU EECS 318 VHDL clock behavioral component ENTITY clock_driver IS GENERIC (Speed: TIME := 5 ns); PORT (Clk: OUT std_logic); END; ENTITY clock_driver IS GENERIC (Speed: TIME := 5 ns); PORT (Clk: OUT std_logic); END; ARCHITECTURE clock_driver_arch OF clock_driver IS SIGNAL Clock:std_logic := ‘0’; BEGIN Clk <= Clk XOR ‘1’ after Speed; Clock <= Clk; END ARCHITECTURE; CONFIGURATION clock_driver_cfg OF clock_driver IS FOR clock_driver_arch END FOR; END CONFIGURATION; ARCHITECTURE clock_driver_arch OF clock_driver IS SIGNAL Clock:std_logic := ‘0’; BEGIN Clk <= Clk XOR ‘1’ after Speed; Clock <= Clk; END ARCHITECTURE; CONFIGURATION clock_driver_cfg OF clock_driver IS FOR clock_driver_arch END FOR; END CONFIGURATION;

CWRU EECS 318 Team Assignment #5 Test benches(1/2) System Level: Team member #1 is responsible for T101_ALU_BIT_TB.vhd and T101_ALU_TB.vhd Processor: Team member #2 is responsible for T101_FSM_TB.vhd: test bench for add instruction Display all input and output bits Memory: Team member #3 is responsible for T101_RAM_TB.vhd write and read some words T101_ROM_TB.vhd with machine instructions Three tests with correct results for each test bench Cut and Paste the output to a file and print it

CWRU EECS 318 Team Assignment #5 Test Bench (2/2) The report should contain the following Cover sheet Each entity section should have the vhdl, and simulation The VHDL test benches for the complete design Everything is due Thursday October 26!

CWRU EECS 318 Team Assignment #6 System Test Bench The report should contain the following Cover sheet Each entity section should have the vhdl, simulation, and synthesis The vhdl T101_PU_TB.vhd test benches Simulate the 32 bit add program: output = input + 1 Read first byte value from the input port and zero upper 24 bits via lbi’s Load the second value from immediate loads Store the results in the output port Display the output port in the test bench Combined report of Assignments #3, #4, #5 Everything is due Thursday October 26!