Chuck Benz ASIC & FPGA Design csrGen: Automated CSRs for ASIC/FPGA Processor Interfaces Chuck Benz Chuck Benz ASIC & FPGA Design

Slides:



Advertisements
Similar presentations
Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
Advertisements

VERILOG: Synthesis - Combinational Logic Combination logic function can be expressed as: logic_output(t) = f(logic_inputs(t)) Rules Avoid technology dependent.
Verilog Fundamentals Shubham Singh Junior Undergrad. Electrical Engineering.
//HDL Example 8-2 // //RTL description of design example (Fig.8-9) module Example_RTL (S,CLK,Clr,E,F,A);
CDA 3100 Recitation Week 11.
Verilog.
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 Modules for Common Digital Functions
Table 7.1 Verilog Operators.
Verilog Intro: Part 1.
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
Verilog. 2 Behavioral Description initial:  is executed once at the beginning. always:  is repeated until the end of simulation.
Give qualifications of instructors: DAP
//HDL Example 6-1 // //Behavioral description of //Universal shift register // Fig. 6-7 and Table 6-3 module shftreg.
Slide 1 7. Verilog: Combinational always statements. VHDL: Combinational Processes: To avoid (I.E. DO NOT What in your HDL code?) Cases that generate Synthesis.
FSM examples.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
2-to-1 Multiplexer: if Statement Discussion D7.1 Example 4.
ELEN 468 Advanced Logic Design
Kazi Fall 2006 EEGN 4941 EEGN-494 HDL Design Principles for VLSI/FPGAs Khurram Kazi.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Overview Logistics Last lecture Today HW5 due today
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
Verilog Digital System Design Z. Navabi, 2006
Registers & Counters M. Önder Efe
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
Verilog Intro: Part 2. Procedural Blocks There are two types of procedural blocks in Verilog. – initial for single-pass behavior: initial blocks execute.
ASIC/FPGA design flow. FPGA Design Flow Detailed (RTL) Design Detailed (RTL) Design Ideas (Specifications) Design Ideas (Specifications) Device Programming.
Using Formal Verification to Exhaustively Verify SoC Assemblies by Mark Handover Kenny Ranerup Applications Engineer ASIC Consultant Mentor Graphics Corp.
SoC Verification HW #2 TA: Wei-Ting Tu Assignment: 04/12/06
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Array Synthesis in SystemC Hardware Compilation Authors: J. Ditmar and S. McKeever Oxford University Computing Laboratory, UK Conference: Field Programmable.
Introduction to FPGA Development Justin Thiel Two Sigma Investments.
Slide 1 6. VHDL/Verilog Behavioral Description. Slide 2 Verilog for Synthesis: Behavioral description Instead of instantiating components, describe them.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
Introduction to Experiment 6 Internal FPGA Memories, Pseudo Random Number Generator, Advanced Testbenches ECE 448 Spring 2009.
Slide 1 2. Verilog Elements. Slide 2 Why (V)HDL? (VHDL, Verilog etc.), Karen Parnell, Nick Mehta, “Programmable Logic Design Quick Start Handbook”, Xilinx.
Kazi ECE 6811 ECE 681 VLSI Design Automation Khurram Kazi Thanks to Automation press THE button outcomes the Chip !!! Reality or Myth.
Automated Generation of the Register Set of a SOC and its Verification Environment K. Poulos, K. Adaos, G.P. Alexiou Dept. of Computer Engineering and.
Timing and Constraints “The software is the lens through which the user views the FPGA.” -Bill Carter.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
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.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Introduction to ASIC flow and Verilog HDL
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU 99-1 Under-Graduate Project Design of Datapath Controllers Speaker: Shao-Wei Feng Adviser:
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
EMT 351/4 DIGITAL IC DESIGN Verilog Behavioral Modeling  Finite State Machine -Moore & Mealy Machine -State Encoding Techniques.
Lecture 5. Verilog HDL #3 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design.
1 Lecture 3: Modeling Sequential Logic in Verilog HDL.
Introduction to FPGAs Getting Started with Xilinx.
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.
SUBJECT : DIGITAL ELECTRONICS CLASS : SEM 3(B) TOPIC : INTRODUCTION OF VHDL.
Overview Logistics Last lecture Today HW5 due today
Hardware Description Languages: Verilog
EECE6017C - Lab 0 Introduction to Altera tools and Basic Digital Logic
TODAY’S OUTLINE Introduction to Verilog Verilog coding format
Figure 8.1. The general form of a sequential circuit.
EMT 351/4 DIGITAL IC DESIGN Week # Synthesis of Sequential Logic 10.
Digital System Verification
KARTHIK.S Lecturer/ECE S.N.G.C.E
Hardware Description Languages: Verilog
SYNTHESIS OF SEQUENTIAL LOGIC
Register-Transfer Level Components in Verilog
Verilog-HDL Reference: Verilog HDL: a guide to digital design and synthesis, Palnitkar, Samir Some of slides in this lecture are supported by Prof. An-Yeu.
The Verilog Hardware Description Language
Presentation transcript:

Chuck Benz ASIC & FPGA Design csrGen: Automated CSRs for ASIC/FPGA Processor Interfaces Chuck Benz Chuck Benz ASIC & FPGA Design

2 Chuck Benz ASIC & FPGA Design 1 Outline Describe processor interfaces and CSRs Discuss automating CSRs Example using csrGen – template file and result More complete list of csrGen features Future directions

3 Chuck Benz ASIC & FPGA Design 1 Example CSR memory map And so forth… And more4 More3 bitX6bitX5bitX4bitX3bitX2 bitX1 2 Field21 bitDbitCbitBbitAField10

4 Chuck Benz ASIC & FPGA Design 1 Example CSR logic read data read mux write data write and address decode CS_L WR_L Address Interface logic

5 Chuck Benz ASIC & FPGA Design 1 CSR verilog code fragments output [7:0] field2 ; reg [7:0] field2, field2_D ; (*) begin field2_D = field2 ; if (write) case (address) 1: field2_D = up_datain[7:0] ; endcase case (address) 1: up_dataout_D[7:0] = field2 ; endcase (posedge clock or negedge resetl) if ( ! resetl) field2 <= 0 ; else field2 <= field2_D ;

6 Chuck Benz ASIC & FPGA Design 1 Why Automate? Time savings Correctness Consistency, shared structures Generate more than RTL code

7 Chuck Benz ASIC & FPGA Design 1 Ways to Automate CSRs (1) Code fragments vs. complete RTL – create the fragments, maybe use `ifdef, OR – blend automated stuff with the rest of the Verilog code Results: – verilog (or VHDL?) RTL code – defines for verification, software code – declarations/instantiation for hierarchy – documentation (format?)

8 Chuck Benz ASIC & FPGA Design 1 Ways to Automate CSRs (2) What types of CSRs ? – R/W – RO – sticky (COR/W1C) – counters (COR/W1C) – pulse Single or many modules Input format ?

9 Chuck Benz ASIC & FPGA Design 1 csrGen example template part 1 %I read %I write %I address 4 %I up_datain 8 %OF up_dataout 8 %A 0 7:0 field1 %A 1 7:0 version RO %A 2 3:0 field2 6 someerror sticky W1C

10 Chuck Benz ASIC & FPGA Design 1 csrGen example template part 2 %VCL if (write) case (address) %writecase endcase if (read) case (address) %readcase endcase %E %AUTO

11 Chuck Benz ASIC & FPGA Design 1 csrGen example result part 1 module chip_up_ifc (/*AUTOARG*/) ; input clock, initl ; input [7:0] version; input someerror; input read; input write; input [3:0] address; input [7:0] up_datain; output [7:0] field1; output [3:0] field2; output [7:0] up_dataout; reg [7:0] field1, field1_D; reg [3:0] field2, field2_D; reg someerrorS, someerrorS_D; reg [7:0] up_dataout, up_dataout_D ;

12 Chuck Benz ASIC & FPGA Design 1 csrGen example result part 2 (/*AUTOSENSE*/) begin field1_D = field1 ; field2_D = field2 ; someerrorS_D = someerrorS | someerror ; up_dataout_D = up_dataout ;

13 Chuck Benz ASIC & FPGA Design 1 csrGen example result part 3 Continuing the always block: if (write) case (address) 0: begin field1_D = up_datain[7:0] ; end 1: begin end 2: begin field2_D = up_datain[3:0] ; someerrorS_D = (someerrorS_D & ~up_datain[6]) | someerror ; end endcase

14 Chuck Benz ASIC & FPGA Design 1 csrGen example result part 4 Finishing the always block: if (read) case (address) 0: begin up_dataout_D[7:0] = field1 ; end 1: begin up_dataout_D[7:0] = version ; end 2: begin up_dataout_D[3:0] = field2 ; up_dataout_D[6] = someerrorS ; end endcase end

15 Chuck Benz ASIC & FPGA Design 1 csrGen example result part 5 (posedge clock or negedge initl) if ( ! initl) begin field1 <= 0 ; field2 <= 0 ; someerror <= 0 ; up_dataout <= 0 ; end else begin field1 <= field1_D ; field2 <= field2_D ; someerrorS <= someerrorS_D ; up_dataout <= up_dataout_D ; end endmodule

16 Chuck Benz ASIC & FPGA Design 1 Beyond simple Example is just basic, csrGen has many more features various CSR structures (more later) An address definition can be repeated – incrementing index appended to field names – or for single bits, constructing a vector spanning addresses %VCL and %V have simple repeat structure – the missing verilog Generate statement – simply unrolls a print statement ▪▪▪► any structure

17 Chuck Benz ASIC & FPGA Design 1 More features Verilog tasks can be called for write or read to address Wide fields can be broken across several addresses Read multiplexer can be pipelined Reset value of flops can be set Direct value for flops bypasses _D structure

18 Chuck Benz ASIC & FPGA Design 1 Supported CSR properties internal to module (no IO declarations for CSR field) read only write only sticky clear-on-read write-1-to-clear counters pulses (see paper on CD for full feature list, details)

19 Chuck Benz ASIC & FPGA Design 1 Verification Automated definitions: – define csr_address_name 42 – define csr_width_name 8 – define csr_range_name 7:0 Allows for automated testing – R/W – reset values – clear on read, write-1-to-clear tests

20 Chuck Benz ASIC & FPGA Design 1 Futures, Enhancements Open source tool, change as desired More CSR structures (send requests, enhancements) Generate HTML table for each address Parser and data structures could be better

21 Chuck Benz ASIC & FPGA Design 1 Lessons, Ideas More than a tool – a concept of how design work can evolve “Spec driven design” – but small step rather than giant leap – focused on one area of a design – emphasis on integrating Other ways to do this – template file could be generated from other tool – emacs mode auto expansion from comments (pragmas) – object oriented design language ?

22 Chuck Benz ASIC & FPGA Design 1 Conclusion Avoid tedious, error prone work Here's a tool for your tool box feedback is welcome csrGen.pl