ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 1 Implementing Combinational Logic in VHDL.

Slides:



Advertisements
Similar presentations
Lecture 5: MIPS Instruction Set
Advertisements

Quad 2-to-1 and Quad 4-to-1 Multiplexers Discussion D2.4 Example 7.
361 div.1 Computer Architecture ECE 361 Lecture 7: ALU Design : Division.
1 Lecture 2: MIPS Instruction Set Today’s topic:  MIPS instructions Reminder: sign up for the mailing list cs3810 Reminder: set up your CADE accounts.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Lecture 5 Sept 14 Goals: Chapter 2 continued MIPS assembly language instruction formats translating c into MIPS - examples.
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.
Workshop Topics - Outline
ECE 4436ECE 5367 ISA I. ECE 4436ECE 5367 CPU = Seconds= Instructions x Cycles x Seconds Time Program Program Instruction Cycle CPU = Seconds= Instructions.
George Mason University Modeling of Arithmetic Circuits ECE 545 Lecture 7.
ECE 448: Spring 12 Lab Midterm Exam Review. Part 1: Detailed discussion of a selected midterm from Spring Part 2: Review & discussion of common.
Data Flow Modeling of Combinational Logic Simple Testbenches
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.
L26 – Datapath ALU implementation
1 ECE 545 – Introduction to VHDL Dataflow Modeling of Combinational Logic Simple Testbenches ECE 656. Lecture 2.
ECE 332 Digital Electronics and Logic Design Lab Lab 6 Concurrent Statements & Adders.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University Lab 1 Introduction to Aldec Active HDL Implementing Combinational Logic in VHDL.
Computer Organization & Programming Chapter 6 Single Datapath CPU Architecture.
Introduction to FPGA Tools
CS2100 Computer Organisation The Processor: Datapath (AY2015/6) Semester 1.
Team DataPath Research Computer Architechture. PC and IF in the Processor.
1. Building A CPU  We’ve built a small ALU l Add, Subtract, SLT, And, Or l Could figure out Multiply and Divide  What about the rest l How do.
George Mason University Data Flow Modeling in VHDL ECE 545 Lecture 7.
Data Flow Modeling in VHDL
George Mason University ECE 448 – FPGA and ASIC Design with VHDL VHDL Coding for Synthesis ECE 448 Lecture 12.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
Pirouz Bazargan SabetDecember 2003 Effective Implementation of a 32-bit RISC Processor Pirouz Bazargan Sabet University of Paris 6 - LIP6 - ASIM
CDA 4253 FPGA System Design Behavioral modeling of Combinational Circuits Hao Zheng Dept of Comp Sci & Eng USF.
ECE 448 Lab 1 Developing Effective Testbenches
MIPS Arithmetic and Logic Instructions
CS Computer Organization Numbers and Instructions Dr. Stephen P. Carl.
George Mason University Data Flow Modeling of Combinational Logic ECE 545 Lecture 5.
ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 2 Implementing Combinational Logic in VHDL.
Access the Instruction from Memory
Implementing Combinational
Electrical and Computer Engineering University of Cyprus
COMPUTER ARCHITECTURE & OPERATIONS I
COMP541 Datapaths I Montek Singh Mar 28, 2012.
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
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.
CS/COE0447 Computer Organization & Assembly Language
MISP Assembly.
Review of Aldec Active HDL Implementing Combinational
Mano and Kime Sections 7-6 – 7-8
ECE232: Hardware Organization and Design
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
COMS 361 Computer Organization
ECE 448 Lab 1 Developing Effective Testbenches
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
Sequential Logic for Synthesis Based on Aldec Active-HDL
COMP541 Datapaths I Montek Singh Mar 18, 2010.
Implementing Combinational and Sequential Logic in VHDL
Data Flow Description of Combinational-Circuit Building Blocks
Single Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Logical instructions And rd rs rt Nor rd rs rt Or rd rs rt
Modeling of Circuits with a Regular Structure
MIPS Assembly.
CS/COE0447 Computer Organization & Assembly Language
Implementing Combinational
Logical Instructions And rd rs rt Nor rd rs rt Or rd rs rt
The Processor: Datapath & Control.
4-Input Gates VHDL for Loops
Digital Logic with VHDL
Presentation transcript:

ECE 448 – FPGA and ASIC Design with VHDL George Mason University ECE 448 Lab 1 Implementing Combinational Logic in VHDL

Part 1: General Lab Rules Part 2: Introduction to Experiment 1: ALU of MIPS Part 3: Hands-on Session: Simulation and Synthesis in the Aldec Active HDL Environment Agenda for today

Part 1 General Lab Rules

See the Rules posted at the Course Web Page. Follow this link.this link

Part 2 Introduction to Experiment 1 ALU of MIPS

Overview of MIPS datapath Source: Source:

MIPS overview 32 bit addresses 32 registers/5 bit register addresses 3 basic types of instructions  Register (R) -type  Immediate (I)-type  Jump (J)-type

R-type Instruction Format opcode: 6 bit field identifying the instruction. For all R-type instructions field is “000000”. Rs: 5 bit field identifying the first source register for the operation. Rt: 5 bit field identifying the second source register. Rd: 5 bit field identifying the destination register for the operation. shamt: the shift amount for any shift operation. func: A more specific function operation code, i.e., add, subtract. opcodeRsRtRdshamtfunc

I-type Instruction Format opcode: 6 bit field identifying the instruction. Rs: 5 bit field identifying the source register for the operation. Rt: 5 bit field identifying the destination register. Imm: 16 bit immediate value for this operation. opcodeRsRtImm

J-type Instruction Format opcode: 6 bit field identifying the instruction; either 0x02 (JUMP) or 0x03 (Jump And Link, JAL) address: 26 bit address to jump to opcodeaddress

Instructions to Implement Required R-type ADD AND OR SUB XOR SLT (Set Less Than) SLTU (Set Less Than Unsigned) I-Type ADDI ANDI ORI

Instructions to Implement Extra Credit R-type SLL (Shift Left Logical) SRL (Shift Right Logical) SLLV (Shift Left Logical Variable) SRLV (Shift Right Logical Variable)

Block Diagram Behavioral

Required Tasks Example of a Similar Problem 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

Unsigned and Signed Arithmetic in VHDL

19ECE 448 – FPGA and ASIC Design with VHDL Operations on Unsigned Numbers For operations on unsigned numbers USE ieee.numeric_std.all and signals of the type UNSIGNED and conversion functions: std_logic_vector(), unsigned() OR USE ieee.std_logic_unsigned.all and signals of the type STD_LOGIC_VECTOR (recommended) (permitted)

20ECE 448 – FPGA and ASIC Design with VHDL Operations on Signed Numbers For operations on signed numbers USE ieee.numeric_std.all, signals of the type SIGNED, and conversion functions: std_logic_vector(), signed() OR USE ieee.std_logic_signed.all and signals of the type STD_LOGIC_VECTOR (recommended) (permitted)

21ECE 448 – FPGA and ASIC Design with VHDL Signed and Unsigned Types Behave exactly like STD_LOGIC_VECTOR plus, they determine whether a given vector should be treated as a signed or unsigned number. Require USE ieee.numeric_std.all;

22ECE 448 – FPGA and ASIC Design with VHDL Multiplication of unsigned numbers LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_unsigned.all ; entity multiply is port( a : in STD_LOGIC_VECTOR(7 downto 0); b : in STD_LOGIC_VECTOR(7 downto 0); c : out STD_LOGIC_VECTOR(15 downto 0) ); end multiply; architecture dataflow of multiply is c <= a * b; end dataflow;

23ECE 448 – FPGA and ASIC Design with VHDL Multiplication of signed numbers LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_signed.all ; entity multiply is port( a : in STD_LOGIC_VECTOR(7 downto 0); b : in STD_LOGIC_VECTOR(7 downto 0); c : out STD_LOGIC_VECTOR(15 downto 0) ); end multiply; architecture dataflow of multiply is c <= a * b; end dataflow;

24ECE 448 – FPGA and ASIC Design with VHDL Multiplication of signed and unsigned numbers LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.numeric_std.all ; entity multiply is port( a : in STD_LOGIC_VECTOR(7 downto 0); b : in STD_LOGIC_VECTOR(7 downto 0); cu : out STD_LOGIC_VECTOR(15 downto 0); cs : out STD_LOGIC_VECTOR(15 downto 0) ); end multiply; architecture dataflow of multiply is begin -- signed multiplication cs <= STD_LOGIC_VECTOR(SIGNED(a)*SIGNED(b)); -- unsigned multiplication cu <= STD_LOGIC_VECTOR(UNSIGNED(a)*UNSIGNED(b)) end dataflow;

Extra Credit Example of a Similar Problem Variable Rotator

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

Interface A B C

Block diagram C

Fixed Rotation in VHDL A(3) A(2) A(1) A(0) A(2)A(1)A(0)A(3) A<<<1 SIGNAL A : STD_LOGIC_VECTOR(3 DOWNTO 0); SIGNAL ArotL: STD_LOGIC_VECTOR(3 DOWNTO 0); ArotL <= A(2 downto 0) & A(3); ArotL A

Part 3 Hands-on Session Simulation and Synthesis in the Aldec Active HDL Environment

Example for the Hands-on Session MLU Block Diagram B A NEG_A NEG_B IN0 IN1 IN2 IN3 OUTPUT SEL1 SEL0 MUX_4_1 L0L1 NEG_Y Y Y1 A1 B1 MUX_0 MUX_1 MUX_2 MUX_