5 eda
This presentation is the property of its rightful owner.
Sponsored Links
1 / 87

第 5 章 常用 EDA 工具软件 PowerPoint PPT Presentation


  • 138 Views
  • Uploaded on
  • Presentation posted in: General

第 5 章 常用 EDA 工具软件. • 本章概要: 本章介绍几种目前世界上比较流行和实用的 EDA 工具软件,包括 Altera 公司的 Nios Ⅱ 、 ModelSim 和 Matlab ,以适应不同读者的需要。这些软件主要是基于 PC 机平台的,面向 FPGA 和 CPLD 或 ASIC 设计,比较适合学校教学、项目开发和相关的科研。 • 知识要点:( 1 ) ModelSim 工具软件的使用方法。 ( 2 )基于 Matlab/DSP Builder 的 DSP 模块设计。 ( 3 ) Nios Ⅱ 软件的使用方法

Download Presentation

第 5 章 常用 EDA 工具软件

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


5 eda

5 EDA

EDAAlteraNios ModelSimMatlabPCFPGACPLDASIC

1ModelSim

2Matlab/DSP BuilderDSP

3Nios

68Quartus II

2014/9/10

1


5 1 modelsim

5.1 ModelSim

ModelSimHDLAlturaQuartus ModelSimQuartus ModelSimQuartus ModelSim

Quartus 9.0ModelSim-ALTERA 6.4aModelSim

2014/9/10

2


5 eda

ModeSim

5.1.1 ModelSim

ModelSimMain WindowsTranscriptWorkspaceModelSimTree ListLibraryProject

2014/9/10

3


5 eda

ModelSimworkVHDLworkModelSimworkworkModelSimProjectworkVHDLVerilog HDLModelSimworkVHDLieee.std_logic_1164VHDLLibraryUse

2014/9/10

4


5 eda

QuartusModelSimModelSimFileNewProjectOKPreject

2014/9/10

5


5 eda

ModelSim

1. ModelSim

ModelSimAdd items to the ProjectCreate New FileModelSimModelSimFileNewSourceVHDLModelSimVHDLVerilog HDL

2014/9/10

6


5 eda

ModelSimsourceVHDLcnt10y.vhdcnt10y.vhd

LIBRARY IEEE;

USE IEEE.STD_LOGIC_1164.ALL;

USE ieee.Numeric_Std.ALL;

ENTITY cnt10y IS

PORT(clr:IN STD_LOGIC;

clk:IN STD_LOGIC;

q:BUFFER INTEGER RANGE 9 DOWNTO 0;

cout:OUT STD_LOGIC);

END cnt10y;

ARCHITECTURE one OF cnt10y IS

BEGIN

2014/9/10

7


5 eda

PROCESS(clr,clk)

BEGIN

IF clr='0' THEN q<=0;

ELSIF clk'EVENT AND clk='1' THEN

IF (q=9) THEN

q<=0;

cout<='0';

ELSE

q<=q+1;

cout<='1';

END IF;

END IF;

END PROCESS;

END one;

2014/9/10

8


5 eda

2. ModelSim

ModelSimCompileCompileHDLCompile HDL Source Filecnt10yCompilecnt10ywork

3. ModelSim

ModelSim

2014/9/10

9


5 eda

ModelSim

1

ModelSimSimulateStart Simulateworkcnt10yOKSim

2014/9/10

10


5 eda

2

ObjectsModelSimViewObjectsclrclkqcout

clrForceForce Selected SignalForceForceValue:1clr1Delay For:Cancel After:OKForce

2014/9/10

11


5 eda

ModelSimObjectsAddTo WaveSelected ItemsModelSimWave

2014/9/10

12


5 eda

3

ModelSimViewWaveWaveModelSimModelSimWaveForceclrForceForce

2014/9/10

13


5 eda

5.1.2 ModelSimQuartus II

Quartus IIHDLModelSimHDLmypllModelSimQuartus II

ModelSimProject Add to Project Existing FileFile NameHDLD:/myeda/mypll.vhdOKHDLwork

2014/9/10

14


5 eda

mypll

ModelSimmypll

2014/9/10

15


5 eda

5.1.3 ModelSim

ModelSimModelSimModelSim

5.1.4 ModelSim

ModelSimModelSim

2014/9/10

16


5 eda

ModelSimFileNewSourceDOModelSimDOcnt10y.do

vsim work.cnt10y //workcnt10y

# Loading std.standard//VHDL

# Loading ieee.std_logic_1164(body)

# Loading ieee.numeric_std(body)

# Loading work.cnt10y(one)

force -freeze sim:/cnt10y/clr 1 0//1

force -freeze sim:/cnt10y/clk 1 0, 0 {50 ps} -r 100 //

add wave \//

{sim:/cnt10y/clr } \

{sim:/cnt10y/clk } \

{sim:/cnt10y/q } \

{sim:/cnt10y/cout }

2014/9/10

17


5 eda

run

run 100//100ps

force -freeze sim:/cnt10y/clr 0 0//0

run 200//200

force -freeze sim:/cnt10y/clr 1 0//1

run 2000//2000

cnt10ym.do.doDOModelSimModelSimdo cnt10y.docnt10y

2014/9/10

18


5 2 matlab dsp builder dsp

5.2 Matlab/DSP BuilderDSP

MatlabAlteraMatlabQuartus IIDSP

Matlab/DSP BuilderDSPMatlabSignalCompilerModelsimRTLQuartus IIQuartus II

Matlab/DSP BuilderDSP

2014/9/10

19


5 eda

5.2.1

IncCounterSinLUTDelayProductDATAINOutput6IncCounterSinLUTSinLUT8DelayProductDATAINOutputOutputD/A

2014/9/10

20


5 eda

Matlab

5.2.2 Matlab

MatlabDSPMatlab/DSP BuilderDSP

1. Matlab

MatlabCommand WindowsWorkspaceCommand History

2014/9/10

21


5 eda

SignalCompilder

MATLABSimulink

2.

MatlabFileNewmodelMATLAB

2014/9/10

22


5 eda

3. SignalCompiler

Library browserAltera DSP BuilderDSP BuilderAltLabAltLabSignalCompilerSignalCompilerSignalCompilerHDL

2014/9/10

23


5 eda

IncCounter

4. Increment Decrement

Altera DSP BuilderArithmeticIncrement DecrementIncrement DecrementIncrement DecrementIncrement DecrementIncCounter

2014/9/10

24


5 eda

SinLUT

5. SinLUT

Altera DSP BuilderGate & ControlLUTSinLUTSinLUTinLUTBus TypeUnsigned IntegerOutput[number of bits]8LUT Address Width6

2014/9/10

25


5 eda

Delay

6. Delay

Altera DSP BuilderStorageDelayDelayDelayDelayDelayDepthDepth11/z11Depthn1/znn

2014/9/10

26


5 eda

DATAIN

7. DATAIN

Altera DSP BuilderIO & BusInputInputDATAINDATAINDATAINBus TypeUnsigned Integer[number of bits].[]11HDLDATAIN1

2014/9/10

27


5 eda

Product

8. Product

Altera DSP BuilderArithmeticProductProductDelaySinLUT1DATAINDATAINSinLUTProductProductProductPipelineProductProduct

2014/9/10

28


5 eda

Output

9. Output

Altera DSP BuilderIO & BusOutputOutput5.56OutputOutputBus TypeUnsigned Integer[number of bits].[]88HDLOutput8

2014/9/10

29


5 eda

Random Number

5.2.3 Matlab

1.

SimulinkSimulinkSourcesRandom NumberRandom Number Random Number

2014/9/10

30


5 eda

ScopeScopeGenera

2.

SimulinkSinksScopeScopeScopeScopeParametersScope

2014/9/10

31


5 eda

3.

SimulationSimulation ParametersSimulation ParametersStart time0.0Stop Time500

2014/9/10

32


5 eda

4.

SimulationStartMatlab0

2014/9/10

33


5 eda

DSP Builder

SignalCompiler

5.2.4 SignalCompiler

MatlabDSP BuilderFPGAHDLFirstDSPSignalCompilerDSP BuilderAnalyzeSignalCompilerFirstDSPSignalCompilerMatlabSignalCompiler

2014/9/10

34


5 eda

5.2.5 ModelsimRTL

simulink.mdlHDL

SignalCompilerGenerate Stimuli for VHDL TestbenchDSP BuilderMDL to VHDLHDLModelsimModelsimVHDL

ModelsimModelsimToolsExecute MacroFirstDSP.vhdmyeda_qtb_FirstDSP.tclModelsimtb_FirstDSP.tclwave

2014/9/10

35


5 eda

Modelsim

Modelsim

2014/9/10

36


5 eda

5.3.6 Quartus II

Quartus IIQuartus IIFile Open Project Open ProjectFirstDSPDSP BuilderQuartus IIFirstDSPVHDLfirstdsp.vhd

SignalCompilerQuartus IIQuartus IIProcessingStart Compilationfirstdsp.vhd

ProcessingStart SimulationSimulator ToolRepotQuartus II

2014/9/10

37


5 eda

FirstDSPQuartus

2014/9/10

38


5 eda

5.2.7 DSP Builder

DSPDSP BuilderSimulinkDSP Builder

DSP BuilderDSP BuilderDSPSubSystem

2014/9/10

39


5 eda

DSP Builder

MatlabFirstDDSShiftSignalCompilerRandom NumberScopeCreate subsystemDSP Builder

2014/9/10

40


5 3 nios ii

5.3 Nios II

SOPC BuilderAlteraPLDNios IIPCI/OLEDLCDVGASOPC Builder

2014/9/10

41


5 eda

5.3.1 Nios II

Nios IICPUNios IICPUSOPC BuilderIP CoreNios IIVHDLVerilog HDL

Nios IIDE2DE2 70Nios II9.0

DE2Nios IISDRAMSRAMFLASHLCDVGAISP1362I2CNios IISRAMVGAI2CDE2Nios IINios IIUser Logic

2014/9/10

42


5 eda

DE2\DE2\DE2_NIOS_HOST_MOUSE_VGASRAMVGAI2Cuser_logic_SRAM_16Bits_512Kuser_logic_SEG7_LUT_8 user_logic_VGA_Controlleruser_logic_Open_I2CSOPC_DE2SOPC BuilderUser LogicDE2DE2SRAM_16Bits_512KSEG7_LUT_8Binary_VGA_ControllerSOPC BuilderTerasic Technologies Inc

2014/9/10

43


5 eda

1. SOPC

Quartus IICyclone IIEP2C35F672C6EP2C70F896C6EP2C35F672C6DE2EP2C35F672C6DE2 70

ToolsSOPC BuilderQuartus IISOPCSOPC BuilderSOPC BuilderFileNew systemCreate New SystemSOPCnios_0VHDLVerilog HDLVerilog HDLOKSOPC Builder

2014/9/10

44


5 eda

SOPC Builder

SOPC BuilderNios IISOPC BuilderNios IISOPC Builder

2014/9/10

45


5 eda

2. Nios II

SOPCFPGAFPGANIOS CPU CORECPUFPGA

DE2Nios IINIOS CPU CORECPUJTAG UARTUARTBUTTON PIOSW PIOLED LEDAvalonSRAMTimerLCDFlashFLASHSDRAMIDI2CI2CVGAISP1362USB

2014/9/10

46


5 eda

1NIOS CPU CORECPU

SOPC BuilderComponent LibraryNios II ProcessorNios IICPU

Nios II

Nios II/e600700LEs

Nios II/f14001800LEs

Nios II/s12001400LEs

2014/9/10

47


5 eda

Nios IISOPC Builder

Nios II/scpu_0CPUSOPCinstruction_Masterdata_Masterjtag_debug_moduleJTAGcpu_0Renamecpu_0EditLock Base Address

2014/9/10

48


5 eda

JTAG UART

2 JTAG UART

JTAG UARTJTAGFlashInterfaseSerialJTAG UARTJTAG UARTJTAG UARTjtag_uart_0

2014/9/10

49


5 eda

UART

3 UART

UARTNios IIUARTNIOSInterfaseSerialUARTRS232 series portUART115200UARTuart_0

2014/9/10

50


5 eda

4 BUTTON PIO

DE24key3key04PIOPeripherals Microcontroller PeripheralsPIOPIOBasic settingWidth4DirectionInput Ports OnlyNextPIOInput OptionsIRQLevelEdgeEdgeRising EdgeFalling EdgeEither EdgeEdgeEither EdgePIObutton_pio

2014/9/10

51


5 eda

5SW PIO

DE218SW17SW018SW PIOPeripherals Microcontroller PeripheralsPIOPIOBasic settingWidth18DirectionInput Ports Onlyswitch_pio

6LED

DE29LEDG8LEDG0PIOPIOWidth9DirectionOutput Ports OnlyLEDled_green

2014/9/10

52


5 eda

7LED

DE218LEDR17LEDR0PIOPIOWidth18DirectionOutput Ports OnlyLEDled_red

8

DE28hex7hex08User LogicSEG7_LUT_8PIOSEG7_Display

2014/9/10

53


5 eda

9SRAM

DE251216KBSRAMUser LogicSRAM_16Bits_512KSRAMSRAMsram_0

10Timer

SOPC BuilderPreripherals Microcontroller PreripheralsInterval TimerTimerTimertimer_0

2014/9/10

54


5 eda

11LCD

SOPC BuilderPreripheralsDisplayCharacter LCDLCDLCDlcd_16207_0LCDOptrex 16207216

12Avalon

NIOS CPUSRAMAvalonBridges and AdaptersMemory MappedAvalon-MM Tristate BridgeAvalontri_state_bridge_0

2014/9/10

55


5 eda

13Flash

SOPC BuilderMemory and Memory ControllersFlash Memory InterfaceFlashAttributesPresetsCustomSizeAddress Width20bitsData Width8bits

TimingNextFlashTimingFlashSetupWaterHoldSetup40nsWater160nsHold40nsFlashcfi_flash_0s1Avalontristate_master

2014/9/10

56


5 eda

14FLASH

FLASHFlashSOPC BuilderMemory and Memory ControllersMemoryEPCS Serial Flash ControllerFlashFLASHepcs_flash_controller

15SDRAM

SDRAMSDRAMSOPC BuilderMemory and Memory Controllers SDRAMSDRAM ControllerSDRAMMemory ProfilePresetsCustomData Width16Bits

2014/9/10

57


5 eda

TimingNextTimingSDRAMsdram_0

16System ID

system IDSOPCNios IIFPGAIDFPGAPeripheralsDebug and PerformanceSystem ID PeripheralSystem IDSystem IDsysid

2014/9/10

58


5 eda

5.3.2 SDRAM

cpu_0Reset AddressException Addresssdram_0SOPCSystemAuto-Assign Base AddressesSDROM

cpu_0SOPCGenerateNios IISOPCNios IInios_0SOPCExitSOPC Builder

2014/9/10

59


5 eda

5.3.3 Nios II

Nios IINios IIHDLDE2Nios IIVerilog HDL

1. Nios II

DE2Nios Reset_DelaySDRAM_PLL50MHz27MHzNios I2CVGAI2CI2C_Controller.vI2CI2C_AV_Config.vVGAVGA_Controller.v

2014/9/10

60


5 eda

2.

DE2Nios IIDE2

DE2/DE2_NIOS_HOST_MOUSE_VGA/DE2_NIOS_HOST_MOUSE_VGA.qsfSOPC_DE2.qsf

DE2Nios II

2014/9/10

61


5 eda

5.3.4 Nios II

Nios IISOPCDE2DE2 70Nios IISOPCNios IIDE2DE2 70Nios IIIDE

Quartus IIDE2DE2_demonstrationsDE2_70_demonstrationsDE2_NIOS_HOST_MOUSE_VGAToolsSOPC BuilderSOPC Builder

2014/9/10

62


5 eda

SOPC BuilderSystem GenerationNios II IDENios II IDENios IIIDEIDEWorkspace LauncherF:\DE2_demonstrations\DE2_NIOS_HOST_MOUSE_VGANios II IDENios II IDEFileSwitch Workspace

2014/9/10

63


5 eda

Nios IDE

C/C++

Nios II IDEC/C++

2014/9/10

64


5 eda

1.

IDEFileNewNew projectC/C++ ApplicationNew Project Select Project TemplateBlank ProjectHello LED Hello worldCount BinaryC/C++

2014/9/10

65


5 eda

Select Project TemplateCount Binarycount_binary_02count_binary_1Name

FinishNios II IDEsyslibcount_binary_0_syslib[nios_0]count_binary_0count_binary.cC/C++count_binary.c

2014/9/10

66


5 eda

count_binary.cPIO80ff4SW0-SW3LEDLCDcount_binary.cC/C++count_binary.ccount_binary.ccount_binary.hcount_binary.cC/C++

2014/9/10

67


5 eda

#include "count_binary.h"

int alt_main (void)

{

int second;

while (1)

{

usleep(100000); //0.1s

second++;

IOWR(SEG7_DISPLAY_BASE,0,second);

IOWR(LED_RED_BASE,0,second);

}

}

second0.1sDE2second

2014/9/10

68


5 eda

2.

C/C++count_binary_0Builder ProjectProjectBuilder ProjectProjectBuilder AllNios II IDE.elfTasks

2014/9/10

69


5 eda

3.

count_binary_0Debug AsNios II Instruction Set SimulatorIDEC/C++DisassemblyDebug perspectiveRunRun AsNios II Instruction Set SimulatorRunConsole

2014/9/10

70


5 eda

4.

Nios II IDEC/C++.elfNios IISDRAM

IDEToolQuartus II ProgrammerSOPC_DE2.sofDE2RunRunMainTarget ConnectionDebuggerSourceCommon5MainProjectcount_binary_0

2014/9/10

71


5 eda

Configurationscount_binary_0 Nios II HM ConfigurationsTarget ConnectionJTAG CableJTAGJTAG cableEDA6000ByteBlasterMV[LPT1]USBDE2BSB-Blaster[USB-0]JTAG Deviceautomatic1[EP2C35]Communication devicejtag_uart_0UARTUARTnone

2014/9/10

72


5 eda

Run

Nios Run As Nios Hardware

2014/9/10

73


5 eda

5.3.5 Nios II

Nios IISOPCUARTLEDLCDVGANios IINios IIVHDLVerilog HDLDE2DE2 70Nios IINios IINios II

2014/9/10

74


5 eda

1. PIO

PIOIOIOLEDIOLCD

1LEDR

DE218LEDR17LEDR0Nios IILED_REDNios II IDEC++Nios II IDEcount_binaryC++system.h

2014/9/10

75


5 eda

DE218LEDR17LEDR0C/C++LEDR18.c

#include "count_binary.h"

int alt_main (void)

{ int i,data;

while (1)

{ data = 0x01;

for (i=0; i<18; i++)

{ IOWR(LED_RED_BASE,0,data);

data <<= 1;

usleep(100000); //

}

}

}

2014/9/10

76


5 eda

2LEDG

DE29LEDG8LEDG0Nios IILED_GREENDE29LEDG8LEDG0C/C++

#include "count_binary.h"

void main(void)

{ int i, data;

while (1)

{ data = 0x01;

for (i=0; i<8; i++)

{ IOWR(LED_GREEN_BASE,0,data);

data <<= 1;

usleep(100000); } }

}

2014/9/10

77


5 eda

3

DE28HEX7HEX0Nios IISEG7_DISPLAYDE28HEX7HEX0sumC/C++

#include "count_binary.h"

int alt_main (void)

{ int sum;

while (1)

{ sum = 0x20090101;

IOWR(SEG7_DISPLAY_BASE, 0,sum);

usleep(1000000); //

sum = 0x00235959;

IOWR(SEG7_DISPLAY_BASE,0, sum);

usleep(1000000); } //

}

2014/9/10

78


5 eda

4SW

DE218SW17SW0Nios IISWITCH_PIOkeyDE218SWC/C++

#include "count_binary.h"

int alt_main (void)

{

int key;

while (1)

{

key = IORD(SWITCH_PIO_BASE,0);

IOWR(SEG7_DISPLAY_BASE,0,key);

}

}

2014/9/10

79


5 eda

5BUTTON

DE24KEY3KEY0nios_0BUTTON_PIOED218LEDR17LEDR0KEY0LEDC/C++

#include "count_binary.h"

int alt_main (void)

{ int i, key, data;

while (1)

{ key = IORD(BUTTON_PIO_BASE,0);

if (key & 0x02)

{ data = 0x01;

for (i=0; i<18; i++)

{ IOWR(LED_RED_BASE,0,data);

data <<= 1;

usleep(100000); } //

2014/9/10

80


5 eda

}

else

{

data = 0x20000;

for (i=0; i<18; i++)

{IOWR(LED_RED_BASE,0,data);

data >>= 1;

usleep(100000);

}

}

}

}

2014/9/10

81


5 eda

nios_0BUTTON_PIOBUTTON_PIOedge_capture_ptr

*edge_capture_ptr = IORD_ALTERA_AVALON_PIO_EDGE_CAP(BUTTON_PIO_BASE);

void* edge_capture_ptr = (void*) &edge_capture;

/* 4. */

IOWR_ALTERA_AVALON_PIO_IRQ_MASK(BUTTON_PIO_BASE, 0xf);

2014/9/10

82


5 eda

/* . */ IOWR_ALTERA_AVALON_PIO_EDGE_CAP(BUTTON_PIO_BASE, 0x0);

/* .*/

alt_irq_register( BUTTON_PIO_IRQ, edge_capture_ptr, handle_button_interrupts );

DE23KEY3KEY1C/C++button_2.c

2014/9/10

83


5 eda

2.

Nios IISOPC Builder32Nios IIusleep()1second1DE2C/C++

#include "count_binary.h"

int main (void)

{ int second;

while (1)

{ usleep(1000000);

second++;

IOWR(SEG7_DISPLAY_BASE,0,second); }

}

2014/9/10

84


5 eda

3. LCD

LCDI/O3I/O

stdinstdoutstderrI/Ohello world!stdoutC/C++

#include "stdio.h"

int main()

{

printf("hello world!");

return 0;

}

2014/9/10

85


5 eda

Nios II IDEC/C++count_binary_0System Library Propertiescount_binary_0Properties for count_binary_0_syslib

2014/9/10

86


5 eda

stdoutstderrstdinlcd_16207_0DE2LCDLCDjtag_uart_0DE2JTAGIDEConsole

2014/9/10

87


  • Login