Instructions on creating CTL files for PAL pin placement

Similar documents
6.111 Lecture # 5. Entity section describes input and output. VHDL: Very High speed integrated circuit Description Language:

Tutorial: Working with the Xilinx tools 14.4

Introduction to Verilog

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Verilog Design Entry, Synthesis, and Behavioral Simulation

EET2141 Project 2: Binary Adder Using Xilinx 7.1i Due Friday April 25

NOTE: This tutorial contains many large illustrations. Page breaks have been added to keep images on the same page as the step that they represent.

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Module 2.1 Gate-Level/Structural Modeling. UNIT 2: Modeling in Verilog

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Hardware Description Languages (HDLs) Verilog

Tutorial: ISE 12.2 and the Spartan3e Board v August 2010

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Lab 2: Introduction to Verilog HDL and Quartus

ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EEM Digital Systems II

E85: Digital Design and Computer Engineering Lab 2: FPGA Tools and Combinatorial Logic Design

ASL: Auburn Simulation Language and AUSIM: Auburn University SIMulator. Chuck Stroud Professor Electrical & Computer Engineering Auburn University

Lab 1 Modular Design and Testbench Simulation ENGIN 341 Advanced Digital Design University of Massachusetts Boston

EE183 LAB TUTORIAL. Introduction. Projects. Design Entry

Digital Design Using VHDL Using Xilinx s Tool for Synthesis and ModelSim for Verification

Experiment 18 Full Adder and Parallel Binary Adder

Introduction to Verilog HDL

EXPERIMENT NUMBER 7 HIERARCHICAL DESIGN OF A FOUR BIT ADDER (EDA-2)

Digital Design with FPGAs. By Neeraj Kulkarni

Hardware Description Language VHDL (1) Introduction

Electronic Design Automation Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Combinational Logic Design with Verilog. ECE 152A Winter 2012

EE 231 Fall Lab 1: Introduction to Verilog HDL and Altera IDE

Tutorial on Quartus II Introduction Using Verilog Code

Chapter 2 Getting Hands on Altera Quartus II Software

Lab 1: Introduction to Verilog HDL and the Xilinx ISE

Introduction to Verilog

VERILOG 2: LANGUAGE BASICS

Introduction to Verilog. Mitch Trope EECS 240 Spring 2004

and 32 bit for 32 bit. If you don t pay attention to this, there will be unexpected behavior in the ISE software and thing may not work properly!

Abi Farsoni, Department of Nuclear Engineering and Radiation Health Physics, Oregon State University

ENGIN 241 Digital Systems with Lab

Nikhil Gupta. FPGA Challenge Takneek 2012

101-1 Under-Graduate Project Digital IC Design Flow

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

After opening the Programs> Xilinx ISE 8.2i > Project Navigator, you will come to this screen as start-up.

ECE 3610 Microprocessing Systems Lab #1 Verilog Design of the TOC Using Quartus II

Experiment 3 Introduction to Verilog Programming using Quartus II software Prepared by: Eng. Shatha Awawdeh, Eng.Eman Abu_Zaitoun

Speaker: Shao-Wei Feng Adviser: Prof. An-Yeu Wu Date: 2010/09/28

CPEN 230L: Introduction to Digital Logic Laboratory Lab #6: Verilog and ModelSim

Verilog Module 1 Introduction and Combinational Logic

Lecture 8: Combinational Verilog. CSE 370, Autumn 2007 Benjamin Ylvisaker. Where We Are. Last lecture: Minimization with K!maps

and numbers and no spaces. Press after typing the name. You are now in the Program Editor. Each line of code begins with the colon character ( : ).

Start Active-HDL. Create a new workspace TUTORIAL #1 CREATING AND SIMULATING SIMPLE SCHEMATICS

Quartus II Introduction Using Verilog Design

EE 231 Fall EE 231 Lab 2

Contents. Appendix B HDL Entry Tutorial 2 Page 1 of 14

VeriLogger Tutorial: Basic Verilog Simulation

CSE140 L. Instructor: Thomas Y. P. Lee January 18,2006. CSE140L Course Info

Lab. Course Goals. Topics. What is VLSI design? What is an integrated circuit? VLSI Design Cycle. VLSI Design Automation

EECS150 - Digital Design Lecture 10 Logic Synthesis

EECS150 - Digital Design Lecture 10 Logic Synthesis

Software Engineering 2DA4. Slides 2: Introduction to Logic Circuits

Engineering 303 Digital Logic Design Fall 2018

A Verilog Primer. An Overview of Verilog for Digital Design and Simulation

Verilog Design Principles

CSE370 TUTORIAL 3 - INTRODUCTION TO USING VERILOG IN ACTIVE-HDL

Course Topics - Outline

Tutorial: Working with Verilog and the Xilinx FPGA in ISE 9.2i

Lab 2 Designing with Verilog

LAB 5 Implementing an ALU

Chapter 2: Hardware Design Flow Using Verilog in Quartus II

Hardware description languages

CCE 3202 Advanced Digital System Design

Using ChipScope. Overview. Detailed Instructions: Step 1 Creating a new Project

Getting Started with Xilinx WebPack 13.1

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits

ECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb UMass Amherst Fall 2017

Xilinx Schematic Entry Tutorial

ENGN3213. Digital Systems & Microprocessors. CLAB 1: ICARUS Verilog and ISE WebPACK

P-1/26. Samir Palnitkar. Prentice-Hall, Inc. INSTRUCTOR : CHING-LUNG SU.

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

CCE 3202 Advanced Digital System Design

Simulating a Design Circuit Using Qsim

14:332:231 DIGITAL LOGIC DESIGN. Hardware Description Languages

Numbering Systems. Number Representations Part 1

Lecture Programming in C++ PART 1. By Assistant Professor Dr. Ali Kattan

Chap 6 Introduction to HDL (d)

CSE P567 - Winter 2010 Lab 1 Introduction to FGPA CAD Tools

EN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages

Department of Electrical and Computer Engineering Xilinx ISIM <Release Version: 14.1i> Simulation Tutorial Using Verilog

University of Massachusetts Amherst Computer Systems Lab 2 (ECE 354) Spring Lab 1: Using Nios 2 processor for code execution on FPGA

A Brief Introduction to Verilog Hardware Definition Language (HDL)

EEL 4783: HDL in Digital System Design

Tutorial on Verilog HDL

Lab 2 Verilog Synthesis & Logic Optimization

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog

Introduction to PSpice

Verilog Design Principles

Week 2 Tutorial: The Verilog Primer

TUTORIAL #2 HIERARCHICAL DESIGNS AND TEST FIXTURES

structure syntax different levels of abstraction

Here is a list of lecture objectives. They are provided for you to reflect on what you are supposed to learn, rather than an introduction to this

CSE140L: Components and Design Techniques for Digital Systems Lab

TLL5000 Electronic System Design Base Module. Getting Started Guide, Ver 3.4

Transcription:

Instructions on creating CTL files for PAL pin placement We use CTL files to control how Active-HDL assigns inputs and outputs to pins. This will make it easier for you to re-synthesize a file since Active-HDL will place the inputs and outputs on the same pins. Keeping the pin assignments identical will allow you to replace the chip with a new program without rewiring your circuit. Remember to pay close attention to how many terms an output requires as the outputs in the PAL do not have the same amount of terms. To create a CTL file: CTL files follow a specific format so please adhere to these rules closely. 1) Create a blank file and name it <module_name>.ctl, where <module_name> refers to the name of the module that was set as the Top Level for synthesis. In the case of a verilog file the <module_name> is defined by the keyword module. In the case of a block diagram the module name is the exact same name as the block diagram name (i.e. <module_name>.bde> For example, if we wanted to make a wiring file for the module full_adder we would name the file: full_adder.ctl. You will probably want to use some text editor to create the file. NOTE: Do not let the text editor you are using append any extensions on the end of the file name. Make sure your file does not get named something like full_adder.ctl.txt. 2) The first line of your CTL file must match the name of the CTL file and the module name: attribute pin_numbers of <module_name>:module where <module_name> refers to the name of the module that was set as the Top Level for synthesis. The rest of the CTL file is determined by where you want to place the inputs and outputs. For example, the first line might resemble attribute pin_numbers of full_adder:module for a module named full_adder. 3) Choose the pin number that you want to assign to each variable during synthesis & implementation. Keep in mind the following pin assignment schemes: a. Pin 1: clock/input (Only pin that can be assigned to a clock) b. Pins 2-11 & 13: inputs c. Pins 14-23: outputs (can also be assigned to be inputs; however, outputs are limited so not recommended unless needed) In addition, some of the output pins can handle more product terms than others. You need to consider product term sizes when making your CTL or Active may ignore your assignments. If Active ignores your CTL, see fixing mistakes section. The breakdown of product terms for output pins is: Pin: Product Term Capacity 14: 8 15: 10 16: 12

17: 14 18: 16 19: 16 20: 14 21: 12 22: 10 23: 8 4) The next step is to assign the pins to the desired variable name. Pins are assigned in a string ending with a semi colon. For readability most people write their pin assignments on separate lines. The instructions focus on a pin assignment per line method but you may write a single string if you wish. a. Each pin assignment line should follow this format with the exception of the last line of your CTL file. <variable_name>:<pin number> & example: "A:2 " & (where A=<variable name>, 2 =<pin number>) example for bus: "B(0):2 " & (Note: Bus name then the index in parentheses) Spacing and exact placement of quotation marks is important as you are creating a string to assign the pins. The space is needed to separate the pin assignments as strings will be joined into a single string. b. For the last line of your CTL file you will want to put a semicolon to mark the end of your string. Follow this format: "<variable name>:<pin number> ; Example: "Sum:20"; 5) Now all you need to do is include the CTL file at synthesis time. Refer to the next section on Using the CTL file for synthesis & implementation. Using the CTL file for synthesis & implementation. 1) Click on the options button (located next to the Synthesis & Implementation button) to include your CTL file during synthesis & implementation. 2) Check the box: Use custom CTL file. Then, browse until you find the path to your custom CTL file. See the figure that follows.

3) Click OK. You are now ready to run synthesis & implementation. If everything goes well the pin assignments in the report file will match the pins assignments in your CTL file. Otherwise, see the fixing mistakes section. Making a CTL file: Full Adder Example For example, here is the Verilog code for a full adder: module full_adder ( A,Cin,B,Cout,Sum ); input A ; wire A ; input Cin ; wire Cin ; input B ; wire B ; output Cout ; wire Cout ; output Sum ; wire Sum ; assign Sum = (A & ~B & ~Cin) (~A & B & ~Cin) (~A & ~B & Cin) (A & B & Cin); assign Cout = (A & Cin) (B & Cin) (A & B); endmodule 1) From step 1 in the creating a CTL file section we know that the name of the CTL file for this full adder will have to be full_adder.ctl. Open a new file, and save it as full_adder.ctl 2) Looking at the code there are 5 inputs and outputs:

A B Cin Sum Cout 3) If you wanted to assign A to pin 2, B to pin 4, C to pin 6, Sum to pin 20 and Cout to pin 18, an example CTL file would be: attribute pin_numbers of full_adder:module "A:2 " & "B:4 " & "Cin:6 " & "Sum:20 " & "Cout:18"; In particular, notice the spacing and the use of ampersands for concating the string and a semicolon to end the string. If you don t have the spaces the pin assignments will run together. These are all critical to the CTL working. Fixing Mistakes If you miss one of the steps above, one of following two things will occur:

1) Active-HDL will ignore your CTL file and do whatever it wants with pin assignment. Active-HDL may then ignore subsequent attempts to fix the CTL file. Try the fixes mentioned below. 2) Active-HDL may spit out error messages to you about your CTL (missing a space, cannot understand this word). If you re lucky enough to get these error messages, try to follow them and, if that doesn t work, use the fixes mentioned below. The fixes: 1) First try to delete the.jed file within the synthesis folder, along with the.pin file, that has the same name as the file you are trying to synthesize. 2) Now, retry synthesis with the correct CTL file 3) If this works, great. Otherwise, delete the synthesis folder (scary, but there should be no code within the synthesis folder). Anything.jed files that you had previously synthesized will be lost. 4) Now, retry synthesis with the correct CTL file. If your syntax all matches within the file, and the naming conventions are correct, everything should be ok. 5) You will need to re-synthesize all files that you need a.jed to program.