CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 4 Khurram Kazi.

Slides:



Advertisements
Similar presentations
28/10/2007DSD,USIT,GGSIPU1 Latch & Register Inference.
Advertisements

Arbitrary Waveform Discussion 5.5 Example 34.
1 VLSI DESIGN USING VHDL Part II A workshop by Dr. Junaid Ahmed Zubairi.
Ring Counter Discussion D5.3 Example 32. Ring Counter if rising_edge(CLK) then for i in 0 to 2 loop s(i)
Logic Design Fundamentals - 3 Discussion D3.2. Logic Design Fundamentals - 3 Basic Gates Basic Combinational Circuits Basic Sequential Circuits.
6/27/20061 Sequence Detectors Lecture Notes – Lab 5 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
6/12/20151 Sequence Detectors Lecture Notes – Lab 4 Sequence detection is the act of recognizing a predefined series of inputs A sequence detector is a.
Counters Discussion D5.3 Example 33. Counters 3-Bit, Divide-by-8 Counter 3-Bit Behavioral Counter in Verilog Modulo-5 Counter An N-Bit Counter.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 3 Khurram Kazi Some of the slides were taken from K Gaj ’ s lecture slides from GMU ’ s VHDL.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
VHDL And Synthesis Review. VHDL In Detail Things that we will look at: –Port and Types –Arithmetic Operators –Design styles for Synthesis.
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi Some of the slides were taken from K Gaj’s lecture slides from GMU’s.
CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 2 Khurram Kazi Some of the slides were taken from K Gaj ’ s lecture slides from GMU ’ s VHDL.
Shift Registers Discussion D5.2 Example Bit Shift Register qs(3) qs(2) qs(1) qs(0) if rising_edge(CLK) then for i in 0 to 2 loop s(i) := s(i+1);
Capacitance Sensor Project
Lecture #5 In this lecture we will introduce the sequential circuits.
4-bit Shift Register. 2-bit Register Serial-in-serial-out Shift Register.
Advanced FPGA Based System Design Lecture-9 & 10 VHDL Sequential Code By: Dr Imtiaz Hussain 1.
ECE 448: Lab 4 FIR Filters.
Finite State Machines. Binary encoded state machines –The number of flip-flops is the smallest number m such that 2 m  n, where n is the number of states.
1 Part V: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Advanced Digital Circuits ECET 146 Week 7 Professor Iskandar Hack ET 221B,
Reconfigurable Computing - VHDL - Types John Morris Chung-Ang University The University of Auckland.
Design Verification VHDL ET062G & ET063G Lecture 5 Najeem Lawal 2012.
Graduate Computer Architecture I VHDL Structure and Testing Michael Sorensen.
Chapter 14 Introduction to Microprocessors. 2 Microcomputer A self-contained computer system that consists of CPU (central processing unit), memory (RAM.
VHDL Project I: Introduction to Testbench Design Matthew Murach Slides Available at:
1 Sequential Logic Lecture #7. 모바일컴퓨팅특강 2 강의순서 Latch FlipFlop Shift Register Counter.
1 ECE 545—Digital System Design with VHDL Lecture 6 Behavioral VHDL Coding (for Synthesis): Finite State Machines and ASMs 9/30/08.
ECE 448: Spring 11 Lab 3 Part 1 Sequential Logic for Synthesis.
ENG241 Digital Design Week #8 Registers and Counters.
Copyright(c) 1996 W. B. Ligon III1 Getting Started with VHDL VHDL code is composed of a number of entities Entities describe the interface of the component.
Reaction Timer Project
Kazi ECE 6811 ECE 681 VLSI Design Automation Khurram Kazi Thanks to Automation press THE button outcomes the Chip !!! Reality or Myth.
Reconfigurable Computing - VHDL - Types John Morris Chung-Ang University The University of Auckland.
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
VHDL Discussion Finite State Machines
VHDL Discussion Finite State Machines IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology 1.
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
Digital System Projects
 Seattle Pacific University EE Logic System DesignCounters-1 Shift Registers DQ clk DQ DQ ShiftIn Q3Q3 Q2Q2 DQ Q1Q1 Q0Q0 A shift register shifts.
1 Part III: VHDL CODING. 2 Design StructureData TypesOperators and AttributesConcurrent DesignSequential DesignSignals and VariablesState Machines A VHDL.
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
CEC 220 Digital Circuit Design VHDL in Sequential Logic Wednesday, March 25 CEC 220 Digital Circuit Design Slide 1 of 13.
Controllers ENGIN 341 – Advanced Digital Design University of Massachusetts Boston Department of Engineering Dr. Filip Cuckov.
Digital System Design using VHDL
Algorithmic State Machines Sorting Signed & Unsigned Data Types
Copyright (c) 2003 by Valery Sklyarov and Iouliia Skliarova: DETUA, IEETA, Aveiro University, Portugal.
George Mason University Behavioral Modeling of Sequential-Circuit Building Blocks ECE 545 Lecture 8.
Registers and Counters Discussion D8.1. Logic Design Fundamentals - 3 Registers Counters Shift Registers.
1 Introduction to Engineering Spring 2007 Lecture 19: Digital Tools 3.
An Introduction to V.H.D.L.. Need of a Compiler… main( ) { int x=10,y=20,z; z = x + y ; printf ( “ %d “, z ); getch( ) ; } What’s That ? Give me only.
Sequential statements (1) process
Combinational logic circuit
Registers and Counters
CHAPTER 17 VHDL FOR SEQUENTIAL LOGIC
Part IV: VHDL CODING.
ECE 4110–5110 Digital System Design
CPE/EE 428/528 VLSI Design II – Intro to Testing (Part 3)
Sequential-Circuit Building Blocks
ECE 434 Advanced Digital System L08
VHDL (VHSIC Hardware Description Language)
Lecture #5 In this lecture we will introduce the sequential circuits.
Behavioral Modeling of Sequential-Circuit Building Blocks
Figure 8.1. The general form of a sequential circuit.
Sequntial-Circuit Building Blocks
디 지 털 시 스 템 설 계 UP2 Kit를 이용한 카운터 설계
(Sequential-Circuit Building Blocks)
Presentation transcript:

CSCI 660 EEGN-CSCI 660 Introduction to VLSI Design Lecture 4 Khurram Kazi

CSCI Review of ROM/RAM assignment

CSCI Signal Generator using Finite State Machine Method

CSCI Signal Generator using Finite State Machine Method library ieee; use ieee.std_logic_1164.all; ENTITY signal_gen1 IS PORT ( clk:IN STD_LOGIC; reset:IN STD_LOGIC; wave: OUT STD_LOGIC); END signal_gen1; Architecture finite_state_machine OF signal_gen1 IS TYPE states IS (zero, one, two, three, four, five, six, seven); signal Wstate,: states; signal temp : STD_LOGIC; BEGIN wave <= temp; PROCESS (clk, reset) Begin IF (reset = '0') then Wstate <= zero; ELSIF (clk'EVENT and clk = '1') THEN CASE Wstate IS WHEN zero => temp <= '0'; Wstate <= one; WHEN one => temp <= '1'; Wstate <= two; WHEN two => temp <= '0'; Wstate <= three; WHEN three => temp <= '1'; Wstate <= four; WHEN four => temp <= '1'; Wstate <= five; WHEN five => temp <= '1'; Wstate <= six; WHEN six => temp <= '0'; Wstate <= seven; WHEN seven => temp <= '0'; Wstate <= zero; END CASE; END PROCESS; END finite_state_machine;

CSCI Clock divider Do the clocks have to be 50% duty cycle? How would you design a divide by 3 clock?? Bits change on every rising clock edge!

CSCI Serial to parallel conversion library ieee; use ieee.std_logic_1164.all; ENTITY ser_to_par is generic(N : integer := 8); port( clk : in STD_LOGIC; sin : in STD_LOGIC; resetb : in STD_LOGIC; par_dout : out std_logic_vector ((n-1) downto 0)); end ser_to_par; architecture behavior of ser_to_par is signal par_reg : std_logic_vector((n-1) downto 0); signal bit_counter : integer; signal shiftreg : std_logic_vector ((n-1) downto 0); begin shiftin: process (clk, resetb) begin if (resetb = '0') then shiftreg '0'); elsif rising_edge(CLK) then shiftreg <= shiftreg((n-2) downto 0) & sin; end if; end process shiftin; Parallel_load_data: process (clk, resetb) begin if (resetb = '0') then par_reg '0'); elsif rising_edge (clk) then if(bit_counter = (n-1)) then par_reg <= shiftreg; end if; end process; process (clk, resetb) begin if (resetb = '0') then bit_counter <= 0; elsif rising_edge (clk) then if (bit_counter = n - 1) then bit_counter <= 0; else bit_counter <= bit_counter + 1; end if; end process; end behavior;

CSCI SONET Frame

CSCI SONET Framer  Framing States within the SONET Framer  Out of Frame (OOF)  In this state when out of reset state and if contiguous 24 errored frames (i.e. 24 invalid framing patterns)  Errored Frame (EF)  In this state if 2 contiguous errored frames received (i.e. 2 invalid framing patterns)  Severely Errored Frame (SEF)  In this state if 4 contiguous errored frames received (i.e. 4 invalid framing patterns)  In Frame  When 2 contiguous valid frames received

CSCI Scrambling in SONET (STS-1) 1 + x 6 + x 7 : Why scramble data? dataindataoutunscrambled data On the receive side use the same circuit. The receive data goes in the “datain” pin and the original unscrambled data is extracted on “dataout”. A1A2 Bytes are NOT scrambled

CSCI PRBS (Pseudo Random Binary Sequence)  PRBS is a very powerful pattern generator and that can be self- checking on the receiving end.  Use one of the PRBS pattern generator as the data source for the payload area within the SONET frame

CSCI Sample code of LFSR (3bit LFSR) LIBRARY ieee; USE ieee.std_logic_1164.all; USE ieee.std_logic_arith.all; ENTITY lfsr IS PORT ( clk : IN std_logic resetb: IN std_logic; lfsr_out: OUT std_logic ); END lfsr; ARCHITECTURE behavior of lfsr IS signallfsr_reg : std_logic_vector (2 downto 0); signal tap1 : std_logic; BEGIN Process (clk, resetb) BEGIN if (resetb = '0') then lfsr_reg '1'); --presetting the LFSR elsif (clk'event and clk = '1') then lfsr_reg <= lfsr_reg(1 downto 0) & tap1; end if; end process; tap1 <= lfsr_reg(0) xor lfsr_reg(2); lfsr_out <= lfsr_reg(2); END behavior;

CSCI Data Com bytes (D1-D3)  D1-D3 bytes are the 1 st three bytes in the 3 rd row of the STS-1 frame. These bytes are used as a 192 kbps data channel for operations functions, such as Operations, Administration, Management and Provisioning (OAM&P). These bytes are used between 2 “section” type equipment (like regenerator)

CSCI Data Com bytes D4-D12  These bytes (1 st three bytes of rows 6,7 and 8) represent a 576 kbps message-based channel used for OAM&P messages between SONET line-level network equipment.

CSCI Clock generator block  Input serial clock  Internal byte_clock also output clock (spe_clk)  D1_3_clock  D4_12_clk  All the clocks going to different blocks need to be generated from this block

CSCI Some recommendation for test benches (package) Package package_name IS (package delcrations) End package_name; e.g. PACKAGE SONET_Pkg IS Signal tb_d1Byte : std_logic_vector (7 downto 0); Signal tb_d2Byte : std_logic_vector (7 downto 0); Signal tb_d3Byte : std_logic_vector (7 downto 0); Signal tb_d4Byte : std_logic_vector (7 downto 0); Signal tb_d5Byte : std_logic_vector (7 downto 0); Signal tb_d6Byte : std_logic_vector (7 downto 0); Signal tb_d7Byte : std_logic_vector (7 downto 0); Signal tb_d8Byte : std_logic_vector (7 downto 0); Signal tb_d9Byte : std_logic_vector (7 downto 0); Signal tb_d10Byte : std_logic_vector (7 downto 0); Signal tb_d11Byte : std_logic_vector (7 downto 0); Signal tb_d12Byte : std_logic_vector (7 downto 0); END SONET_Pkg; 1) write this package in a vhdl file, e.g. “SONET_Pkg.vhd”. 2) Compile the package vhdl file 3) Include under the library declarations USE work.SONET_Pkg.all;

CSCI Suggested pinout of the Framer

CSCI Block diagram of the Framer Receiver direction

CSCI Block diagram of top.vhd Declare signals in framer_pkg.vhd Drive the signals in generator Monitor the signals in analyzer to see whatever OHs received matched the values in the generator

CSCI Some recommendation for test benches  Use global signals to pass information between the generator to the data analyzer. These global signals can be used to control the pattern generators as the simulation progress.  Use some sort of timestamp to keep track of events. For example use frame counter (in the test bench) to keep track of data sent a particular frame and use that information during the self checking of the output data!

CSCI Assignment  InFrame = in frame  EF = Errored Frame : 2 contiguous invalid framing pattern  SEF = Severely Errored Frame : 4 contiguous invalid framing pattern  OOF = out of Frame : 24 contiguous invalid framing pattern  Extend SONET Framer to incorporate four states of the framer:  1) In-Frame state, 2) EF, 3)SEF, 4) OOF  USE concept developed in slide 13 (lecture 4) to define these states  Extend the SONET Framer’s testbench to incorporate:  Generate SONET valid SONET frames (i.e. proper A1 A2 Byte contents of F6 28) for at least 3 frames  Generate 4 contiguous invalid framing pattern (by changing different bits inside the A1 or A2 byte)  This will result in SONET Framer detecting EF and SEF States  Continue generating invalid framing pattern for a total of 24 frames  This will result in SONET Framer going into OOF state  Add to the framer’s port list  InFrame, EF, SEF and OOF. Each will be a std_logic.  Assert these ports high whenever the framer is in the respective state.

CSCI Assignment  After acquiring frame  Convert serial data into parallel data  Store the Over Head portion of data into a RAM  8 bit data should be written to the RAM at a time.

CSCI Assignment  Use the SONET scramble to scramble the data (except A1 and A1 bytes)  Use PRBS pattern generator to insert in the 3 Data Com bytes D1-D3 byte positions  Take first 9 characters of your name and convert them into ASCII (bit value). Insert those values in the D4-D12 byte positions.  The D1-D3 and D4-D12 data should come out on separate serial ports along with 192 kbps and 576 kbps clock. The firs byte should be indicated by a start of frame signal. (3 ports per Data com bytes should be output ports from your block, therefore total of 6 output ports)

CSCI How do I get started (1)?  1) Look for the framing pattern  Design a bit counter that rolls over every 8th cycle (i.e. it goes from 0 – 7 and then back to 0  Design a byte counter that counts from 0 – 809 and rolls over back to 0  The starting values of both the bit and byte counters should coincide with every occurrence of the framing pattern to ensure that the framing pattern comes in at the desired expected bit count value/byte count value

CSCI How do I get started (2)?  Develop a state machine that has the states:  In-frame state (go in this state if two consecutive valid frames are received)  Errored Frame (EF) state: go in this state if 2 contiguous errored frames received (i.e. 2 invalid framing patterns)  Severely Errored Frame (SEF) state: go in this state if 4 contiguous errored frames received (i.e. 4 invalid framing patterns) are received  Out of Frame (OOF) state: go in this state when out of reset state and if contiguous 24 errored frames (i.e. 24 invalid framing patterns)

CSCI How do I get started (3)?  Normal operation of data occurs when the device goes from OOF to Inframe-state  Store the Overhead bytes (OH) in the RAM after they have been received serially and subsequently converted into parallel (8 bits).  At a later time of receiving the OH bytes read the data from the proper RAM location (read in 8 bits at a time).  Convert 8 bits into serial form  Transport the serialized bit out of the appropriate ports (e.g. d1_d3_dataout, and d4_d12_dataout)  Transport spe_dataout(7:0) as soon as the data is converted from serial to parallel

CSCI What are the basic components I need to get started?  Bit counter  Byte counter  Serial to parallel converter  Parallel to serial converter  Framing state machine that has the states defined in 2 of “How do I get started?”  Clock generation blocks  Refer to 17 for more blocks needed in the design.