ECE 545 Lecture 11 Addendum
|
|
- Giles Marshall
- 6 years ago
- Views:
Transcription
1 ECE 545 Lecture 11 Addendum Controllers for Keccak_F and AES George Mason University
2 ECE 448 FPGA and ASIC Design with VHDL Keccak_F
3 1600 din start done Keccak_F rst 1600 dout ready
4 Note: Bold line represents a 1600 bit bus unless specified otherwise din round sel_in RC ROM rin Round en_in rc 64 rout dout
5 din key clk rst start din key start Keccak_F Datapath dout en_in sel_in round 5 rst en_in sel_in round ready Keccak_F Control done dout ready done Note: Bold line represents a 1600 bit bus unless specified otherwise
6 rst RESET WAIT_START round = 0 ready DONE done ready round = 0 N start? Y sel_in en_in N PROCESS Y round= RNDS 1? en_in Note: RNDS=G_ROUNDS round++
7 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity Keccak_F_Control is generic ( G_RNDS : integer := 24 --! Number of round_rs for the permutation ); port ( --! Global signals clk : in std_logic; rst : in std_logic; --! External signals start : in std_logic; --! Start signal ready : out std_logic; --! Ready signal done : out std_logic; --! Done signal --! Internal signals round : out std_logic_vector(4 downto 0); sel_in : out std_logic; en_in : out std_logic ); end Keccak_F_Control;
8 architecture behav of Keccak_F_Control is type type_state is (S_RESET, S_WAIT_START, S_PROCESS, S_DONE); signal state : type_state; signal state_next : type_state; signal round_r : std_logic_vector(4 downto 0); signal round_next : std_logic_vector(4 downto 0); begin pctrl: process( clk ) begin if rising_edge( clk ) then if rst = '1' then state <= S_RESET; round_r <= (others => '0'); else state <= state_next; round_r <= round_next; end process; round <= round_r;
9 pcomb: process(state, round_r, start) begin --! Default values state_next <= state; round_next <= round_r; ready <= '0'; sel_in <= '0'; en_in <= '0'; done <= '0'; case state is when S_RESET => round_next <= (others => '0'); state_next <= S_WAIT_START; when S_WAIT_START => ready <= '1'; if (start = '1') then en_in <= '1'; sel_in <= '1'; round_next <= round_r + 1; state_next <= S_PROCESS;
10 when S_PROCESS => en_in <= '1'; if (round_r = G_RNDS-1) then round_next <= (others => '0'); state_next <= S_DONE; else round_next <= round_r + 1; when S_DONE => done <= '1'; ready <= '1'; if (start = '1') then en_in <= '1'; sel_in <= '1'; round_next <= round_r + 1; state_next <= S_PROCESS; else state_next <= S_WAIT_START; end case; end process; end behav;
11 AES_Enc ECE 448 FPGA and ASIC Design with VHDL 11
12 start din key done init done_init rst AES_Enc 128 dout ready
13 Note: Bold line represents a 128 bit bus unless specified otherwise din 0 1 din Round sel_in en_in rkey key we dout en_fkey wr_rkey RAM din addr 0 1 sel_fkey ki KeyUpdate dout_fdb dout en_rkey round round ko dout
14 din key clk rst init start din key init start Enc Datapath 128 dout dout en_rkey wr_rkey en_fkey sel_fkey en_in sel_in round Note: Bold line represents a 128 bit bus unless specified otherwise 4 rst en_rkey wr_rkey en_fkey sel_fkey en_in sel_in round ready Enc Control done_init done ready done done_init
15 rst RESET round = 0 done_init_s round=0 WAIT_START ready done_s round=0 N Y round=0? N Y round= RNDS 1? init? Y N N start? Y N Y round= RNDS 1? sel_fkey en_fkey INIT round++ wr_rkey Note: Output of "done" and "done_init" signals are registered. RNDS = G_ROUNDS sel_in en_in en_rkey PROCESS en_rkey en_in round++
16 Registered Outputs done_s and done_init_s are outputs of the Mealy type done and done_init are the corresponding outputs of the Moore type done and done_init become ac7ve at the rising edge of the clock if done_s and done_init_s are already ac7ve when this edge happens Pulses at the outputs done_s and done_init_s last for a frac7on of a clock period. Pulses at the outputs done and done_init last for the en7re following clock period.
17 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; use work.aes_pkg.all; entity AES_Enc_Control is generic ( G_RNDS : integer := AES_ROUNDS); port( clk : in std_logic; rst : in std_logic; start : in std_logic; init : in std_logic; sel_fkey : out std_logic; en_fkey : out std_logic; en_rkey : out std_logic; wr_rkey : out std_logic; round : out std_logic_vector(3 downto 0); sel_in : out std_logic; en_in : out std_logic; ready : out std_logic; done : out std_logic; done_init : out std_logic); end AES_Enc_Control;
18 architecture behav of AES_Enc_Control is type t_state is (S_RESET, S_WAIT_START, S_INIT, S_PROCESS); signal state : t_state; signal state_next : t_state; signal round_r : std_logic_vector(3 downto 0); signal round_next : std_logic_vector(3 downto 0); signal done_s : std_logic; signal done_init_s : std_logic; begin p_fsm: process(clk) begin if rising_edge(clk) then if (rst = '1') then state <= S_RESET; else state <= state_next; round_r <= round_next; done <= done_s; done_init <= done_init_s; end process; round <= round_r;
19 p_comb: process(state, round_r, init, start) begin --! Default values state_next <= state; round_next <= round_r; ready <= '0'; en_fkey <= '0'; wr_rkey <= '0'; sel_fkey <= '0'; sel_in <= '0'; en_in <= '0'; en_rkey <= '0'; done_init_s <= '0'; done_s <= '0'; case state is when S_RESET => state_next <= S_WAIT_START; round_next <= (others => '0');
20 when S_WAIT_START => ready <= '1'; if (init = '1') then en_fkey <= '1'; state_next <= S_INIT; elsif (start = '1') then sel_in <= '1'; en_in <= '1'; en_rkey <= '1'; round_next <= round_r + 1; state_next <= S_PROCESS; when S_INIT => wr_rkey <= '1'; if (round_r = G_RNDS-1) then round_next <= (others => '0'); done_init_s <= '1'; state_next <= S_WAIT_START; else if (round_r = 0) then sel_fkey <= '1'; round_next <= round_r + 1;
21 when S_PROCESS => en_rkey <= '1'; en_in <= '1'; if (round_r = G_RNDS-1) then round_next <= (others => '0'); done_s <= '1'; state_next <= S_WAIT_START; else round_next <= round_r + 1; end case; end process; end behav;
22 Advanced Coding Style for the Datapath Note: Bold line represents a 128 bit bus unless specified otherwise din 0 1 din Round sel_in en_in rkey key we dout en_fkey wr_rkey RAM din addr 0 1 sel_fkey ki KeyUpdate dout_fdb dout en_rkey round round ko dout
23 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use work.aes_pkg.all; entity AES_Enc_Datapath is port( clk : in std_logic; rst : in std_logic; din : in t_aes_state; key : in t_aes_state; dout : out t_aes_state; sel_fkey : in std_logic; en_fkey : in std_logic; en_rkey : in std_logic; wr_rkey : in std_logic; round : in std_logic_vector(3 downto 0); sel_in : in std_logic; en_in : in std_logic); end AES_Enc_Datapath;
24 architecture structure of AES_Enc_Datapath is signal from_reg : t_aes_state; signal from_round_fdb : t_aes_state; signal ki_state : t_aes_state; signal ko_state : t_aes_state; signal fkey : t_aes_state; signal rkey_state : t_aes_state; signal ko_reg : t_aes_state; signal ko : std_logic_vector(aes_block_size-1 downto 0); signal rkey : std_logic_vector(aes_block_size-1 downto 0); type t_key_ram is array (0 to 15) of std_logic_vector(aes_block_size-1 downto 0); signal key_ram : t_key_ram; begin u_inv_ko: entity work.aes_invmap(structure) port map ( ii => ko_state, oo => ko); u_map_rkey: entity work.aes_map(structure) port map ( ii => rkey, oo => rkey_state);
25 p_reg: process(clk) begin if rising_edge(clk) then if en_in = '1' then if sel_in = '1' then for i in 0 to 3 loop for j in 0 to 3 loop from_reg(j,i) <= din(j,i) xor fkey(j,i); end loop; end loop; else from_reg <= from_round_fdb; if en_fkey = '1' then fkey <= key;
26 if wr_rkey = '1' then key_ram(to_integer(unsigned(round))) <= ko; ko_reg <= ko_state; if en_rkey = '1' then rkey <= key_ram(to_integer(unsigned(round))); end process;
27 u_round: entity work.aes_round(basic) port map ( din => from_reg, rkey => rkey_state, dout_fdb => from_round_fdb, dout => dout); --! Key Expansion ki_state <= fkey when sel_fkey = '1' else ko_reg; u_keyexp: entity work.aes_keyupdate(key_size_128) port map ( round => round, ki => ki_state, ko => ko_state); end structure;
28 ECE 448 FPGA and ASIC Design with VHDL AES_EncDec
29 128 din start decrypt init 128 key done done_init AES_EncDec rst ready dout 128
30 KeyUpdate round ko ki din en_fkey 4 sel_fkey 1 0 round Note: Bold line represents a 128 bit bus unless specified otherwise key en_lkey sel_in round invround 4 4 en_in 0 1 din Round rkey rkey din Inv Round din addr RAM we dout sel_round wr_rkey dout_fdb dout dout dout_fdb en_rkey 0 1 sel_decrypt dout
31 din key rst clk start init decrypt din key start init decrypt EncDec Datapath sel_decrypt invround round sel_round sel_in en_in en_rkey wr_rkey en_lkey en_fkey sel_fkey dout 128 dout rst sel_decrypt invround round sel_round sel_in en_in en_rkey wr_rkey en_lkey en_fkey sel_fkey ready done_init Note: Bold line represents a 128 bit bus unless specified otherwise EncDec Control done ready done done_init
32 rst round++ en_lkey N N INIT_KEY round = 1 done_init_s Y round= RNDS? sel_fkey Y round = 0? wr_rkey RESET WAIT_START round = 1 invround=rnds 1 ready init? Y round = 0 en_lkey en_fkey Note: Output of "done" and "done_init" signals are registered. RNDS = G_ROUNDS N start? decrypt_r = decrypt sel_in=2 en_in en_rkey decrypt? N N Y Y round = 1 invround=rnds 1 done_s sel_round sel_fkey Y round= RNDS? N N PROCESS round++ invround sel_round sel_in=1 Y decrypt_r? en_rkey en_in
33 Using a Pulse to Store the Current Value of an Input decrypt is an input to FSM that lasts for just one clock cycle we store its value for future use in the register decrypt_r, as represented in the ASM chart using the ac7on decrypt_r = decrypt in order to perform this ac7on in the VHDL code, the assignment decrypt_r = decrypt is represented as an ac7ve value of the enable signal of the register decrypt_r, called en_decrypt_s
34 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; use work.aes_pkg.all; entity AES_EncDec_Control is generic ( G_RNDS : integer := AES_ROUNDS); port( clk : in std_logic; rst : in std_logic; --! Internal sel_decrypt : out std_logic; invround : out std_logic_vector(3 downto 0); round : out std_logic_vector(3 downto 0); en_rkey : out std_logic; wr_rkey : out std_logic; en_fkey : out std_logic; en_lkey : out std_logic; sel_fkey : out std_logic; sel_round : out std_logic; sel_in : out std_logic_vector(1 downto 0); en_in : out std_logic;
35 --! External init : in std_logic; done_init : out std_logic; start : in std_logic; decrypt : in std_logic; ready : out std_logic; done : out std_logic); end AES_EncDec_Control;
36 architecture behav of AES_EncDec_Control is --! Internal Registers type t_state is (S_RESET, S_WAIT_START, S_INIT_KEY, S_PROCESS); signal state : t_state; signal state_next : t_state; signal round_r : std_logic_vector(3 downto 0); signal round_next : std_logic_vector(3 downto 0); signal invround_r : std_logic_vector(3 downto 0); signal invround_next : std_logic_vector(3 downto 0); signal decrypt_r : std_logic; signal done_r : std_logic; signal done_init_r : std_logic; --! Internal signals signal en_decrypt_s signal done_s signal done_init_s : std_logic; : std_logic; : std_logic;
37 begin p_fsm: process(clk) begin if rising_edge(clk) then if (rst = '1') then state <= S_RESET; else state <= state_next; if (en_decrypt_s = '1') then decrypt_r <= decrypt; round_r <= round_next; invround_r <= invround_next; done_init_r <= done_init_s; done_r <= done_s; end process; round <= round_r; invround <= invround_r; sel_decrypt <= decrypt_r; done_init <= done_init_r; done <= done_r;
38 p_comb: process(state, round_r, init, start, decrypt_r, decrypt) begin --! Default values state_next <= state; round_next <= round_r; ready <= '0'; en_lkey <= '0'; en_fkey <= '0'; wr_rkey <= '0'; sel_fkey <= '0'; sel_in <= "00"; en_in <= '0'; sel_round <= '0'; en_rkey <= '0'; en_decrypt_s <= '0'; done_s <= '0'; done_init_s <= '0'; case state is when S_RESET => round_next <= std_logic_vector(to_unsigned(1,4)); invround_next <= std_logic_vector(to_unsigned(g_rnds-1,4)); state_next <= S_WAIT_START;
39 when S_WAIT_START => ready <= '1'; if (init = '1') then round_next <= (others => '0'); en_lkey <= '1'; en_fkey <= '1'; state_next <= S_INIT_KEY; elsif (start = '1') then en_decrypt_s <= '1'; sel_in <= "10"; en_in <= '1'; en_rkey <= '1'; if (decrypt = '1') then sel_round <= '1'; else sel_fkey <= '1'; round_next <= round_r + 1; invround_next <= invround_r - 1; state_next <= S_PROCESS;
40 when S_INIT_KEY => wr_rkey <= '1'; if (round_r = 0) then sel_fkey <= '1'; if (round_r = G_RNDS) then round_next <= std_logic_vector(to_unsigned(1,4)); done_init_s <= '1'; state_next <= S_WAIT_START; else round_next <= round_r + 1; en_lkey <= '1';
41 when S_PROCESS => en_rkey <= '1'; en_in <= '1'; if (decrypt_r = '1') then sel_round <= '1'; sel_in <= "01"; if (round_r = G_RNDS) then round_next <= std_logic_vector(to_unsigned(1,4)); invround_next <= std_logic_vector(to_unsigned(g_rnds-1,4)); done_s <= '1'; state_next <= S_WAIT_START; else round_next <= round_r + 1; invround_next <= invround_r - 1; end case; end process; end behav;
DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6
DIGITAL LOGIC DESIGN VHDL Coding for FPGAs Unit 6 FINITE STATE MACHINES (FSMs) Moore Machines Mealy Machines Algorithmic State Machine (ASM) charts FINITE STATE MACHINES (FSMs) Classification: Moore Machine:
More informationECE 545 Lecture 12. Datapath vs. Controller. Structure of a Typical Digital System Data Inputs. Required reading. Design of Controllers
ECE 545 Lecture 12 Design of Controllers Finite State Machines and Algorithmic State Machine (ASM) Charts Required reading P. Chu, using VHDL Chapter 1, Finite State Machine: Principle & Practice Chapter
More informationCSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014
CSE 260 Introduction to Digital Logic and Computer Design Jonathan Turner Exam 1 Your name 2/13/2014 1. (10 points) Draw a logic diagram that implements the expression A(B+C)(C +D)(B+D ) directly (do not
More informationSign here to give permission for your test to be returned in class, where others might see your score:
EEL 4712 Midterm 2 Spring 216 VERSION 1 Name: UFID: Sign here to give permission for your test to be returned in class, where others might see your score: IMPORTANT: Please be neat and write (or draw)
More informationTiming in synchronous systems
BO 1 esign of sequential logic Outline Timing in synchronous networks Synchronous processes in VHL VHL-code that introduces latches andf flip-flops Initialization of registers Mealy- and Moore machines
More informationIn our case Dr. Johnson is setting the best practices
VHDL Best Practices Best Practices??? Best practices are often defined by company, toolset or device In our case Dr. Johnson is setting the best practices These rules are for Class/Lab purposes. Industry
More informationSequential Statement
Sequential Statement Sequential Logic Output depends not only on current input values but also on previous input values. Are building blocks of; Counters Shift registers Memories Flip flops are basic sequential
More informationECE 545 Lecture 8. Data Flow Description of Combinational-Circuit Building Blocks. George Mason University
ECE 545 Lecture 8 Data Flow Description of Combinational-Circuit Building Blocks George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 7, Combinational Circuit Design:
More informationDIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6
DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6 FINITE STATE MACHINES (FSMs) Moore Machines Mealy Machines FINITE STATE MACHINES (FSMs) Classification: Moore Machine: Outputs depend only on the current state
More informationECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. George Mason University
ECE 545 Lecture 6 Behavioral Modeling of Sequential-Circuit Building Blocks George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 5.1, VHDL Process Chapter 8, Sequential
More informationVHDL: Modeling RAM and Register Files. Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2
VHDL: Modeling RAM and Register Files Textbook Chapters: 6.6.1, 8.7, 8.8, 9.5.2, 11.2 Memory Synthesis Approaches: Random logic using flip-flops or latches Register files in datapaths RAM standard components
More informationThe University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution Spring 2016
The University of Alabama in Huntsville ECE Department CPE 526 01 Midterm Exam Solution Spring 2016 1. (15 points) Write a VHDL function that accepts a std_logic_vector of arbitrary length and an integer
More informationECE 545: Lecture 11. Programmable Logic Memories
ECE 545: Lecture 11 Programmable Logic Memories Recommended reading Vivado Design Suite User Guide: Synthesis Chapter 4 RAM HDL Coding Techniques Initializing RAM Contents 7 Series FPGAs Memory Resources:
More informationECE 545: Lecture 11. Programmable Logic Memories. Recommended reading. Memory Types. Memory Types. Memory Types specific to Xilinx FPGAs
ECE 545: Lecture 11 Programmable Logic Memories Recommended reading Vivado Design Suite User Guide: Synthesis Chapter 4 RAM HDL Coding Techniques Initializing RAM Contents 7 Series FPGAs Resources: User
More informationSchedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a
ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 8, 2006 Midterm Average: 70 Lecture 16: Midterm Solutions Homework 6: Calculator Handshaking HW 6: Due Wednesday, November
More informationECE 545 Lecture 17 RAM. George Mason University
ECE 545 Lecture 17 RAM George Mason University Recommended reading XST User Guide for Virtex-6, Spartan-6, and 7 Series Devices Chapter 7, HDL Coding Techniques [ UG687 (v 14.5) March 20, 2013 ] Sections:
More informationFSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques
FSM Components XST features: Specific inference capabilities for synchronous Finite State Machine (FSM) components. Built-in FSM encoding strategies to accommodate your optimization goals. You may also
More informationSummary of FPGA & VHDL
FYS4220/9220 Summary of FPGA & VHDL Lecture #6 Jan Kenneth Bekkeng, University of Oslo - Department of Physics 16.11.2011 Curriculum (VHDL & FPGA part) Curriculum (Syllabus) defined by: Lectures Lecture6:
More informationECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles
ECE 448 Lecture 4 Sequential-Circuit Building Blocks Mixing Description Styles George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 4, Regular Sequential Circuit Recommended
More informationECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 3, RT-level
More informationCSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions
CSE 6 Introduction to igital Logic and Computer esign Exam Solutions Jonathan Turner /3/4. ( points) raw a logic diagram that implements the expression (B+C)(C +)(B+ ) directly (do not simplify first),
More informationVHDL And Synthesis Review
VHDL And Synthesis Review VHDL In Detail Things that we will look at: Port and Types Arithmetic Operators Design styles for Synthesis VHDL Ports Four Different Types of Ports in: signal values are read-only
More informationECE 448 Lecture 3. Combinational-Circuit Building Blocks. Data Flow Modeling of Combinational Logic
ECE 448 Lecture 3 Combinational-Circuit Building Blocks Data Flow Modeling of Combinational Logic George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 3, RT-level
More informationECE 699: Lecture 9. Programmable Logic Memories
ECE 699: Lecture 9 Programmable Logic Memories Recommended reading XST User Guide for Virtex-6, Spartan-6, and 7 Series Devices Chapter 7, HDL Coding Techniques Sections: RAM HDL Coding Techniques ROM
More informationECE 545 Lecture 4. Simple Testbenches. George Mason University
ECE 545 Lecture 4 Simple Testbenches George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 2.2.4, Testbenches 2 Testbenches ECE 448 FPGA and ASIC Design with VHDL 3 Testbench
More informationECE 545 Lecture 12. FPGA Resources. George Mason University
ECE 545 Lecture 2 FPGA Resources George Mason University Recommended reading 7 Series FPGAs Configurable Logic Block: User Guide Overview Functional Details 2 What is an FPGA? Configurable Logic Blocks
More informationCprE 583 Reconfigurable Computing
Recap Moore FSM Example CprE / ComS 583 Reconfigurable Computing Moore FSM that recognizes sequence 10 0 1 0 1 S0 / 0 S1 / 0 1 S2 / 1 Prof. Joseph Zambreno Department of Electrical and Computer Engineering
More informationSequential Logic - Module 5
Sequential Logic Module 5 Jim Duckworth, WPI 1 Latches and Flip-Flops Implemented by using signals in IF statements that are not completely specified Necessary latches or registers are inferred by the
More informationLecture 08 Finite State Machine Design Using VHDL
Lecture 08 Finite State Machine Design Using VHDL 10/1/2006 ECE 358: Introduction to VHDL Lecture 8-1 Today Sequential digital logic system design state diagram/state graph 10/1/2006 ECE 358: Introduction
More informationCOVER SHEET: Total: Regrade Info: 5 (5 points) 2 (8 points) 6 (10 points) 7b (13 points) 7c (13 points) 7d (13 points)
EEL 4712 Midterm 2 Spring 2011 VERSION 1 Name: UFID: Sign your name here if you would like for your test to be returned in class: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read
More informationSEQUENTIAL STATEMENTS
SEQUENTIAL STATEMENTS Sequential Statements Allow to describe the behavior of a circuit as a sequence of related events Can be used to model, simulate and synthesize: Combinational logic circuits Sequential
More informationCOVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID:
EEL 4712 Midterm 1 Spring 2012 VERSION 1 Name: UFID: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. As always, the best answer
More informationVHDL in 1h. Martin Schöberl
VHDL in 1h Martin Schöberl VHDL /= C, Java, Think in hardware All constructs run concurrent Different from software programming Forget the simulation explanation VHDL is complex We use only a small subset
More informationECE 459/559 Secure & Trustworthy Computer Hardware Design
ECE 459/559 Secure & Trustworthy Computer Hardware Design VHDL Overview Garrett S. Rose Spring 2016 Recap Public Key Encryption (PKE) RSA (Rivest, Shamir and Adelman) Encryption Advanced Encryption Standard
More informationSynthesis from VHDL. Krzysztof Kuchcinski Department of Computer Science Lund Institute of Technology Sweden
Synthesis from VHDL Krzysztof Kuchcinski Krzysztof.Kuchcinski@cs.lth.se Department of Computer Science Lund Institute of Technology Sweden March 23, 2006 Kris Kuchcinski (LTH) Synthesis from VHDL March
More informationLecture 12 VHDL Synthesis
CPE 487: Digital System Design Spring 2018 Lecture 12 VHDL Synthesis Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 1 What is Synthesis?
More informationThe University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution
5.3(a)(2), 5.6(c)(2), 5.2(2), 8.2(2), 8.8(2) The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 25 Homework #6 Solution 5.3 (a) For the following SM chart:
More informationECE 545 Lecture 6. Behavioral Modeling of Sequential-Circuit Building Blocks. Behavioral Design Style: Registers & Counters.
ECE 55 Lecture 6 Behavioral Modeling of Sequential-Circuit Building Blocks Required reading P. Chu, RTL Hardware esign using VHL Chapter 5.1, VHL Process Chapter 8, Sequential Circuit esign: Principle
More informationVHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University
VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University 1 The Wait Statement Syntax wait until condition; Different forms wait until(clk event and clk = 1 ); wait
More informationCounters. Counter Types. Variations. Modulo Gray Code BCD (Decimal) Decade Ring Johnson (twisted ring) LFSR
CE 1911 Counters Counter Types Modulo Gray Code BC (ecimal) ecade Ring Johnson (twisted ring) LFSR Variations Asynchronous / Synchronous Up/own Loadable 2 tj Modulo-n (n = a power of 2) Asynchronous Count
More informationCOE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14
COE 405, Term 062 Design & Modeling of Digital Systems HW# 1 Solution Due date: Wednesday, March. 14 Q.1. Consider the 4-bit carry-look-ahead adder (CLA) block shown below: A 3 -A 0 B 3 -B 0 C 3 4-bit
More informationentity priority is Port ( a,b,c,d : in STD_LOGIC; encoded : out STD_LOGIC_VECTOR(2 downto 0)); end priority;
Примери Приоритетен кодер library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity priority is Port ( a,b,c,d : in STD_LOGIC; encoded : out STD_LOGIC_VECTOR(2 downto 0)); end priority; architecture Behavioral
More informationComputer-Aided Digital System Design VHDL
بس م اهلل الر حم ن الر حی م Iran University of Science and Technology Department of Computer Engineering Computer-Aided Digital System Design VHDL Ramin Rajaei ramin_rajaei@ee.sharif.edu Modeling Styles
More informationExample 58: Traffic Lights
208 Chapter 8 Listing 8.7(cont.) doorlock2_top.vhd btn012
More informationVHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents
VHDL Testbench Tutorial 1 Contents 1 VHDL Testbench 2 Test Bench Syntax 3 Testbench Example: VHDL Code for Up Down Binary Counter 4 VHDL Testbench code for up down binary counter 5 Testbench Waveform for
More informationsearch_chr: ASM chart search_chr search_chr search_chr MEM_ENABLE MEM_WE MEM_ADDRESS MEM_DATAIN MEM_DATAOUT MEM_READY ADDRESS CHAR LEN nfound
ADDRESS CHAR LEN nfound 32 8 6? START READY 32 8 8 MEM_ENABLE MEM_WE MEM_ADDRESS MEM_DATAIN MEM_DATAOUT MEM_READY INIT COUNT
More informationToday. Comments about assignment Max 1/T (skew = 0) Max clock skew? Comments about assignment 3 ASICs and Programmable logic Others courses
Today Comments about assignment 3-43 Comments about assignment 3 ASICs and Programmable logic Others courses octor Per should show up in the end of the lecture Mealy machines can not be coded in a single
More informationVHDL simulation and synthesis
VHDL simulation and synthesis How we treat VHDL in this course You will not become an expert in VHDL after taking this course The goal is that you should learn how VHDL can be used for simulation and synthesis
More informationCS211 Digital Systems/Lab. Introduction to VHDL. Hyotaek Shim, Computer Architecture Laboratory
CS211 Digital Systems/Lab Introduction to VHDL Hyotaek Shim, Computer Architecture Laboratory Programmable Logic Device (PLD) 2/32 An electronic component used to build reconfigurable digital circuits
More informationQuartus Counter Example. Last updated 9/6/18
Quartus Counter Example Last updated 9/6/18 Create a logic design from start to a DE10 implementation This example uses best design practices This example is not about creating HDL The HDL code will be
More informationEECE 353: Digital Systems Design Lecture 10: Datapath Circuits
EECE 353: Digital Systems Design Lecture 10: Datapath Circuits Cristian Grecu grecuc@ece.ubc.ca Course web site: http://courses.ece.ubc.ca/353 Introduction to lecture 10 Large digital systems are more
More informationECE 448 Lecture 13. FPGA Memories. George Mason University
ECE 448 Lecture 13 FPGA Memories George Mason University Recommended reading Spartan-6 FPGA Block RAM Resources: User Guide Google search: UG383 Spartan-6 FPGA Configurable Logic Block: User Guide Google
More informationDesign Examples. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning
Design Examples ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Cengage Learning BCD to 7-Segment Display 418_04 2 BCD to 7-Segment Display entity BCD_Seven is port(bcd: in std_logic_vector(3
More informationControl and Datapath 8
Control and Datapath 8 Engineering attempts to develop design methods that break a problem up into separate steps to simplify the design and increase the likelihood of a correct solution. Digital system
More informationCPE 626 Advanced VLSI Design Lecture 6: VHDL Synthesis. Register File: An Example. Register File: An Example (cont d) Aleksandar Milenkovic
CPE 626 Lecture 6: VHDL Synthesis Aleksandar Milenkovic http://www.ece.uah.edu/~milenka http://www.ece.uah.edu/~milenka/cpe626-04f/ milenka@ece.uah.edu Assistant Professor Electrical and Computer Engineering
More informationAssignment. Last time. Last time. ECE 4514 Digital Design II. Back to the big picture. Back to the big picture
Assignment Last time Project 4: Using synthesis tools Synplify Pro and Webpack Due 11/11 ning of class Generics Used to parameterize models E.g., Delay, bit width Configurations Configuration specification
More informationLecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems
EE 3610: Digital Systems 1 Lecture 4: Modeling in VHDL (Continued ) Sequential Statements Use Process process (sensitivity list) variable/constant declarations Sequential Statements end process; 2 Sequential
More informationLuleå University of Technology Kurskod SMD152 Datum Skrivtid
Luleå University of Technology Kurskod SMD152 Datum 2003-10-24 Skrivtid 9.00 13.00 1 Manual synthesis (10 p, 2 p each) Here you are given five different VHDL models. Your task is to draw the schematics
More informationFPGA.
CMOS TTL Verilog VHDL mshora@yahoo.com 7400. NAND CMOS TTL 1 0 source sink datasheet bounce bounce debunce RS Latch debounce Typical Characteristics NO NC Semiconductor Material Wavelength Colour V F @
More informationECE 545 Lecture 5. Data Flow Modeling in VHDL. George Mason University
ECE 545 Lecture 5 Data Flow Modeling in VHDL George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 4, Concurrent Signal Assignment Statements of VHDL 2 Types of VHDL Description
More informationMidterm Exam Thursday, October 24, :00--2:15PM (75 minutes)
Last (family) name: Answer Key First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Midterm
More informationExample 15: Moving Sprites with Flash Background
Displaying an Image Read from Flash Memory 95 Listing 2.5 (cont.) vga_flash_n2_top.vhd clr
More informationEECE-4740/5740 Advanced VHDL and FPGA Design Lecture 4. Cristinel Ababei Dept. of Electrical and Computer Engr. Marquette University
EECE-4740/5740 Advanced VHDL and FPGA Design Lecture 4 FSM, ASM, FSMD, ASMD Cristinel Ababei Dept. of Electrical and Computer Engr. Marquette University Overview Finite State Machine (FSM) Representations:
More informationVHDL for FPGA Design. by : Mohamed Samy
VHDL for FPGA Design by : Mohamed Samy VHDL Vhdl is Case insensitive myvar = myvar = MYVAR IF = if = if Comments start with -- Comments can exist anywhere in the line Semi colon indicates the end of statements
More informationECE 545 Lecture 7. Advanced Testbenches. George Mason University
ECE 545 Lecture 7 Advanced Testbenches George Mason University Steps of the Design Process 1. Text description 2. Interface 3. Pseudocode 4. Block diagram of the Datapath 5. Interface with the division
More informationEEE8076. Reconfigurable Hardware Design (coursework) Module Outline. Dr A. Bystrov Dr. E.G. Chester. Autumn
EEE8076 Reconfigurable Hardware Design (coursework) Module Outline Dr A. Bystrov Dr. E.G. Chester Autumn 2010 1 2 3 4 5 6 7 8 9 10 11 12 Altera UP2 development board, Flex EPF10K70 FPGA www.altera.com/literature/univ/upds.pdf
More informationThe University of Alabama in Huntsville ECE Department CPE Final Exam Solution Spring 2004
The University of Alabama in Huntsville ECE Department CPE 526 01 Final Exam Solution Spring 2004 1. (15 points) An old Thunderbird car has three left and three right tail lights, which flash in unique
More informationEsempio FSM Description : library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; entity esempiofsm is port ( clk: in STD_LOGIC; p: in STD_LOGIC; reset:
More informationProgrammable Logic. Simple Programmable Logic Devices
Programmable Logic SM098 Computation Structures - Programmable Logic Simple Programmable Logic evices Programmable Array Logic (PAL) AN-OR arrays are common blocks in SPL and CPL architectures Implements
More informationLecture 4. VHDL Fundamentals. George Mason University
Lecture 4 VHDL Fundamentals George Mason University Required reading P. Chu, RTL Hardware Design using VHDL Chapter 3, Basic Language Constructs of VHDL 2 Design Entity ECE 448 FPGA and ASIC Design with
More informationProblem Set 10 Solutions
CSE 260 Digital Computers: Organization and Logical Design Problem Set 10 Solutions Jon Turner thru 6.20 1. The diagram below shows a memory array containing 32 words of 2 bits each. Label each memory
More informationLab 3. Advanced VHDL
Lab 3 Advanced VHDL Lab 3 Advanced VHDL This lab will demonstrate many advanced VHDL techniques and how they can be used to your advantage to create efficient VHDL code. Topics include operator balancing,
More informationECEU530. Schedule. ECE U530 Digital Hardware Synthesis. Datapath for the Calculator (HW 5) HW 5 Datapath Entity
ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 6, 2006 Classes November 6 and 8 are in 429 Dana! Lecture 15: Homework 5: Datapath How to write a testbench for synchronous
More informationDesign Problem 5 Solutions
CS/EE 260 Digital Computers: Organization and Logical Design Design Problem 5 Solutions Jon Turner Due 5/4/04 1. (100 points) In this problem, you will implement a simple shared memory multiprocessor system
More informationGetting Started with VHDL
Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component Entities can be primitive objects or complex objects Architectures are associated
More informationLecture 6. Advanced Testbenches. George Mason University
Lecture 6 Advanced Testbenches George Mason University Required reading Sundar Rajan, Essential VHDL: RTL Synthesis Done Right Chapter 14, starting from Design Verification 2 Steps of the Design Process
More informationTutorial 4 HDL. Outline VHDL PROCESS. Modeling Combinational Logic. Structural Description Instantiation and Interconnection Hierarchy
CS3: Hardware Lab Tutorial 4 HDL Outline VHDL basic language concepts basic design methodology Examples A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati i i i3 i4 Modeling Combinational
More informationEE434 ASIC & Digital Systems
EE434 ASIC & Digital Systems VHDL Sequential Processing Spring 2016 Dae Hyun Kim daehyun@eecs.wsu.edu 1 Sequential Statements Sequential statements are executed sequentially. Format ARCHITECTURE architecture_name
More informationPollard s Tutorial on Clocked Stuff in VHDL
Pollard s Tutorial on Clocked Stuff in VHDL Welcome to a biased view of how to do register type of stuff in VHDL. The object of this short note is to identify one way to easily handle registered logic
More informationVHDL. ELEC 418 Advanced Digital Systems Dr. Ron Hayne. Images Courtesy of Cengage Learning
VHDL ELEC 418 Advanced Digital Systems Dr. Ron Hayne Images Courtesy of Cengage Learning Design Flow 418_02 2 VHDL Modules 418_02 3 VHDL Libraries library IEEE; use IEEE.std_logic_1164.all; std_logic Single-bit
More informationCOE Design Process Tutorial
COE 758 - Design Process Tutorial I. Introduction This tutorial describes a formal design process for the creation of digital systems. The aim of this design process is to provide a systematic approach
More informationCDA 4253 FPGA System Design Op7miza7on Techniques. Hao Zheng Comp S ci & Eng Univ of South Florida
CDA 4253 FPGA System Design Op7miza7on Techniques Hao Zheng Comp S ci & Eng Univ of South Florida 1 Extracted from Advanced FPGA Design by Steve Kilts 2 Op7miza7on for Performance 3 Performance Defini7ons
More informationAltera s Avalon Communication Fabric
Altera s Avalon Communication Fabric Stephen A. Edwards Columbia University Spring 2012 Altera s Avalon Bus Something like PCI on a chip Described in Altera s Avalon Memory-Mapped Interface Specification
More informationECE 545 Fall 2014 Midterm Exam
ECE 545 Fall 2014 Midterm Exam Problem 1 [10 points] Draw a block diagram of a simple microprocessor system, composed of A. Microprocessor, with the bidirectional input/output DATA (8-bits), and outputs
More informationIntroduction to VHDL #3
ECE 322 Digital Design with VHDL Introduction to VHDL #3 Lecture 7 & 8 VHDL Modeling Styles VHDL Modeling Styles Dataflow Concurrent statements Structural Components and interconnects Behavioral (sequential)
More informationHDL. Hardware Description Languages extensively used for:
HDL Hardware Description Languages extensively used for: Describing (digital) hardware (formal documentation) Simulating it Verifying it Synthesizing it (first step of modern design flow) 2 main options:
More informationNanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas
Nanosistemų programavimo kalbos 5 paskaita Sekvencinių schemų projektavimas Terminai Combinational circuit kombinacinė schema (be atminties elementų) Sequential circuit nuosekli (trigerinė, sekvencinė)
More informationExercise: how can we do?
: how can we do? Create special inter-process communication channels: the signals Interleave execution phases and signal update phase Signal assignments during execution phase are recorded and delayed;
More informationCodec. WM8731 Audio Codec
Codec WM8731 Audio Codec Codec Coder / Decoder Audio, Video Compression/decompression signal coding 2 tj WM8731 3 tj WM8731 Data Path Basic Connection 4 tj WM8731 Data Path Basic Timing 5 tj WM8731 Data
More information8 Register, Multiplexer and
8 Register, Multiplexer and Three-State Inference HDL Compiler can infer Registers (latches and flip flops) Multiplexers Three state gates This chapter discusses methods of inferring different types of
More informationCOVER SHEET: Total: Regrade Info: 2 (6 points) 3 (8 points) 4 (10 points) 8 (12 points) 6 (6 points) 7 (6 points) 9 (30 points) 10 (4 points)
EEL 4712 Midterm 2 Spring 2010 VERSION 1 Name: UFID: Sign your name here if you would like for your test to be returned in class: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read
More informationCprE 583 Reconfigurable Computing
Recap 4:1 Multiplexer CprE / ComS 583 Reconfigurable Computing Prof. Joseph Zambreno Department of Electrical and Computer Engineering Iowa State University Lecture #18 VHDL for Synthesis I LIBRARY ieee
More informationLattice VHDL Training
Lattice Part I February 2000 1 VHDL Basic Modeling Structure February 2000 2 VHDL Design Description VHDL language describes a digital system as a set of modular blocks. Each modular block is described
More informationCSE 260 Digital Computers: Organization and Logical Design. Exam 2. Jon Turner 3/28/2012
CSE 260 Digital Computers: Organization and Logical Design Exam 2 Jon Turner 3/28/2012 1. (15 points). Draw a diagram for a circuit that implements the VHDL module shown below. Your diagram may include
More informationReconfigurable Hardware Design (coursework)
EEE8076 Reconfigurable Hardware Design (coursework) Dr A. Bystrov Dr. E.G. Chester Autumn 2010 Module Outline Teaching Staff Dr Alex Bystrov Dr Graeme Chester The contact details are in the EECE web page
More informationProblem Set 5 Solutions
Problem Set 5 Solutions library ieee; use ieee.std_logic_1164.all; use work.std_arith.all; -- here is the declaration of entity entity la_rewarder is port (clk, go, SRAM_busy, SRAM_rdy: in std_logic; min:
More information8-1. Fig. 8-1 ASM Chart Elements 2001 Prentice Hall, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 2e, Updated.
8-1 Name Binary code IDLE 000 Register operation or output R 0 RUN 0 1 Condition (a) State box (b) Example of state box (c) Decision box IDLE R 0 From decision box 0 1 START Register operation or output
More informationINTRODUCTION TO VHDL ADVANCED COMPUTER ARCHITECTURES. Slides by: Pedro Tomás. Additional reading: - ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC)
INTRODUCTION TO VHDL Slides by: Pedro Tomás Additional reading: - ADVANCED COMPUTER ARCHITECTURES ARQUITECTURAS AVANÇADAS DE COMPUTADORES (AAC) Outline 2 Hardware Description Languages (HDL) VHDL Very
More informationThe CPU Bus : Structure 0
The CPU Bus : Structure 0 The following can be applied to both the internal CPU buses and the external system buses. This distinction becomes blurred when we discuss Systems on a single Chip (SoC). The
More information3 Designing Digital Systems with Algorithmic State Machine Charts
3 Designing with Algorithmic State Machine Charts An ASM chart is a method of describing the sequential operations of a digital system which has to implement an algorithm. An algorithm is a well defined
More information