在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 5770|回复: 12

FPGA/HDL Synthesis Simulation-Xilinx综合仿真好资料

[复制链接]
发表于 2009-6-26 08:50:30 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
在网上找译码器的资料,在xilinx无意间看到这个东西是网页板的;
第二章里面有Vhdlverilog对应的代码,同种电路举一反三,很受用... 对大家会很有帮助的

FPGA/HDL综合仿真好资料Xilinx Synthesis Technology (XST) User [email=Guide@Synthesis]Guide  与         Synthesis[/email] and Simulation Design Guide
Chapter 2
HDL Coding Techniques This chapter contains the following sections:
Chapter 3
FPGA Optimization This chapter contains the following sections:

Chapter 4
CPLD Optimization
This chapter contains the following sections.
• “CPLD Synthesis Options”
• “Implementation Details for Macro Generation”
• “Log File Analysis”
• “Constraints”
• “Improving Results”



Chapter 5
Design Constraints
This chapter describes constraints, options, and attributes supported
for use with XST.
This chapter contains the following sections.
• “Introduction”
• “Setting Global Constraints and Options”
• “XST Constraints”
• “HDL Inference and Optimization”
• “FPGA Options”
• “CPLD Options”
• “Summary”
• “Implementation Constraints”
• “Third Party Constraints”
• “Constraints Precedence”


Chapter 6
VHDL Language Support
This chapter explains how VHDL is supported for XST. The chapter
provides details on the VHDL language, supported constructs, and
synthesis options in relationship to XST. The sections in this chapter
are as follows:
• “Introduction”
• “Data Types in VHDL”
• “Record Types”
• “Objects in VHDL”
• “Operators”
• “Entity and Architecture Descriptions”
• “Combinatorial Circuits”
• “Sequential Circuits”
• “Functions and Procedures”
• “Packages”
• “VHDL Language Support”



Chapter 7
Verilog Language Support
This chapter contains the following sections.
• “Introduction”
• “Behavioral Verilog Features”
• “Structural Verilog Features”
• “Parameters”
• “Verilog Limitations in XST”
• “Verilog Meta Comments”
• “Language Support Tables”
• “Primitives”
• “Verilog Reserved Keywords”


Chapter 8
Command Line Mode
This chapter describes how to run XST using the command line. The
chapter contains the following sections.
• “Introduction”
• “Launching XST”
• “Setting Up an XST Script”
• “Run Command”
• “Set Command”
• “Elaborate Command”
• “Time Command”
• “Example 1: How to Synthesize VHDL Designs Using Command
Line Mode”
• “Example 2: How to Synthesize Verilog Designs Using Command
Line Mode”


4-bit Unsigned Up Counter with Asynchronous Clear The following table shows pin definitions for a 4-bit unsigned up counter with asynchronous clear.
IO Pins

Description

C
Positive-Edge Clock
CLR
Asynchronous Clear (active High)
Q[3:0]
Data Output

VHDL Code Following is VHDL code for a 4-bit unsigned up counter with asynchronous clear.
library ieee;

use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity counter is   port(C, CLR : in  std_logic;         Q : out std_logic_vector(3 downto 0)); end counter; architecture archi of counter is   signal tmp: std_logic_vector(3 downto 0);   begin       process (C, CLR)         begin           if (CLR='1') then             tmp <= "0000";           elsif (C'event and C='1') then             tmp <= tmp + 1;           end if;       end process;       Q <= tmp; end archi; Verilog Code Following is the Verilog code for a 4-bit unsigned up counter with asynchronous clear.
module counter (C, CLR, Q); input C, CLR; output [3:0] Q; reg [3:0] tmp;   always @(posedge C or posedge CLR)     begin       if (CLR)         tmp = 4'b0000;       else         tmp = tmp + 1'b1;       end   assign Q = tmp; endmodule 4-bit Unsigned Down Counter with Synchronous Set The following table shows pin definitions for a 4-bit unsigned down counter with synchronous set.
IO Pins

Description

C
Positive-Edge Clock
S
Synchronous Set (active High)
Q[3:0]
Data Output

VHDL Code Following is the VHDL code for a 4-bit unsigned down counter with synchronous set.
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity counter is   port(C, S : in  std_logic;         Q : out std_logic_vector(3 downto 0)); end counter; architecture archi of counter is   signal tmp: std_logic_vector(3 downto 0);   begin     process (C)       begin         if (C'event and C='1') then           if (S='1') then             tmp <= "1111";           else             tmp <= tmp - 1;           end if;         end if;     end process;     Q <= tmp; end archi; Verilog Code Following is the Verilog code for a 4-bit unsigned down counter with synchronous set.
module counter (C, S, Q); input C, S; output [3:0] Q; reg [3:0] tmp;   always @(posedge C)     begin       if (S)         tmp = 4'b1111;       else         tmp = tmp - 1'b1;     end   assign Q = tmp; endmodule 4-bit Unsigned Up Counter with Asynchronous Load from Primary Input The following table shows pin definitions for a 4-bit unsigned up counter with asynchronous load from primary input.
IO Pins

Description

C
Positive-Edge Clock
ALOAD
Asynchronous Load (active High)
D[3:0]
Data Input
Q[3:0]
Data Output

VHDL Code Following is the VHDL code for a 4-bit unsigned up counter with asynchronous load from primary input.
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity counter is   port(C, ALOAD : in  std_logic;         D : in std_logic_vector(3 downto 0);         Q : out std_logic_vector(3 downto 0)); end counter; architecture archi of counter is   signal tmp: std_logic_vector(3 downto 0);   begin     process (C, ALOAD, D)       begin         if (ALOAD='1') then           tmp <= D;         elsif (C'event and C='1') then           tmp <= tmp + 1;         end if;     end process;     Q <= tmp; end archi; Verilog Code Following is the Verilog code for a 4-bit unsigned up counter with asynchronous load from primary input.
module counter (C, ALOAD, D, Q); input C, ALOAD; input  [3:0] D; output [3:0] Q; reg    [3:0] tmp;   always @(posedge C or posedge ALOAD)     begin       if (ALOAD)         tmp = D;       else         tmp = tmp + 1'b1;     end   assign Q = tmp; endmodule 4-bit Unsigned Up Counter with Synchronous Load with a Constant The following table shows pin definitions for a 4-bit unsigned up counter with synchronous load with a constant.
IO Pins

Description

C
Positive-Edge Clock
SLOAD
Synchronous Load (active High)
Q[3:0]
Data Output

VHDL Code Following is the VHDL code for a 4-bit unsigned up counter with synchronous load with a constant.
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity counter is   port(C, SLOAD : in  std_logic;         Q : out std_logic_vector(3 downto 0)); end counter; architecture archi of counter is   signal tmp: std_logic_vector(3 downto 0);    begin     process (C)       begin         if (C'event and C='1') then           if (SLOAD='1') then             tmp <= "1010";           else             tmp <= tmp + 1;           end if;         end if;     end process;     Q <= tmp; end archi; Verilog Code Following is the Verilog code for a 4-bit unsigned up counter with synchronous load with a constant.
module counter (C, SLOAD, Q); input C, SLOAD; output [3:0] Q; reg [3:0] tmp;   always @(posedge C)     begin       if (SLOAD)         tmp = 4'b1010;       else         tmp = tmp + 1'b1;     end   assign Q = tmp; endmodule 4-bit Unsigned Up Counter with Asynchronous Clear and Clock Enable The following table shows pin definitions for a 4-bit unsigned up counter with asynchronous clear and clock enable.
IO Pins

Description

C
Positive-Edge Clock
CLR
Asynchronous Clear (active High)
CE
Clock Enable
Q[3:0]
Data Output

VHDL Code Following is the VHDL code for a 4-bit unsigned up counter with asynchronous clear and clock enable.
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity counter is   port(C, CLR, CE : in std_logic;         Q : out std_logic_vector(3 downto 0)); end counter; architecture archi of counter is   signal tmp: std_logic_vector(3 downto 0);   begin     process (C, CLR)       begin         if (CLR='1') then           tmp <= "0000";         elsif (C'event and C='1') then           if (CE='1') then             tmp <= tmp + 1;           end if;         end if;     end process;     Q <= tmp; end archi; Verilog Code Following is the Verilog code for a 4-bit unsigned up counter with asynchronous clear and clock enable.
module counter (C, CLR, CE, Q); input C, CLR, CE; output [3:0] Q; reg    [3:0] tmp;   always @(posedge C or posedge CLR)     begin       if (CLR)         tmp = 4'b0000;       else         if (CE)           tmp = tmp + 1'b1;     end   assign Q = tmp; endmodule 4-bit Unsigned Up/Down counter with Asynchronous Clear The following table shows pin definitions for a 4-bit unsigned up/down counter with asynchronous clear.
IO Pins

Description

C
Positive-Edge Clock
CLR
Asynchronous Clear (active High)
UP_DOWN
up/down count mode selector
Q[3:0]
Data Output

VHDL Code Following is the VHDL code for a 4-bit unsigned up/down counter with asynchronous clear.
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity counter is   port(C, CLR, UP_DOWN : in std_logic;         Q : out std_logic_vector(3 downto 0)); end counter; architecture archi of counter is   signal tmp: std_logic_vector(3 downto 0);   begin     process (C, CLR)       begin         if (CLR='1') then           tmp <= "0000";         elsif (C'event and C='1') then           if (UP_DOWN='1') then             tmp <= tmp + 1;           else             tmp <= tmp - 1;           end if;         end if;     end process;     Q <= tmp; end archi; Verilog Code Following is the Verilog code for a 4-bit unsigned up/down counter with asynchronous clear.
module counter (C, CLR, UP_DOWN, Q); input C, CLR, UP_DOWN; output [3:0] Q; reg    [3:0] tmp;   always @(posedge C or posedge CLR)     begin       if (CLR)         tmp = 4'b0000;       else         if (UP_DOWN)           tmp = tmp + 1'b1;         else           tmp = tmp - 1'b1;     end   assign Q = tmp; endmodule 4-bit Signed Up Counter with Asynchronous Reset The following table shows pin definitions for a 4-bit signed up counter with asynchronous reset.
IO Pins

Description

C
Positive-Edge Clock
CLR
Asynchronous Clear (active High)
Q[3:0]
Data Output

VHDL Code Following is the VHDL code for a 4-bit signed up counter with asynchronous reset.
library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_signed.all; entity counter is   port(C, CLR : in  std_logic;         Q : out std_logic_vector(3 downto 0)); end counter; architecture archi of counter is   signal tmp: std_logic_vector(3 downto 0);   begin     process (C, CLR)       begin         if (CLR='1') then           tmp <= "0000";         elsif (C'event and C='1')   then           tmp <= tmp + 1;         end if;     end process;     Q <= tmp; end archi; Verilog Code There is no equivalent Verilog code, as Verilog does not support signed values.
No constraints are available.

第二篇
Synthesis and Simulation
Design Guide



Chapter 1
Introduction
This chapter provides a general overview of designing Field
Programmable Gate Arrays (FPGAs) with HDLs, and also includes
installation requirements and instructions. It includes the following
sections.
&#8226; “Architecture Support”
&#8226; “Overview of Hardware Description Languages”
&#8226; “Advantages of Using the Virtex-E FPGA Architecture”
&#8226; “Advantages of Using HDLs to Design FPGAs”
&#8226; “Designing FPGAs with HDLs”
&#8226; “Xilinx Internet Web Sites”


Chapter 2
Understanding High-Density Design Flow
This chapter describes the steps in a typical HDL design flow.
Although these steps may vary with each design, the information in
this chapter is a good starting point for any design. If necessary, refer
to the current version of the “Quick Start Guide” to familiarize yourself
with the Xilinx and interface tools. This chapter includes the
following sections.
&#8226; “Design Flow”
&#8226; “Entering your Design and Selecting Hierarchy”
&#8226; “Functional Simulation of your Design”
&#8226; “Synthesizing and Optimizing your Design”
&#8226; “Setting Constraints”
&#8226; “Evaluating Design Size and Performance”
&#8226; “Evaluating your Design for Coding Style and System Features”
&#8226; “Placing and Routing Your Design”
&#8226; “Timing Simulation of Your Design”
&#8226; “Downloading to the Device and In-system Debugging”
&#8226; “Creating a PROM File for Stand-Alone Operation”


Chapter 3
General HDL Coding Styles
This chapter contains HDL coding styles and design examples to help
you develop an efficient coding style. It includes the following
sections.
&#8226; “Naming and Labeling Styles”
&#8226; “Specifying Constants”
&#8226; “Choosing Data Type (VHDL only)”
&#8226; “Coding for Synthesis”
&#8226; “Implementing Latches and Registers”
&#8226; “Resource Sharing”
&#8226; “Reducing Gates”
&#8226; “Using Preset Pin or Clear Pin”


Chapter 4
Architecture Specific HDL Coding Styles for
XC4000XLA, Spartan, and Spartan-XL
This chapter includes coding techniques to help you improve
synthesis results. It includes the following sections.
&#8226; “Introduction”
&#8226; “Instantiating Components”
&#8226; “Using Boundary Scan (JTAG 1149.1)”
&#8226; “Using Global Clock Buffers”
&#8226; “Using Dedicated Global Set/Reset Resource”
&#8226; “Implementing Inputs and Outputs”
&#8226; “Encoding State Machines”
&#8226; “Implementing Inputs and Outputs”
&#8226; “Implementing Memory”
&#8226; “Implementing Multiplexers”
&#8226; “Using Pipelining”
&#8226; “Design Hierarchy”
&#8226; “Incremental Design (ECO)”


Chapter 5
Architecture Specific HDL Coding Styles for
Spartan-II, Virtex, Virtex-E, Virtex-II, and
Virtex-II Pro
This chapter includes coding techniques to help you improve
synthesis results. It includes the following sections.
&#8226; “Introduction”
&#8226; “Instantiating Components”
&#8226; “Using Boundary Scan (JTAG 1149.1)”
&#8226; “Using Global Clock Buffers”
&#8226; “Using Advanced Clock Management,”
&#8226; “Using Dedicated Global Set/Reset Resource”
&#8226; “Implementing Inputs and Outputs”
&#8226; “Encoding State Machines”
&#8226; “Implementing Operators and Generate Modules”
&#8226; “Implementing Memory”
&#8226; “Implementing Shift Register (Virtex/E/II and Spartan-II)”
&#8226; “Implementing Multiplexers”
&#8226; “Using Pipelining”
&#8226; “Design Hierarchy”
&#8226; “Modular Design and Incremental Design (ECO)”


Chapter 6
Simulating Your Design
This chapter describes the basic HDL simulation flow using the Alliance
software. It includes the following sections.
&#8226; “Introduction”
&#8226; “Adhering to Industry Standards”
&#8226; “Simulation Points”
&#8226; “VHDL/Verilog Libraries and Models”
&#8226; “Compiling HDL Libraries”
&#8226; “Running NGD2VHDL and NGD2VER”
&#8226; “Understanding the Global Signals for Simulation”
&#8226; “Simulating VHDL”
&#8226; “Simulating Verilog”
&#8226; “RTL Simulation Using Xilinx Libraries”
&#8226; “Timing Simulation”
&#8226; “Simulation Flows”
&#8226; “LMG SmartModels”
&#8226; “IBIS”
&#8226; “STAMP”



4–to–1 Multiplexer Design with Case Construct
&#8226; VHDL Example
-- CASE_EX.VHD
-- May 2001
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
entity case_ex is
port (SEL: in STD_LOGIC_VECTOR(1 downto 0);
A,B,C,D: in STD_LOGIC;
MUX_OUT: out STD_LOGIC);
end case_ex;
architecture BEHAV of case_ex is
begin
CASE_PRO: process (SEL,A,B,C,D)
begin
case SEL is
when “00” => MUX_OUT <= A;
when “01” => MUX_OUT <= B;
when “10” => MUX_OUT <= C;
when “11” => MUX_OUT <= D;
when others=> MUX_OUT <= '0';
end case;
end process; --End CASE_PRO
end BEHAV;




&#8226; Verilog Example
//////////////////////////////////////////
// CASE_EX.V //
// Example of a Case statement showing //
// A mux created using parallel logic //
// HDL Synthesis Design Guide for FPGAs //
// November 2000 //
//////////////////////////////////////////
module case_ex (A, B, C, D, SEL, MUX_OUT);
input A, B, C, D;
input [1:0] SEL;
output MUX_OUT;
reg MUX_OUT;
always @ (A or B or C or D or SEL)
begin
case (SEL)
2’b00:
MUX_OUT = A;
2’b01:
MUX_OUT = B;
2’b10:
MUX_OUT = C;
2’b11:
MUX_OUT = D;
default:
MUX_OUT = 0;
endcase
end
endmodule

xst.JPG
sim.JPG

xst.pdf

2.23 MB, 下载次数: 60 , 下载积分: 资产 -2 信元, 下载支出 2 信元

sim.pdf

1.42 MB, 下载次数: 48 , 下载积分: 资产 -2 信元, 下载支出 2 信元

发表于 2009-6-26 09:34:58 | 显示全部楼层
还有像你这样赚钱的啊?
发表于 2009-6-26 09:59:47 | 显示全部楼层


人家辛辛苦苦上传资料上来怎么啦?招你惹你了?!!!而且楼主又没有把附件分割的七零八落的。你爱要不要。
发表于 2009-6-26 10:18:57 | 显示全部楼层
安装ISE之后,这些都会有,在安装文件doc下。
 楼主| 发表于 2009-6-26 23:53:18 | 显示全部楼层
我没有装ISE,也没有用xilinx的东西;
多是用altera的;
我觉得xilinx的这2个东西不错,所以就发上来了;
发表于 2011-4-5 01:08:12 | 显示全部楼层
很好,很好谢谢。。。
发表于 2011-4-5 10:05:58 | 显示全部楼层
classic
thank u
发表于 2011-4-6 16:16:20 | 显示全部楼层
Thanks very much
发表于 2011-4-6 17:13:26 | 显示全部楼层
下载下来学习学习
发表于 2012-2-6 23:27:24 | 显示全部楼层
下载下来学习学习
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /3 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-19 20:47 , Processed in 0.037131 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表