삼성기초VHDL이론.PDF

Size: px
Start display at page:

Download "삼성기초VHDL이론.PDF"

Transcription

1 VHDL System ASIC Design Lab. : jcho@asiclab.inchon.ac.kr. Chap. 1 Chap. 2 Chap. 3 Digital SystemVHDL Modeling Chap. 4 Test Bench Model 1

2 Chap. 1 ASIC (1) 1-Chip Format Source encode Encrypt Channel encode Multi plex Modulate Frequency spread Multiple access X M T Synchronization Format Source decode Decrypt Channel decodel Demodulate Demultiplex Frequency despread Multiple access R C V VHDLASIC NO.-4 2

3 ASIC (2) Wireless Audiovisual Terminal Camera LCD senser A/D preprocessing D/A H.263/MPEG- 4 Encoder H.263/MPEG- 4 Decoder display processing Audio Out Audio In D/A A/D G H.223/H.245/ Link/Network Protocol control user interface OFDM modem transceiver H.324 CODEC : Video Audio Data Digital Communication Module : Data, Error Micro-Controller : 16-Bit ProcessorCamera, LCD Interface Chips Analog Front End Module : A/D, D/A VHDLASIC NO.-5 System Level Behavioral Level RTL Level Logic Level Circuit Level Layout Level Level Graphical Representation System Partioning,Pipelining Behavioral Scheduling,Allocation RTL State Machines,Logic and RTL Multi-level, 2-level Optimization Port1 Port2 Port3 Port1 Port2 Port3 Mux1 R1 R2 R3 ALU Output < Output Mux2 + ADDER HDL, Graphical specifications HDL, Bubble diagrams Logic Technology mapping/ translation a b c d e f Logic equations, HDL, Gates Implementation Place and Route Layout CIF/GDSII Graphic Diagram (HDL : Hardware Description Language) VHDLASIC NO.-6 3

4 2 FA D D FA D D ASIC...???...!! 1?? Q( x)? e x 2? y /2 dy architecture rtl of... signal s0, s1, s2 : std_logi process (clock,reset)... Behavioral Register Transfer Level VHDL, FPGA VHDL Physical ASIC System Board ASIC VHDLASIC NO.-7 Digital ASIC Digital ASIC Hierarchical cells Generators : Memory PLA Sparse logic Gate matrix Gate arrays Sea of gates Compacted arrays Anti-fuse based Memory-based VHDLASIC NO.-8 4

5 Digital ASIC ASIC Custom Cell-based Prediffused Prewired Density Performance Very High Very High High High High High Medium - Low Medium - Low Flexibility Very High High Medium Low Design time Manufacturing time Very Long Medium Short Medium Short Short Very Short Very Short Cost - low volume Very High High High Low Cost - high volume Low Low Low High VHDLASIC NO.-9 Boding Diagram Standard-Cell Design VHDLASIC NO.-10 5

6 Sea-of-Gate Design Boding Diagram : FLEX Decoder Chip VHDLASIC NO : System(Algorithm) Level C, MATLAB, SPW COSSAP System Level library sub-block system (, BER ) hardwarecomplexityperformance data-busbit size System Chip COSSAP DS/SS Base Band MODEM Modeling VHDLASIC NO.-12 6

7 -2 : Behavioral Compiler System Level Data Path Module Behavioral Compiler Option RTL RTL RTL RTL RTL RTL RTL Behavioral Source Behavioral Behavioral Synthesis Synthesis RTL RTL RTL RTL RTL RTL Design Compiler Netlist VHDLASIC NO : Behavioral Compiler Design Flow Behavioral Compiler Design Flow Operator to State Binding Variable to Register Binding Function Unit Sharing Control Logic FSM Specification Behavioral Simulation Implementation Behavioral Compiler Optional RTL Simulation HDL Synthesis & Test Gate_Level Simulation Gate_Level Optimization Silicon Vendor Place & Route VHDLASIC NO.-14 7

8 -2 : Behavioral Compiler RTL.????? Data Path Module RTL Controller Module RTL FSM Table Model VHDLASIC NO : Register-Transfer Level RTL Target Architecture D Q Selector D Q Register RF Memory D Q Nextstate logic state register Output logic Register VHDLASIC NO.-16 8

9 -3 : Register-Transfer Level Synthesis VHDL Hardware Logic state M A R Target Architecture M R : Basic Gates, Modular Units (mux, decoder, arithmetic units) : F/Fs, Registers, Counters, FSM(Finite State Machine) : ROM, RAM Bus : 3-Buffer VHDLASIC NO : Design Compiler Design Flow3 Design Flow RTL VHDL Simulation Gate Level,,Power Design Library : FPGA, ASIC Component Delay Timing Simulation Physical Design EDIF FPGA Physical Design FPGA Tool Compile Device Option Layout Data Simulation Target Board Emulation ASIC ASIC Physical Design Design HouseEDIF Wire Delay Simulation Sign-off ASIC Test Board, VHDLASIC NO.-18 9

10 HDL VHDL HDL VHDL :, synthesis sub-set VHDLmodeling guide. Verilog : VHDL, gate simulation design kitgolden simulator VHDL V1.0 V V3.0 Orono V3.5 Workshop Critical Design Review V4.0 V5.0 V6.0 V V Preliminary Draft IEEE Standard Standard Ballot 12 Final IEEE Standard 1992 VHDL '92 Value 1987 STD-1076 Version STD library 2-Value, { 0, 1 } 1990 Value IEEE library 9-value, { U, X, 0, 1, Z, W, L, H, - } VHDLASIC NO.-19 Design Design Entity Hardware : NOT gate, ALU, 8051 Micro-Controller, DSP Board, Digital TV System VHDL Design Entity : entity declaration design unit : architecture body design unit entity unitarchitecture unit : configuration design unit VHDLASIC NO

11 Design Entity Subprogram,, Component VHDL Interface Package Declaration Design Unit Sub-Program Algorithm Package Body Design Unit VHDLASIC NO.-21 VHDL 5 Design Unit Hardware 3 Unit entity declaration unit interface architecture body unit configuration declaration unit entity unitarchitecture unit simulation Software 2 Unit package declaration unit design entity package body unit subprogram 2 Unit entity unit 9-Value Package Visibility I/O architecture unit : Behavioral View Model : Structural View Model VHDLASIC NO

12 System System IP Macro Component Critical Path Block Block 4,000~5,000 GateOptimization (n, k, d) Reed-Solomon Decoder r(x) s 1 r? (x) s 2 x ( ) s 2t x ( ) Design Tree Model VHDLASIC NO.-23 VHDL Model (1) Design TreeFully VHDL Design NodeEntity Unit + Architecture Unit VHDLASIC NO

13 VHDL Model (2) Design Tree1-Level VHDL Root Design Node Entity Unit + Architecture Unit Root Design NodeConcurrent VHDL : (B3 BlockCritical Path ) B3 Behavioral View Model VHDLASIC NO.-25 VHDL System : SimulationDocumentation Chip : Simulation, Synthesis Documentation Chip IP(Intellectual Property) Model Re-Use Synthesis VHDL Modeling VHDLASIC NO

14 Full Adder 2 VHDL VHDLASIC NO.-27 SimulationSynthesis (1) Simulation Waveform 1-Level VHDL LSI-10K Library : 3.0 VHDLASIC NO

15 SimulationSynthesis (2) VHDL Structural View Node Behavioral View Node (HA: Half Adder, OR2: 2-input OR) LSI-10K Library : 1.5* = 3.5 Optimization VHDLASIC NO.-29 VHDL library IEEE; use IEEE.std_logic_1164.all; entity EX is port (A, B, C, D : in std_logic; Y1, Y2 : out std_logic); end EX; architecture RTL of EX is process (A, B, C, D) variable TMP: std_logic_vector(3 downto 0); TMP := A & B & C & D; case TMP is when "0000" => Y1<='1'; Y2<='0'; when "0001" => Y1<='1'; Y2<='0'; when "0010" => Y1<='1'; Y2<='0'; when "0011" => Y1<='1'; Y2<= 0'; when "0100" => Y1<='1'; Y2<='0'; when "0101" => Y1<='1'; Y2<='0'; when "0110" => Y1<='1'; Y2<='0'; when "0111" => Y1<='1'; Y2<='0'; when "1000" => Y1<='1'; Y2<='0'; when "1001" => Y1<='0'; Y2<='1'; when "1010" => Y1<='0'; Y2<='1'; when "1011" => Y1<='1'; Y2<='1'; when "1100" => Y1<='1'; Y2<= 0'; when "1101" => Y1<='1'; Y2<='0'; when "1110" => Y1<='1'; Y2<='0'; when others => Y1<='1'; Y2<='0'; end case; end RTL; VHDLASIC NO

16 Target Library : LSI_10K Area Area Design Constraint 5-cells(Area : 7.0), Critical Path(2.38ns) Timing Design Constraint 8-cells(Area : 15.0), Critical Path(0.84ns) VHDLASIC NO.-31 FPGA Fast Prototyping FPGA Board Reed-Solomon Decoder VHDLASIC NO

17 ASIC Reed-Solomon Decoder Bonding Diagram VHDLASIC NO.-33 Chap. 2 VHDL 17

18 Character Set, Lexical Elements Identifier Character Sets Upper-Case Letters Lower-Case Letters Special Characters Space Character Format Effectors Lexical Elements Delimiter Single Character Compound Character Identifier Reserved Identifier Identifier Literal VHDL-87 Reserved Word abs access after alias all and architecture array assert attribute block body buffer bus case component configuration constant disconnect downto else elsif end entity exit file for function generate generic guarded if in inout is label library linkage loop map mod nand new next nor not null of on open or others out package port procedure process range record register rem report return select severity signal subtype then to transport type units until use variable wait when while with xor VHDLASIC NO.-35 VHDL-93 Reserved Word Identifier VHDL-93 Reserved Word group impure inertial literal postponed pure reject rol ror shared sla sll sra srl unaffected xnor Identifier Alphabet. Alphabet. Alphabet, _., _. Alphabet. COUNT cout c_out AB2_5C VHSIC X1 FFT Decoder A_B_C xyz h333 STORE_NEXT_ITEM :. 2CA My-name H$B LOOP Decode_ N#3 VHDLASIC NO

19 VHDL Literal Literal Tree VHDLASIC NO.-37 Class Syntax Data_Class Object_Identifier : Data_Type [ := initial value ] ; signal A: std_logic; constant B: std_logic_vector(3 downto 0) := 0001 ; Data Class Signal Simulation Dynamic Data H/W Variable Simulation Dynamic Data H/W File Simulation Vector File Constant Static Data H/W object Constant H/W entity,architecture,process package,function,procedure block Signal entity, architecture, package, block Variable process, function, procedure VHDLASIC NO

20 Data Data : Data Type Group, Package Data Type VHDL Data Type : ++ TypeSynthesis Tool Scalar Data Types Enumeration Type, Numeric type, Physical Type ++ Composite Data Types Array Type, Record Type Access Data Type ++ File Data Type ++ Type package standard package 1987 std_logic_ Standard Package package STANDARD is type BOOLEAN is (FALSE, TRUE); type BIT is ( 0, 1 ); type CHARACTER is ( ); type SEVERITY_LEVEL is (NOTE, WARNING, ERROR, FAILURE); type INTEGER is implementation_defined ; type REAL is implementation_defined ; type TIME is range implementation_defined ; units fs: ps = 1000 fs; end units; subtype DELAY_LENGTH is TIME; function NOW return time; subtype NATURAL is integer range 0 to integer high; subtype POSITIVE is integer range 1 to integer high; type STRING is array(positive range <>) of character; type BIT_VECTOR is array(natural range <>) of bit; end STANDARD; VHDLASIC NO PackageType Std_logic_1164 Package package STD_LOGIC_1164 is type STD_ULOGIC is ( U, --Uninitialized X, --Forcing Unknown 0, --Forcing 0 1, --Forcing 1 Z, --High Impedance W, --Weak Unknown L, --Weak 0 H, --Weak Don t care ); type STD_ULOGIC_VECTOR is array(natural range <>) of std_ulogic; function resolved(s: std_ulogic _vector) return std_ulogic; subtype STD_ULOGIC is resolved std_ulogic; type STD_LOGIC_VECTOR is array(natural range <>) of std_logic; subtype X01 is resolved std_ulogic range X to 1 ; subtype X01Z is resolved std_ulogic range X to Z ; subtype UX01 is resolved std_ulogic range U to 1 ; subtype UX01Z is resolved std_ulogic range U to Z ; function and (l: std_logic; r: std_logic) return std_logic; ; function and (l: std_logic_vector; r: std_logic_vector) return std_logic_vector; ; function Is_X (s: std_ulogic) return boolean; end STD_LOGIC_1164; VHDLASIC NO

21 Data Type (1) Integer Data Type Enumeration Data Type type COUNTVALUE is range 0 to 15; FSM type TWENTIES is range 20 to 29; Synthesis tool bit type STATE_NAME is (A, B, C, D); 0 2 (0 ) element 1 Integer 0 ~ 15 type STATE is (S0, S1, S2); signal C_STATE, N_STATE : STATE; VHDLASIC NO.-41 Data Type (2) 8*5 Bit2 Memory : -1 8*5 Bit2 Memory : -2 Word Addressing Mode Bit Addressing Mode Memory type MEMORY4 is -1 array(0 to 7, 4 downto 0) of std_logic; subtype WORD1 is std_logic_vector(4 downto 0); Bit-addressing Mode 2 Memory type MEMORY1 is array(0 to 7) of WORD; -2 type WORD2 is array(4 downto 0) of std_logic; type MEMORY2 is array(0 to 7) of WORD; -3 type MEMORY3 is array(0 to 7) of std_logic_vector(4 downto 0); Composite Record Data Type type FloatPointType is record SIGN : std_logic; EXPONENT : unsigned(0 to 6); FRACTION : unsigned(24 downto 1); end record; Composite Array Data Type type unsigned is array(natural range <>) of std_logic; type unsigned_word is array(natural range 7 downto 0) of std_logic; VHDLASIC NO

22 Entity Declaration Unit Entity Unit Syntax entity ENTITY_NAME is [ generic ( LIST_OF_GENERICS_AND_THEIR_TYPES ) ; ] [ port ( LIST_OF_PORTS_AND_THEIR_MODE ) ; ] [ DECLARATIONS ] [ { ENTITY_STATEMENT } ] end [ ENTITY_NAME ] ; VHDLASIC NO.-43 Out ModeBuffer Mode Out ModeBuffer Mode out mode buffer mode Buffer Mode Buffer Mode, Buffer Mode. Buffer Mode Buffer ModeOut Mode VHDLASIC NO

23 Entity Declaration Unit D Flip-FlopEntity Unit Generic DecoderEntity Unit D Q SIZEIN A GENERIC_ DECODER SIZEOUT B CLK CLR Q -- 9-value Package Visibility library IEEE; use IEEE.std_logic_1164.ALL; -- Pin Name, Mode, Data Type entity DFF is port (D : in std_logic; CLK : in std_logic; CLR : in std_logic; -- D, CLK, CLR : in std_logic; Q, QBAR : out std_logic); end DFF; EN library IEEE; use IEEE.std_logic_1164.ALL; entity GENERIC_DECODER is -- Static Information generic (SIZEIN, SIZEOUT : integer); -- Dynamic Pin Data port (EN: in std_logic; A: in std_logic_vector(sizein-1 downto 0); B : out std_logic_vector(sizeout-1 downto 0)); end GENERIC_DECODER; VHDLASIC NO.-45 Architecture Body Unit Syntax architecture A_NAME of E_NAME is [ DECLARATIONS ] {CONCURRENT_STATEMENT} end [A_NAME] ; Behavioral view Q= 1 x= 1, YZ 1 Data-flow view Boolean state equation Structural view and gateor gate and or gatebehavioral View Data-flow View Mixed view Behavioral View Data-flow View Structural View. VHDLASIC NO

24 Architecture Body Unit Entity design unit library IEEE; use IEEE.std_logic_1164.all; entity EXAMPLE is port (X, Y, Z: in std_logic; Q: out std_logic); end EXAMPLE; Behavioral View architecture RTL1 of EXAMPLE is process (X, Y, Z) if X= 1 then Q <= 1 ; elsif (Y= 1 and Z= 1 ) then Q <= 1 ; else Q <= 0 ; end RTL1; Data-flow View architecture RTL2 of EXAMPLE is Q <= X or (Y AND Z); end RTL2; Structural View architecture RTL3 of EXAMPLE is component OR2 port (I1, I2: in std_logic; O1: out std_logic); end component; component AND2 port (I1, I2: in std_logic; O1: out std_logic); end component; for U0: OR2 use entity work.or2(rtl); for U1: AND2 use entity work.and2(rtl); signal S1: std_logic; U0: OR2 port map (X, S1, Q); U1: AND2 port map (Y, Z, S1); end RTL3; VHDLASIC NO.-47 Configuration Entity Unit Architecture Unit2 Simulation Architecture Unit Component Object Link Component Object Entity Unit EXAMPLE 3 Architecture Unit Simulation Entity Unit Architecture Unit Architecture Unit Configuration Specification Configuration Unit Configuration Declaration Unit VHDLASIC NO

25 Configuration Specification : Architecture UnitStructural View component compile library entity unit architecture unit component binding 1-Level architecture unit Syntax for INSTANTIATION_LIST : COMPONENT_NAME [ use entity ENTITY_NAME { ( ARCHITECTURE_NAME ) } ] [ generic map ( GENERIC_ASSOCIATION_LIST ) ] [ port map ( PORT_ASSOCIATION_LIST ) ] ; for U0 : NAND1, NAND2 use entity work.nand_gate(rtl); for U1 : INV1, INV2, INV3 use entity work.inverter; for ALL : NOR use configuration LIB1.NOR_C; NOR componentcompilelibrary LIB1 for others : NOT use entity work.not(rtl); VHDLASIC NO.-49 Configuration Declaration Unit : Behavioral View : configuration TOP of XDOWN is for BEHAVIORAL end for; end TOP; Structural View : design entity configuration configuration FA_C of FA_E is for FA_A for u1,u2: HA use entity WORK.HA_E(HA_A) generic map (3 ns, 2 ns); for HA_A for u1: XOR2 use entity WORK.XOR2_E(XOR2_A) generic map (3 ns); end for; for u2: AND2 use entity WORK.AND2_E(AND2_A) generic map (2 ns); end for; end for; end for; for u3: OR2 use entity WORK.OR2_E(OR2_A) generic map (2 ns); end for; end for; end; Generate configuration declaration unit : generate VHDLASIC NO

26 Source filecompiled file VDHL source filecompile library, compiled file (intermediate format) library WORK library VHDL library WORK IEEE VHDL (VASG) library 2-value STD 9-value IEEE VHDL Analyzer Design units VHDL Analyzer Intermediate format VHDL Design file A design unit is: - entity declaration - architecture body - configuration declaration - package declaration - package body Working library, WORK LIB1 LIB2 IEEE STD Design libraries VHDLASIC NO.-51 Library Library Visibility STD library VHDL library textio IEEE library std_logic_1164 std_logic_arith std_logic_unsigned ASIC vendor library WORK library directory logic gateentity, architecture user library package, entity, architecture VHDL Code Package Unit Visibility packagework library design unit. use WORK.package_name.item_name; packagelib2compile, CodeLIB1 Compile design unit. library LIB2; use LIB2.package_name.item_name; VHDLASIC NO

27 Library Visibility Entity Unit architectureconfiguration unit --library visibility library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.all; --entity unit entity ADD_SUB is port ( A, B : in std_logic_vector(3 downto 0); SEL : in std_logic; S : out std_logic_vector(3 downto 0); CF, ZF : out std_logic); end ADD_SUB; Package Declaration Unit package body unit library IEEE;use IEEE.std_logic_1164.ALL; use IEEE.std_logic_arith.all; use IEEE.std_logic_signed.all; package PACK_MATCH is function COMP2C ( A: std_logic_vector) return std_logic_vector; function TWO_MUL ( A: std_logic_vector; B: std_logic) return std_logic_vector; end PACK_MATCH; VHDLASIC NO.-53 Structural View Structural View VHDL Component Architecture Unit Component D.B. Wire Architecture Unit Port Map Component Component I/O Port Formal Name: Pin Name component HA port (A, B: in std_logic; C, D: out std_logic); end component; Component Configuration for U0: HA use entity work.ha(rtl); Component 3 Component Instantiation Actual Name: Wire Name PinWire H/W if for generate Component Instantiation PinWire 2 Positional Association Mapping Named Association Mappin WireData Type Signal. VHDLASIC NO

28 Component Instantiation VHDL library IEEE; use IEEE.std_logic_1164.all; entity FA is port (A, B, CIN : in std_logic; SUM, COUT : out std_logic); end FA; -- architecture RTL of FA is component HA port ( A, B : in std_logic; C, S : out std_logic); end component; component OR2 port ( A, B: in std_logic; Y : out std_logic); end component; for U0, U1: HA use entity work.ha(rtl); for U2: OR2 use entity work.or2(rtl); signal S1, S2, S3 : std_logic; --Positional Association Mapping U0 : HA port map (A, B, S1, S2); U1 : HA port map (CIN, S2, S3, SUM); U2 : OR2 port map (S1, S3, COUT); --Named Association Mapping --U0 : HA port map (A=>A, B=>B, -- C=>S1, S=>S2); --U1 : HA port map (A=>CIN, B=>S1, -- C=>S3, S=>SUM); --U2 : OR2 port map (A=>S1, B=>S3, -- Y=>COUT); end RTL; Compile HAOR2 VHDL Component Compile HAOR2FA Component Component Compile VHDLASIC NO.-55 Unconnected Port Unconnected Port Pin Wire Port Unconnected Port Unconnected Port architecture RTL of EX1 is component EX2 port (CLK,PRESET,RESET,D: PRSET in std_logic; D D Q Q Q, QBAR : out std_logic); end component; for U1: EX2 use entity work.dsr(rtl); CLK Qbar signal VCC : std_logic; RESET --VHDL-87 / CLR Unconnected Output Port VCC <= 1 ; Unconnected Input Port VHDL Unconnected Input Port VCC 1 U1 : EX2 port map (D => D, CLK =>CLK, PRESET =>VCC, RESET=>CLR, Q=>Q, QBAR=>open); GND 0 --VHDL-93 Unconnected Output Port Reserved IdentifierOPEN --U1 : EX2 port map (D => D, -- CLK=>CLK, PRESET => 1, -- RESET=>CLR, Q=>Q, -- QBAR=>open); end RTL; VHDLASIC NO

29 Generic Map Command Generic Behavioral entity AND_GATE is generic (TDELAY : time := 10 ns; N : positive := 2); port (A : in std_logic_vector(n-1 downto 0); C : out std_logic); end AND_GATE; architecture RTL of AND_GATE is P0 : process (A) variable INT : std_logic; INT := 1; for I in (A length-1) downto 0 loop if (A(I)= 0 ) then INT := 0 ; end loop; C <= INT after Tdelay; end RTL; Generic Map Structural entity EX is port (D1, D2, D3, D4, D5 : in std_logic; Q1, Q2 : out std_logic); end EX; architecture RTL of EX is component AND_COMP generic (TDELAY : time; N : positive); port (A : in std_logic_vector(n-1 downto 0); C : out std_logic); end component; for all : AND_COMP use entity work.and_gate(rtl); U1: AND_COMP generic map (n=>2, TDELAY=>8 ns) port map (A(0)=>D1, A(1)=>D2, C=>Q1); U2: AND_COMP generic map (n=>3, TDELAY=>12 ns) port map (A(0)=>D3, A(1)=>D4, A(2)=>D5, C=>Q2); end RTL; VHDLASIC NO.-57 For..Generate Structure View 4-Bit Ripple Carry Adder ArchitectureConfiguration Unit ComponentSymbol architecture RTL1 of FA4 is NameFormal Name -- FA Component.. signal TMP : std_logic_vector(4 downto0); Component Instantiation TMP(0) <= 0 ;. G: for I in 0 to 3 generate L : FA port map ( X(I), Y(I), TMP(I), Z(I), TMP(I+1)); end generate; COUT <= TMP(4); end RTL1; -- configuration CONF_FA4 of FA4 is for RTL for G for L: FA use entity work.fa(rtl); end for; end for; end for; end CONF_FA4; Port Map Configuration VHDLASIC NO

30 If For..Generate Structure View 4-Bit Ripple Carry Adder Architecture Unit Component Symbol architecture RTL1 of FA4 is Name. -- FA, HA Component Component -- Instantiation signal T : std_logic_vector(4 downto 1);. G0: for I in 0 to 3 generate G1 : if I=0 generate L0 : HA port map (X(I),Y(I),Z(I),T(I+1)); end generate; G2 : if I>=1 and I<=3 generate L1 : FA port map (X(I),Y(I),T(I),Z(I),T(I+1)); end generate; end generate; COUT <= TMP(4); end RTL1; VHDLASIC NO.-59 Generate Configuration Declaration Unit Configuration Unit configuration CONF_FA4 of FA4 is for RTL1 for G0 for G1 for L0: HA use entity work.ha(rtl); end for; end for; for G2 for L1: FA use entity work.fa(rtl); end for; end for; end for; end for; end CONF_FA4; Component component configuration architecture RTL of TB_FA4 is signal X, Y: std_logic_vector(n-1 downto 0); signal Z: std_logic_vector(n-1 downto 0); signal COUT: std_logic; component FA4 generic(n: integer := 4); port (X: in std_logic_vector(n-1 downto 0); Y: in std_logic_vector(n-1 downto 0); Z: out std_logic_vector(n-1 downto 0); COUT: out std_logic); end component; for U0: FA4 use configuration work.conf_fa4; U0: FA4 port map (X, Y, Z, COUT); X <= 0011, 1010 after 40 ns; Y <= 1000, 1110 after 20 ns; end RTL; VHDLASIC NO

31 H/W Sensitivity Signal Simulation reset Spreading Code Active State: chip clock 8-Bit Shift Register Suspend State: Sensitivity Signal 8-Bit Shift Register I È»êµÈ Reset= 0 Chip Clock I-Data Falling Edge Q Sensitivity Signal È»êµÈ Q-Data Shift,. 2 XOR Gate Group Block Shift Register Block Register, I Q XOR Gate, reset, chip clock. XOR Gates Block VHDL I, Q Shift Register 3 Concurrent 2 Concurrent 1 Concurrent VHDLASIC NO.-61 VHDL Behavioral View Concurrent signal assignment statement basic signal assignment conditional signal assignment selected signal assignment process statement with many sequential statements concurrent subprogram call statement block statement basic block guarded block signal assignment concurrent assert statement Structural View Concurrent component instantiation statement Generate statement Behavioral View process function procedure subprogram wait statement Vector basic signal assignment statement variable assignment statement if statement case statement loop statements for..loop statement while loop statement infinite loop statement next statement, exit statement null statement sequential subprogram call statement sequential assert statement VHDLASIC NO

32 Data Operator Logical Operators not and or nand nor xor xnor(vhdl-93) Operand Type : std_logic, boolean Result Type : std_logic, boolean Relational Operators = /= < <= > >= Operand Type : any type Result Type: boolean Arithmetic Operators + - * / ** MOD REM ABS Operand Type : integer, real, physical Result Type: integer, real, physical Concatenation Operators : & Operand Type : array of any type Result Type : array of any type MODREM A = B*N + (A mod B) (N: ) A = (A/B)*B + (A rem B) A=10, B=3: A mod B = 1, A rem B = 1 A=-10, B=3: A mod B = 2, A rem B = -1 A=11, B=- 4: A mod B = -1, A rem B = 3 operator reset= 0 or (clk= 0 and clk event) A <= ((B nand C) nand D) nand E; A <= (B and C) or (D and E) VHDLASIC NO.-63 Predefined Type and Array Attributes Attribute type attribute, array attribute, signal attribute, entity attribute Array Attribute Type. type COLOR is (RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET); type STATE is (S0, S1, S2, S3, S4); type INDEXD is range 7 downto 0; Signal Type Attribute Return Value COLOR pos(green) = 3 COLOR val(3) = GREEN STATE pos(s2) = 2 STATE val(0) = S0 COLOR left= RED STATE left= S0 STATE right = S4 COLOR low = RED COLOR high = VIORET STATE high = S4 COLOR pred(green) = YELLOW STATE succ(s3) = S4 COLOR leftof (GREEN) = YELLOW STATE rightof(s2) = S3 INDEXD left= 7 INDEXD right = 0 INDEXD low = 0 INDEXD high = 7 INDEXD pred(6) = 5 INDEXD leftof(6) = 7 INDEXD succ(6) = 7 INDEXD rightof(6) = 5 INDEXD range = 7 downto 0 INDEXD reverse_range = 0 to 7 INDEXD length = 8 VHDLASIC NO

33 Predefined Signal Attributes X2 active Simulation Cycle X2Transaction True X3 event Simulation Cycle X3Event True X2 stable(5 ns) Simulation Cycle 5 ns X2Event True X2 quiet(5 ns) Simulation Cycle 5 ns X2Transaction True X2 last_event Simulation Cycle Event X2 last_active Simulation Cycle Active X2 last_value Simulation Cycle Event VHDLASIC NO.-65 Predefined Signal Attributes Signal X1 Simulation = 15 ns Attribute X1 stable(8 ns) : FALSE X1 stable(2 ns) : TRUE X1 event : FALSE X1 last_event : 5 ns X1 last_value : 1 Simulation = 20 ns Attribute X1 event and X1= 1 : TRUE X1= 1 and (not X1 stable) : TRUE Simulation = 25 ns Attribute X1 event and X1= 0 : TRUE X1= 0 and (not X1 stable) : TRUE X1 delayed(2 ns) Value2 ns delay VHDLASIC NO

34 Delay Delay Selection Delay Model (VHDL-87) Inertial Delay : VHDL default delay delay noise. delay. Component delay. Transport Delay delay. Interconnect delay modeling. Internal Delay Delta Delay : concurrent event driven simulation delay. Simulation : Plot. B <= transport A after 3 ns; C <= A after 3 ns; D <= A; VHDLASIC NO.-67 Delay Model (VHDL-93) VHDL-87 Inertial Delay Model Reject Delay Model A B A [ns] b1 <= inertial a after 10 ns; b2 <= transport a after 10 ns; b3 <= reject 4 ns inertial a after 10 ns; B1 B2 B3 VHDLASIC NO

35 Delta Delay Model VHDL Simulation Engine Delay Model A A B c <= a and b; d <= not c; & C D B [ns] 30 ns + 1 delta 57 ns + 1 delta C D 30 ns + 2 delta 57 ns + 2 delta VHDLASIC NO.-69 architecture RTL of ADDER is signal S0, S1 : std_logic; Basic Signal Assignment Full-Adder Gate Signal Assignment Sensitivity Signal Aggregate : Target Signal Source Assign architecture RTL of EX is signal A : std_logic_vector( 4 downto 0); signal B : std_logic_vector( 4 downto 0); A <= (others => 0 ); Basic Signal Assignment Architecture Unit -- A <= ; -- A <= ( 0, 0, 0, 0, 0 ); --gatesignal assignment SUM <= S0 xor CIN; COUT <= S1 or (S0 and CIN); S0 <= A xor B; S1 <= A and B; end RTL; B <= (1=>C(2), 3=>C(1), others => D(0)); -- B <= D(0)&C(1)&D(0)&C(2)&D(0); end RTL; Source Target Signal. VHDLASIC NO

36 Conditional Signal Assignment Syntax signal_identifier <= waveform_1 when condition_1 else waveform_2 when condition_2 else waveform_(n-1) when condition_(n-1) else waveform_n ; D Type Flip-FlopVHDL Symbol architecture A2 of DFF is D Q Q <= 0 when CLR= 0 else D when (CLK= 0 and CLK EVENT) else CLK Q Q; CLR -- D when (CLK= 0 and CLK EVENT); Valid in VHDL-93 QBAR <= not Q; end A2; Data Selector Conditional Signal Assignment MUXOUT <= I0 when (SEL= 0 ) else I1; -- when (SEL= 1 ) else X ; VHDLASIC NO.-71 Selected Signal Assignment Syntax with expression select signal_identifier <= waveform1 when expression_1,... waveform(n-1) when expression(n-1), waveform(n) when others ; 2*1 MUX library IEEE; use IEEE.std_logic_1164.ALL; entity MUX21 is port (SEL, A, B : in std_logic; C : out std_logic); end MUX21; architecture RTL of MUX21 is with SEL select C <= A after 10 ns when 0, B after 10 ns when others; end RTL; Half-Adder library IEEE; use IEEE.std_logic_1164.ALL; entity HA is port (A, B : in std_logic; SUM, COUT : out std_logic); end HA; architecture RTL of HA is signal TMP1, TMP2 : std_logic_vector(1 downto 0); TMP1 <= A & B; with TMP1 select TMP2 <= 00 when 00, 01 when 01, 01 when 10, 10 when others; (COUT, SUM) <= TMP2; end RTL; VHDLASIC NO

37 Syntax [ Label : ] process [ ( Sensitivity_Signals ) ] -- declaration statements -- sequential activity statements end process [ Label ] ; Process Sensitivity Signal 1 Wait. Simulation Wait. Wait Simulation. Stimulus Vector Sensitivity Signal Half-Adder Sensitivity Signal process (A, B) process (A) Wait. Simulation SUM <= A xor B; SUM<=A xor B; Signal COUT <= A and B; COUT<=A and B; 1. Process Sensitivity Signal List Simulation ( ) Signal Event Synthesis ( ) Event Process Simulation. H/W VHDLASIC NO.-73 Signal Variable Assignment (1) Assignment : Target IdentifierObject 2 Signal Assignment [label:] signal_identifier <= [transport] expression [after expression]; Variable Assignment [label:] variable_identifier := value_expression; 2 Assignment Code -1 process variable num,sum:integer := 0; variable_process signal_process wait for 10 ns; time num sum time num sum num := num + 1; sum := sum + num; process wait for 10 ns; num <= num + 1; sum <= sum + num; VHDLASIC NO

38 Signal Variable Assignment Signal Assignment Variable Assignment VHDLASIC NO.-75 Simulation Waveform Signal Assignment Simulation Waveform Variable Assignment Simulation Waveform VHDLASIC NO

39 Wait Syntax wait [ on list ] [ until condition ] [ for time ] ; wait; SimulationRestart. wait on A; Signal A Simulation. wait until (CLK= 0 and CLK event); CLK SignalFalling Edge Simulation. wait for 100 ns; 100 nssimulation,. wait until A= 1 for 50 ns; 50 ns A A= 1. wait on A until (C= 1 ) for 50 ns; 50 ns A C= 1. Wait ( ) Synthesis Code : Clock wait Tool wait until CLK Edge Test Bench Modeling VHDLASIC NO.-77 Process Process Simulation Simulation process (A) process C1<=NOT A; C2<=NOT A; wait on A; A C [ns] process wait on A; C3<=NOT A; process process wait until A= 1 ; C5<=NOT A; C4<=not A; wait until A= 1 for 10 ns; C2 C3 C4 C5 10 ns 20 ns VHDLASIC NO

40 Clock Wait Test Bench Modeling clock VHDL : CLK1, CLK2, CLK3, CLK4, CLK5, CLK6 0. process process CLK1 <= not CLK1; CLK2 <= not CLK2 after 25 ns; wait for 25 ns; wait on CLK2; process (CLK3) CLK3 <= not CLK3 after 25 ns; CLK4 <= not CLK4 after 25 ns; process process if (now = 0 ns) then CLK5 <= 0 ; wait for 20 ns; CLK6 <= 0 ; wait for 100 ns; CLK5 <= 1 ; wait for 30 ns; else CLK6 <= NOT CLK6; wait for 25 ns; end if Quiz: Simulation. VHDLASIC NO.-79 If Syntax if...then if... then...else if then elsif elsif else if then.if then end if. Latch IF -1: 2*1 MUX process (A, B, SEL) if SEL= 0 then Y <= A; else Y <= B; -2: 4*1 MUX process (SEL, A, B, C, D) if SEL= 00 then Y <= A; elsif SEL= 01 then Y <= B; elsif SEL= 10 then Y <= C; else Y <= D; -3: Latch process (EN, D) if EN= 1 THEN Q <= D; end if VHDLASIC NO

41 Case Syntax caseexpression is when condition_1 => (sequential_statements;).. when condition_(n-1) => (sequential_statements;) when others => (sequential_statements;) end case ; when condition when Value => when Value Value Value => when Value to Value => when others => Truth Table 1 - Bit & operator Multi-Bits Variable expression 1-Bit Half-Adder architecture RTL1 of EX is --signal TMP1 : -- std_logic_vector(1 downto 0); --TMP1 <= A & B; --process (TMP1) process (A, B) variable TMP1, TMP2 : std_logic_vector(1 downto 0); TMP1 := A & B; case TMP1 is when 00 => TMP2 := 00 ; when => TMP2 := 01 ; when others => TMP2 := 10 ; end case; (COUT, SUM) <= TMP2; end RTL; VHDLASIC NO.-81 For..Loop Syntax For..Loop [Label:] Data-flow Graph for loop_parameter in discrete_range loop VHDL. --sequential statements end loop [Label] ; Range integer_expression to ( downto) integer_expression array_attribute range array_attribute reverse_range loop_parameter Signal Variable. Signal Assignment Data-Flow For..Loop VHDLASIC NO

42 For..Loop (1) VHDLASIC NO.-83 For..Loop (2) VHDLASIC NO

43 While..Loop While..Loop Syntax [Label:] while condition loop --sequential statements end loop [Label] ; Infinite Loop process (N) variable TMP, I : integer; 1 ~ N TMP := 0; I := 0; entity ADD_LOOP is FIRST: loop port ( N : in integer; I := I + 1; SUM : out integer); TMP := TMP + 1; end ADD_LOOP; exit when (I = N) ; architecture RTL of ADD_LOOP is end loop FIRST; process (N) variable TMP, I : integer; Advanced Synthesis Tool TMP := 0; I := 1; while (I <= N) loop Behavioral Compiler TMP := TMP + I; I := I + 1; end loop; SUM <= TMP; end RTL; VHDLASIC NO.-85 NextExit Next Syntax next; nextloop_label ; next when boolean_expression ; next loop_label when boolean_expression ; LBL1 : process (S) variable TMP, J : integer := 0; TMP := 0; J := 0; A_LOOP: for I in 0 to 7 loop J := J + 1; if J > S then next A_LOOP; TMP := TMP + 1; end loop; end process LBL1; Exit Syntax exit; exit loop_label ; exit when boolean_expression ; exit loop_label when boolean_expression ; LBL2 : process (S) variable SUM, CNT : integer := 0; SUM:= 0; CNT:= 0; FIRST: loop CNT:=CNT+1; SUM:=SUM+CNT; exit when SUM > 100; end loop FIRST; --SECOND: loop -- CNT:=CNT+1; SUM:=SUM+CNT; -- if SUM > 100 then exit; --end loop SECOND; end process LBL2; VHDLASIC NO

44 Block Script File read -f vhdl blk_fa.vhd group -hdl_block nand_1 group -hdl_block nand_2 group -hdl_block or2 /* create_clock clk*/ max_delay 0 -to all_outputs() compile -map_effort high create_schematic write -f db write -f edif -hierarchy -o blk_fa.edf Guarded Block Statement D_FF: block(clk= 0 and clk event) Q <= guarded D; end block; VHDLASIC NO.-87 Assert (1) Syntax assertcondition ; assertcondition report message ; assertcondition severity level ; assertcondition report message severity level ; Passive : H/W Concurrent, Sequential Assert D Flip-FlopAssert Setup Time Violation Setup Time CLK D Setup Setup Assert library IEEE; use IEEE.std_logic_1164.all; entity DFF_A_SR is generic (D_SETUP : time := 2 NS); port (SD_N, RD_N, CLK, DIN : in std_logic; Q, Q_N : out std_logic); assert (SD_N='1' or RD_N='1') report "PRESET and CLEAR are both '0' ; process (CLK, DIN) variable D_CHANGE : time := 0 ns; variable D_VALUE, CLK_VALUE : std_logic; if (D_VALUE /= DIN) then D_CHANGE := now; D_VALUE := DIN; if (CLK_VALUE /= CLK) then CLK_VALUE := CLK; if (CLK='1') then assert (now - D_CHANGE >= D_SETUP) report "SETUP VIOLATION ; end DFF_A_SR; VHDLASIC NO

45 Assert (2) Assert VHDLASIC NO.-89 Package Package Syntax package package_name is --exported_subprogram_declarations --exported_constant_declarations --exported_components --exported_type_declarations --attribute_declarations --attribute_specifications end [package_name] ; package body package_name is --exported_subprogram_bodies --internal_subprogram_declarations --internal_subprogram_bodies --internal_constant_declarations --internal_components --internal_type_declarations end [package_name] ; Package package EX_PKG is subtype INT8 is INTEGER range 0 to 255; constant ZERO : INT8 := 0; constant MAX : INT8 := 100; procedure Increment (variable Count: inout INT8); end EX_PKG; Package package body EX_PKG is procedure Increment (variable Count: inout INT8) is if (Count >= MAX) then Count := Zero; else Count := Count + 1; end Increment; end EX_PKG; VHDLASIC NO

46 Predefined Package Predefined Packages Package Group Package. Library Name : STD $/synopsys/packages/ieee/src/*.vhd Package Name standard std_logic_1164.vhd textio textio package std_logic_arith.vhd visibility. std_logic_signed.vhd Library Name : IEEE std_logic_unsigned.vhd Package Name std_logic_textio.vhd std_logic_1164 std_logic_textio Visibility. Synopsys Package. Library Name : IEEE Package Name std_logic_unsigned std_logic_signed std_logic_arith VHDLASIC NO.-91 Unsigned Data Data Type: std_logic_vector Package: std_logic_unsigned VHDL library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity TB_UNSIGNED is end TB_UNSIGNED; architecture RTL of TB_UNSIGNED is signal s1, s2 : std_logic_vector(3 downto 0); signal a, b : std_logic_vector(4 downto 0); signal c, d : std_logic_vector(7 downto 0); process s1 <= "0011"; s2 <= "0101"; wait for 50 ns; s1 <= "1101"; s2 <= "0101"; wait for 50 ns; s1 <= "1101"; s2 <= "1011"; wait for 50 ns; s1 <= "0011"; s2 <= "1011"; wait for 50 ns; a <= ('0'&s1) + s2; b <= ('0'&s1) - s2; c <= s1 * s2; d <= s1 * "1000"; end RTL; Data Type: unsigned Package: std_logic_arith VHDL library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity TB_ARITH_UNSIGNED is end TB_ARITH_UNSIGNED; architecture RTL of TB_ARITH_UNSIGNED is signal s1, s2 : unsigned(3 downto 0); signal a, b : unsigned(4 downto 0); signal c : unsigned(7 downto0); process s1 <= "0011"; s2 <= "0101"; wait for 50 ns; s1 <= "1101"; s2 <= "0101"; wait for 50 ns; s1 <= "1101"; s2 <= "1011"; wait for 50 ns; s1 <= "0011"; s2 <= "1011"; wait for 50 ns; a <= ('0'&s1) + s2; b <= ('0'&s1) - s2; c <= s1 * s2; end RTL; VHDLASIC NO

47 Unsigned Data Simulation std_logic_vector std_logic_unsigned package Simulation unsigned std_logic_arith package simulation VHDLASIC NO.-93 Signed Data Data Type: std_logic_vector Package: std_logic_signed VHDL library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_signed.all; entity TB_SIGNED is end TB_SIGNED; architecture RTL of TB_SIGNED is signal s1, s2 : std_logic_vector(3 downto 0); signal a,b : std_logic_vector(4 downto 0); signal c, d : std_logic_vector(7 downto 0); process s1 <= "0011"; s2 <= "0101"; wait for 50 ns; s1 <= "1101"; s2 <= "0101"; wait for 50 ns; s1 <= "1101"; s2 <= "1011"; wait for 50 ns; s1 <= "0011"; s2 <= "1011"; wait for 50 ns; a <= (s1(3)&s1) + (s2(3)&s2); b <= (s1(3)&s1) - (s2(3)& s2); c <= s1 * s2; d <= s1 * "1000"; end RTL; Data Type: signed Package: std_logic_arith VHDL library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity TB_ARITH_SIGNED is end TB_ARITH_SIGNED; architecture RTL of TB_ARITH_SIGNED is signal s1, s2 : signed(3 downto 0); signal a, b : signed(4 downto 0); signal c : signed(7 downto 0); process s1 <= "0011"; s2 <= "0101"; wait for 50 ns; s1 <= "1101"; s2 <= "0101"; wait for 50 ns; s1 <= "1101"; s2 <= "1011"; wait for 50 ns; s1 <= "0011"; s2 <= "1011"; wait for 50 ns; a <= (s1(3)&s1) + (s2(3)&s2); b <= (s1(3)&s1) - (s2(3)& s2); c <= s1 * s2; end RTL; VHDLASIC NO

48 Signed Data Simulation std_logic_vector std_logic_signed package simulation signed std_logic_arith package simulation VHDLASIC NO.-95 Subprogram Function Subprogram Subprogram Parameter Function Data Mode Procedure in. Subprogram Data Object Package : constant signal Package : constant Architecture Formal NameActual Name Process Function Syntax signal : signal constant : Package function name (formal_parameter_list) signal,constant,variable return data_type is Function Visibility Package Package function name (formal_parameter_list) Package return data_type is Package Body -- declarative statements Package Body -- sequential statements Architecture -- including return expression Architecture end name ; Process Process VHDLASIC NO

49 Function Subprogram Function Subprogram package MYPACK is function MAX (A, B: in std_logic_vector) return std_logic_vector; function EQUAL (A, B : in std_logic_vector) return boolean; end; package body MYPACK is function MAX (A, B: in std_logic_vector) return std_logic_vector is if A > B then return (A); else return (B); end MAX ; function EQAUL(A, B : in std_logic_vector) return boolean is return (A=B); end EQUAL; end MYPACK; Function Subprogram library IEEE; use IEEE.std_logic_1164.all; use work.mypack.all; entity EX is port (D1, D2: in std_logic_vector(3 downto 0); DATA1, DATA2: in std_logic_vector(7 downto 0); Q: out std_logic_vector(3 downto 0); DATA_OUT: out boolean); end EX; architecture RTL of EX is Q <= MAX(d1, d2); --Concurrent function call process (DATA1, DATA2) DATA_OUT <= EQUAL(DATA1, DATA2); --Sequential function call end RTL; VHDLASIC NO.-97 Procedure Subprogram Procedure Syntax Package procedure name (formal_parameter_list) ; Package procedure name (formal_parameter_list) is -- declarative statements -- sequential statements end name ; Parameter Data Mode in, out, inout. in mode Data Class Modein, constant, signal, variable. Modein, constant Modeinout out, variable, signal. Modeinout out, variable Formal NameActual Name signal : signal variable : variable constant : signal,constant,variable Procedure Visibility Package Package Package Body Package Body Architecture Architecture Process Process VHDLASIC NO

50 Procedure Subprogram (1) Procedure package MYPACK is procedure COMPUTE (A, B: in integer; MEAN, MAX: out integer); end MYPACK; package body MYPACK is procedure COMPUTE (A, B: in integer; MEAN, MAX: out integer) is MEAN := (A+B)/2; if A> B then MAX := A; else MAX := B; end COMPUTE; end MYPACK; Procedure use work.mypack.all; entity EX is port (D1, D2, D3, D4: in integer; Q1, Q2, Q3, Q4: out integer); architecture RTL1 of EX is COMPUTE(D1, D2, Q1, Q2); --, Q1, Q2 not variables --Concurrent procedure call process(d3, D4) variable A, B: integer; COMPUTE(D3, D4, A, B); --, A and B variables --Sequential procedure call Q3 <= A; Q4 <= B; end RTL1; VHDLASIC NO.-99 Procedure Subprogram (2) Procedure package MYPACK is procedure COMPUTE (A, B: in integer; signal MEAN, MAX: out integer); end MYPACK; package body MYPACK is procedure COMPUTE (A, B: in integer; signal MEAN, MAX: out integer) is MEAN <= (A+B)/2; if A> B then MAX <= A; else MAX <= B; end COMPUTE; end MYPACK; Procedure use work.mypack.all; entity EX is port (D1, D2, D3, D4: in integer; Q1, Q2, Q3, Q4: out integer); architecture RTL2 of EX is COMPUTE(D1, D2, Q1, Q2); --, Q1 and Q2 signals --Concurrent procedure call process(d3, D4) COMPUTE(D3, D4, Q3, Q4); --, Q3 and Q4 signals --Sequential procedure call end RTL2; VHDLASIC NO

51 Procedure Subprogram (3) library IEEE; use IEEE.std_logic_1164.ALL; package EXAMPLE is procedure RCA (A, B : in std_logic_vector; CIN : in std_logic; SUM : out std_logic_vector; COUT : out std_logic); end EXAMPLE; package body EXAMPLE is function XOR3 (A, B, C : in std_logic) return std_logic is return (A xor B xor C); end XOR3; procedure RCA (A, B : in std_logic_vector; CIN : in std_logic; SUM : out std_logic_vector; COUT : out std_logic) is variable C: std_logic_vector((a high-a low+1) downto0); C(0) := CIN; for I in 0 to (A high-a low) loop SUM(I+SUM low) := XOR3(A(I+A low), B(I+B low), C(I)); C(I+1) := (A(I+A low) and (I+B low)) or (C(I) and (A(I+A low) or B(I+B low))); end loop; COUT := C(C high); end RCA; end EXAMPLE; library IEEE; use IEEE.std_logic_1164.ALL; use work.example.all; entity ADDER_TEST is port ( A, B: in std_logic_vector(15 downto 0); CIN : in std_logic; SUM : out std_logic_vector(15 downto 0); COUT : out std_logic); end ADDER_TEST; architecture RTL of ADDER_TEST is process (A,B,CIN) variable TMP_SUM: std_logic_vector(sum range); variable TMP_COUT : std_logic; RCA(A, B, CIN, TMP_SUM, TMP_COUT); SUM <= TMP_SUM; COUT <= TMP_COUT; end RTL; VHDLASIC NO.-101 Operator Overload VHDL Compiler data Compile VHDL Code+ type Operator CompilerOperandData Type overload Function. function Type Function Function Function Algorithm,. Function Analysis Error Message. Function Function Synopsys Vendor Algorithm. Package C <= A + B, A, Bstd_logic_vector function + (L: std_logic_vector, R: std_logic_vector) A std_logic_vector, B integer return std_logic_vector; function + (L: std_logic_vector, R: integer) Function Name return std_logic_vector; VHDLASIC NO

52 Subprogram Overload Subprogram, Formal Parameter Return Value Data Type Subprogram library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_arith.all; use IEEE.std_logic_unsigned.all; package EXAMPLE is function CONV_2COMP (A : std_logic_vector; K : integer) return std_logic_vector; function CONV_2COMP (A : integer; K : integer) return std_logic_vector; end EXAMPLE; package body EXAMPLE is function CONV_2COMP (A : std_logic_vector; K : integer) return std_logic_vector is return (not (A(K-1) downto 0)+1); end; -- function CONV_2COMP (A : integer; K : integer) return std_logic_vector is return (not conv_std_logic_vector(a,k)+1); end; end EXAMPLE; VHDL Compiler B <= CONV_2COMP(A, 8);. Astd_logic_vector Ainteger VHDLASIC NO.-103 Chap 3. Digital SystemVHDL Modeling 52

53 Digital SystemRTL -1 4 Process -2 2 Process VHDLASIC NO.-105 Digital SystemVHDL Modeling Template H/W Model VHDL Modeling Entity + Architecture Entity Unit Visibility 9-value Visibility Arithmetic Operator Visibility Visibility, Block Diagram Generic, Port Data DataIdentifier, Mode, Type Architecture Unit entity name is port ( ); end name ; architecture architecture_name of name is (: signal); Package -- sync : process (clock, reset ) Basic Modeling Template library IEEE; use IEEE.std_logic_1164.ALL; VHDL statements for state elements end process sync; -- ( ) -- comb : process ( ) (: variable) end process comb; end architecture_name ; VHDLASIC NO

54 4-Bit Up-Counter VHDL Modeling Counter Table RST Block Diagram LOADB ENB DIN CLK 4 X Counter RST ENB CLK VHDL library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.all; entity COUNTER is port ( RST,CLK,LOADB,ENB: in std_logic; DIN : in std_logic_vector(3 downto 0); DOUT : out std_logic_vector(3 downto 0)); end COUNTER; X 1 1 LOADB 4 X 0 1 DOUT DOUT "0000" DIN DOUT+1 architecture RTL of COUNTER is signal T1,T2: std_logic_vector(3 downto 0); A: process (RST, CLK) if RST = '0' then T1 <= (others => '0'); elsif CLK'event and CLK = '1' then if ENB = 1' then T1 <= T2; -- B: process (LOADB, DIN, T1) if LOADB= 0 then T2 <= DIN; else T2 <= T1 + 1; -- DOUT <= T1; end RTL; VHDLASIC NO.-107 Gate-Level Gate Logic Operator Boolean Equation Wire Signal Signal Assign Shift Data library IEEE; use IEEE.std_logic_1164.ALL; Arithmetic Logic entity ADDER is 3-state Buffer port (A, B, CIN : in std_logic; SUM, COUT : out std_logic); end ADDER; architecture RTL1 of ADDER is -- Wire Signal signal S0, S1, S2 : std_logic; --GateLogical Operator S0 <= A xor B; S1 <= A and B; SUM <= S0 xor CIN; S2 <= S0 and CIN; COUT <= S1 or S2; end RTL1; VHDLASIC NO

55 Boolean Equation VHDL Equation sum? abc in? abc in? abc in? abc in cout? abc in? abc in? abc in? abc in Boolean EquationData Flow Signal Assign architecture RTL2 of ADDER is SUM <= (not A and not B and Cin) or (not A and B and not Cin) or (A and B and not Cin) or (A and B and Cin); COUT <= (not A and B and Cin) or (A and not B and Cin) or (A and B and not Cin) or (A and B and C); end RTL2; Multi-Bit Entity Unit entity MULTIBIT is port (A,B,C : IN std_logic_vector(3 DOWNTO 0); Z: OUT std_logic_vector(3 DOWNTO 0)); end MULTIBIT; 2 Architecture Unit architecture RTL2 of MULTIBIT is --Multi-Bit. Z <= A or (B nand C); end RTL2; -- architecture RTL1 of MULTBIT is --Bit Equation Z(3) <= A(3) nor (B(3) nand C(3)); Z(2) <= A(2) nor (B(2) nand C(2)); Z(1) <= A(1) nor (B(1) nand C(1)); Z(0) <= A(0) nor (B(0) nand C(0)); end RTL1; VHDLASIC NO.-109 Truth Table VHDL 1-Bit Truth Table a b cin sum cout Bit & Variable Case Signal Assign Variable Assign end case; end RTL2; Architecture Unit architecture RTL2 of ADDER is process (A, B, CIN) variable TMP : std_logic_vector(2 downto 0); -- variable. TMP := A & B & CIN; case TMP is when "000" => SUM <= 0 ; COUT <='0'; when "001" "010" "100" => SUM <='1'; COUT <='0'; when "011" "101" "110" => SUM <='0'; COUT <='1'; when others => SUM <='1'; COUT <='1'; VHDLASIC NO

56 VHDL 4*2 Priority Encoder ProcessIF a b c d enc_out Conditional Signal Assign Process IF Conditional Signal Assign architecture RTL1 of PRIO_ENC is ENC_OUT <= "00" when D = '0' else "01" when C = '0' else "10" when B = '0' else "11 ; end RTL1; architecture RTL2 of PRIO_ENC is process (A,B,C,D) if D='0' then ENC_OUT <= "00"; elsif C='0' then ENC_OUT <= "01"; elsif B='0' then ENC_OUT <= "10"; else ENC_OUT <= "11"; end RTL2; VHDLASIC NO.-111 (1) Enable 4*1 MUX ENABLE SEL Y 0 00 l l l l "0000" ProcessCase process(sel,enable,l0,l1,l2,l3) if ENABLE='0' then case SEL is when "00" => Y <= l0; when "01" => Y <= l1; when "10" => Y <= l2; when others => Y <= l3; end case; else Y <= "0000"; Selected Signal Assign architecture RTL2 of MUX41 is signal TMP : std_logic_vector(1 downto 0); with SEL select TMP <= l0 when "00", l1 when "01", l2 when "10", l3 when others; with ENABLE select Y <= TMP when '0, "0000" when others; end RTL2; MUX MUXComponent, Structural Modeling process case, Tool VHDLASIC NO

57 (2) Enable 2*4 DEC Enable G DATA Y "1110" "1101" "1011" "0111" "1111" Process process(g,data) if G='0' then case DATA is when "00" => Y <= "1110"; when "01" => Y <= "1101"; when "10" => Y <= "1011"; when others => Y <= "0111"; end case; else Y <= "1111"; Selected Signal Assign architecture RTL2 of EDECODER is signal TMP : std_logic_vector(2 downto 0); TMP <= G & DATA; with TMP select Y <= "1110" when "000", "1101" when "001", "1011" when "010", "0111" when "011", "1111" when others; end RTL2; BCD-to-7 Segment Decoder Don t Care VHDL.. VHDLASIC NO.-113 Shift Data VHDL Shift Data Basic Signal Assign & Operator & Operator : Shift Rotate. -- DATA4(7 downto 3) <= DATA1(4 downto 0); -- DATA4(2 downto 0) <= DATA1(7 downto 5); DATA4 <= DATA1(4 downto 0) & DATA1(7 downto 5); -- DATA5(7 downto 5) <= 000 ; -- DATA5(4 downto 0) <= DATA2(7 downto 3); DATA5 <= "000" & DATA2(7 downto 3); -- DATA6(7) <= DATA3(7); -- DATA6(6 downto 3) <= DATA3(3 downto 0); -- DATA6(2 downto 0) <= "000 ; DATA6 <= DATA3(7) & DATA3(3 downto 0)& "000 ; VHDLASIC NO

58 Arithmetic VHDL 8 ALU 000 op1 + op2 001 op op1 - op2 011 op op1 and op2 101 op1 or op2 110 not op1 111 op1 Entity Unit library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.all; entity SIM_ALU is port (OP1,OP2:in std_logic_vector(7 downto 0); CIN : in std_logic; SEL : in std_logic_vector(2 downto 0); ALU_OUT : out std_logic_vector(7 downto 0); ZERO_FLAG : out std_logic ); end SIM_ALU; Case architecture RTL of SIM_ALU is process (OP1, OP2, CIN, SEL) variable TMP:std_logic_vector(7 downto 0); case SEL is when 000 =>TMP:= OP1+OP2+CIN; when 001 =>TMP:= OP1-1; when 010 =>TMP:= OP1-OP2+CIN; when 011 =>TMP:= OP1+1; when 100 =>TMP:= OP1 and OP2; when 101 =>TMP:= OP1 or OP2; when 110 =>TMP:= not OP1; when others =>TMP:= OP1; end case; ALU_OUT <= TMP; if TMP=0 then ZERO_FLAG <= 1 ; else ZERO_FLAG <= 0 ; end RTL; VHDLASIC NO State Buffer VHDL Resolved Signal Data Source2 Wire architecture RTL2 of TRISTATE is Resolved Signal 3-State Buffer MUX Y2 D2 Y1 D1 resolved signal TBUS Selected Signal Assign architecture RTL1 of TRISTATE is TBUS<= D1 when (Y1= 1 ) else Z ; TBUS<= D2 when (Y1= 0 and Y2= 1 ) else Z ; end RTL1; Process IF 3-BufferOFF Z process (Y1, D1) if (Y1= 1 ) then TBUS<=D1; else TBUS<= Z ; process (Y1, Y2, D2) if (Y1= 0 and Y2= 1 ) then TBUS<=D2; else TBUS<= Z ; end RTL2; Resolved Function 0 1 VHDLASIC NO

59 VHDL : ROM ROM address bus : N-bit data bus : M-bit Entity Unit library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.ALL; entity ROM is generic (N: integer := 3; M: integer := 5); port ( ADDR: in std_logic_vector(n-1 downto 0); CE_N, OE_N : in std_logic; DATA : out std_logic_vector(m-1 downto 0)); end ROM; Architecture Unit 2 ROM ROM addressinteger architecture RTL of ROM is subtype WORD is std_logic_vector(m-1 downto 0); type TABLE is array(0 to 2**N-1) of WORD; -- type TABLE is array(0 to 2**N-1) of -- std_logic_vector(m-1 downto 0); constant ROM_DATA : TABLE := TABLE ( 10101, 10000, 11111, 11011, 10001, 01100, 00101, ); process (CE_N,OE_N,ADDR) if CE_N= 0 and OE_N= 0 then DATA <= ROM_DATA(conv_integer(ADDR)); else DATA <= (others=> Z ); end RTL; VHDLASIC NO.-117 VHDL : RAM RAM address bus : 8-bit data bus : 8-bit ADDRESS RAM 8 8 /RD /CE /WR Entity Unit library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.ALL; entity RAM is port ( ADDR : in std_logic_vector(7 downto 0); CE_N, RD_N, WR_N : in std_logic; DATA : inout std_logic_vector(7 downto 0)); end RAM; DATA Architecture Unit 2 RAM addressinteger Read Data Bus Bit Z : Resolved Signal architecture RTL of RAM is subtype RAM_WORD is std_logic_vector(7 downto 0); type RAM_TABLE is array(0 to 255) of RAM_WORD; signal RAM_DATA : RAM_TABLE; process (CE_N,RD_N,WR_N,ADDR,DATA) variable TMP : integer; DATA <= ZZZZZZZZ ; TMP := conv _integer(addr); if CE_N= 0 and RD_N= 0 then DATA <= RAM_DATA(TMP); elsif CE_N= 0 and WR_N= 0 then RAM_DATA(TMP) <= DATA; end RTL; VHDLASIC NO

60 Latch VHDL D-Latch G G o 1 D Q Latch Process IF architecture RTL1 of DLATCH1 is process (G, D) if G= 1 then Q <= D; QBAR <= not D; end RTL1; E Q(t+1) Q(t) D Signal Assign architecture RTL2 of DLATCH1 is signal TMP : std_logic; TMP<=D when G= 1 else TMP; Q <= TMP; QBAR <= not TMP; end RTL2; Latch architecture RTL of EX is signal A, B, C, D, E: std_logic_vector(1 downto 0); process (C, D, E, EN) if EN= 1 then A <= C; B <= D; else A <= E; end RTL; VHDLASIC NO.-119 Flip-Flop VHDL Synchronous D Flip-Flop Asynchronous D Flip-Flop d D Q q in_data d q FD clk CLK clk clk reset data reset VHDL A1: process (CLK) if (CLK= 1 and CLK event) then Q <= D; A2: process wait until CLK= 1 ; Q <= D; VHDL (Synopsys Model) A1: process (RESET, CLK) if RESET= 1 then DATA <= 0 ; elsif (CLK= 1 and CLK event) then DATA <= IN_DATA; VHDLASIC NO

61 Flip-Flop VHDL (1) -1 architecture RTL1 of EX is signal A, B: std_logic_vector(3 downto 0); process (CLK) if (CLK= 1 AND CLK EVENT) then if Q(3)/= 1 then Q <= A + B; end RTL1;. -2 architecture RTL2 of EX is signal A, B: std_logic_vector(3 downto 0); process (CLK) variable INT: std_logic_vector(3 downto 0); if (CLK= 1 AND CLK EVENT) then if INT(3)/= 1 then INT := A + B; Q <= INT; end RTL2;. VHDLASIC NO.-121 Flip-Flop VHDL (2) -3 architecture RTL3 of EX is process (RESET_N, CLK) if (RESET_N= 0 ) then Q1 <= 0 ; Q2 <= 0 ; elsif (CLK= 1 AND CLK EVENT) then Q1 <= A and B; Q2 <= C; end RTL3;. -4 architecture RTL4 of EX is signal Q1, I2: std_logic; process (CLK) if (CLK= 1 AND CLK EVENT) then Q1 <= D; I2 <= Q1 and A; Q2 <= I2 and B; end RTL4;. VHDLASIC NO

62 Variable Signal Assignment Flip-Flop SignalShift-Register --4 Flip-Flop library IEEE; use IEEE.std_logic_1164.all; entity SHREG4 is port ( D_IN, CLK : in std_logic; D_OUT: out std_logic); end SHREG4; architecture RTL of SHREG4 is signal S0, S1, S2: std_logic; process (CLK) if (CLK= 1 and CLK event) then S0 <= D_IN; S1 <= S0; S2 <= S1; D_OUT <= S2; end RTL;. VariableShift-Register --1 Flip-Flop process (CLK) variable S0, S1, S2: std_logic; if (CLK= 1 and CLK event) then S0 := D_IN; S1 := S0; S2 := S1; D_OUT <= S2; --4 Flip-Flop process (CLK) variable S0, S1, S2: std_logic; if (CLK= 1 and CLK event) then D_OUT <= S2; S2 := S1; S1 := S0; S0 := D_IN;,,. VHDLASIC NO.-123 Register VHDL Multi-Bits Register Shift-Register FIFO Cycle Buffer 8-Bit Register RESET LD ENABLE CLK REG ? (x)? (o) LDDATA REG REG REGIN library IEEE; use IEEE.std_logic_1164.ALL; entity REGISTER1 is port (RESET, LD, ENABLE, CLK : in std_logic; REGIN : in std_logic_vector(7 downto 0); REG : out std_logic_vector(7 downto 0)); end REGISTER1; architecture RTL2 of REGISTER1 is process (RESET, LD, CLK) if RESET= 0 then REG <= (others => 0 ); elsif LD= 1 then REG <= LDDATA; elsif ENABLE= 1 then if (CLK= 0 and CLK event) then REG <= REGIN; end RTL2; VHDLASIC NO

63 Counter VHDL Out Mode library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.all; entity CNT8 is port (RESET,CLK: in std_logic; CNT: out std_logic_vector(2 downto 0)); end CNT8; architecture RTL1 of CNT8 is signal TMP1,TMP2: std_logic_vector(2 downto 0); CNT <= TMP2; TMP1 <= TMP2 + 1 ; process (RESET, CLK) if (RESET= 0 ) then TMP2 <= 000 ; elsif (CLK= 1 and CLK event) then TMP2 <= TMP1; end RTL1; Buffer Mode Signal. Buffer Mode : library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.std_logic_unsigned.all; entity CNT8 is port (RESET,CLK: in std_logic; CNT: buffer std_logic_vector(2 downto 0)); end CNT8; architecture RTL2 of CNT8 is process (RESET, CLK) if (RESET= 0 ) then CNT <= 000 ; elsif (CLK= 1 and CLK event) then CNT <= CNT + 1 ; end RTL2; VHDLASIC NO.-125 Counter VHDL 8Ripple Counter CLK RESET D Q Q Generate D Flip-Flop architecture RTL1 of DFFR is signal TMP_Q : std_logic; Q <= TMP_Q; QBAR <= not TMP_Q; process (RESET, CLK) if (RESET= 0 ) then TMP_Q <= 0 ; elsif (CLK= 1 and CLK event) then TMP_Q <= D; end RTL1; D Q Q D Q Q Generate architecture RTL2 of RPLCNT8 is -- Clock Wire signal CNTB: std_logic_vector(3 downto 0); -- D Flip-Flop Component component DFFR port (RESET, CLK, D : in std_logic; Q, QBAR : out std_logic); end component; -- Component Specification for U: use entity DFFR work.dffr(rtl1); CNTB(0) <= CLK; GEN1: for I in 0 to 2 generate U: DFFR port map (CLK => CNTB(I), RESET => RESET, D => CNTB(I+1), Q => CNT(I), QBAR => CNTB(I+1)); end generate GEN1; end RTL2; VHDLASIC NO

64 Finite State Machine (1) State Diagram FSMHardware Moore Type Machine Mealy Type Machine State Register Symbolic State Name Enumeration Data Type Symbolic State Modeling library IEEE; use IEEE.std_logic_1164.ALL; entity MEALYFSM is port (RESET, CLK, X : in std_logic; Z : out std_logic); end MEALYFSM; architecture RTL1 of MEALYFSM is --Symbolic State Name Type type STATE is (S0, S1, S2); --State Signal signal C_STATE, N_STATE : STATE; VHDLASIC NO.-127 Finite State Machine (2) SYNC: process (RESET, CLK) if RESET= 0 then C_STATE <= S0; elsif CLK= 0 and CLK event then C_STATE <= N_STATE; COMB : process (C_STATE, X) case C_STATE is when S0 => Z <= 0 ; if X= 0 then N_STATE <= S0; else N_STATE <= S1; when S1 => if X= 0 then N_STATE <= S0; Z <= 0 ; else N_STATE <= S2; Z <= 1 ; when others => if X= 0 then N_STATE <= S0; Z<= 0 ; else N_STATE <= S1; Z <= 1 ; end case; end RTL1; State Code Assignment Tool Tool Symbolic State Name Simulation Code Assign Symbolic Name Synthesis Binary CodeAssign State Name Binary CodeEncoding. S0=(00), S1=(01), S2=(10) VHDLASIC NO

65 Finite State Machine (3) State Code State Code Assignment -1 library IEEE; use IEEE.std_logic_1164.ALL; entity MEALYFSM is port (RESET, CLK, X : in std_logic; Z : out std_logic); end MEALYFSM; architecture RTL2 of MEALYFSM is constant S0: std_logic_vector(1 downto 0) := 00 ; constant S1: std_logic_vector(1 downto 0) := 01 ; constant S2: std_logic_vector(1 downto 0) := 11 ; signal C_STATE, N_STATE : std_logic_vector(1 downto 0); -- VHDL Code end RTL2; State Code Assignment -2 library IEEE; use IEEE.std_logic_1164.ALL; entity MEALYFSM is port (RESET, CLK, X : in std_logic; Z : out std_logic); end MEALYFSM; architecture RTL3 of MEALYFSM is --Symbolic State Name Type type STATE is (S0, S1, S2); attribute ENUM_ENCODING: string; attribute ENUM_ENCODING of STATE: type is ; -- State Signal signal C_STATE, N_STATE : STATE; -- VHDL Code end RTL3; VHDLASIC NO.-129 Chap. 4 VHDL Test Bench Model 65

66 H/W S/W H/W Model Signal generator Prototype Oscilloscope S/W Model Nodes In signal file "Signal generator" Computer model Netlist (schematic) "Prototype" Out signal file "Oscilloscope" VHDLASIC NO.-131 VHDLTest Bench Modeling Test Harness Test Vectors File Synthesis Hardware VHDL Model Simulation Data Vector Generation VHDL Model Test Harness Array Vector System File Vector Simulation Tool VHDL Model Simulation Simulation File assert Pass/Fail VHDLASIC NO

67 Test Vector 3 VHDL Case1 : Clock signal clock, reset : std_logic:='0'; clock <= not clock after 20 ns; reset <= '1' after 120 ns; reset 0 40ns 120ns clock time 20ns case2 : Random (1 ) x <= "00", "01" after 50 ns, "10" after 100 ns, "11" after 200 ns, "10" after 220 ns; x 0 50ns 100ns 200ns 220ns case3 : Random ( ) process a <= '0'; b <= '1'; wait for 50 ns; a <= '1'; wait for 70 ns; b <= '0'; wait for 100 ns; a <= '0'; wait for 50 ns; time a 0 50ns 120ns 220ns 270ns b time VHDLASIC NO.-133 Test Vector Modeling --9-value visibility library IEEE; use IEEE.std_logic_1164.ALL; --entity unit entity TB is port (CLOCK1 : buffer std_logic := 0 ; CLOCK2, RESET1, RESET2 : out std_logic ; ENABLE : out std_logic; A_DATA, B_DATA : out std_logic_vector(7 downto 0)); end TB; --architecture unit architecture TB_A of TB is CLOCK1 <= not CLOCK1 after 20 ns; RESET1 <= 0, '1' after 100 ns; process if now = 0 ns then CLOCK2 <= '0'; wait for 250 ns; else CLOCK2 <= '1'; wait for 20 ns; CLOCK2 <= '0'; wait for 20 ns; process A_DATA <= " "; B_DATA <= " "; wait for 120 ns; A_DATA <= " "; wait for 30 ns; B_DATA <= " "; wait for 90 ns; A_DATA <= " "; wait for 150 ns; process if now = 0 ns then RESET2 <= '0'; ENABLE <= '0'; wait for 50 ns; else RESET2 <= '1'; ENABLE <= '1'; wait for 300 ns; ENABLE <= '0' after 200 ns, '1' after 400 ns; wait for 800 ns; RESET2 <= '0', '1' after 150 ns; ENABLE <= '0' after 50 ns; wait for 200 ns; end TB_A; VHDLASIC NO

68 Test Vector Waveform Test Vector Waveform CLOCK1, CLOCK2 RESET1, RESET2 A_DATA, B_DATA Data Process VHDLASIC NO : Booth Multiplier Booth Multiplier Algorithm VHDLASIC NO

69 -1 : Booth Multiplier VHDL library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.numeric_std.ALL; -- entity BOOTH is generic (N : integer := 8); port (RESET, CLOCK, LOAD : in std_logic; MULTIPLICAND, MULTIPLIER : in std_logic_vector(n-1 downto 0); PRODUCT : out std_logic_vector(2*n-1 downto 0)); end BOOTH; -- architecture RTL of BOOTH is signal Q1 : std_logic; signal AC, BR : std_logic_vector(n-1 downto 0); signal QR : std_logic_vector(n-1 downto 0); signal SC : integer; process (RESET, CLOCK) variable TMP_AC : std_logic_vector(n -1 downto 0); if RESET='0' then BR <= (OTHERS => '0'); QR <= (OTHERS => '0'); AC <= (OTHERS => '0'); Q1 <= '0'; SC <= N; PRODUCT <= (OTHERS => '0'); elsif (CLOCK='1' AND CLOCK'event) then if LOAD='1' then BR <= MULTIPLICAND; QR <= MULTIPLIER; AC <= (OTHERS => '0'); Q1 <= '0'; SC <= N; PRODUCT <= (OTHERS => '0'); else if (SC=0) then PRODUCT <= AC & QR; else if QR(0)='0' and Q1='1' then TMP_AC := AC + BR; elsif QR(0)='1' and Q1='0' then TMP_AC := AC + not BR + '1'; else TMP_AC := AC; Q1 <= QR(0); QR <= TMP_AC(0) & QR(N-1 downto 1); AC <= TMP_AC(N -1) & TMP_AC(N-1 downto 1); SC <= SC - 1; end RTL; -- VHDLASIC NO : Test Bench Vector library IEEE; use IEEE.std_logic_1164.ALL; library IEEE.numeric_std.ALL; entity VEC_GEN is port ( CLOCK, RESET, LOAD : out std_logic; A_PORT, B_PORT : out std_logic_vector(7downto0)); end VEC_GEN; architecture VEC_GEN_A of VEC_GEN is signal CLOCK_S : std_logic := '0'; RESET <= '1' after 50 ns; CLOCK_S <= not CLOCK_S after 2 ns; CLOCK <= CLOCK_S; LOAD <= '0', '1' after 20 ns, '0' after 70 ns, '1' after 210 ns, '0' after 250 ns, '1' after 390 ns, '0' after 430 ns, '1' after 570 ns, '0' after 610 ns; A_PORT_DRV : process A_PORT <= " "; A_PORT <= " "; B_PORT_DRV : process B_PORT <= " "; B_PORT <= " "; end VEC_GEN_A; wait for 200 NS; wait for 400 NS; wait for 400 NS; wait for 400 NS; Test Bench library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.numeric_std.ALL; entity TB_BOOTH1 is end TB_BOOTH1; architecture TB_BOOTH1_A of TB_BOOTH1 is component BOOTH generic (n : integer := 8); port (RESET, CLOCK, LOAD : in std_logic; MULTIPLICAND, MULTIPLIER : in std_logic_vector(n-1 downto 0); PRODUCT : out std_logic_vector(2*n-1 downto0)); end component; -- Vector Generation Block signal A_PORT, B_PORT: std_logic_vector(7downto 0); signal MUL_OUT : std_logic_vector(15 downto 0); signal RESET, CLOCK, LOAD : std_logic; for u0 : BOOTH use entity work.booth(rtl); for u1 : VEC_GEN use entity work.vec_gen(vec_gen_a); u0 : BOOTH port map(reset, CLOCK, LOAD, A_PORT, B_PORT, MUL_OUT); u1 : VEC_GEN port map ( CLOCK, RESET, LOAD, A_PORT, B_PORT ); end TB_BOOTH1_A; VHDLASIC NO

70 -1 : Test Bench VHDL Simulation VHDL Functional Simulation Simulation -1 : (+5) = ( ) 2, (+3)=( ) 2 = ( _ ) 2 Simulation -2 : (-5) = ( ) 2, (+3)=( ) 2 = ( _ ) 2 Simulation -3 : (-5) = ( ) 2, (-3)=( ) 2 Simulation -4 : (+5) = ( ) 2, (-3)=( ) 2 VHDLASIC NO : ASSERT Test Bench Compare library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.numeric_std.ALL; entity COMP is port ( RESET, LOAD : in std_logic; A_PORT, B_PORT : in signed(7 downto 0); MUL_OUT : in signed(15 downto 0)); end COMP; architecture COMP_A of COMP is constant CLOCK_PERIOD : time := 5 ns; process wait on RESET, LOAD; if RESET='0' then wait for (CLOCK_PERIOD); assert (MUL_OUT=0) report "assert violation-1"; elsif LOAD='1' then wait for (CLOCK_PERIOD); assert (MUL_OUT=0) report "assert violation-2"; else wait until (LOAD='0' and load'event); wait on MUL_OUT; assert (MUL_OUT=(A_PORT*B_PORT)) report "assert violation-3"; end COMP_A; Test Bench library IEEE; use IEEE.std_logic_1164.ALL; use IEEE.numeric_std.ALL; entity TB_BOOTH2 is end TB_BOOTH2; architecture TB_BOOTH2_A of TB_BOOTH2 is -- Compare Component component COMP port ( RESET, LOAD : in std_logic; A_PORT, B_PORT : in signed(7 downto 0); MUL_OUT : in signed(15 downto 0)); end component; signal A_PORT, B_PORT: signed(7downto 0); signal MUL_OUT : signed(15 downto0); signal RESET, CLOCK, LOAD: std_logic; for u0 : BOOTH use entity work.booth(rtl); for u1 : VEC_GEN use entity work.vec_gen(vec_gen_a); for u2 : COMP use entity work.comp(comp_a); u0 : BOOTH port map(reset, CLOCK, LOAD, A_PORT, B_PORT, MUL_OUT); u1 : VEC_GEN port map ( CLOCK, RESET, LOAD, A_PORT, B_PORT ); u2 : COMP port map ( RESET, LOAD, A_PORT, B_PORT, MUL_OUT ); end TB_BOOTH2_A; VHDLASIC NO

歯Chap1-Chap2.PDF

歯Chap1-Chap2.PDF ASIC Chip Chip Chip Proto-Type Chip ASIC Design Flow(Front-End) ASIC VHDL Coding VHDL Simulation Schematic Entry Synthesis Test Vector Gen Test Vector Gen Pre-Simulation Pre-Simulation Timing Verify Timing

More information

Microsoft PowerPoint - VHDL01_chapter1.ppt [호환 모드]

Microsoft PowerPoint - VHDL01_chapter1.ppt [호환 모드] VHDL 프로그래밍 1. 문법기초 - 간단한조합회로및문법 학습목표 VHDL 기술과소프트웨어와차이파악 Signal assignment 의의미파악 Architecture body 의개념파악 Entity declaration 의개념파악 Process 문의사용법 Variable 과 signal 의차이파악 Library, Use, Package 의사용법 2/53 간단한논리회로예제

More information

MAX+plus II Getting Started - 무작정따라하기

MAX+plus II Getting Started - 무작정따라하기 무작정 따라하기 2001 10 4 / Version 20-2 0 MAX+plus II Digital, Schematic Capture MAX+plus II, IC, CPLD FPGA (Logic) ALTERA PLD FLEX10K Series EPF10K10QC208-4 MAX+plus II Project, Schematic, Design Compilation,

More information

ºÎ·ÏB

ºÎ·ÏB B B.1 B.2 B.3 B.4 B.5 B.1 2 (Boolean algebra). 1854 An Investigation of the Laws of Thought on Which to Found the Mathematical Theories of Logic and Probabilities George Boole. 1938 MIT Claude Sannon [SHAN38].

More information

디지털공학 5판 7-8장

디지털공학 5판 7-8장 Flip-Flops c h a p t e r 07 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 292 flip flop Q Q Q 1 Q 0 set ON preset Q 0 Q 1 resetoff clear Q Q 1 2 SET RESET SET RESET 7 1 crossednand SET RESET SET RESET

More information

삼성기초VHDL실습.PDF

삼성기초VHDL실습.PDF VHDL Simulation Synthesis - Synopsys Tool - System ASIC Design Lab : jcho@asiclabinchonackr -I - : -Bit Full Adder Simulation Synopsys Simulation Simulation Tool -2 : -Bit Full Adder Synthesis Synopsys

More information

Orcad Capture 9.x

Orcad Capture 9.x OrCAD Capture Workbook (Ver 10.xx) 0 Capture 1 2 3 Capture for window 4.opj ( OrCAD Project file) Design file Programe link file..dsn (OrCAD Design file) Design file..olb (OrCAD Library file) file..upd

More information

1

1 1 1....6 1.1...6 2. Java Architecture...7 2.1 2SDK(Software Development Kit)...8 2.2 JRE(Java Runtime Environment)...9 2.3 (Java Virtual Machine, JVM)...10 2.4 JVM...11 2.5 (runtime)jvm...12 2.5.1 2.5.2

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 2... ( ). ( ). @ vs. logic data method variable behavior attribute method field Flow (Type), ( ) member @ () : C program Method A ( ) Method B ( ) Method C () program : Java, C++, C# data @ Program

More information

T100MD+

T100MD+ User s Manual 100% ) ( x b a a + 1 RX+ TX+ DTR GND TX+ RX+ DTR GND RX+ TX+ DTR GND DSR RX+ TX+ DTR GND DSR [ DCE TYPE ] [ DCE TYPE ] RS232 Format Baud 1 T100MD+

More information

Libero Overview and Design Flow

Libero Overview and Design Flow Libero Overview and Design Flow Libero Integrated Orchestra Actel Macro Builder VDHL& VeriogHDL Editor ViewDraw Schematic Entry Synplicify for HDL Synthesis Synapticad Test Bench Generator ModelSim

More information

hwp

hwp BE 8 BE 6 BE 4 BE 2 BE 0 y 17 y 16 y 15 y 14 y 13 y 12 y 11 y 10 y 9 y 8 y 7 y 6 y 5 y 4 y 3 y 2 y 1 y 0 0 BE 7 BE 5 BE 3 BE 1 BE 16 BE 14 BE 12 BE 10 y 32 y 31 y 30 y 29 y 28 y 27 y 26 y 25 y 24 y 23

More information

4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ζ ω n (rad/sec) 2 ( ζ < 1), 1 (ζ = 1), ( ) 1

4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ζ ω n (rad/sec) 2 ( ζ < 1), 1 (ζ = 1), ( ) 1 : LabVIEW Control Design, Simulation, & System Identification LabVIEW Control Design Toolkit, Simulation Module, System Identification Toolkit 2 (RLC Spring-Mass-Damper) Control Design toolkit LabVIEW

More information

Microsoft PowerPoint - PL_03-04.pptx

Microsoft PowerPoint - PL_03-04.pptx Copyright, 2011 H. Y. Kwak, Jeju National University. Kwak, Ho-Young http://cybertec.cheju.ac.kr Contents 1 프로그래밍 언어 소개 2 언어의 변천 3 프로그래밍 언어 설계 4 프로그래밍 언어의 구문과 구현 기법 5 6 7 컴파일러 개요 변수, 바인딩, 식 및 제어문 자료형 8

More information

Microsoft Word - logic2005.doc

Microsoft Word - logic2005.doc 제 7 장 Flip-Flops and Registers 실험의목표 - S-R Latch 의동작을이해하도록한다. - Latch 와 Flip-flop 의차이를이해한다. - D-FF 과 JK-FF 의동작원리를이해한다. - Shift-register MSI 의동작을익히도록한다. - Timing 시뮬레이션방법에대하여습득한다. 실험도움자료 1. Universal Shift

More information

Microsoft PowerPoint - hw4.ppt [호환 모드]

Microsoft PowerPoint - hw4.ppt [호환 모드] 4.1 initial 과 always Chapter 4 Verilog의특징 보통의 programming언어와같은 procedural statement을제공 추상적인 behavioral model 기술에사용 순차적으로수행하는보통의 programming 언어와는다르게병렬적으로수행하는언어임 module Behavioral Model 논리설계 병렬수행 module

More information

歯15-ROMPLD.PDF

歯15-ROMPLD.PDF MSI & PLD MSI (Medium Scale Integrate Circuit) gate adder, subtractor, comparator, decoder, encoder, multiplexer, demultiplexer, ROM, PLA PLD (programmable logic device) fuse( ) array IC AND OR array sum

More information

Microsoft PowerPoint - VHDL08.ppt [호환 모드]

Microsoft PowerPoint - VHDL08.ppt [호환 모드] VHDL 프로그래밍 8. 조합논리회로설계 한동일 학습목표 테스트벤치의용도를알고작성할수있다. 간단한조합논리회로를설계할수있다. 하나의로직회로에대해서다양한설계방식을구사할수있다. 제네릭을활용할수있다. 로직설계를위한사양을이해할수있다. 주어진문제를하드웨어설계문제로변환할수있다. 설계된코드를테스트벤치를이용하여검증할수있다. 2/37 테스트벤치 (test bench) 테스트벤치

More information

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for 2003 Development of the Software Generation Method using Model Driven Software Engineering Tool,,,,, Hoon-Seon Chang, Jae-Cheon Jung, Jae-Hack Kim Hee-Hwan Han, Do-Yeon Kim, Young-Woo Chang Wang Sik, Moon

More information

歯Intro_alt_han_s.PDF

歯Intro_alt_han_s.PDF ALTERA & MAX+PLUS II ALTERA & ALTERA Device ALTERA MAX7000, MAX9000 FLEX8000,FLEX10K APEX20K Family MAX+PLUS II MAX+PLUS II 2 Altera & Altera Devices 4 ALTERA Programmable Logic Device Inventor of the

More information

Microsoft Word - 제6장 Beyond Simple Logic Gate.doc

Microsoft Word - 제6장 Beyond Simple Logic Gate.doc 제 6 장 Beyond Simple Logic Gate 실험의목표 - MUX, DEMUX의동작을이해하도록한다. - encoder 와 decoder 의원리를익히고 MUX, DEMUX 와비교를해본다. - MUX 를이용하여조합회로를설계해본다. - tri-state gate 와 open-collector gate 의특성에대하여알아본다. 잘못된사용법에대하여어떤결과가발생하는지확인해본다.

More information

DIY 챗봇 - LangCon

DIY 챗봇 - LangCon without Chatbot Builder & Deep Learning bage79@gmail.com Chatbot Builder (=Dialogue Manager),. We need different chatbot builders for various chatbot services. Chatbot builders can t call some external

More information

歯DCS.PDF

歯DCS.PDF DCS 1 DCS - DCS Hardware Software System Software & Application 1) - DCS System All-Mighty, Module, ( 5 Mbps ) Data Hardware : System Console : MMI(Man-Machine Interface), DCS Controller :, (Transmitter

More information

歯02-BooleanFunction.PDF

歯02-BooleanFunction.PDF 2Boolean Algebra and Logic Gates 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 IC Chapter 2 Boolean Algebra & Logic Gates 1 Boolean Algebra 1854 George Boole Chapter 2 Boolean Algebra & Logic Gates 2 Duality Principle

More information

PRO1_04E [읽기 전용]

PRO1_04E [읽기 전용] Siemens AG 1999 All rights reserved File: PRO1_04E1 Information and S7-300 2 S7-400 3 EPROM / 4 5 6 HW Config 7 8 9 CPU 10 CPU : 11 CPU : 12 CPU : 13 CPU : / 14 CPU : 15 CPU : / 16 HW 17 HW PG 18 SIMATIC

More information

디지털 ASIC 설계 (1주차) MAXPLUS II 소개 및 사용법

디지털 ASIC 설계    (1주차)  MAXPLUS II  소개 및 사용법 디지털 ASIC 설계 (1 주차 ) MAXPLUS II 소개및사용법 신흥대학전자통신과김정훈 jhkim@shc.ac.kr 차례 1. Why Digital 2. Combinational logic ( 조합회로 ) 소개 3. Sequential logic ( 순차회로 ) 소개 4. MAX+PLUSII 소개 5. MAX+PLUSII Tools 설계환경 6. 예제소개

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Verilog: Finite State Machines CSED311 Lab03 Joonsung Kim, joonsung90@postech.ac.kr Finite State Machines Digital system design 시간에배운것과같습니다. Moore / Mealy machines Verilog 를이용해서어떻게구현할까? 2 Finite State

More information

untitled

untitled Logic and Computer Design Fundamentals Chapter 4 Combinational Functions and Circuits Functions of a single variable Can be used on inputs to functional blocks to implement other than block s intended

More information

10주차.key

10주차.key 10, Process synchronization (concurrently) ( ) => critical section ( ) / =>, A, B / Race condition int counter; Process A { counter++; } Process B { counter ;.. } counter++ register1 = counter register1

More information

C# Programming Guide - Types

C# Programming Guide - Types C# Programming Guide - Types 최도경 lifeisforu@wemade.com 이문서는 MSDN 의 Types 를요약하고보충한것입니다. http://msdn.microsoft.com/enus/library/ms173104(v=vs.100).aspx Types, Variables, and Values C# 은 type 에민감한언어이다. 모든

More information

Microsoft PowerPoint - VHDL06.ppt [호환 모드]

Microsoft PowerPoint - VHDL06.ppt [호환 모드] VHDL 프로그래밍 6. 부프로그램과패키지 한동일 학습목표 부프로그램의종류와차이점과활용방법에대해서배운다. 함수를정의하고호출하는방법을배운다. 프로시저를정의하고호출하는방법을배운다. 부프로그램오버로딩의개념을이해한다. 패키지의사용목적을배운다. 설계파일, 설계단위, 설계라이브러리의개념을이해한다. VHDL 의라이브러리구조를이해한다. 2/39 부프로그램 (subprogram)

More information

thesis

thesis ( Design and Implementation of a Generalized Management Information Repository Service for Network and System Management ) ssp@nile nile.postech.ac..ac.kr DPE Lab. 1997 12 16 GMIRS GMIRS GMIRS prototype

More information

UML

UML Introduction to UML Team. 5 2014/03/14 원스타 200611494 김성원 200810047 허태경 200811466 - Index - 1. UML이란? - 3 2. UML Diagram - 4 3. UML 표기법 - 17 4. GRAPPLE에 따른 UML 작성 과정 - 21 5. UML Tool Star UML - 32 6. 참조문헌

More information

6주차.key

6주차.key 6, Process concept A program in execution Program code PCB (process control block) Program counter, registers, etc. Stack Heap Data section => global variable Process in memory Process state New Running

More information

VHDL 기초 VHDL 두원공과대학정보통신미디어계열이무영

VHDL 기초 VHDL 두원공과대학정보통신미디어계열이무영 기초 두원공과대학정보통신미디어계열이무영 2! 담당 : 이무영, 본관 325 호, mylee@doowon.ac.kr! 강의교재! 3 월 : 기존교재복습 ( 기초와응용, 홍릉과학출판사, 이대영외 3 명공저 )! 4 월이후 : 추후공지! 실습도구! 한백전자 HBE-DTK-240! www.hanback.co.kr ( 디지털 -FPGA) 자료참고할것임.! 천안공대류장열교수님온라인컨텐츠

More information

PRO1_09E [읽기 전용]

PRO1_09E [읽기 전용] Siemens AG 1999 All rights reserved File: PRO1_09E1 Information and - ( ) 2 3 4 5 Monitor/Modify Variables" 6 7 8 9 10 11 CPU 12 Stop 13 (Forcing) 14 (1) 15 (2) 16 : 17 : Stop 18 : 19 : (Forcing) 20 :

More information

LCD Display

LCD Display LCD Display SyncMaster 460DRn, 460DR VCR DVD DTV HDMI DVI to HDMI LAN USB (MDC: Multiple Display Control) PC. PC RS-232C. PC (Serial port) (Serial port) RS-232C.. > > Multiple Display

More information

untitled

untitled Step Motor Device Driver Embedded System Lab. II Step Motor Step Motor Step Motor source Embedded System Lab. II 2 open loop, : : Pulse, 1 Pulse,, -, 1 +5%, step Step Motor (2),, Embedded System Lab. II

More information

歯AG-MX70P한글매뉴얼.PDF

歯AG-MX70P한글매뉴얼.PDF 120 V AC, 50/60 Hz : 52 W (with no optional accessories installed), indicates safety information. 70 W (with all optional accessories installed) : : (WxHxD) : : 41 F to 104 F (+ 5 C to + 40 C) Less than

More information

Microsoft PowerPoint - AC3.pptx

Microsoft PowerPoint - AC3.pptx Chapter 3 Block Diagrams and Signal Flow Graphs Automatic Control Systems, 9th Edition Farid Golnaraghi, Simon Fraser University Benjamin C. Kuo, University of Illinois 1 Introduction In this chapter,

More information

Mentor_PCB설계입문

Mentor_PCB설계입문 Mentor MCM, PCB 1999, 03, 13 (daedoo@eeinfokaistackr), (kkuumm00@orgionet) KAIST EE Terahertz Media & System Laboratory MCM, PCB (mentor) : da & Summary librarian jakup & package jakup & layout jakup &

More information

MPLAB C18 C

MPLAB C18 C MPLAB C18 C MPLAB C18 MPLAB C18 C MPLAB C18 C #define START, c:\mcc18 errorlevel{0 1} char isascii(char ch); list[list_optioin,list_option] OK, Cancel , MPLAB IDE User s Guide MPLAB C18 C

More information

untitled

untitled 1... 2 System... 3... 3.1... 3.2... 3.3... 4... 4.1... 5... 5.1... 5.2... 5.2.1... 5.3... 5.3.1 Modbus-TCP... 5.3.2 Modbus-RTU... 5.3.3 LS485... 5.4... 5.5... 5.5.1... 5.5.2... 5.6... 5.6.1... 5.6.2...

More information

. 고성능마이크로프로세서 LU 와레지스터 파일의구조 (2.). 직접디지털주파수합성기 (FS) 의구조 3. 고성능마이크로프로세서부동소수점연산기 (Floating-Point Unit) 구조 (2) (2.) (2.) 2. 암호화를위한 VLSI 구조와설계의개요 (2.) 다음참

. 고성능마이크로프로세서 LU 와레지스터 파일의구조 (2.). 직접디지털주파수합성기 (FS) 의구조 3. 고성능마이크로프로세서부동소수점연산기 (Floating-Point Unit) 구조 (2) (2.) (2.) 2. 암호화를위한 VLSI 구조와설계의개요 (2.) 다음참 이비디오교재는정보통신부의 999년도정보통신학술진흥지원사업에의하여지원되어연세대학교전기전자공학과이용석교수연구실에서제작되었습니다 고성능마이크로프로세서 LU ( rithmetic Logic Unit) 와 Register File의구조 2. 연세대학교전기전자공학과이용석교수 Homepage: http://mpu.yonsei.ac.kr E-mail: yonglee@yonsei.ac.kr

More information

SRC PLUS 제어기 MANUAL

SRC PLUS 제어기 MANUAL ,,,, DE FIN E I N T R E A L L O C E N D SU B E N D S U B M O TIO

More information

Microsoft PowerPoint - VHDL12_full.ppt [호환 모드]

Microsoft PowerPoint - VHDL12_full.ppt [호환 모드] VHDL 프로그래밍 12. 메모리인터페이스회로설계 한동일 학습목표 ROM 의구조를이해하고 VHDL 로구현할수있다. 연산식의구현을위해서 ROM 을활용할수있다. RAM 의구조를이해하고 VHDL 로구현할수있다. FIFO, STACK 등의용도로 RAM 을활용할수있다. ASIC, FPGA 업체에서제공하는메가셀을이용하여원하는스펙의메모리를생성할수있다. SDRAM 의구조를이해한다.

More information

김기남_ATDC2016_160620_[키노트].key

김기남_ATDC2016_160620_[키노트].key metatron Enterprise Big Data SKT Metatron/Big Data Big Data Big Data... metatron Ready to Enterprise Big Data Big Data Big Data Big Data?? Data Raw. CRM SCM MES TCO Data & Store & Processing Computational

More information

Manufacturing6

Manufacturing6 σ6 Six Sigma, it makes Better & Competitive - - 200138 : KOREA SiGMA MANAGEMENT C G Page 2 Function Method Measurement ( / Input Input : Man / Machine Man Machine Machine Man / Measurement Man Measurement

More information

wire [n-1:0] a, b, c, d, e, f, g, h; wire [n-1:0] x; // internal wires wire [n-1:0] tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; mux_2to1 mux001 (.x(tmp0),.a(a

wire [n-1:0] a, b, c, d, e, f, g, h; wire [n-1:0] x; // internal wires wire [n-1:0] tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; mux_2to1 mux001 (.x(tmp0),.a(a [2010 년디지털시스템설계및실험중간고사 1 답안지 ] 출제 : 채수익 Verilog 문법채점기준 ( 따로문제의채점기준에명시되어있지않아도적용되어있음 ) (a) output이 always 문에서사용된경우, reg로선언하지않은경우 (-1 pts) (b) reg, wire를혼동하여사용한경우 (-1 pts) (c) always @( ) 에서모든 input을 sensitivity

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 Reasons for Poor Performance Programs 60% Design 20% System 2.5% Database 17.5% Source: ORACLE Performance Tuning 1 SMS TOOL DBA Monitoring TOOL Administration TOOL Performance Insight Backup SQL TUNING

More information

강의10

강의10 Computer Programming gdb and awk 12 th Lecture 김현철컴퓨터공학부서울대학교 순서 C Compiler and Linker 보충 Static vs Shared Libraries ( 계속 ) gdb awk Q&A Shared vs Static Libraries ( 계속 ) Advantage of Using Libraries Reduced

More information

OPCTalk for Hitachi Ethernet 1 2. Path. DCOMwindow NT/2000 network server. Winsock update win95. . . 3 Excel CSV. Update Background Thread Client Command Queue Size Client Dynamic Scan Block Block

More information

Microsoft Word - Automap3

Microsoft Word - Automap3 사 용 설 명 서 본 설명서는 뮤직메트로에서 제공합니다. 순 서 소개 -------------------------------------------------------------------------------------------------------------------------------------------- 3 제품 등록 --------------------------------------------------------------------------------------------------------------------------------------

More information

untitled

untitled CAN BUS RS232 Line Ethernet CAN H/W FIFO RS232 FIFO IP ARP CAN S/W FIFO TERMINAL Emulator COMMAND Interpreter ICMP TCP UDP PROTOCOL Converter TELNET DHCP C2E SW1 CAN RS232 RJ45 Power

More information

untitled

untitled Push... 2 Push... 4 Push... 5 Push... 13 Push... 15 1 FORCS Co., LTD A Leader of Enterprise e-business Solution Push (Daemon ), Push Push Observer. Push., Observer. Session. Thread Thread. Observer ID.

More information

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어 개나리 연구소 C 언어 노트 (tyback.egloos.com) 프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어먹고 하더라구요. 그래서,

More information

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770>

<C0CCBCBCBFB52DC1A4B4EBBFF82DBCAEBBE7B3EDB9AE2D313939392D382E687770> i ii iii iv v vi 1 2 3 4 가상대학 시스템의 국내외 현황 조사 가상대학 플랫폼 개발 이상적인 가상대학시스템의 미래상 제안 5 웹-기반 가상대학 시스템 전통적인 교수 방법 시간/공간 제약을 극복한 학습동기 부여 교수의 일방적인 내용전달 교수와 학생간의 상호작용 동료 학생들 간의 상호작용 가상대학 운영 공지사항,강의록 자료실, 메모 질의응답,

More information

인켈(국문)pdf.pdf

인켈(국문)pdf.pdf M F - 2 5 0 Portable Digital Music Player FM PRESET STEREOMONO FM FM FM FM EQ PC Install Disc MP3/FM Program U S B P C Firmware Upgrade General Repeat Mode FM Band Sleep Time Power Off Time Resume Load

More information

제5장 PLD의 이해와 실습

제5장 PLD의 이해와 실습 제 5 장 PLD 의이해와실습 실험의목표 - 프로그래머블논리소자인 PAL 과 PLA, EPROM, CPLD 등에대하여이해한다. - MAX PLUS II를이용하여 CPLD 프로그램하는방법을배운다. - CPLD 굽는법에대하여익힌다. - VHDL 간단한표현과문법에대하여소개를한다. 실험도움자료 1. PLD(Programmable Logic Device) PLD는사용자가필요로하는논리기능을직접

More information

Microsoft PowerPoint - CH6.ppt [호환 모드]

Microsoft PowerPoint - CH6.ppt [호환 모드] II. VHDL 설계부 4 장. VHDL 개요 5 장. VHDL 설계구성 7 장. VHDL 모델링 8 장. VHDL 구문과예제 - 1 - 어휘요소 (Lexical Elements) 식별자, 리터럴, 예약어, 구분자로구분되어지며, 식별자와예약어의경우대소문자의구별이없다. 객체 (Objects) 류가있다. 데이터를저장하기위한기억장소를나타내며, 상수 / 변수 ( 파일

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 (Host) set up : Linux Backend RS-232, Ethernet, parallel(jtag) Host terminal Target terminal : monitor (Minicom) JTAG Cross compiler Boot loader Pentium Redhat 9.0 Serial port Serial cross cable Ethernet

More information

을 할 때, 결국 여러 가지 단어를 넣어서 모두 찾아야 한다는 것이다. 그 러나 가능한 모든 용어 표현을 상상하기가 쉽지 않고, 또 모두 찾기도 어 렵다. 용어를 표준화하여 한 가지 표현만 쓰도록 하여야 한다고 하지만, 말은 쉬워도 모든 표준화된 용어를 일일이 외우기는

을 할 때, 결국 여러 가지 단어를 넣어서 모두 찾아야 한다는 것이다. 그 러나 가능한 모든 용어 표현을 상상하기가 쉽지 않고, 또 모두 찾기도 어 렵다. 용어를 표준화하여 한 가지 표현만 쓰도록 하여야 한다고 하지만, 말은 쉬워도 모든 표준화된 용어를 일일이 외우기는 특집 전문 용어와 국어생활 전문 용어의 표준화 -남북 표준에서 시맨틱 웹까지- 최기선 한국과학기술원 전산학과 교수 1. 전문 용어 표준화가 사회 문화를 향상시키는가? 전문 용어 는 우리에게 어떤 의미가 있는가? 이 질문은 매일 마시는 공기 는 우리에게 어떤 의미가 있느냐고 묻는 것과 같다. 있을 때에는 없 는 듯하지만, 없으면 곧 있어야 함을 아는 것이 공기이다.

More information

歯03-ICFamily.PDF

歯03-ICFamily.PDF Integrated Circuits SSI(Small Scale IC) 10 / ( ) MSI(Medium Scale IC) / (, ) LSI(Large Scale IC) / (LU) VLSI(Very Large Scale IC) - / (CPU, Memory) ULSI(Ultra Large Scale IC) - / ( ) GSI(Giant Large Scale

More information

(72) 발명자 정진곤 서울특별시 성북구 종암1동 54-398 이용훈 대전광역시 유성구 어은동 한빛아파트 122동 1301 호 - 2 -

(72) 발명자 정진곤 서울특별시 성북구 종암1동 54-398 이용훈 대전광역시 유성구 어은동 한빛아파트 122동 1301 호 - 2 - (51) Int. Cl. (19) 대한민국특허청(KR) (12) 등록특허공보(B1) H04B 7/04 (2006.01) H04B 7/02 (2006.01) H04L 1/02 (2006.01) (21) 출원번호 10-2007-0000175 (22) 출원일자 2007년01월02일 심사청구일자 2008년08월26일 (65) 공개번호 10-2008-0063590 (43)

More information

(72) 발명자 이동희 서울 동작구 여의대방로44길 10, 101동 802호 (대 방동, 대림아파트) 노삼혁 서울 중구 정동길 21-31, B동 404호 (정동, 정동상 림원) 이 발명을 지원한 국가연구개발사업 과제고유번호 2010-0025282 부처명 교육과학기술부

(72) 발명자 이동희 서울 동작구 여의대방로44길 10, 101동 802호 (대 방동, 대림아파트) 노삼혁 서울 중구 정동길 21-31, B동 404호 (정동, 정동상 림원) 이 발명을 지원한 국가연구개발사업 과제고유번호 2010-0025282 부처명 교육과학기술부 (19) 대한민국특허청(KR) (12) 등록특허공보(B1) (45) 공고일자 2015년01월13일 (11) 등록번호 10-1480424 (24) 등록일자 2015년01월02일 (51) 국제특허분류(Int. Cl.) G06F 12/00 (2006.01) G11C 16/00 (2006.01) (21) 출원번호 10-2013-0023977 (22) 출원일자 2013년03월06일

More information

CD-RW_Advanced.PDF

CD-RW_Advanced.PDF HP CD-Writer Program User Guide - - Ver. 2.0 HP CD-RW Adaptec Easy CD Creator Copier, Direct CD. HP CD-RW,. Easy CD Creator 3.5C, Direct CD 3.0., HP. HP CD-RW TEAM ( 02-3270-0803 ) < > 1. CD...3 CD...5

More information

Slide 1

Slide 1 Clock Jitter Effect for Testing Data Converters Jin-Soo Ko Teradyne 2007. 6. 29. 1 Contents Noise Sources of Testing Converter Calculation of SNR with Clock Jitter Minimum Clock Jitter for Testing N bit

More information

PowerPoint 프레젠테이션

PowerPoint 프레젠테이션 @ Lesson 3 if, if else, if else if, switch case for, while, do while break, continue : System.in, args, JOptionPane for (,, ) @ vs. logic data method variable Data Data Flow (Type), ( ) @ Member field

More information

슬라이드 1

슬라이드 1 Pairwise Tool & Pairwise Test NuSRS 200511305 김성규 200511306 김성훈 200614164 김효석 200611124 유성배 200518036 곡진화 2 PICT Pairwise Tool - PICT Microsoft 의 Command-line 기반의 Free Software www.pairwise.org 에서다운로드후설치

More information

final_thesis

final_thesis CORBA/SNMP DPNM Lab. POSTECH email : ymkang@postech.ac.kr Motivation CORBA/SNMP CORBA/SNMP 2 Motivation CMIP, SNMP and CORBA high cost, low efficiency, complexity 3 Goal (Information Model) (Operation)

More information

. "" "",.... :...,,....,.. :..,,,..,,...,.... 2

.  ,.... :...,,....,.. :..,,,..,,...,.... 2 RD-5405 /.. . "" "",.... :...,,....,.. :..,,,..,,...,.... 2 ..,,..,.. (,,,, )......,...,., ( ),,,,.,. (, )..,...... BD/DVD CD TV, VCR,........ (+, -).,,..... 3 ... 2... 3....3... 5... 9... 10...11...11...

More information

<BBEABEF7B5BFC7E22DA5B12E687770>

<BBEABEF7B5BFC7E22DA5B12E687770> 2 40) 1. 172 2. 174 2.1 174 2.2 175 2.3 D 178 3. 181 3.1 181 3.2 182 3.3 182 184 1.., D. DPC (main memory). D, CPU S, ROM,.,.. D *, (02) 570 4192, jerrypak@kisdi.re.kr 172 . D.. (Digital Signal Processor),

More information

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서

PowerChute Personal Edition v3.1.0 에이전트 사용 설명서 PowerChute Personal Edition v3.1.0 990-3772D-019 4/2019 Schneider Electric IT Corporation Schneider Electric IT Corporation.. Schneider Electric IT Corporation,,,.,. Schneider Electric IT Corporation..

More information

<4D F736F F F696E74202D20B1E2BCFAC1A4BAB8C8B8C0C72DB0E8C3F8C1A6BEEE2DC0CCC0E7C8EF2E BC0D0B1E220C0FCBFEB5D>

<4D F736F F F696E74202D20B1E2BCFAC1A4BAB8C8B8C0C72DB0E8C3F8C1A6BEEE2DC0CCC0E7C8EF2E BC0D0B1E220C0FCBFEB5D> Programmable Logic Device 설계특성 2006. 4. 6. 이재흥한밭대학교정보통신컴퓨터공학부 발표순서 1. PLD의개요및구조 2. CPLD/FPGA의구조 3. CPLD/FPGA 설계및검증방법 4. Embedded SW와 FPGA Design 질의 & 응답 2 ASIC vs PLD Standard ICs General-purpose processors,

More information

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

Microsoft Word - FS_ZigBee_Manual_V1.3.docx FirmSYS Zigbee etworks Kit User Manual FS-ZK500 Rev. 2008/05 Page 1 of 26 Version 1.3 목 차 1. 제품구성... 3 2. 개요... 4 3. 네트워크 설명... 5 4. 호스트/노드 설명... 6 네트워크 구성... 6 5. 모바일 태그 설명... 8 6. 프로토콜 설명... 9 프로토콜 목록...

More information

1217 WebTrafMon II

1217 WebTrafMon II (1/28) (2/28) (10 Mbps ) Video, Audio. (3/28) 10 ~ 15 ( : telnet, ftp ),, (4/28) UDP/TCP (5/28) centralized environment packet header information analysis network traffic data, capture presentation network

More information

C++-¿Ïº®Çؼ³10Àå

C++-¿Ïº®Çؼ³10Àå C C++. (preprocessor directives), C C++ C/C++... C++, C. C++ C. C C++. C,, C++, C++., C++.,.. #define #elif #else #error #if #itdef #ifndef #include #line #pragma #undef #.,.,. #include #include

More information

airDACManualOnline_Kor.key

airDACManualOnline_Kor.key 5F InnoValley E Bldg., 255 Pangyo-ro, Bundang-gu, Seongnam-si, Gyeonggi-do, Korea (Zip 463-400) T 031 8018 7333 F 031 8018 7330 airdac AD200 F1/F2/F3 141x141x35 mm (xx) 350 g LED LED1/LED2/LED3 USB RCA

More information

CPX-E-EC_BES_C_ _ k1

CPX-E-EC_BES_C_ _ k1 CPX-E CPX-E-EC EtherCAT 8071155 2017-07 [8075310] CPX-E-EC CPX-E-EC-KO EtherCAT, TwinCAT (). :, 2 Festo CPX-E-EC-KO 2017-07 CPX-E-EC 1... 4 1.1... 4 1.2... 4 1.3... 4 1.4... 5 1.5... 5 2... 6 2.1... 6

More information

Coriolis.hwp

Coriolis.hwp MCM Series 주요특징 MaxiFlo TM (맥시플로) 코리올리스 (Coriolis) 질량유량계 MCM 시리즈는 최고의 정밀도를 자랑하며 슬러리를 포함한 액체, 혼합 액체등의 질량 유량, 밀도, 온도, 보정된 부피 유량을 측정할 수 있는 질량 유량계 이다. 단일 액체 또는 2가지 혼합액체를 측정할 수 있으며, 강한 노이즈 에도 견디는 면역성, 높은 정밀도,

More information

PCServerMgmt7

PCServerMgmt7 Web Windows NT/2000 Server DP&NM Lab 1 Contents 2 Windows NT Service Provider Management Application Web UI 3 . PC,, Client/Server Network 4 (1),,, PC Mainframe PC Backbone Server TCP/IP DCS PLC Network

More information

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf("hihi\n"); } warning: conflicting types for functiona

4. #include <stdio.h> #include <stdlib.h> int main() { functiona(); } void functiona() { printf(hihi\n); } warning: conflicting types for functiona 이름 : 학번 : A. True or False: 각각항목마다 True 인지 False 인지적으세요. 1. (Python:) randint 함수를사용하려면, random 모듈을 import 해야한다. 2. (Python:) '' (single quote) 는한글자를표현할때, (double quote) 는문자열을표현할때사용한다. B. 다음에러를수정하는방법을적으세요.

More information

슬라이드 1

슬라이드 1 사용 전에 사용자 주의 사항을 반드시 읽고 정확하게 지켜주시기 바랍니다. 사용설명서의 구성품 형상과 색상은 실제와 다를 수 있습니다. 사용설명서의 내용은 제품의 소프트웨어 버전이나 통신 사업자의 사정에 따라 다를 수 있습니다. 본 사용설명서는 저작권법에 의해 보호를 받고 있습니다. 본 사용설명서는 주식회사 블루버드소프트에서 제작한 것으로 편집 오류, 정보 누락

More information

04_오픈지엘API.key

04_오픈지엘API.key 4. API. API. API..,.. 1 ,, ISO/IEC JTC1/SC24, Working Group ISO " (Architecture) " (API, Application Program Interface) " (Metafile and Interface) " (Language Binding) " (Validation Testing and Registration)"

More information

Microsoft Word - SRA-Series Manual.doc

Microsoft Word - SRA-Series Manual.doc 사 용 설 명 서 SRA Series Professional Power Amplifier MODEL No : SRA-500, SRA-900, SRA-1300 차 례 차 례 ---------------------------------------------------------------------- 2 안전지침 / 주의사항 -----------------------------------------------------------

More information

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Crash Unity SDK... Log & Crash Search. - Unity3D v4.0 ios

More information

Microsoft PowerPoint - CHAP-03 [호환 모드]

Microsoft PowerPoint - CHAP-03 [호환 모드] 컴퓨터구성 Lecture Series #4 Chapter 3: Data Representation Spring, 2013 컴퓨터구성 : Spring, 2013: No. 4-1 Data Types Introduction This chapter presents data types used in computers for representing diverse numbers

More information

歯처리.PDF

歯처리.PDF E06 (Exception) 1 (Report) : { $I- } { I/O } Assign(InFile, InputName); Reset(InFile); { $I+ } { I/O } if IOResult 0 then { }; (Exception) 2 2 (Settling State) Post OnValidate BeforePost Post Settling

More information

1

1 WebPACK ISE5.1i Manual Insight Korea Xilinx FAE Team 2003. 3. 10 WebPACK ISE 5.1i( 이하 WebPACK ) 은 Xilinx FPGA 나 CPLD 를쉽게디자인할수있게 하는 Free Design Software 로서 Design Entry, Synthesis, 그리고 Verification, Simulation

More information

Microsoft PowerPoint - ICCAD_Digital_lec02.ppt [호환 모드]

Microsoft PowerPoint - ICCAD_Digital_lec02.ppt [호환 모드] IC-CAD CAD 실험 Lecture 2 장재원 주문형반도체 (ASIC * ) 설계흐름도개요 Lecture 1 REVIEW ASIC Spec. Front-end design Logic design Logic synthesis Behavioral-level design Structural-level design Schematic editor *Analog 회로설계시

More information

정보기술응용학회 발표

정보기술응용학회 발표 , hsh@bhknuackr, trademark21@koreacom 1370, +82-53-950-5440 - 476 - :,, VOC,, CBML - Abstract -,, VOC VOC VOC - 477 - - 478 - Cost- Center [2] VOC VOC, ( ) VOC - 479 - IT [7] Knowledge / Information Management

More information

Vertical Probe Card Technology Pin Technology 1) Probe Pin Testable Pitch:03 (Matrix) Minimum Pin Length:2.67 High Speed Test Application:Test Socket

Vertical Probe Card Technology Pin Technology 1) Probe Pin Testable Pitch:03 (Matrix) Minimum Pin Length:2.67 High Speed Test Application:Test Socket Vertical Probe Card for Wafer Test Vertical Probe Card Technology Pin Technology 1) Probe Pin Testable Pitch:03 (Matrix) Minimum Pin Length:2.67 High Speed Test Application:Test Socket Life Time: 500000

More information

untitled

untitled CAN BUS RS232 Line CAN H/W FIFO RS232 FIFO CAN S/W FIFO TERMINAL Emulator COMMAND Interpreter PROTOCOL Converter CAN2RS232 Converter Block Diagram > +- syntax

More information

Remote UI Guide

Remote UI Guide Remote UI KOR Remote UI Remote UI PDF Adobe Reader/Adobe Acrobat Reader. Adobe Reader/Adobe Acrobat Reader Adobe Systems Incorporated.. Canon. Remote UI GIF Adobe Systems Incorporated Photoshop. ..........................................................

More information

VOL.76.2008/2 Technical SmartPlant Materials - Document Management SmartPlant Materials에서 기본적인 Document를 관리하고자 할 때 필요한 세팅, 파일 업로드 방법 그리고 Path Type인 Ph

VOL.76.2008/2 Technical SmartPlant Materials - Document Management SmartPlant Materials에서 기본적인 Document를 관리하고자 할 때 필요한 세팅, 파일 업로드 방법 그리고 Path Type인 Ph 인터그래프코리아(주)뉴스레터 통권 제76회 비매품 News Letters Information Systems for the plant Lifecycle Proccess Power & Marine Intergraph 2008 Contents Intergraph 2008 SmartPlant Materials Customer Status 인터그래프(주) 파트너사

More information

Microsoft PowerPoint - ICCAD_Digital_lec03.ppt [호환 모드]

Microsoft PowerPoint - ICCAD_Digital_lec03.ppt [호환 모드] IC-CAD CAD 실험 Lecture 3 장재원 주문형반도체 (ASIC * ) 설계흐름도개요 Lecture 2 REVIEW ASIC Spec. Front-end design Logic design Logic synthesis Behavioral-level design Structural-level design Schematic editor *Analog 회로설계시

More information

TEL:02)861-1175, FAX:02)861-1176 , REAL-TIME,, ( ) CUSTOMER. CUSTOMER REAL TIME CUSTOMER D/B RF HANDY TEMINAL RF, RF (AP-3020) : LAN-S (N-1000) : LAN (TCP/IP) RF (PPT-2740) : RF (,RF ) : (CL-201)

More information

휠세미나3 ver0.4

휠세미나3 ver0.4 andromeda@sparcs:/$ ls -al dev/sda* brw-rw---- 1 root disk 8, 0 2014-06-09 18:43 dev/sda brw-rw---- 1 root disk 8, 1 2014-06-09 18:43 dev/sda1 brw-rw---- 1 root disk 8, 2 2014-06-09 18:43 dev/sda2 andromeda@sparcs:/$

More information

untitled

untitled 9 hamks@dongguk.ac.kr : Source code Assembly language code x = a + b; ld a, %r1 ld b, %r2 add %r1, %r2, %r3 st %r3, x (Assembler) (bit pattern) (machine code) CPU security (code generator).. (Instruction

More information

HW5 Exercise 1 (60pts) M interpreter with a simple type system M. M. M.., M (simple type system). M, M. M., M.

HW5 Exercise 1 (60pts) M interpreter with a simple type system M. M. M.., M (simple type system). M, M. M., M. 오늘할것 5 6 HW5 Exercise 1 (60pts) M interpreter with a simple type system M. M. M.., M (simple type system). M, M. M., M. Review: 5-2 7 7 17 5 4 3 4 OR 0 2 1 2 ~20 ~40 ~60 ~80 ~100 M 언어 e ::= const constant

More information