VHDL TUTORIAL using Xilinx’s WEBPACK and ModelSim

After you have installed the Xilinx’s WebPack and ModelSim, start the Xilinx ISE 6 > Project Navigator

You will come to the blank project (next time will have the most-recent project loaded by default). Click on File > New Project to start a new project

Be sure to select HDL as the top-level module type. You can name your project, but let’s keep it simple and called this “Project1”.

Be sure to select VHDL for “Generated Simulation Language”. Leave everything else as default. There are Device family & Device on first two row. These are the actual hardware your VHDL will map to as the final product. You can buy these chips, but they can be costly (hundreds to thousands of dollars depending on what you select). Note, the tool is free, but hardware is not and that’s how Xilinx makes money.

Leave everything as default because you are starting with no files. You may add new source file later also.

Leave everything as default because you are starting with no files. You may add existing files later as well.

Click Finish to create the new project.

This is the environment without any VHDL Files

Now, let’s create a full-adder using VHDL. Note, you can now add existing source (a pointer) or add Copy of Source (create a new file from the source). Source is usually a .vhd file. If your partner finished one vhdl and gives you the file, you want to select add Copy of Source. You can always Ctrl-c Ctrl-v

Be sure to select VHDL Module

Architecture Name: Structure (concurrent statement). Architecture Name can also be Behavioral if it’s a sequential process like while loop and if-else statements

It shows a quick summary of what you are about to create, click “Finish”.

Some code will be automatically generated (libraries, declarations, and skeleton of the VHDL code)

Add in the VHDL code for full adder logic

Now, you can create a test bench for the full-adder to test whether the logic is what you expected. (Be sure to click on FullAdder VHDL file and right click)

Be sure to select VHDL Test Bench and give it a file name.

If you have a list of modules already created, you will see it here. Click “Next” to continue.

Click “Finish” after you verify what you about to create is correct.

A test bench template will be created, similar to VHDL module but with different library & declarations.

Add in the test bench code. This example shows a complete combination.

The ASSERT will provide an error in the main window (not the waveform window) if value COUT & SUM values do not map to the truth table. Another example of using assert statement: assert COUT = '0' report "COUT output incorrect. Value 1 is expected instead" severity error;

Before you can simulate a VHDL module, you need to tell it which simulation you are going to use. Make sure you have the xc2s15-6cs144 selected on the top left window, then right click on the Compile HDL Simulation > Properties…

Select ModelSim SE which is the freeware version of simulation you have installed before.

Now you are ready to compile the simulation library so you can run the simulation later.

When it’s finished compiling the libraries, you see the Green Check Mark next to it.

Now, select the test-bench file on the upper left window. Then the bottom window will show the ModelSim simulator option. Right click on the Simulate Behavioral Model to run the simulation. It will open up few windows.

Note, you may need to experiment with the zoom in/out and horizontal scroll-bar in the wave-form! Note the window behind the wave form with a list of status (# Reading C:/Modeltech_xe_starter/tcl/vsim/pref.tcl), if an error occurred with the simulation, error messages will appear in that window. (After you verify the simulation is correct, you need to close the ModelSim. Otherwise, it will try to launch another one next time)

Let’s create a 4-bit adder based on the full-adder we just built.

Same as before…

Note, we are setting A(3:0) and B(3:0) as input and SUM(3:0) as output by assigning MSB values It is also a “Structure” architecture

Looks good! Click “Finish”.

Here is the code for 4-bit adder by mapping 4 FullAdder components within the “begin” and “End structure”. It’s a ripple adder (carry-out of first full-adder goes to the carry-in of the next full-adder)

Now, add a simple test bench for 4-bit adder.

Same as before…

Make sure adder4bit is selected. Click “Next” and then Finish on the next screen (omitted)

Add the simple test bench code, only three cases we tested in this case. Sometimes, you just can’t test every possible case.

With the test bench file selected on upper-left window, right click on the bottom left window’s “Simulate Behavioral Model” and Run.

Note, you have to zoom in/out a bit and scroll the waveform window to the left.

Again, make sure you exit ModelSim each time.

With 4 bit adder selected, click on the Synthesis (generating the actual logic circuit).

Expand the synthesize-XST dir on the bottom-left window, and double click on “View RTL Schematic”

You can drill down what is inside the 4-bit adder by double click on the schematic symbol

Double click again at the schematic and you’ll see the full-adder implementation

Double click again on the component

This is as far as it goes. Close this window.

This is another example. A bus-splitting module. Splitting 32-bit input into two 16-bit output (upper 16 & lower 16)

Note, you use “downto” as the keyword

You can also check your syntax before you simulate or synthesize

Add the test bench for SplitBus module (same steps as before… some windows skipped).

Add the test bench code and run simulation

After zooming in/out and scroll to the left, you can see the result of the BusSplit module.

THE END OF TUTORIAL

HUONG DAN DUNG VHDL XILINX EN.pdf

Page 1 of 60. Bohol Profile. Bohol. Basic Facts. Geographic Location Bohol is nestled securely at the heart of the Central. Visayas Region, between southeast of Cebu and southwest. of Leyte. Located centrally in the Philippine Archipelago, specifically. within north latitude 9030' and 10015' and east longitude. 123040' and ...

8MB Sizes 0 Downloads 267 Views

Recommend Documents

huong-dan-su dung-fax.pdf
send to more destinations at once. To do this,. after step 5, specify destinations and press the. {Start} key. To send to an Internet Fax,. e-mail, or folder.

huong-dan-su dung-fax.pdf
{Reset} key. Press to clear the current settings. 5. {Program} key. Press to register frequently used settings,. or to recall registered settings. 6. Main power indicator. 7. {Energy Saver} key. 8. {Login/Logout} key. 9. {User Tools/Counter} key. 10.

huong-dan-su-dung-EZ 590.PDF
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Main menu.

huong-dan-su-dung-may-do-duong-huyet-ogcare-ytebachkhoa.pdf
huong-dan-su-dung-may-do-duong-huyet-ogcare-ytebachkhoa.pdf. huong-dan-su-dung-may-do-duong-huyet-ogcare-ytebachkhoa.pdf. Open. Extract.

HUONG DAN CAI DAT VA SU DUNG CAMERA VSTARCAM TREN ...
HUONG DAN CAI DAT VA SU DUNG CAMERA VSTARCAM TREN ANDROID.pdf. HUONG DAN CAI DAT VA SU DUNG CAMERA VSTARCAM TREN ...

Huong dan su dung Simulation S7-200.pdf
Page 1 of 4. Trường TCN KTCN Hùng VÆ°Æ¡ng TT CÆ¡ Điện Tá»­. K.SÆ° Trần Văn Hiếu. Email: [email protected]. 161 – 165 Nguyễn Chí Thanh Phường 12 Quận 5 TP.HCM. HƯỚNG DẪN SỬ DỤNG SIMULATION S7-200. Bước 1: V

Huong dan su dung KD MONEY.pdf
Loading… Page 1. Whoops! There was a problem loading more pages. Retrying... Main menu. Displaying Huong dan su dung KD MONEY.pdf.

huong-dan-su-dung-copy-ban-dau.pdf
A See if original is 1-sided or 2-sided (duplex). B Press [Dup./Combine/Series]. C Select the original and copy types and/or the orientation. D Place the originals, and then press the {Start} key. Duplex. 1-Sided → 2-Sided. Copies two 1-sided pages

Huong dan su dung Adobe Presenter ban cap ...
Huong dan su dung Adobe Presenter ban cap nhat_giangdungpham.wordpress.com.pdf. Huong dan su dung Adobe Presenter ban cap ...

huong-dan-su-dung-adobe-photoshop-cs3.pdf
huong-dan-su-dung-adobe-photoshop-cs3.pdf. huong-dan-su-dung-adobe-photoshop-cs3.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ...

Huong dan MITCALC.pdf
mở trong Microsoft Excel do công ty Ing. Miroslav Petele, Cộng hòa Séc thá»±c hiện. MITCalc. gồm cả tính toán thiết kế và kiểm nghiệm cho nhiều chi tiết máy khác nhau nhÆ°: bánh răng, đai,. xích, ổ trục, chi tiáº

Huong dan DKHP_XHNV.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Huong dan DKHP_XHNV.pdf. Huong dan DKHP_XHNV.pdf. Open. Extract. Open with. Sign In. Main menu.

huong-dan-su-dung-nhiet-ke-hong-ngoai-do-tran-omron-mc ...
Connect more apps... Try one of the apps below to open or edit this item. huong-dan-su-dung-nhiet-ke-hong-ngoai-do-tran-omron-mc-720-ytebachkhoa.pdf.

huong-dan-su-dung-may-do-duong-huyet-omron-mmol-112-mg ...
Connect more apps... Try one of the apps below to open or edit this item. huong-dan-su-dung-may-do-duong-huyet-omron-mmol-112-mg-ytebachkhoa.pdf.

huong-dan-su-dung-may-do-huyet-ap-omron-hem-7121 ...
huong-dan-su-dung-may-do-huyet-ap-omron-hem-7121-ytebachkhoa.pdf. huong-dan-su-dung-may-do-huyet-ap-omron-hem-7121-ytebachkhoa.pdf. Open.

huong-dan-su-dung-piano-yamaha-clp-330-370-340.pdf ...
(CLP-370/340) AVE-TCPTM, a TCP/IP protocol stack by ACCESS Co., Ltd., is installed in this product. Copyright © 1997-2008 ACCESS CO., LTD.

HUONG DAN SU DUNG Come to Live 20130622.pdf
Evaluation Zone 22. 4. Forum Zone (Khu vá»±c diễn đàn) 26. Page 3 of 49. HUONG DAN SU DUNG Come to Live 20130622.pdf. HUONG DAN SU DUNG Come ...

Huong Dan Su Dung Va Cai Dat J-tech HD4110W-HD3110W.pdf ...
Huong Dan Su Dung Va Cai Dat J-tech HD4110W-HD3110W.pdf. Huong Dan Su Dung Va Cai Dat J-tech HD4110W-HD3110W.pdf. Open. Extract. Open with.

huong-dan-su-dung-piano-yamaha-clp-330-370-340.pdf ...
Windows is a registered trademark of Microsoft® Corporation in the United States and other countries. • SmartMedia is a trademark of Toshiba Corporation.

huong-dan-su-dung-may-do-huyet-ap-microlife-a2 ...
Europe / Middle-East / Africa. Microlife AG. Espenstrasse 139. 9443 Widnau/Switzerland. Tel. ... Retrying... Whoops! There was a problem loading this page. Retrying... huong-dan-su-dung-may-do-huyet-ap-microlife-a2-basic-ytebachkhoa.pdf. huong-dan-su

huong-dan-su-dung-may-do-huyet-ap-omron-hem-7130 ...
huong-dan-su-dung-may-do-huyet-ap-omron-hem-7130-ytebachkhoa.pdf. huong-dan-su-dung-may-do-huyet-ap-omron-hem-7130-ytebachkhoa.pdf. Open.

huong-dan-bao-mat.pdf
Embedded applications. • Providing extended features. • Tested, compatibility certified and. digitally signed by Ricoh. • Examples: Authentication, secure. print, encryption, workflow. Network (transport & data link layer). • Leverage and com

huong-dan-su-sung-scan.pdf
F Scan to Delivery Server. G Scan via TWAIN Driver. For details about C, E, F, and G, see Scan on. the supplied CD-ROM. How to save to the machine's hard disk... (Storing and Saving the Scanned Documents). A Press the {Home} key on the top left of th