RTL Design Methodology Transition from Pseudocode & Interface

Slides:



Advertisements
Similar presentations
Tutorial 2 Sequential Logic. Registers A register is basically a D Flip-Flop A D Flip Flop has 3 basic ports. D, Q, and Clock.
Advertisements

Table 7.1 Verilog Operators.
Give qualifications of instructors: DAP
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
4/10/20081 Lab 9 RT methodology introduction Register operations Data Path Control Path ASM Example TA: Jorge Crichigno.
Lab 10 RT methodology (cont’d) Example 1 – a counter Example 2 – a repetitive-adder multiplier.
George Mason University ECE 448 – FPGA and ASIC Design with VHDL Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts,
ECE 545 Project 1 Part IV Key Scheduling Final Integration List of Deliverables.
Lecture 9 RTL Design Methodology Sorting Example.
George Mason University Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code ECE 448 Lecture 6.
Digital Logic Design.
Lecture 9 RTL Design Methodology. Structure of a Typical Digital System Datapath (Execution Unit) Controller (Control Unit) Data Inputs Data Outputs Control.
RTL Design Methodology Transition from Pseudocode & Interface
Lecture 5B Block Diagrams HASH Example.
Lecture 3 RTL Design Methodology Transition from Pseudocode & Interface to a Corresponding Block Diagram.
IAY 0600 Digital Systems Design Register Transfer Level Design (GCD example) Lab. 7 Alexander Sudnitson Tallinn University of Technology.
Lecture 13 PicoBlaze I/O & Interrupt Interface Example of Assembly Language Routine ECE 448 – FPGA and ASIC Design with VHDL.
CDA 4253 FPGA System Design RTL Design Methodology 1 Hao Zheng Comp Sci & Eng USF.
1 ECE 545 – Introduction to VHDL Algorithmic State Machines Sorting Example ECE 656 Lecture 8.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
George Mason University Design of Controllers using Algorithmic State Machine (ASM) Charts ECE 545 Lecture 12.
ECE 545 Project 1 Introduction & Specification Part I.
George Mason University Finite State Machines Refresher ECE 545 Lecture 11.
Implementing Combinational
Class Exercise 1B.
RTL Design Methodology Transition from Pseudocode & Interface
Digital Electronics Multiplexer
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
Hash Function Performance Metrics
Hao Zheng Comp Sci & Eng USF
IAY 0600 Digital Systems Design
Basics of digital systems
Digital Electronics Multiplexer
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
IAY 0600 Digital Systems Design
RTL Design Methodology
RTL Design Methodology
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic ECE 448 – FPGA and ASIC Design with VHDL.
Implementing Combinational and Sequential Logic in VHDL
RTL Design Methodology
Lecture 18 SORTING in Hardware.
ECE 448: Spring 2015 Lab 3 FPGA Design Flow Based on Aldec Active-HDL.
ECE 448: Spring 2018 Lab 3 – Part 2 FPGA Design Flow Based on
ECE 545 Lecture 12 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 10 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 9 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
ECE 545 Lecture 11 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts.
RTL Design Methodology Transition from Pseudocode & Interface
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
IAS 0600 Digital Systems Design
ECE 545 Remaining Tasks.
Lecture 13 PicoBlaze I/O & Interrupt Interface
Data Flow Description of Combinational-Circuit Building Blocks
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code.
RTL Design Methodology
RTL Design Methodology
RTL Design Methodology
RTL Design Methodology Transition from Pseudocode & Interface
RTL Design Methodology
ECE 448 Lecture 6 Finite State Machines State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL code ECE 448 – FPGA and ASIC Design.
RTL Design Methodology
RTL Design Methodology
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
ECE 448 Lab 3 – Part 1 FPGA Design Flow Based on
ECE 448: Spring 2018 Lab 3 – Part 2 Design of Controllers
RTL Design Methodology
Presentation transcript:

RTL Design Methodology Transition from Pseudocode & Interface Lecture 3 RTL Design Methodology Transition from Pseudocode & Interface to a Corresponding Block Diagram

Structure of a Typical Digital System Data Inputs Control & Status Inputs Control Signals Datapath (Execution Unit) Controller (Control Unit) Status Signals Data Outputs Control & Status Outputs

Hardware Design with RTL VHDL Pseudocode Interface Datapath Controller ASM chart Block diagram VHDL code VHDL code

Steps of the Design Process Text description Interface Pseudocode Block diagram of the Datapath Interface divided into Datapath and Controller ASM chart of the Controller RTL VHDL code of the Datapath, Controller, and Top-Level Unit Testbench for the Datapath, Controller, and Top-Level Unit Functional simulation and debugging Synthesis and post-synthesis simulation Implementation and timing simulation Experimental testing using FPGA board

Steps of the Design Process Introduced in Class Today Text description Interface Pseudocode Block diagram of the Datapath Interface divided into Datapath and Controller ASM chart of the Controller RTL VHDL code of the Datapath, Controller, and Top-level Unit Testbench for the Datapath, Controller, and Top-Level Unit Functional simulation and debugging Synthesis and post-synthesis simulation Implementation and timing simulation Experimental testing using FPGA board

Class Exercise 1 STATISTICS

Pseudocode no_1 = no_2 = no_3 = sum = 0 for i=0 to k-1 do sum = sum + din if din > no_1 then no_3 = no_2 no_2 = no_1 no_1 = din elseif (din > no_2) then no_2 = din elseif (din > no_3) then no_3 = din end if end for avr = sum / k

Circuit Interface n 2 clk reset din go done dout dout_mode Statistics

Interface Table Port Width Meaning clk 1 System clock. reset System reset. din n Input Data. go Control signal indicating that the first input is ready. Active for one clock cycle. done Signal set to high after the output is ready. dout Output dependent on the dout_mode input. dout_mode 2 Control signal determining value available at the output. 00: avr, 01: no_1, 10: no_2, 11: no_3.

STATISTICS: Solutions

Block diagram of the Datapath din n n n en1 en reset rst n+m clk clk A gt1 n+m no_1 A>B n esum en reset n B rst clk clk 1 s2 sum n+m en2 enc en reset en reset rst rst clk clk clk clk A gt2 no_2 m A>B n+m n n B i 1 s3 >> m = k-1 en3 en reset rst n clk clk A gt3 avr A>B n no_3 zi no_1 no_2 no_3 B n n n dout_mode 00 01 10 11 2 n dout Block diagram of the Datapath

Interface with the division into the Datapath and Controller dout_mode din clk reset go n 2 gt1 gt2 gt3 Datapath Controller zi en1 en2 en3 esum enc s2 s3 n dout done

Class Exercise 2 CIPHER

Pseudocode Split input I into four words, I3, I2, I1, I0, of the size of w bits each A = I3; B = I2; C = I1; D=I0 B = B + S[0] D = D + S[1] for i = 1 to r do { T = (B*(2B + 1)) <<< k U = (D*(2D + 1)) <<< k A = ((A ⊕ T) <<< U) + S[2i] C = ((C ⊕ U) <<< T) + S[2i + 1] (A, B, C, D) = (B, C, D, A) } A = A + S[2r + 2] C = C + S[2r + 3] O = (A, B, C, D)

Notation w: word size, e.g., w=8 (constant) k: log2(w) (constant) A, B, C, D, U, T: w-bit variables I3, I2, I1, I0: Four w-bit words of the input I r: number of rounds (constant) O: output of the size of 4w bits S[j] : 2r+4 round keys stored in two RAMs. Each key is a w-bit word. The first RAM stores values of S[j=2i], i.e., only round keys with even indices. The second memory stores values of S[j=2i+1], i.e., only round keys with odd indices.

Operations ⊕ : XOR + : addition modulo 2w – : subtraction modulo 2w * : multiplication modulo 2w X <<< Y : rotation of X to the left by the number of positions given in Y X >>> Y : rotation of X to the right by the number of positions (A, B, C, D) : Concatenation of A, B, C, and D.

Circuit Interface CIPHER clk reset O I write_I DONE Sj Write_Sj j 4w m

Interface Table Note: m is a size of index j. It is a minimum integer, such that 2m -1  2r+3.

Protocol (1) An external circuit first loads all round keys S[0], S[1], S[2], …, S[2r+2], [2r+3] to the two internal memories of the CIPHER unit. The first memory stores values of S[j=2i], i.e., only round keys with even indices. The second memory stores values of S[j=2i+1], i.e. only round keys with odd indices. Loading round keys is performed using inputs: Sj, j, write_Sj, clk. Then, the external circuits, loads an input block I to the CIPHER unit, using inputs: I, write_I, clk. After the input block I is loaded to the CIPHER unit, the encryption starts automatically.

Protocol (2) When the encryption is completed, signal DONE becomes active, and the output O changes to the new value of the ciphertext. The output O keeps the last value of the ciphertext at the output, until the next encryption is completed. Before the first encryption is completed, this output should be equal to zero.

Assumptions • 2r+4 clock cycles are used to load round keys to internal RAMs one round of the main for loop of the pseudocode executes in one clock cycle • you can access only one position of each internal memory of round keys per clock cycle As a result, the encryption of a single input block I should last r+2 clock cycles.

Typical Internal Structure of a Secret-Key Block Cipher Round Key[0] Initial Transformation i:=1 Round Key[i] Cipher Round i:=i+1 #rounds times i<#rounds? Round Key[#rounds+1] Final Transformation

(no Initial Transformation, no Final Transformation) Basic iterative architecture (no Initial Transformation, no Final Transformation) input multiplexer register round key combinational logic one round output

CIPHER: Solutions

Multiplication mod 2w

Variable Rotation X<<<Y

=2D+1

Memories of Round Keys – Contents Case of r=2

Memories of Round Keys – Circuit S2i

Counter

Interface with the Division into the Datapath and Controller