ECE 448 – FPGA and ASIC Design with VHDL George Mason University Lab 1 Introduction to Aldec Active HDL Implementing Combinational Logic in VHDL.

Slides:



Advertisements
Similar presentations
Arbitrary Waveform Discussion 5.5 Example 34.
Advertisements

Arithmetic Logic Unit (ALU)
Adder Discussion D6.2 Example 17. s i = c i ^ (a i ^ b i ) c i+1 = a i * b i + c i * (a i ^ b i ) Full Adder (Appendix I)
TK 2633 Microprocessor & Interfacing
Introduction to VHDL VHDL Tutorial R. E. Haskell and D. M. Hanna T1: Combinational Logic Circuits.
EE1A Revision What should you be expected to do in a typical exam question ? Understanding of basic principles. Ability to perform simple circuit analysis.
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
Memory - Registers Instruction Sets
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448.
Unit-1 PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE Advance Processor.
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.
Introduction to Design Tools COE Review: Tools, functions, design flow Four tools we will use in this course – HDL Designer Suite FPGA Advantage.
Figure 5.1 Conversion from decimal to binary. Table 5.1 Numbers in different systems.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Experiment 7 VHDL Modeling of Embedded Microprocessors and Microcontrollers.
Embedded System Spring, 2011 Lecture 10: Arithmetic, Logic Instruction and Programs Eng. Wazen M. Shbair.
PIC18F Programming Model and Instruction Set
Lecture – 4 PIC18 Family Instruction Set 1. Outline Literal instructions. Bit-oriented instructions. Byte-oriented instructions. Program control instructions.
L26 – Datapath ALU implementation
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
ECE 448 – FPGA and ASIC Design with VHDL Lecture 12 PicoBlaze Overview.
PIC – ch. 2b. Move to GPR Move [copy] contents of WREG  GPR/RAM MOVLW99H;WREG=99H MOVWF0H ;move [copy] WREG contents to location 0h … -Cant move literal.
EE3A1 Computer Hardware and Digital Design Lecture 2 Introduction to VHDL.
Introduction to FPGA Tools
CS 151: Digital Design Chapter 4: Arithmetic Functions and Circuits
CHAPTER 6 ARITHMETIC, LOGIC INSTRUCTIONS, AND PROGRAMS.
Number Representation and Arithmetic Circuits
V 0.41 C Arithmetic operators OperatorDescription +, -addition (i+j), subtraction (i-j) *, /multiplication (i*j), division (i/j) ++, --increment (i++),
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
Department of Electronic & Electrical Engineering Lecture 2. PIC16F84A Architecture / Instructions Memory. Program/Data (Harvard) File Registers (Data).
MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 1 Implementing Combinational Logic in VHDL.
ECE 448 Lab 1 Developing Effective Testbenches
George Mason University Data Flow Modeling of Combinational Logic ECE 545 Lecture 5.
1 ECE 372 – Microcontroller Design Basic Assembly Programming for(j=0; j
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
1 Computer Architecture & Assembly Language Spring 2009 Dr. Richard Spillman Lecture 11 – ALU Design.
Implementing Combinational
Basic Language Concepts
Microprocessor Systems Design I
Assembly Language Programming of 8085
Microprocessor T. Y. B. Sc..
COMP541 Datapaths I Montek Singh Mar 28, 2012.
Microprocessor Systems Design I
PIC – ch. 2b Md. Atiqur Rahman Ahad.
PIC18 CH. 4.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
The 8051 Assembly Language Arithmetic & Logic Instructions
Introduction to ModelSim Implementing Sequential
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Review of Aldec Active HDL Implementing Combinational
Mano and Kime Sections 7-6 – 7-8
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Modeling of Combinational Logic
Implementing Combinational
EECE.3170 Microprocessor Systems Design I
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Data Flow Description of Combinational-Circuit Building Blocks
COMP541 Datapaths I Montek Singh Mar 18, 2010.
Implementing Combinational and Sequential Logic in VHDL
Data Flow Description of Combinational-Circuit Building Blocks
Modeling of Circuits with a Regular Structure
Lecture 14 PicoBlaze Instruction Set
Implementing Combinational
EECE.3170 Microprocessor Systems Design I
COMPUTER ORGANIZATION AND ARCHITECTURE
Computer Architecture Assembly Language
4-Input Gates VHDL for Loops
Presentation transcript:

ECE 448 – FPGA and ASIC Design with VHDL George Mason University Lab 1 Introduction to Aldec Active HDL Implementing Combinational Logic in VHDL

Example 1: MLU Introduction to Aldec Active-HDL

MLU Block Diagram

Experiment 1 Problem 1 ALU of PIC Microcontroller

Pertinent Components of PIC Working Register 70 W Register File (32 Registers) Address STATUS Special Function Registers General Purpose Registers

Addressing Modes Immediate mode ANDLW H’6C’ Direct mode ANDWF H’12’, 0 W & 0x6C  W W & (0x12)  W

Assembly language vs. Machine Code Assembly language mnemonic [operands] ANDLW H’6C’ Machine code ‘000101’ ‘010010’ opcode [operands] ANDWF H’12’, 0 ‘1110’ ‘ ’

Status Register STATUS 0 7 Z DC C Carry/Borrow Digit Carry (3 rd  4 th bit) Zero Power-down Time-out Program Page Preselect Reserved

Definition of the Status Register Flags (1) Z = 1 if result = 0 0 otherwise Zero flag - Z zero result C = 1 if result > MAX_UNSIGNED or result < 0 0 otherwise where MAX_UNSIGNED = for 8-bit results Carry flag - C out-of-range for unsigned numbers

Definition of the Status Register Flags (2) DC = 1 if carry from bit 3 to bit 4 (ADDWF) or no borrow from bit 4 to 3 (SUBWF) 0 otherwise Digit Carry flag – DC Carry / Borrow between MSB of first hex digit and LSB of second DC = 1

Logic Instructions 1.AND ANDWFW & RF  W or RF ANDLW W & L  W 2. Inclusive OR IORWFW | RF  W or RF IORLWW | L  W 3. Exclusive OR XORWF W  RF  W or RF XORLWW  L  W 4.Ones Complement COMF RF  RF DIR Z C DC DIR IMM DIR – DIR IMM

Arithmetic Instructions 1. Addition ADDWF W + RF  W or RF 2.Subtraction SUBWF RF – W  W or RF DIR 3.Increment INCFRF + 1  RF 4.Decrement DECFRF - 1  RF DIR Z C DC DIR –

Shifts and Rotation Instructions 1. Rotate Left Through Carry RLF 2. Rotate Right Through Carry RRF 3. Swap Nibbles SWAPFRF [7:4]  W [3:0] or RF [3:0] RF [4:0]  W [7:4] or RF [7:4] DIR Z C DC DIR – x x – – – C 0 7 C

Instruction Summary

Example 2 Mini ALU

opcode A B M R Mini ALU

MnemonicOperationOpcode ADDABR= A + B0000 ADDAMR = A + M0001 SUBABR = A - B0010 SUBAMR = A - M0011 NOTAR = NOT A0100 NOTBR = NOT B0101 NOTMR = NOT M0110 ANDABR = A AND B0111 ANDAMR = A AND M1000 ORABR = A OR B1001 ORAMR = A OR M1010 XORABR = A XOR B1011 XORAMR = A XOR M1100

Block diagram

Example 3 Variable Rotator

Function C = A <<< B A – 4-bit data input B – 2-bit rotation amount

Interface A B C

Block diagram C

Fixed Shifts in VHDL A(3)A(2) A(1) A(0) A(3)A(2)A(1) A>>1 A_shiftR <= ‘0’ & A(3 downto 1); ‘0’

Arithmetic Functions in VHDL (1) To use arithmetic operations involving std_logic_vectors you need to include the following library packages: library ieee; use ieee.std_logic_1164.all; use ieee.STD_LOGIC_UNSIGNED.ALL;

Arithmetic Functions in VHDL (2) You can use standard +, - operators to perform addition and subtraction: signal A : STD_LOGIC_VECTOR(3 downto 0); signal B : STD_LOGIC_VECTOR(3 downto 0); signal C : STD_LOGIC_VECTOR(3 downto 0); …… C<= A + B;