U of U CS 3710 - Frequency Counter for Spartan-3E Starter Ki

Unformatted text preview:

Frequency CounterforSpartan-3E Starter Kit (with test oscillators)Ken ChapmanXilinx Ltd7thMarch 2006Rev.1PicoBlaze Spartan-3E Starter Kit Initial Design 2Limited Warranty and Disclaimer. These designs are provided to you “as is”. Xilinx and its licensors make and you receive no warranties or conditions, express, implied, statutory or otherwise, and Xilinx specifically disclaims any implied warranties of merchantability, non-infringement, or fitness for a particular purpose. Xilinx does not warrant that the functions contained in these designs will meet your requirements, or that the operation of these designs will be uninterrupted or error free, or that defects in the Designs will be corrected. Furthermore, Xilinx does not warrant or make any representations regarding use or the results of the use of the designs in terms of correctness, accuracy, reliability, or otherwise.Limitation of Liability. In no event will Xilinx or its licensors be liable for any loss of data, lost profits, cost or procurement of substitute goods or services, or for any special, incidental, consequential, or indirect damages arising from the use or operation of the designs or accompanying documentation, however caused and on any theory of liability. This limitation will apply even if Xilinx has been advised of the possibility of such damage. This limitation shall apply not-withstanding the failure of the essential purpose of any limited remedies herein.This design module is not supported by general Xilinx Technical support as an official Xilinx Product.Please refer any issues initially to the provider of the module.Any problems or items felt of value in the continued improvement of KCPSM3 or this reference design would be gratefully received by the author.Ken ChapmanSenior Staff Engineer – Spartan Applications Specialistemail: [email protected] author would also be pleased to hear from anyone using KCPSM3 or the UART macros with information about your application and how these macros have been useful.PicoBlaze Spartan-3E Starter Kit Initial Design 3Design OverviewThis design converts the Spartan-3E Starter Kit into a reasonably accurate frequency counter measuring frequencies up to 200MHz (and possibly more) as well as providing two different types of on-chip oscillator for test and evaluation. The design can be used ‘as is’ as a piece of test equipment but it is hoped that the design may form the basis for future PicoBlaze designs as well as provide a general introduction to the board. Some exercises are suggested to encourage further self study. As well as providing the basic instructions to use the frequency counter, this document provides details of the design which is a good illustration of how a PicoBlaze processor can be used in conjunction with hardware to provide a solution. Hardware is used to provide the high speed support for the actual frequency measurement whilst PicoBlaze performs the overall control of the system, numerical conversions and direct drive of the LCD display which are all relatively slow, if complex, tasks.As well as the source design files, a compiled configuration bitfile is provided which you can immediately download into the Spartan XC3S500E device on your board. To make this task really easy the first time, unzip all the files provided into a directory and then…. double click on ‘install_frequency_counter.bat’. Assuming you have the Xilinx software installed, your board connected with the USB cable and the board powered (don’t forget the switch), then this should open a DOS window and run iMPACT in batch mode to configure the Spartan-3E with the design.Load it now – it only takes 30 seconds!It is recommended that you try this to become familiar with what the design does (operating instructions on the next page).4 slide switches select between SMA input, two on-chip oscillators and the 50MHz reference crystalSMA socket for input of signal to be measuredDisplay indicates the selected source and the frequency measurement50MHz Crystal Oscillator used for time baseLEDs indicate measurements in progressPicoBlaze Spartan-3E Starter Kit Initial Design 4Operating InstructionsApply external signal to be measured to the SMA connector (J17). This is a direct input to the Spartan-3E device and is currently defined as having the LVTTL standard. This could be modified in the User Constraints File (UCF) if an alternative standard is required. The 50MHz signal is the on board 50MHz crystal oscillator (IC17). Since this is used to form the 1 second time base for all frequency measurements, selecting this as the input means that the system is measuring itself and therefore must produce the perfect result (even if the 50MHz is not 100% accurate).Raise one of the four slide switches to select the signal for measurement. If no switches are raised or more than one switch is raised at the same time a simple menu is provided. LEDs toggle at 1 second intervals to indicate measurement intervals This oscillator is implemented inside the Spartan-3E using a mode of the DCM normally reserved for test purposes. May be you will find such a ‘free’ oscillator useful in one of your designs. A ring oscillator is one implemented using a combinatorial loop in the design. Normally something to be avoided and why processing this design will yield some warning messages. This design is an ideal way to experiment with these interesting beasts!PicoBlaze Spartan-3E Starter Kit Initial Design 5PicoBlaze Design SizeThe images and statistics on this page show that the design occupies just 190 slices and 1 BRAM. This is only 4.1% of the slices and 5% of the BRAMs available in an XC3S500E device and would still be less than 20% of the slices in the smallest XC3S100E device. Number of occupied Slices: 190 out of 4,656 4%Number of Block RAMs: 1 out of 20 5%Total equivalent gate count for design: 85,032PicoBlaze makes extensive use of the distributed memory features of the Spartan-3E device leading to very high design efficiency. If this designwas replicated to fill the XC3S500E device, it would represent the equivalent of over 1.5 million gates. Not bad for a device even marketing claims to be 500 thousand gates MAP reportFPGA Editor view Floorplanner viewXC3S500EPicoBlaze Spartan-3E Starter Kit Initial Design 6Design FilesThe source files provided for the reference design are…..frequency_counter.vhdTop level file and main description of


View Full Document
Download Frequency Counter for Spartan-3E Starter Ki
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Frequency Counter for Spartan-3E Starter Ki and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Frequency Counter for Spartan-3E Starter Ki 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?