Formalni postupci u oblikovanju računalnih sustava(2008) Auditorne_1:03.03.2008., 14:00 – 16:00, D1 Pred. (Logika)07.03.2006., 09:15 – 11:00B4 Auditorne_2:10.03.2008.,

Slides:



Advertisements
Similar presentations
VERILOG: Synthesis - Combinational Logic Combination logic function can be expressed as: logic_output(t) = f(logic_inputs(t)) Rules Avoid technology dependent.
Advertisements

Recap : Always block module and_gate (out, in1, in2); inputin1, in2; outputout; regout; or in2) begin out = in1 & in2; end endmodule zAlways.
FSM and Efficient Synthesizable FSM Design using Verilog
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
Algorithmic Software Verification VII. Computation tree logic and bisimulations.
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Synchronous Sequential Logic
EE 361 Fall 2003University of Hawaii1 Hardware Design Tips EE 361 University of Hawaii.
Combinational Logic.
Verilog Intro: Part 1.
Hardware Description Language (HDL)
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
1 Brief Introduction to Verilog Weiping Shi. 2 What is Verilog? It is a hardware description language Originally designed to model and verify a design.
Model Checking Inputs: A design (in some HDL) and a property (in some temporal logic) Outputs: Decision about whether or not the property always holds.
Verilog - 1 Writing Hardware Programs in Abstract Verilog  Abstract Verilog is a language with special semantics  Allows fine-grained parallelism to.
CSE Spring Verilog for Sequential Systems - 1 Today: Verilog and Sequential Logic zFlip-flops yrepresentation of clocks - timing of state.
FSM examples.
Spring 20067W. Rhett Davis with minor modifications by Dean Brock ECE 406 at UNASlide 1 ECE 406 Design of Complex Digital Systems Lecture 10: 9: State.
© 2011 Carnegie Mellon University Introduction to SMV Arie Gurfinkel (SEI/CMU) based on material by Prof. Clarke and others.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
SMV Examples Bug Catching in 2006 Fall Oct. 24, 2006.
Digital System Design by Verilog University of Maryland ENEE408C.
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
ELEN 468 Lecture 161 ELEN 468 Advanced Logic Design Lecture 16 Synthesis of Language Construct II.
ECE 353 Computer Systems Lab I Verilog Hardware Description Language.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 4 - Verilog 2 (Sequential.
2/18/20051 Introduction to SMV. 2/18/20052 Symbolic Model Verifier Ken McMillan, Symbolic Model Checking: An Approach to the State Explosion Problem,
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 4 - Advanced Verilog.
Advanced Verilog EECS 270 v10/23/06.
Lecture 7 Verilog Additional references Structural constructs
Overview Logistics Last lecture Today HW5 due today
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
Synthesis Presented by: Ms. Sangeeta L. Mahaddalkar ME(Microelectronics) Sem II Subject: Subject:ASIC Design and FPGA.
CS 61C L4.2.2 Verilog II (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture Verilog II Kurt Meinz inst.eecs.berkeley.edu/~cs61c.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
EEE2243 Digital System Design Chapter 4: Verilog HDL (Sequential) by Muhazam Mustapha, January 2011.
2/19/20031 Introduction to SMV. 2/19/20032 Useful Links CMU Model checking homepage SMV windows version
ECE/CS 352 Digital System Fundamentals© 2001 C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapters 3 and 4: Verilog – Part 2 Charles R.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
Finite State Machine (FSM) Nattha Jindapetch December 2008.
VIS Technology Transfer Course Session 7 Fairness Constraints and Monitors Serdar Tasiran.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Introduction to ASIC flow and Verilog HDL
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapters 4 – Part4: Verilog – Part 2.
1 Lecture 1: Verilog HDL Introduction. 2 What is Verilog HDL? Verilog Hardware Description Language(HDL)? –A high-level computer language can model, represent.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
Overview Logistics Last lecture Today HW5 due today
Hardware Description Languages: Verilog
Combinational Logic Design
Figure 8.1. The general form of a sequential circuit.
Last Lecture Talked about combinational logic always statements. e.g.,
Reg and Wire:.
Verilog Introduction Fall
‘if-else’ & ‘case’ Statements
Hardware Description Languages: Verilog
SYNTHESIS OF SEQUENTIAL LOGIC
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
Introduction to SMV 2/19/2003.
The Verilog Hardware Description Language
Introduction to Digital IC Design
Lecture 9: SMV: An Introduction
Lecture 7: Verilog Part II
Presentation transcript:

Formalni postupci u oblikovanju računalnih sustava(2008) Auditorne_1: , 14:00 – 16:00, D1 Pred. (Logika) , 09:15 – 11:00B4 Auditorne_2: , 08:00-10:00D1 Test sustava: , 14:00 – 16:30A 102 Prvi lab otvoren: , 16:30 – 18:00A 102 Pred. (CTL) , 09:15 – 11:00B4 Auditorne_3: :00 – 10:00D1 Prvi lab kolokvij: , 14:00 – 16:30 A 102, 101 Za raspored po grupama vidi Web stranicu labosa

Formal verification I = Implementation (model of the system to be verified) S = Specification (behavior) Expressed in temporal logic Verifier YES NO (error trace) I  S 1.How to model I ? 2.What is 3.How to model S ?

A 1) Verifikacija sklopovlja Primjer:Arbitar sabirnice Opis implementacije (I):Verilog (HDL) Opis specifikacije (S):CTL Sustav za verifikaciju:VIS A 2) Verifikacija dijelova programskih produkata Primjeri:Međ. isključ. proc. Opis implementacije (I):SMV Opis specifikacije (S):CTL Sustav za verifikaciju:SMV

A 1) Laboratorijske vježbe iz verifikacije sklopovlja: Arbitar sabirnice (engl. Bus Arbiter) Opis implementacije ( I ): Verilog Opis specifikacije ( S ): CTL vremenska logika Sustav za verifikaciju: VIS

Verification Synthesis Simulation CTL Fairness Blif-mv VHDL Verilog SMV SIS Move around View hierarchy VIS : PASSFAIL (error trace) S = bar.ctl I = foo.v F = go.fair

Na stranicama lab. vježbi VIS dokumentacija Za implementaciju I: 1.VIS User Manual 2.Verilog – kratki opis 3.Verilog – pregled naredbi Za specifikaciju S: 1.VIS CTL Manual

VERILOG Jezik za opis sklopovlja (HDL), sintaktički posudio mnogo od C-a. Opis na više razina apstrakcije. IEEE standard # Verilog datoteke se mogu verificirati, simulirati i sintetizirati. Ref.: 1. Donald E. Thomas and Philip R. Moorby The Verilog Hardware Description Language, 4th Ed. Kluwer, (Carnagie Melon University) 2. (VERILOG i VHDL)

g1 g2 f1 f2 nsel

!!!!!

Second: temp store before assign addition (Logical OR = II)

(anything can be accessed, bad style)

same as a.e since no local e This e is different (it is top e)

e e logic only Inputs: A B C D Ex = char. “d” e = 1 (ON) CD AB

module fsm(out, in, clock, reset); outputout; inputin, clock, reset; regout; reg[1:0]currentState, nextState; // combination portion * * * // sequential portion * * * endmodule Output State Input neg. edge clock pos. edge 00/0 01/1 11/ reset

// combination portion or currentState) begin out = ~currentState[1] & currentState[0]; // out = 1 only for state 01 nextState = 0; if (currentState == 0) if(in) nextState = 1; //else stay in 0 if (currentState == 1) if (in) nextState = 3; //else go to 0 if (currentState == 3)begin if (in) nextState = 3; else nextState = 1; end // the sequential portion clock or negedge reset) begin if (~reset) currentState <= 0; // as long as res=0 else currentState <= nextState; // as D type bistable end Bit select = 01 Non blocking

Verilog extensions (in VIS environment) Enumerated types ( similar to C ) typedef enum {IDLE, READY, BUSY} controller_state; /* contr._state is an enum type */ controller_state reg state; /* state is a register variable of the type “controller_state” */

Non-determinism There exist state-input pair for which the next state and output are not unique. $ND construct creates a nondeterministic signal source should only be used in an assign statement wire r;/* def of a wire variable */ assign r=$ND(GO, NOGO);/* nondeterminism */. clk) begin. state = r; /* the state is nondeterm. GO or NOGO */. end

clientAclientBclientC Example: Arbiter

module main(clk); …// typedef …// input, output, wire, reg... controller controllerA(clk, reqA, ackA, sel, pass_tokenA, A); controller controllerB(clk, reqB, ackB, sel, pass_tokenB, B); controller controllerC(clk, reqC, ackC, sel, pass_tokenC, C); arbiter arbiter(clk, sel, active); client clientA(clk, reqA, ackA); client clientB(clk, reqB, ackB); client clientC(clk, reqC, ackC); endmodule module controller(clk, req, ack, sel, pass_token, id); input clk, req, sel, id; output ack, pass_token; …. endmodule module arbiter(clk, sel, active); input clk, active; output sel;... endmodule module client(clk, req, ack); input clk, ack; output req;... endmodule

A 2) Laboratorijske vježbe iz verifikacije programskih dijelova: Algoritmi međusobnog isključivanja procesa (mutex) Opis implementacije ( I ): SMV Opis specifikacije ( S ): CTL vremenska logika Sustav za verifikaciju: SMV

SMV - Symbolic model verifier Ken McMillan, CMU, Ph.D. thesis, Formalni model (/)- SMV sintaksa Formalna specifikacija (S)- CTL formule SMV sustav za verifikaciju S I Da / Ne (+ error trace) foo.smv

Implementacija ( I ): stroj s konačnim brojem stanja (FSM) u SMV kodu req = 0 st.=ready req = 1 st.=ready req = 1 st.=busy req = 0 st.=busy request = {0, 1} (npr. 1=True, 0=False) status = {ready, busy}

MODULE main // foo.smv file VAR request: boolean // type boolean status: {ready, busy} // type sclr {ready, busy} ASSIGN init (status) := ready; // init status value next (status) := case // next status value request : busy; // if st=rdy  req=1 in crnt state, then next st=bsy 1 : {ready, busy}; // else not det. esac; SPEC AG(request -> AF status = busy) // CTL spec.

MODULE main // ring of 3 inverters, each with diff. speed VAR gate1 : process inverter(gate3.output); gate2 : process inverter(gate1.output); gate3 : process inverter(gate2.output); // SMV chooses and runs any process module nondeterminist. // useful to describe parallel processes, e.g comm. protocols SPEC (AG AF gate1.out) & (AG AF !gate1.out) MODULE inverter(input) VAR output : boolean; ASSIGN init(output) := 0; next(ouput) := !input;// output inverts input with type chk