1 1 2 2 2-1 2 2-2 4 2-3 11 2-4 12 2-5 14 3 16 3-1 16 3-2 18 3-3 22 4 35 4-1 VHDL 35 4-2 VHDL 37 4-3 VHDL 37 4-3-1 37 4-3-2 42 i



Similar documents
VHDL

if clear = 1 then Q <= " "; elsif we = 1 then Q <= D; end rtl; regs.vhdl clk 0 1 rst clear we Write Enable we 1 we 0 if clk 1 Q if rst =

論理設計の基礎

TECH_I Vol.25 改訂新版PCIデバイス設計入門

スライド 1

Unconventional HDL Programming ( version) 1

スライド 1

フリップフロップ

Microsoft Word - 実験4_FPGA実験2_2015

Microsoft PowerPoint - 集積回路工学_ ppt[読み取り専用]

Microsoft PowerPoint LC_15.ppt


回路 7 レジスタ ( 同期イネーブル及び非同期リセット付 ) 入力データを保持するのに用いる記憶素子 使用用途として, マイクロプロセッサ内部で演算や実行状態の保持に用いられる Fig4-2 のレジスタは, クロック信号の立ち上がり時かつ 信号が 1 のときに外部からの 1 ビットデータ R をレ

エンティティ : インタフェースを定義 entity HLFDD is port (, : in std_logic ;, : out std_logic ) ; end HLFDD ; アーキテクチャ : エンティティの実現 architecture RH1 of HLFDD is <= xor

VBI VBI FM FM FM FM FM DARC DARC

- VHDL 演習 ( 組み合せ論理回路 ) 回路 半加算器 (half adder,fig.-) 全加算器を構成する要素である半加算器を作成する i) リスト - のコードを理解してから, コンパイル, ダウンロードする ii) 実験基板上のスイッチ W, が, の入力,LED, が, の出力とな

untitled

starc_verilog_hdl pptx

問 2. タイミングチャート以下に示す VHDL コードで記述されている回路に関するタイミングチャートを完成させよ ) レジスタの動作 use IEEE.std_logic_64.all; entity RegN is generic (N : integer := 8 port ( CLK, EN

卒 業 研 究 報 告

Verilog HDL による回路設計記述

デザインパフォーマンス向上のためのHDLコーディング法

LSI LSI 2

PeakVHDL Max+Plus VGA VG

RSA FA FA AND Booth FA FA RSA 3 4 5

COINS 5 2.1

TULを用いたVisual ScalerとTDCの開発

<4D F736F F D2091B28BC68CA48B8695F18D902E646F63>

untitled

FPGA と LUPO その1

「FPGAを用いたプロセッサ検証システムの製作」

Design at a higher level

VHDL-AMS Department of Electrical Engineering, Doshisha University, Tatara, Kyotanabe, Kyoto, Japan TOYOTA Motor Corporation, Susono, Shizuok

VHDL


PLDとFPGA

2ALU 以下はデータ幅 4ビットの ALU の例 加算, 減算,AND,OR の4つの演算を実行する 実際のプロセッサの ALU は, もっと多種類の演算が可能 リスト 7-2 ALU の VHDL 記述 M use IEEE.STD_LOGIC_1164.ALL; 00 : 加算 use IEE

Report Template

論理回路設計

XC9500 ISP CPLD JTAG Port 3 JTAG Controller In-System Programming Controller 8 36 Function Block Macrocells to 8 /GCK /GSR /GTS 3 2 or 4 Blocks FastCO

TOS7200 CD-ROM DUT PC 1.0X p.15 NEMA Vac/10 A [85-AA-0003] m : CEE7/7 : 250Vac/10 A [85-AA-0005] : GB1002 : 250Vac/10A [ ] 2016


卒業研究報告.PDF

論理回路設計

0630-j.ppt

main.dvi

PowerPoint プレゼンテーション

Arduino UNO IS Report No. Report Medical Information System Laboratory

.,. 0. (MSB). =2, =1/2.,. MSB LSB, LSB MSB. MSB 0 LSB 0 0 P

VLD Kazutoshi Kobayashi

LSI LSI

論理回路設計

Handsout3.ppt

●70974_100_AC009160_KAPヘ<3099>ーシス自動車約款(11.10).indb

SystemC 2.0を用いた簡易CPUバスモデルの設計

はじめにお読みください

( ) [18 30] [21 00] 2 3 ( ( ) ) ( ) ( ) a b

Lecture on

REALV5_A4…p_Ł\1_4A_OCF

untitled

「都市から地方への人材誘致・移住促進に関する調査」

<91498EE88CA D815B2E786C73>

〔 大 会 役 員 〕

橡本体資料+参考条文.PDF

TK747取扱説明書

EDSF2006_ PDF

3 SIMPLE ver 3.2: SIMPLE (SIxteen-bit MicroProcessor for Laboratory Experiment) 1 16 SIMPLE SIMPLE 2 SIMPLE 2.1 SIMPLE (main memo


HardCopy IIデバイスのタイミング制約

( ) : 1997

3 PAD p.2/88

For_Beginners_CAPL.indd


untitled

FPGAメモリおよび定数のインシステム・アップデート


プロセッサ・アーキテクチャ

2.5. Verilog 19 Z= X + Y - Z A+B LD ADD SUB ST (X<<1)+(Y<<1) X 1 2 LD SL ST 2 10

MAX IIデバイスのIEEE (JTAG)バウンダリ・スキャン・テスト

/ FPGA LSI [1] CDP DDP 2 LSI FPGA PicoProcessor(pP)[2] (STP)[1] DDP 1.27 i

~~~~~~~~~~~~~~~~~~ wait Call CPU time 1, latch: library cache 7, latch: library cache lock 4, job scheduler co

AN 100: ISPを使用するためのガイドライン

推奨されるHDLコーディング構文

Compatibility list: vTESTstudio/CANoe

FS_handbook.indd

ディジタル電子回路 設計演習課題

Nios II 簡易チュートリアル

untitled

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

<91E63589F161>

Asterisk PBX 不正利用防止

コンピュータ概論

untitled


回路設計 WEBラボ:10ビットのプチDACをRTLで動かしてみる(おまけソースつき)

液晶プロジェクター CP-S317J/X327J 取扱説明書

HardCopy IIIデバイスの外部メモリ・インタフェース

ワードプロセッシングについて

設計現場からの課題抽出と提言 なぜ開発は遅れるか?その解決策は?

HW-Slides-05.ppt

Transcription:

1030195 15 2 10

1 1 2 2 2-1 2 2-2 4 2-3 11 2-4 12 2-5 14 3 16 3-1 16 3-2 18 3-3 22 4 35 4-1 VHDL 35 4-2 VHDL 37 4-3 VHDL 37 4-3-1 37 4-3-2 42 i

4-3-3 47 5 52 53 54 55 ii

1 VHDL IC VHDL 5 2 3 IC 4 5 1

2 2-1 sequential circuit 2.1 [1] 2.1 2.1 t t t 2

state transition diagram state transition table 2.2 2.2 a s1 s3 3 2.2 b a 2.2 3

2-2 flip-flop FF 1 2.3 a 2 NOT N1 N2 N1 Q1 H N2 Q1 H Q2 L N1 L Q1 H Q1 Q1 H Q2 L Q1 L Q1 L Q2 H 2.3 a 2 2 2.3 b R S Q [5] 4

2.3 2 SR SR set reset flip-flop SR-FF S R 2.4 S 1 Q 1 R 0 Q 1 Q 1 FF Q 0 S R 1 S R 0 Q 1 Q 2.4 FF SR SR-FF 2.5 a Q 2.5 b 2.5 c 5

Q Q FF 2.5 d 2.5 SR 6

D D delayed flip-flop D-FF D CL CL D CL CL 1 2.6 a D-FF b c d CL FF 2.6 c SR-FF R Q D 7

2.6 D SR JK T SR S/R 0 Q S/R 1 0 / 1 S/R Q 1 / 0 2.7 SR-FF [2] 8

Q Q t+1 Q Q t Q Q S S R 0 2.7 SR 2.8 [2] 2.8 9

JK SR J/K J/K 0 SR J/K 1 Q SR D 2.9 JK-FF [2] Q Q J 2.9 JK T JK J K T T 0 Q T 1 Q toggle 2.10 T [2] 10

Q Q T T Q 2.10 T 2-3 2.11 latch register read write 2.11 D 11

1 1 D-FF 2.12 D-FF 4 [1] 2.12 2-4 Counter count 1 count up 1 count down 2 10 12 12

ripple carry 2.13 2.13 [2] [2] 13

2-5 decode 2 decoder 2.14 2 1 0 [2] 2.14 2 4 encode encoder 1 1 2.15 2 [2] 1 2.15 D1 D 2 1 D 0 D 3 0 Q 11 D3 14

priority D0 D3 D 1 D 2 1 Q 10 D2 2.15 4 2 15

3 3-1 1 6 2 3 2.5 1 6 1/6 3 3 1 6 ON 1 6 [6] 16

1 6 1 7 LED LED 6 LED 1 6 LED 3.1 LED 3.1 7 LED LED 3.2 LED LED LED LED [6] 3.2 LED 17

3-2 1 6 7 LED 1 6 LED 7 LED LED 1 6 LED 3.3 3.3 LED 7 LED a g 7 LED LED 3.4 3.4 b LED 2 4 5 6 [6] 18

3.4 LED 2 4 5 6 1 H 4 OR b f 1 OR a g 4 OR d 3 OR OR NAND OR NAND 3.5 OR NAND 19

3.5 OR NAND OR NAND OR NAND 3.6 3.7 4 NAND 74HC20 3 NAND 74HC10 NAND 1 330 LED LED 6 LED OFF NAND 0 3V 47k 1 NAND [6] 20

3.6 OR NAND [6] 21

3.7 [6] 3-3 3.8 3 3.9 H 22

3.8 3.9 1 6 6 1 6 6 000 2 101 2 6 1 6 6 LED 3.9 23

[6] CR CR CR CR 3.10 CR 4 74HC14 2 1M,100k 1 0.01 F 45Hz 3.10 CR 6 74 6 7492 TTL D 74HC74 6 6 24

D n=6 6 3.11 [6] 3.11 6 [6] 25

LED 6 10 0 000 2 5 101 2 6 LED 2 2 6 000 101 LED 7 2 LED LED 1 6 7 LED 3.11 7 LED a g X Y Z LED X 0 Y 0 Z 0 1 X 1 Y 0 Z 0 2 2 2 [6] 3.12 26

3.13 X Y Z 3 a b c d e f g 7 X Y Z 0 0 0 1 0 1 6 2 3bit 7bit 3-13 a b c d e f g 3.12 3.12 LED 1 LED 0 LED LED LED 1 LED 3.12 [6] 3.12 LED 3.14 3.15 [6] 27

X Y Z 3 0 0 0 1 1 1 8 6 1 1 0 1 1 1 1 3.14 [6] 28

3.15 3.15 Z OR a g 3.16 3.12 a g b f c e a g 7 4 3.16 b AND OR IC NAND NOR NAND 74HC00 1 3.16 c D [6] 29

3.16 LED LED IC 74HC04 IC H ON L 5V LED IC 470 LED 6mA [6] ON OFF CR 3.17 ON 4.7 F 0 5V 100k L H NAND OFF 4.7 F 100k 5V 30

ON OFF LED ON LED OFF L NAND [6] 3.17 CR 3.18 3.19 3.20 ON OFF 31

3.18 32

3.19 CR 3.20 3.20 6 33

ON,OFF LED LED 34

4 4-1 VHDL HDL HDL ASIC HDL ASIC FPGA PLD HDL VHDL VHSIC HDL Verilog-HDL UDL I Unified Design Language for Integrated Circuit SFL Structured Function description Language 4.1 VHDL [7] 4.1 HDL 35

VHDL VHDL HSIC Very High Speed Integrated Circuit 1981 IC ASIC 3 4 ASIC HDL ASIC 1983 VHDL 1985 VHDL 1986 7.2 ASIC VHDL 1986 IEEE VASG VHDL Analysis & Standardization Group 1987 5 LRM Language Reference Manual 12 IEEE Std 1076-1987 IEEE VHDL HDL 1989 VHDL VHDL EDA [7] 36

4-2 VHDL VHDL 3 RTL Behaviar ASIC FPGA ASIC 4-3 4-3-1 4.1 4.2 4.1 37

RTL 4-1 6 4.1 library ieee; use ieee.std_logic_1164.all; entity DFFR is port( CLK,RESET1,D : in std_logic; Q,QN :out std_logic ); end DFFR; architecture RTL of DFFR is signal Q_IN:std_logic; begin QN <= not Q_IN; Q <= Q_IN; process(clk,reset1)begin if(reset1='1')then Q_IN <= '0'; elsif(clk'event and CLK = '1')then Q_IN <= D; end if; end process; end RTL; library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; 38

entity COUNTER is port( CLK,RESET : in std_logic; COUNT : out std_logic_vector(2 downto 0) ); end COUNTER; architecture RTL of COUNTER is component DFFR port(clk,reset1,d : in std_logic; Q,QN : out std_logic); end component; signal COUNT_IN_BAR : std_logic_vector(3 downto 0); signal COUNT_IN : std_logic_vector(2 downto 0); signal RESET_IN : std_logic; begin COUNT <= COUNT_IN; COUNT_IN_BAR(0) <= CLK; GEN1:for I in 0 to 2 generate U:DFFR port map( CLK => COUNT_IN_BAR(I), RESET1 => RESET_IN, D => COUNT_IN_BAR(I+1), Q => COUNT_IN(I), QN => COUNT_IN_BAR(I+1) ); end generate; 39

RESET_IN <= RESET or (COUNT_IN(1) and COUNT_IN(2)); end RTL; 4.2 library ieee; use ieee.std_logic_1164.all; use work.std.textio.all; use work.dffr; entity TESTBNCH is end TESTBNCH; architecture stimulus of TESTBNCH is component COUNTER is port ( ); CLK : in std_logic; RESET : in std_logic; COUNT : out std_logic_vector(2 downto 0) end component; signal CLK : std_logic; signal RESET : std_logic; signal COUNT : std_logic_vector(2 downto 0); begin DUT : COUNTER port map ( ); CLK, RESET, COUNT 40

CLOCK1:process begin CLK <= '1'; wait for 10 ns; CLK <= '0'; wait for 10 ns; end process CLOCK1; STIMULUS1 : process begin RESET <= '0'; wait for 5 ns; RESET <= '1'; wait for 10 ns; RESET <= '0'; wait for 180 ns; RESET <= '1'; wait for 20 ns; RESET <= '0'; wait; end process STIMULUS1; end stimulus; CLK COUNT 4.1 41

4-3-2 1 6 LED LED 7 7 3 7 3 COUNT A B C 3 7 START EN START EN 1,0 START EN 1,1 4.3 4.4 4.2 3 4.3 3 7 library ieee; use ieee.std_logic_1164.all; entity DECODER3TO7 is port ( A,B,C : in std_logic; START,EN : in std_logic; Y : out std_logic_vector(6 downto 0) ); end DECODER3TO7; architecture RTL of DECODER3TO7 is 42

signal INDATA : std_logic_vector(2 downto 0); begin INDATA <= C & B & A; process(indata,start,en)begin if(start = '1' and EN = '0')then --EN = STOP case INDATA is when "000" => Y <= "0001000"; --1 when "001" => Y <= "0010100"; --2 when "010" => Y <= "1001001"; --3 when "011" => Y <= "1010101"; --4 when "100" => Y <= "1011101"; --5 when "101" => Y <= "1110111"; --6 when others => Y <= "XXXXXXX"; --X end case; else null; --Y <= "1111111"; end if; end process; end RTL; 43

3 7 4.4 3 7 library ieee; use ieee.std_logic_1164.all; use std.textio.all; use work.decoder3to7; entity TESTBNCH is end TESTBNCH; architecture stimulus of TESTBNCH is component DECODER3TO7 is port ( A,B,C : in std_logic; START,EN : in std_logic; Y: out std_logic_vector(6 downto 0) ); end component; constant PERIOD: time := 100 ns; signal A,B,C : std_logic; signal START,EN : std_logic; signal Y: std_logic_vector(6 downto 0); signal done: boolean := false; begin DUT: DECODER3TO7 port map ( A,B,C, START,EN, Y ); STIMULUS1 : process begin 44

START <= '0';wait for 50 ns; START <= '1'; wait; end process STIMULUS1; STIMULUS2 : process begin EN <= '0'; wait for 245 ns; EN <= '1'; wait for 55 ns; EN <= '0'; wait for 333 ns; EN <= '1'; wait for 55 ns; EN <= '0'; wait for 300 ns; EN <= '1'; wait for 55 ns; end process STIMULUS2; STIMULUS3 : process begin A <= '0'; wait for 25 ns; A <= '1'; wait for 25 ns; end process STIMULUS3; STIMULUS4 : process begin B <= '0'; wait for 50 ns; B <= '1'; wait for 50 ns; B <= '0'; wait for 50 ns; 45

end process STIMULUS4; STIMULUS5 : process begin C <= '0'; wait for 100 ns; C <= '1'; wait for 50 ns; end process STIMULUS5; end stimulus; 4.2 4-3-3 4.1 4.3 4.5 4.6 4.3 CLK COUNT 3 START EN 1,0 COUNT A B C Y 7 46

START EN 1,1 START EN 1,0 DICE 4.1 4.3 VHDL library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; 4.5 entity DICE is port( CLK,RESET : in std_logic; Y : out std_logic_vector(6 downto 0); --COUNT : out std_logic_vector(2 downto 0); START,EN : in std_logic ); end DICE; architecture RTL of DICE is component COUNTER port ( CLK,RESET : in std_logic; COUNT : out std_logic_vector(2 downto 0) ); end component; 47

component DECODER3to7 port ( A,B,C : in std_logic; START,EN : in std_logic; Y : out std_logic_vector(6 downto 0) ); end component; signal U0_COUNT : std_logic_vector(2 downto 0); begin U0 : COUNTER port map ( CLK,RESET,U0_COUNT); U1 : DECODER3to7 port map ( U0_COUNT(0),U0_COUNT(1),U0_COUNT(2), START,EN, Y ); end RTL; 4.6 library ieee; use ieee.std_logic_1164.all; use std.textio.all; use work.dice; entity TESTBNCH is end TESTBNCH; architecture stimulus of TESTBNCH is component DICE is 48

port ( CLK,RESET : in std_logic; Y : out std_logic_vector(6 downto 0); --COUNT : out std_logic_vector(2 downto 0); START,EN : in std_logic ); end component; constant PERIOD: time := 100 ns; signal CLK,RESET : std_logic; signal Y : std_logic_vector(6 downto 0); --signal COUNT : std_logic_vector(2 downto 0); signal START,EN : std_logic; signal done : boolean := false; begin DUT: DICE port map ( CLK,RESET, Y,--COUNT, START,EN ); CLOCK1: process begin CLK <= '1'; wait for 10 ns; CLK <= '0'; wait for 10 ns; end process CLOCK1; STIMULUS1 : process begin 49

START <= '0'; wait for 20 ns; START <= '1'; wait; end process STIMULUS1; STIMULUS2 : process begin EN <= '0'; wait for 145 ns; EN <= '1'; wait for 35 ns; EN <= '0'; wait for 233 ns; EN <= '1'; wait for 35 ns; EN <= '0'; wait for 70 ns; EN <= '1'; wait for 35 ns; EN <= '0'; wait for 125 ns; EN <= '1'; wait for 35 ns; EN <= '0'; wait; end process STIMULUS2; STIMULUS3 : process begin RESET <= '0'; wait for 5 ns; RESET <= '1'; wait for 10 ns; RESET <= '0'; wait for 245 ns; RESET <= '1'; wait for 10 ns; RESET <= '0'; wait; end process STIMULUS3; end stimulus; 50

4.3 51

5 IC VHDL IC VHDL 3-7 VHDL VHDL VHDL VHDL 52

53

[1] [2] [3] [4] [5] [6] CQ [7] VHDL CQ 54

VHDL [7] 1 VHDL VHDL VHDL signal signal BBB std_logic_vector 4 downto 0 out out [7] 55

for-generate if-generate 2 for in generate end generate [ ] if generate end generate [ ] for-generate for-loop exit next If-generate TRUE If else [7] wait wait Wait wait until wait on wait on wait wait 1 [7] 1 wait 56

case case when = = If case 1 when others others 2 case [7] 2 case and or not and or nand nor xor 6 57

std_logic bit std_logic_vector Boolean C VHDL 2 and or xor [7] A = B and C and D and E A = B or C or D or E A = B xor C xor D xor E 2 AND-OR A = B nand C nand D nand E -- A = B and C or D and E -- not not and 58

59 2 AND-OR SEL 1 A SEL 0 B [7] VHDL architecture begin component [ ] [ ] end component architecture begin [7] port map port map 2 [7]