卒 業 研 究 報 告

Size: px
Start display at page:

Download "卒 業 研 究 報 告"

Transcription

1 VHDL

2

3 VHDL BCD REG_B STATE VHDL 5 VHDL

4 1 CPU Hardware Description Language : HDL VHDL VHSIC HDL VHDL 4 3

5 2 complement 1 s complement2 s complem MSBMost Significant 1 Bit MSB LSB Least Significant 1 Bit 2 LSB MSB

6 LSB MSB = = = = 0 ( carry) A B SUM CY_OUT A B SUM CY_OUT

7 B A OUT CY B A SUM = = _ 2.2(a) (b) 2.1(a) (b) carry carry carry carry = + + = + + = + + = + + = + + = + + = + + = + +

8 8 A B CY_IN SUM CY_OUT A B CY_IN SUM CY_OUT SUM = A B CY _ IN CY _ OUT = A CY _ IN + B CY _ IN + A B 2.4(a) (b)

9 2.2(a) (b) LSB Cin 0 1 A B

10 = = 1 ( borrow) = = 0 1 borrow 1 4 A B DIF BR_OUT A B DIF BR_OUT

11 B A OUT BR B A DIF = = _ 2.7(a) (b) 2.4(a) (b) borrow borrow borrow borrow = = = = = = = =

12 8 A B BR_INDIF BR_OUT A B BR_IN DIF BR_OUT DIF = A B BR _ IN BR _ OUT = A B + A BR _ IN + B BR _ IN 2.9(a) (b)

13 2.5(a) (b) LSB Bin 0 1 A B

14 0 0 = = = = 1 AND 1.1 LSB MSB X Y Z AND

15 2.84

16

17 A B A B + B ( A B + B) 2 B

18 B B A B B A B B B A B B B A + = + = + = + 2 ) ( ) ( 2.15(a) MSB LSB LSB (b) 2.5

19 2.11(a) (b) LSB

20 3 register

21

22 LOAD EN RESET LOAD 1 LOAD 0 EN JK J K Q 3.4

23

24 MSB 4 2 MSB

25

26 1 1 AND

27

28 K K+1 K LSB 1 K LSB K K

29 2.5.2 L M MSB LSB L+M L+M MSB 1 LSB M LSB 1 1 LSB NAND AND

30 4 8 BCD = > > 2 = REGA 10 BCD DEC_TO_BIN 27 REG_A 10 CNV_MUL 10 BCD cnv_adder 10 INPUT_SEL

31 10 syncro

32 REG_B REG_B STATE 10 DECIMAL OPE HALT 7 LED LED 10 REG_A DECIMAL REG_B OPE LED HALT 10 COUNT ASMD_SEL ASMD_SELECETLED

33 SEL CAL 4.3 D 3 4.3

34

35 VHDL VHDL library ieee; use ieee.std_logic_1164.all; entity ADD is port(a:in std_logic_vector(26 downto 0); B:in std_logic_vector(28 downto 0); S:out std_logic_vector(28 downto 0); START,CLOCK,RESET_B:in std_logic); end ADD; architecture ADD of ADD is signal ADDER4_OUT:std_logic_vector(4 downto 0); signal BIT_A_OUT:std_logic_vector(3 downto 0); signal BIT_B_OUT:std_logic_vector(3 downto 0); signal BIT_REG_OUT:std_logic_vector(28 downto 0); signal CNT16_OUT:std_logic_vector(4 downto 0); signal JK_FF_K_IN:std_logic; signal JK_FF_Q_OUT:std_logic; component ADDER4 port(a,b:in std_logic_vector(3 downto 0); cin:in std_logic; s:out std_logic_vector(4 downto 0)); component BIT_SHIFT_A port(load,clk,en:in std_logic; A_IN:in std_logic_vector(26 downto 0); Q_A:out std_logic_vector(3 downto 0)); 4.5 VHDL1/3

36 component BIT_SHIFT_B port(load,clk,en:in std_logic; B_IN:in std_logic_vector(28 downto 0); Q_B:out std_logic_vector(3 downto 0)); component BIT_REG port(reset,reset_b,clk,en:in std_logic; PIN:in std_logic_vector(4 downto 0); Q:out std_logic_vector(28 downto 0)); component RS_SYJKFF port(reset_b:in std_logic; SET_B:in std_logic :='1'; J,K,CLK:in std_logic; Q,Q_B:out std_logic); component EN_CNT16 port(q:out std_logic_vector(4 downto 0); EN,CLK,CLR_SY,CLR_USY:in std_logic); JK_FF_K_IN <= not CNT16_OUT(4) and not CNT16_OUT(3) and CNT16_OUT(2) and CNT16_OUT(1) and not CNT16_OUT(0); S <= BIT_REG_OUT; U_A:BIT_SHIFT_A port map(start,clock,jk_ff_q_out,a,bit_a_out); U_B:BIT_SHIFT_B port map(start,clock,jk_ff_q_out,b,bit_b_out); U_ADDER4:ADDER4 port map(bit_a_out,bit_b_out,bit_reg_out(28), ADDER4_OUT); U_REG:BIT_REG port map(reset_b,start,clock,jk_ff_q_out, ADDER4_OUT,BIT_REG_OUT); JK_FF:RS_SYJKFF port map(reset_b,open,start,jk_ff_k_in,clock, JK_FF_Q_OUT,open); 4.5 VHDL2/3

37 CNT8:EN_CNT16 map(cnt16_out,jk_ff_q_out,clock,start,reset_b); end ADD; port 4.5 VHDL3/3 library ieee; use ieee.std_logic_1164.all; entity MUL is port(start,clock,reset_b:in std_logic; MD:in std_logic_vector(28 downto 0); MQ:in std_logic_vector(26 downto 0); ANS:out std_logic_vector(55 downto 0)); end MUL; architecture MUL of MUL is signal MQ_S_OUT:std_logic; signal JK_FF_K_IN:std_logic; signal JK_FF_Q_OUT:std_logic; signal MD_Q_OUT:std_logic_vector(28 downto 0); signal ADDER32_A_IN:std_logic_vector(28 downto 0); signal ADDER32_OUT:std_logic_vector(29 downto 0); signal CNT16_OUT:std_logic_vector(4 downto 0); signal ACC_D_IN:std_logic_vector(56 downto 0); signal ACC_Q_OUT:std_logic_vector(56 downto 0); component ADDER32 port(a,b:in std_logic_vector(28 downto 0); cin:in std_logic :='0'; s:out std_logic_vector(28 downto 0); cout:out std_logic); 4.6 VHDL1/3

38 component REG_MD port(load,clk:in std_logic; D:in std_logic_vector(28 downto 0); Q:out std_logic_vector(28 downto 0)); component EN_REG port(reset,en,clr,clk:in std_logic; D:in std_logic_vector(56 downto 0); Q:out std_logic_vector(56 downto 0)); component BIT_SHIFT port(sin:in std_logic :='0'; EN,LOAD,CLK:in std_logic; D:in std_logic_vector(26 downto 0); SOUT:out std_logic); component RS_SYJKFF port(reset_b:in std_logic; SET_B:in std_logic :='1'; J,K,CLK:in std_logic; Q,Q_B:out std_logic); component EN_CNT16 port(en,clk,clr_sy,clr_usy:in std_logic; Q:out std_logic_vector(4 downto 0)); ADDER32_A_IN <= MD_Q_OUT and (MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT& MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT& MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT& MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT); 4.6 VHDL2/3

39 ACC_D_IN <= ADDER32_OUT & ACC_Q_OUT(27 downto 1); JK_FF_K_IN <= CNT16_OUT(4) and CNT16_OUT(3) and not CNT16_OUT(2) and CNT16_OUT(1) and CNT16_OUT(0); ANS <= ACC_Q_OUT(55 downto 0); U_MD:REG_MD port map(start,clock,md,md_q_out); U_ADDER:ADDER32 port map(adder32_a_in,acc_q_out(56 downto 28), open,adder32_out(28 downto 0),ADDER32_OUT(29)); ACC:EN_REG port map(reset_b,jk_ff_q_out,start,clock, ACC_D_IN,ACC_Q_OUT); U_MQ:BIT_SHIFT port map (open,jk_ff_q_out,start,clock, MQ,MQ_S_OUT); JK_FF:RS_SYJKFF port map(reset_b,open,start,jk_ff_k_in,clock, JK_FF_Q_OUT,open); CNT16:EN_CNT16 port map(jk_ff_q_out,clock,start,reset_b, CNT16_OUT); end MUL; 4.6 VHDL3/3 library IEEE; use IEEE.std_logic_1164.all; entity DIV is port(dd:in std_logic_vector(28 downto 0); DQ:in std_logic_vector(26 downto 0); ANS:out std_logic_vector(28 downto 0); ARE:out std_logic_vector(26 downto 0); START,CLOCK,RESET_B:in std_logic ; ER : out std_logic); end DIV; 4.7 VHDL1/5

40 architecture DIV of DIV is signal DQ_E_OUT:std_logic; signal E_JK_FF_J_IN:std_logic; signal STR:std_logic; signal DQ_SEL_IN:std_logic; signal ACC_SEL_IN:std_logic; signal ACC_EN1:std_logic; signal JK_FF_K_IN: std_logic; signal JK_FF_Q_OUT:std_logic; signal ANS_SIN:std_logic; signal ANS_EN:std_logic; signal LAST:std_logic; signal DQ_Q_OUT:std_logic_vector(26 downto 0); signal DQ_SEL_A_IN:std_logic_vector(27 downto 0); signal DQ_SEL_B_IN:std_logic_vector(27 downto 0); signal DQ_SEL_OUT:std_logic_vector(27 downto 0); signal ADD_SUB_B_IN:std_logic_vector(27 downto 0); signal ADD_SUB_OUT:std_logic_vector(28 downto 0); signal ACC_SEL_A_IN:std_logic_vector(55 downto 0); signal ACC_SEL_B_IN:std_logic_vector(55 downto 0); signal ACC_D_IN:std_logic_vector(56 downto 0); signal ACC_Q_OUT:std_logic_vector(56 downto 0); signal ANS_Q_OUT:std_logic_vector(28 downto 0); signal CNT16_OUT:std_logic_vector(4 downto 0); component ADD_SUB port(a,b:in std_logic_vector(27 downto 0); SUB:in std_logic; S:out std_logic_vector(27 downto 0); CY_BR:out std_logic ); component EN_REG4 port(d:in std_logic_vector(26 downto 0); Q:out std_logic_vector(26 downto 0); 4.7 VHDL2/5

41 EN,CLK:in std_logic); component EN_REG13 port( D:in std_logic_vector(56 downto 0); Q:out std_logic_vector(56 downto 0); RESET,EN,CLK:in std_logic); component EN_SIN_POUT_SHIFT port(sin:in std_logic; Q:out std_logic_vector(28 downto 0); EN,PS,CLK:in std_logic); component RS_SYJKFF port(reset_b:in std_logic; SET_B:in std_logic := '1'; J:in std_logic; K:in std_logic := '0'; CLK:in std_logic; Q,Q_B:out std_logic); component EN_CNT16 port(q:out std_logic_vector(4 downto 0); EN,CLK,CLR_SY,CLR_USY:in std_logic); component SEL5 port(a,b:in std_logic_vector(27 downto 0); O:out std_logic_vector(27 downto 0); SEL:in std_logic); component SEL12 port(a,b:in std_logic_vector(55 downto 0); O:out std_logic_vector(55 downto 0); SEL:in std_logic); 4.7 VHDL3/5

42 DQ_E_OUT <= not DQ(26) and not DQ(25) and not DQ(24) and not DQ(23) and not DQ(22) and not DQ(21) and not DQ(20) and not DQ(19) and not DQ(18) and not DQ(17) and not DQ(16) and not DQ(15) and not DQ(14) and not DQ(13) and not DQ(12) and not DQ(11) and not DQ(10) and not DQ(9) and DQ(8) and not DQ(7) and not DQ(6) and not DQ(5) and not DQ(4) and not DQ(3) and not DQ(2) and not DQ(1) and not DQ(0); E_JK_FF_J_IN <= DQ_E_OUT and START; STR <= START and (not DQ_E_OUT); DQ_SEL_IN <= not JK_FF_K_IN; ACC_SEL_IN <= not STR; ACC_EN1 <= STR or JK_FF_Q_OUT; JK_FF_K_IN <= CNT16_OUT( 4 ) and CNT16_OUT( 3 ) and not CNT16_OUT( 2 ) and CNT16_OUT( 1 ) and CNT16_OUT( 0 ); LAST <= not ( JK_FF_K_IN and ANS_Q_OUT( 0 )); DQ_SEL_A_IN <= '0' & DQ_Q_OUT; DQ_SEL_B_IN <= DQ_Q_OUT & '0'; ADD_SUB_B_IN <= DQ_SEL_OUT and ( LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST& LAST & LAST & LAST & LAST& LAST & LAST & LAST & LAST& LAST & LAST & LAST & LAST& LAST & LAST & LAST & LAST ); ACC_SEL_A_IN <= ADD_SUB_OUT( 26 downto 0 ) & ACC_Q_OUT( 25 downto 0 ) & '0'; ACC_SEL_B_IN <= DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD; ACC_D_IN( 54 ) <= ADD_SUB_OUT( 27 ); ANS <= ANS_Q_OUT; ANS_SIN <= ANS_Q_OUT( 0 ) xor ADD_SUB_OUT( 28 ); ANS_EN <= not JK_FF_K_IN and JK_FF_Q_OUT; ARE <= ACC_Q_OUT( 56 downto 30 ); U_ADD_SUB:ADD_SUB port map ( ACC_Q_OUT( 55 downto 28 ), ADD_SUB_B_IN, ANS_Q_OUT( 0 ), ADD_SUB_OUT( 27 downto 0 ), ADD_SUB_OUT( 28 )); U_D:EN_REG4 port map ( DQ, DQ_Q_OUT, STR, CLOCK ); 4.7 VHDL4/5

43 ACC:EN_REG13 port map(acc_d_in,acc_q_out,reset_b, ACC_EN1,CLOCK ); U_ANS:EN_SIN_POUT_SHIFT port map(ans_sin,ans_q_out,ans_en, STR,CLOCK ); JK_FF:RS_SYJKFF port map(reset_b,open,str,jk_ff_k_in, CLOCK, JK_FF_Q_OUT, open ); E_JK_FF:RS_SYJKFF port map(reset_b,open,e_jk_ff_j_in,open, CLOCK,ER,open); CNT16:EN_CNT16 port map(cnt16_out,jk_ff_q_out,clock, STR, RESET_B ); DQ_SEL:SEL5 port map(dq_sel_a_in,dq_sel_b_in, DQ_SEL_OUT,DQ_SEL_IN); ACC_SEL:SEL12 port map(acc_sel_a_in,acc_sel_b_in, ACC_D_IN( 55 downto 0 ),ACC_SEL_IN); end DIV; 4.7 VHDL5/5 library IEEE; use IEEE.std_logic_1164.all; entity DEC_TO_BIN is port(dec:in std_logic_vector(9 downto 0); BIN:out std_logic_vector(3 downto 0)); end DEC_TO_BIN; architecture DEC_TO_BIN of DEC_TO_BIN is process(dec) case DEC is BCD VHDL1/2

44 when " " => BIN <= "0000"; when " " => BIN <= "0001"; when " " => BIN <= "0010"; when " " => BIN <= "0011"; when " " => BIN <= "0100"; when " " => BIN <= "0101"; when " " => BIN <= "0110"; when " " => BIN <= "0111"; when " " => BIN <= "1000"; when " " => BIN <= "1001"; when others => BIN <= "0000"; end case; end process; end DEC_TO_BIN; BCD VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity REGA is port(deci:in std_logic_vector(9 downto 0); KEKKA:out std_logic_vector(26 downto 0); REG_EN,IN_SEL,RST,CLK:in std_logic); end REGA; architecture REGA of REGA is signal BCD:std_logic_vector(3 downto 0); signal ADDER_OUT:std_logic_vector(26 downto 0); signal REG_A_IN:std_logic_vector(26 downto 0); signal REG_A_OUT:std_logic_vector(26 downto 0); 4.9REGA VHDL1/3

45 signal MUL_OUT:std_logic_vector(26 downto 0); component DEC_TO_BIN is port(dec:in std_logic_vector(9 downto 0); BIN:out std_logic_vector(3 downto 0)); component REG_A is port(en,reset_b,clk:in std_logic; PIN:in std_logic_vector(26 downto 0); Q:out std_logic_vector(26 downto 0)); component cnv_mul is port(md:in std_logic_vector(23 downto 0); ANS:out std_logic_vector(26 downto 0); MO:out std_logic); component cnv_adder is port(a:in std_logic_vector(26 downto 0); B:in std_logic_vector(3 downto 0); S:out std_logic_vector(26 downto 0)); component INPUT_SEL is port(a,b:in std_logic_vector(26 downto 0); O:out std_logic_vector(26 downto 0); SEL:in std_logic); KEKKA <= REG_A_OUT; U_ENC:DEC_TO_BIN port map(deci,bcd); U_REG_A:REG_A port map(reg_en,rst,clk,reg_a_in,reg_a_out); U_MUL:cnv_mul port map(reg_a_out(23 downto 0),MUL_OUT,open); U_ADD:cnv_adder port map(mul_out,bcd,adder_out); 4.9REGA VHDL2/3

46 U_SEL:INPUT_SEL port map(adder_out," " & end REGA; BCD,REG_A_IN,IN_SEL); 4.9REGA VHDL3/3 library ieee; use ieee.std_logic_1164.all; entity REGB is port(asmd:in std_logic_vector(1 downto 0); REGA_OUT:in std_logic_vector(26 downto 0); REGB_OUT:out std_logic_vector(26 downto 0); TO_STATE:out std_logic_vector(28 downto 0); CLK,REG_RST,ADD_EN,SUB_EN,MUL_EN,DIV_EN:in std_logic; ERR:out std_logic); end REGB; architecture REGB of REGB is signal REG_B_IN:std_logic_vector(28 downto 0); signal REG_B_OUT:std_logic_vector(28 downto 0); signal HOSU_OUT:std_logic_vector(26 downto 0); signal ADDER_OUT:std_logic_vector(28 downto 0); signal SUB_OUT:std_logic_vector(28 downto 0); signal MUL_OUT:std_logic_vector(55 downto 0); signal DIV_OUT:std_logic_vector(28 downto 0); component REG_B is port(reset_b,clk:in std_logic; PIN:in std_logic_vector(28 downto 0); Q:out std_logic_vector(28 downto 0)); 4.10REGB VHDL1/3

47 component hosu is port(pin:in std_logic_vector(27 downto 0); Q:out std_logic_vector(26 downto 0); CLK:in std_logic); component ASMD_SEL is port(a,s,m,d:in std_logic_vector(28 downto 0); O:out std_logic_vector(28 downto 0); SEL:in std_logic_vector(1 downto 0)); component ADD is port(a:in std_logic_vector(26 downto 0); B:in std_logic_vector(28 downto 0); S:out std_logic_vector(28 downto 0); START,CLOCK,RESET_B:in std_logic); component SUB is port(a:in std_logic_vector(26 downto 0); B:in std_logic_vector(28 downto 0); DIF:out std_logic_vector(28 downto 0); START,CLOCK,RESET_B:in std_logic); component MUL is port(start,clock,reset_b:in std_logic; MD:in std_logic_vector(28 downto 0); MQ:in std_logic_vector(26 downto 0); ANS:out std_logic_vector(55 downto 0)); component DIV is port(dd:in std_logic_vector(28 downto 0); DQ:in std_logic_vector(26 downto 0); ANS:out std_logic_vector(28 downto 0); ARE:out std_logic_vector(26 downto 0); 4.10REGB VHDL2/3

48 REGB_OUT<=HOSU_OUT; TO_STATE <= REG_B_OUT; U_REG_B:REG_B port map(reg_rst,clk,reg_b_in,reg_b_out); U_HOSU:hosu port map(reg_b_out(27 downto 0),HOSU_OUT,CLK); U_SEL:ASMD_SEL port map(adder_out,sub_out, MUL_OUT(28 downto 0),DIV_OUT,REG_B_IN,ASMD); U_ADD:ADD port map(rega_out,reg_b_out,adder_out,add_en, CLK,REG_RST); U_SUB:SUB port map(rega_out,reg_b_out,sub_out,sub_en, CLK,REG_RST); U_MUL:MUL port map(mul_en,clk,reg_rst,reg_b_out,rega_out, MUL_OUT); U_DIV:DIV port map(reg_b_out,rega_out,div_out,open,div_en,clk, REG_RST,ERR); end REGB; 4.10REGB VHDL3/3 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity machine is port(regb:in std_logic_vector(28 downto 0); ASMD:out std_logic_vector(1 downto 0); CLK,RESET,DECI,PLUS,MINUS,KAKERU,WARU,EQUAL,C,CE:in std_logic; SEL,EN,RST_A,RST_B,ADD,SUB,MUL,DIV:out std_logic); end machine; 4.11 VHDL1/5

49 architecture machine of machine is type t_state is (DECIMAL,OPE,HALT); signal state:t_state; signal BR:std_logic; signal B_RST:std_logic; signal COUNT:std_logic_vector(3 downto 0); signal CAL:std_logic_vector(1 downto 0); signal ASMD_SEL:std_logic_vector(1 downto 0); signal ASMD_SELECT:std_logic_vector(3 downto 0); process(clk,reset) if(reset = '0') then COUNT <= "0000"; CAL <= "00"; state <= DECIMAL; elsif(clk'event and CLK ='1') then case state is when DECIMAL => SEL <= '1';BR<='0'; if((deci = '1') and (COUNT < 8)) then B_RST<='0'; COUNT <= COUNT + 1; state <= DECIMAL; elsif(c = '1') then COUNT <= "0000"; state <= DECIMAL; elsif(ce = '1') then COUNT <= "0000"; state <= DECIMAL; elsif((plus or MINUS or KAKERU or WARU or EQUAL) = '1') then 4.11 VHDL2/5

50 if(cal = "00") then ASMD_SELECT <= "0001"; ASMD_SEL<="00"; elsif(cal = "01") then ASMD_SELECT <= "0010"; ASMD_SEL<="01"; elsif(cal = "10") then ASMD_SELECT <= "0100"; ASMD_SEL<="10"; elsif(cal = "11") then ASMD_SELECT <= "1000"; ASMD_SEL<="11"; end if; if(plus = '1')then CAL <= "00"; elsif(minus = '1') then CAL <= "01"; elsif(kakeru = '1') then CAL <= "10"; elsif(waru = '1') then CAL <= "11"; elsif(equal = '1') then CAL <= "00"; BR <= '1'; end if; state <= OPE; end if; when OPE => SEL <= '0'; if(((regb(28) = '1') and (REGB < )) or ((REGB(28) ='0') and (REGB > ))) then state <= HALT; elsif((plus or MINUS or KAKERU or WARU) = '1') then 4.11 VHDL3/5

51 if(plus = '1')then CAL <= "00"; elsif(minus = '1') then CAL <= "01"; elsif(kakeru = '1') then CAL <= "10"; elsif(waru = '1') then CAL <= "11"; end if; state <= OPE; elsif(deci = '1') then if(br = '0') then B_RST <= '0'; COUNT <= "0001"; ASMD_SELECT<="0000"; elsif(br = '1') then B_RST <= '1'; COUNT <= "0001"; ASMD_SELECT<="0000"; end if; state <= DECIMAL; end if; when HALT => if(c = '1') then CAL <= "00"; COUNT <= "0000"; state <=DECIMAL; elsif(ce = '1') then CAL <= "00"; COUNT <= "0000"; state <=DECIMAL; end if; end case; 4.11 VHDL4/5

52 end if; end process; EN<=DECI and not(count(3)and not COUNT(2)and not COUNT(1)and not COUNT(0)); RST_A<=not(CE or C); RST_B<=not (C or B_RST); ADD<=ASMD_SELECT(0); SUB<=ASMD_SELECT(1); MUL<=ASMD_SELECT(2); DIV<=ASMD_SELECT(3); ASMD<=ASMD_SEL; end machine; 4.11 VHDL5/5 library ieee; use ieee.std_logic_1164.all; entity state is port(decimal:in std_logic_vector(9 downto 0); REG_B_OUT:in std_logic_vector(28 downto 0); ASMD:out std_logic_vector(1 downto 0); CLK,RESET,PLUS,MINUS,KAKERU,WARU,EQUAL,C,CE:in std_logic; A_D_SEL,REGA_EN,REGA_RST,REGB_RST,ADD_EN,SUB_EN,MUL_EN,DIV_E N:out std_logic); end state; architecture state of state is signal DEC:std_logic; signal ADD_IN:std_logic; signal SUB_IN:std_logic; 4.12STATE VHDL1/3

53 signal MUL_IN:std_logic; signal DIV_IN:std_logic; signal ADD_OUT:std_logic; signal SUB_OUT:std_logic; signal MUL_OUT:std_logic; signal DIV_OUT:std_logic; signal ASMD_SELECT:std_logic_vector(1 downto 0); component machine is port(regb:in std_logic_vector(28 downto 0); ASMD:out std_logic_vector(1 downto 0); CLK,RESET,DECI,PLUS,MINUS,KAKERU,WARU,EQUAL,C,CE:in std_logic; SEL,EN,RST_A,RST_B,ADD,SUB,MUL,DIV:out std_logic); component ASMD_OUT is port(input,reset,clk:in std_logic; output:out std_logic); component syncro is port(input,reset,clk:in std_logic; output:out std_logic); DEC <= DECIMAL(9) or DECIMAL(8) or DECIMAL(7) or DECIMAL(6) or DECIMAL(5) or DECIMAL(4) or DECIMAL(3) or DECIMAL(2) or DECIMAL(1) or DECIMAL(0); ADD_EN<=ADD_OUT; SUB_EN<=SUB_OUT; MUL_EN<=MUL_OUT; DIV_EN<=DIV_OUT; U_STATE:machine port map(reg_b_out,asmd_select,clk,reset,dec, PLUS,MINUS,KAKERU,WARU,EQUAL,C,CE, A_D_SEL,REGA_EN,REGA_RST,REGB_RST,ADD_IN,SUB_IN,MUL_IN,DIV_IN); 4.12STATE VHDL2/3

54 U_SYNC_A:syncro port map(add_in,reset,clk,add_out); U_SYNC_S:syncro port map(sub_in,reset,clk,sub_out); U_SYNC_M:syncro port map(mul_in,reset,clk,mul_out); U_SYNC_D:syncro port map(div_in,reset,clk,div_out); U_SYNC_ENC0_OUT:ASMD_OUT port map(asmd_select(0), RESET,CLK,ASMD(0)); U_SYNC_ENC1_OUT:ASMD_OUT port map(asmd_select(1),reset, CLK,ASMD(1)); end state; 4.12STATE VHDL3/3 library ieee; use ieee.std_logic_1164.all; entity calc is port(decimal:in std_logic_vector(9 downto 0); OUT_A,OUT_B,ANS:out std_logic_vector(26 downto 0); ANS_BCD8,ANS_BCD7,ANS_BCD6,ANS_BCD5,ANS_BCD4, ANS_BCD3,ANS_BCD2,ANS_BCD1:out std_logic_vector(3 downto 0); CLK,RESET,PLUS,MINUS,KAKERU,WARU,EQUAL,C,CE:in std_logic; SIGN,ERROR_OUT:out std_logic); end calc; architecture calc of calc is signal DECIMAL_IN:std_logic_vector(9 downto 0); signal B_STATE:std_logic_vector(28 downto 0); signal A_OUT:std_logic_vector(26 downto 0); signal B_OUT:std_logic_vector(26 downto 0); signal REG_B_RST:std_logic; 4.13 VHDL1/4

55 signal ENZAN_OUT:std_logic_vector(1 downto 0); signal ANS_BIN:std_logic_vector(26 downto 0); signal ADD_IN:std_logic; signal SUB_IN:std_logic; signal MUL_IN:std_logic; signal DIV_IN:std_logic; signal E_IN:std_logic; signal C_IN:std_logic; signal CE_IN:std_logic; signal ADD:std_logic; signal SUB:std_logic; signal MUL:std_logic; signal DIV:std_logic; signal ANS_SEL:std_logic; component A_S is port(decimal:in std_logic_vector(9 downto 0); OUT_A:out std_logic_vector(26 downto 0); OUT_B:in std_logic_vector(28 downto 0) :=" "; ASMD:out std_logic_vector(1 downto 0); CLK,RESET,PLUS,MINUS,KAKERU,WARU,EQUAL,C,CE:in std_logic; REGB_RST,ENZAN_ADD,ENZAN_SUB,ENZAN_ MUL,ENZAN_DIV,KIRIKAE:out std_logic); component REGB is port(asmd:in std_logic_vector(1 downto 0); REGA_OUT:in std_logic_vector(26 downto 0); REGB_OUT:out std_logic_vector(26 downto 0); TO_STATE:out std_logic_vector(28 downto 0); CLK,REG_RST,ADD_EN,SUB_EN,MUL_EN,DIV_EN:in std_logic; ERR:out std_logic); 4.13 VHDL2/4

56 component LASTSEL is port(a,b:in std_logic_vector(26 downto 0); O:out std_logic_vector(26 downto 0); SEL:in std_logic ); component bintobcd is port(bin:in std_logic_vector(26 downto 0); bcd8,bcd7,bcd6,bcd5,bcd4,bcd3,bcd2,bcd1:out std_logic_vector(3 downto 0)); component syncro is port(input,reset,clk:in std_logic; output:out std_logic); OUT_A<=A_OUT; OUT_B<=B_OUT; ANS<=ANS_BIN; SIGN<=(not ANS_SEL) and B_STATE(27); U_AS:A_S port map(decimal_in,a_out,open,enzan_out,clk, RESET,ADD_IN,SUB_IN,MUL_IN,DIV_IN,E_IN,C_IN, CE_IN,REG_B_RST,ADD,SUB,MUL,DIV,ANS_SEL); U_REGB:REGB port map(enzan_out,a_out,b_out,b_state, CLK,RESET and REG_B_RST,ADD,SUB,MUL,DIV,ERROR_OUT); U_ANS:LASTSEL port map(a_out,b_out,ans_bin,ans_sel); U_BCD:bintobcd port map(ans_bin,ans_bcd8,ans_bcd7,ans_bcd6, ANS_BCD5,ANS_BCD4,ANS_BCD3,ANS_BCD2,ANS_BCD1); U_SYNC_0:syncro port map(decimal(0),reset,clk,decimal_in(0)); U_SYNC_1:syncro port map(decimal(1),reset,clk,decimal_in(1)); U_SYNC_2:syncro port map(decimal(2),reset,clk,decimal_in(2)); U_SYNC_3:syncro port map(decimal(3),reset,clk,decimal_in(3)); U_SYNC_4:syncro port map(decimal(4),reset,clk,decimal_in(4)); U_SYNC_5:syncro port map(decimal(5),reset,clk,decimal_in(5)); 4.13 VHDL3/4

57 U_SYNC_6:syncro port map(decimal(6),reset,clk,decimal_in(6)); U_SYNC_7:syncro port map(decimal(7),reset,clk,decimal_in(7)); U_SYNC_8:syncro port map(decimal(8),reset,clk,decimal_in(8)); U_SYNC_9:syncro port map(decimal(9),reset,clk,decimal_in(9)); U_SYNC_A:syncro port map(plus,reset,clk,add_in); U_SYNC_S:syncro port map(minus,reset,clk,sub_in); U_SYNC_M:syncro port map(kakeru,reset,clk,mul_in); U_SYNC_D:syncro port map(waru,reset,clk,div_in); U_SYNC_E:syncro port map(equal,reset,clk,e_in); U_SYNC_C:syncro port map(c,reset,clk,c_in); U_SYNC_CE:syncro port map(ce,reset,clk,ce_in); end calc; 4.13 VHDL4/4

58 4.13 VHDL OUT_A REG_A OUT_B REGB ANS LED 4.14

59 4.15

60 4.16

61 4.17

62 4.18

63 VHDL FPGA FPGA 2 BCD BCD FPGA BCD 1591 REGA 130

64 5 VHDL VHDL VHDL FPGA FPGA 2 VHDL

65

66 VHDL HDL VLSI VHDL CQ

67 VHDL VHDL library ieee; use ieee.std_logic_1164.all; entity fulladder is port(a,b,cy_in:in std_logic; sum,cy_out:out std_logic); end fulladder; architecture fulladder of fulladder is sum<=a xor b xor cy_in; cy_out<=(a and cy_in) or (b and cy_in) or (a and b); end fulladder; VHDL1/1 ibrary ieee; use ieee.std_logic_1164.all; entity adder4 is port(a,b:in std_logic_vector(3 downto 0); cin:in std_logic; s:out std_logic_vector(4 downto 0)); end adder4; architecture adder4 of adder4 is VHDL1/2

68 signal cy:std_logic_vector(3 downto 0); component fulladder port(a,b,cy_in:in std_logic; sum,cy_out:out std_logic); fa0:fulladder port map(a(0),b(0),cin,s(0),cy(0)); fa1:fulladder port map(a(1),b(1),cy(0),s(1),cy(1)); fa2:fulladder port map(a(2),b(2),cy(1),s(2),cy(2)); fa3:fulladder port map(a(3),b(3),cy(2),s(3),cy(3)); s(4) <= cy(3); end adder4; VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity BIT_SHIFT_A is port(load,clk,en:in std_logic; A_IN:in std_logic_vector(26 downto 0); Q_A:out std_logic_vector(3 downto 0)); end BIT_SHIFT_A; architecture BIT_SHIFT_A of BIT_SHIFT_A is signal REG_Q_A:std_logic_vector(26 downto 0); Q_A <= REG_Q_A(3 downto 0); process(clk) if(clk'event and CLK = '1') then VHDL1/2

69 if(load ='1') then REG_Q_A <= A_IN; elsif(en = '1') then REG_Q_A <= "0000" & REG_Q_A(26 downto 4); end if; end if; end process; end BIT_SHIFT_A; VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity BIT_SHIFT_B is port(load,clk,en:in std_logic; B_IN:in std_logic_vector(28 downto 0); Q_B:out std_logic_vector(3 downto 0)); end BIT_SHIFT_B; architecture BIT_SHIFT_B of BIT_SHIFT_B is signal REG_Q_B:std_logic_vector(28 downto 0); Q_B <= REG_Q_B(3 downto 0); process(clk) if(clk'event and CLK = '1') then if(load ='1') then REG_Q_B <= B_IN; elsif(en = '1') then REG_Q_B <= "0000" & REG_Q_B(28 downto 4); VHDL1/2

70 end if; end if; end process; end BIT_SHIFT_B; VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity BIT_REG is port(reset,reset_b,clk,en:in std_logic; PIN:in std_logic_vector(4 downto 0); Q:out std_logic_vector(28 downto 0)); end BIT_REG; architecture BIT_REG of BIT_REG is signal REG_Q:std_logic_vector(28 downto 0); Q <= REG_Q; process(reset,clk) if(reset = '0') then REG_Q <=(others => '0'); elsif(clk'event and CLK = '1') then if(reset_b = '1') then REG_Q <= (others => '0'); elsif(en = '1') then REG_Q <= PIN & REG_Q(27 downto 4); end if; end if; VHDL1/2

71 end process; end BIT_REG; VHDL2/2 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity EN_CNT16 is port(q:out std_logic_vector(4 downto 0); EN,CLK,CLR_SY,CLR_USY:in std_logic); end EN_CNT16; architecture EN_CNT16 of EN_CNT16 is signal CNT_BUF:std_logic_vector(4 downto 0); Q <= CNT_BUF; process(clk,clr_usy) if(clr_usy = '0') then CNT_BUF <= "00000"; elsif(clk'event and CLK = '1') then if(clr_sy = '1') then CNT_BUF <= "00000"; elsif(en = '1') then CNT_BUF <= CNT_BUF + '1'; end if; end if; end process; end EN_CNT16; VHDL1/1

72 library ieee; use ieee.std_logic_1164.all; entity RS_SYJKFF is port(reset_b,set_b:in std_logic; J,K,CLK:in std_logic; Q,Q_B:out std_logic); end RS_SYJKFF; architecture RS_SYJKFF of RS_SYJKFF is signal FF_Q:std_logic; signal IN_JK:std_logic_vector(1 downto 0); IN_JK <= J & K; Q <= FF_Q; Q_B <= not FF_Q; process(reset_b,set_b,clk) if(reset_b = '0') then FF_Q <= '0'; elsif(set_b = '0') then FF_Q <= '1'; elsif(clk' event and CLK = '1') then case IN_JK is when "01" => FF_Q <= '0'; when "10" => FF_Q <= '1'; when "11" => FF_Q <= not FF_Q; when others => null; end case; end if; end process; end RS_SYJKFF; JK VHDL1/1

73 library ieee; use ieee.std_logic_1164.all; entity ADD is port(a:in std_logic_vector(26 downto 0); B:in std_logic_vector(28 downto 0); S:out std_logic_vector(28 downto 0); START,CLOCK,RESET_B:in std_logic); end ADD; architecture ADD of ADD is signal ADDER4_OUT:std_logic_vector(4 downto 0); signal BIT_A_OUT:std_logic_vector(3 downto 0); signal BIT_B_OUT:std_logic_vector(3 downto 0); signal BIT_REG_OUT:std_logic_vector(28 downto 0); signal CNT16_OUT:std_logic_vector(4 downto 0); signal JK_FF_K_IN:std_logic; signal JK_FF_Q_OUT:std_logic; component ADDER4 port(a,b:in std_logic_vector(3 downto 0); cin:in std_logic; s:out std_logic_vector(4 downto 0)); component BIT_SHIFT_A port(load,clk,en:in std_logic; A_IN:in std_logic_vector(26 downto 0); Q_A:out std_logic_vector(3 downto 0)); component BIT_SHIFT_B port(load,clk,en:in std_logic; B_IN:in std_logic_vector(28 downto 0); Q_B:out std_logic_vector(3 downto 0)); VHDL1/2

74 component BIT_REG port(reset,reset_b,clk,en:in std_logic; PIN:in std_logic_vector(4 downto 0); Q:out std_logic_vector(28 downto 0)); component RS_SYJKFF port(reset_b:in std_logic; SET_B:in std_logic :='1'; J,K,CLK:in std_logic; Q,Q_B:out std_logic); component EN_CNT16 port(q:out std_logic_vector(4 downto 0); EN,CLK,CLR_SY,CLR_USY:in std_logic); JK_FF_K_IN <= not CNT16_OUT(4) and not CNT16_OUT(3) and CNT16_OUT(2) and CNT16_OUT(1) and not CNT16_OUT(0); S <= BIT_REG_OUT; U_A:BIT_SHIFT_A port map(start,clock,jk_ff_q_out,a, BIT_A_OUT); U_B:BIT_SHIFT_B port map(start,clock,jk_ff_q_out,b, BIT_B_OUT); U_ADDER4:ADDER4 port map(bit_a_out,bit_b_out, BIT_REG_OUT(28),ADDER4_OUT); U_REG:BIT_REG port map(reset_b,start,clock, JK_FF_Q_OUT,ADDER4_OUT,BIT_REG_OUT); JK_FF:RS_SYJKFF port map(reset_b,open,start,jk_ff_k_in, CLOCK,JK_FF_Q_OUT,open); CNT8:EN_CNT16 port map(cnt16_out,jk_ff_q_out,clock, START,RESET_B); end ADD; VHDL2/2

75 library ieee; use ieee.std_logic_1164.all; entity fullsub is port(a,b,br_in:in std_logic; dif,br_out:out std_logic); end fullsub; architecture fullsub of fullsub is dif<=a xor b xor br_in; br_out<=(not a and b) or (not a and br_in) or (b and br_in); end fullsub; VHDL1/1 library ieee; use ieee.std_logic_1164.all; entity SUB4 is port(a,b:in std_logic_vector(3 downto 0); bin:in std_logic; dif:out std_logic_vector(3 downto 0); bout:out std_logic); end SUB4; architecture SUB4 of SUB4 is signal br:std_logic_vector(3 downto 0); component fullsub port(a,b,br_in:in std_logic; dif,br_out:out std_logic); 1/2

76 fs0:fullsub port map(a(0),b(0),bin,dif(0),br(0)); fs1:fullsub port map(a(1),b(1),br(0),dif(1),br(1)); fs2:fullsub port map(a(2),b(2),br(1),dif(2),br(2)); fs3:fullsub port map(a(3),b(3),br(2),dif(3),br(3)); bout<=br(3); end SUB4; VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity SUB is port(a:in std_logic_vector(26 downto 0); B:in std_logic_vector(28 downto 0); DIF:out std_logic_vector(28 downto 0); START,CLOCK,RESET_B:in std_logic); end SUB; architecture SUB of SUB is signal SUB4_OUT:std_logic_vector(4 downto 0); signal BIT_A_OUT:std_logic_vector(3 downto 0); signal BIT_B_OUT:std_logic_vector(3 downto 0); signal BIT_REG_OUT:std_logic_vector(28 downto 0); signal CNT16_OUT:std_logic_vector(4 downto 0); signal JK_FF_K_IN:std_logic; signal JK_FF_Q_OUT:std_logic; component SUB4 port(a,b:in std_logic_vector(3 downto 0); VHDL1/3

77 bin:in std_logic; dif:out std_logic_vector(3 downto 0); bout:out std_logic); component BIT_SHIFT_A port(load,clk,en:in std_logic; A_IN:in std_logic_vector(26 downto 0); Q_A:out std_logic_vector(3 downto 0)); component BIT_SHIFT_B port(load,clk,en:in std_logic; B_IN:in std_logic_vector(28 downto 0); Q_B:out std_logic_vector(3 downto 0)); component BIT_REG port(reset,reset_b,clk,en:in std_logic; PIN:in std_logic_vector(4 downto 0); Q:out std_logic_vector(28 downto 0)); component RS_SYJKFF port(reset_b:in std_logic; SET_B:in std_logic :='1'; J,K,CLK:in std_logic; Q,Q_B:out std_logic); component EN_CNT16 port(q:out std_logic_vector(4 downto 0); EN,CLK,CLR_SY,CLR_USY:in std_logic); JK_FF_K_IN <=not CNT16_OUT(4) and not CNT16_OUT(3) and CNT16_OUT(2) and CNT16_OUT(1) and not CNT16_OUT(0); DIF <= BIT_REG_OUT; VHDL2/3

78 U_A:BIT_SHIFT_A port map(start,clock,jk_ff_q_out,a, BIT_A_OUT); U_B:BIT_SHIFT_B port map(start,clock,jk_ff_q_out,b, BIT_B_OUT); U_SUB4:SUB4 port map(bit_b_out,bit_a_out, BIT_REG_OUT(28),SUB4_OUT(3 downto 0),SUB4_OUT(4)); U_BIT_REG:BIT_REG port map(reset_b,start,clock, JK_FF_Q_OUT,SUB4_OUT,BIT_REG_OUT); JK_FF:RS_SYJKFF port map(reset_b,open,start,jk_ff_k_in, CLOCK,JK_FF_Q_OUT,open); CNT8:EN_CNT16 port map(cnt16_out,jk_ff_q_out,clock, START,RESET_B); end SUB; VHDL3/3 library ieee; use ieee.std_logic_1164.all; entity REG_MD is port(load,clk:in std_logic; D:in std_logic_vector(28 downto 0); Q:out std_logic_vector(28 downto 0)); end REG_MD; architecture REG_MD of REG_MD is signal REG_Q:std_logic_vector(28 downto 0); Q <= REG_Q; process(clk) VHDL1/2

79 if(clk'event and CLK = '1') then if(load = '1') then REG_Q <= D; end if; end if; end process; end REG_MD; VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity BIT_SHIFT is port(sin,en,load,clk:in std_logic; D:in std_logic_vector(26 downto 0); SOUT:out std_logic); end BIT_SHIFT; architecture BIT_SHIFT of BIT_SHIFT is signal REG_Q:std_logic_vector(26 downto 0); SOUT <= REG_Q(0); process(clk) if(clk'event and CLK = '1') then if(load = '1') then REG_Q <= D; elsif(en = '1') then REG_Q(26 downto 0) <= SIN & REG_Q(26 downto 1); end if; VHDL1/2

80 end if; end process; end BIT_SHIFT; VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity ADDER32 is port(a,b:in std_logic_vector(28 downto 0); cin:in std_logic; s:out std_logic_vector(28 downto 0); cout:out std_logic); end ADDER32; architecture ADDER32 of ADDER32 is signal cy:std_logic_vector(28 downto 0); component fulladder port(a,b,cy_in:in std_logic; sum,cy_out:out std_logic); fa00:fulladder port map(a(0),b(0),cin,s(0),cy(0)); fa01:fulladder port map(a(1),b(1),cy(0),s(1),cy(1)); fa02:fulladder port map(a(2),b(2),cy(1),s(2),cy(2)); fa03:fulladder port map(a(3),b(3),cy(2),s(3),cy(3)); fa08:fulladder port map(a(8),b(8),cy(7),s(8),cy(8)); fa09:fulladder port map(a(9),b(9),cy(8),s(9),cy(9)); fa10:fulladder port map(a(10),b(10),cy(9),s(10),cy(10)); 29 VHDL1/2

81 fa11:fulladder port map(a(11),b(11),cy(10),s(11),cy(11)); fa12:fulladder port map(a(12),b(12),cy(11),s(12),cy(12)); fa13:fulladder port map(a(13),b(13),cy(12),s(13),cy(13)); fa14:fulladder port map(a(14),b(14),cy(13),s(14),cy(14)); fa15:fulladder port map(a(15),b(15),cy(14),s(15),cy(15)); fa16:fulladder port map(a(16),b(16),cy(15),s(16),cy(16)); fa17:fulladder port map(a(17),b(17),cy(16),s(17),cy(17)); fa18:fulladder port map(a(18),b(18),cy(17),s(18),cy(18)); fa19:fulladder port map(a(19),b(19),cy(18),s(19),cy(19)); fa20:fulladder port map(a(20),b(20),cy(19),s(20),cy(20)); fa21:fulladder port map(a(21),b(21),cy(20),s(21),cy(21)); fa22:fulladder port map(a(22),b(22),cy(21),s(22),cy(22)); fa23:fulladder port map(a(23),b(23),cy(22),s(23),cy(23)); fa24:fulladder port map(a(24),b(24),cy(23),s(24),cy(24)); fa25:fulladder port map(a(25),b(25),cy(24),s(25),cy(25)); fa26:fulladder port map(a(26),b(26),cy(25),s(26),cy(26)); fa27:fulladder port map(a(27),b(27),cy(26),s(27),cy(27)); fa28:fulladder port map(a(28),b(28),cy(27),s(28),cy(28)); cout<=cy(28); end ADDER32; 29 VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity EN_REG is VHDL1/2

82 port(reset,en,clr,clk:in std_logic; D:in std_logic_vector(56 downto 0); Q:out std_logic_vector(56 downto 0)); end EN_REG; architecture EN_REG of EN_REG is process(reset,clk) if(reset = '0') then Q <= (others => '0'); elsif(clk'event and CLK = '1') then if(clr = '1') then Q <= (others => '0'); elsif(en = '1') then Q <= D; end if; end if; end process; end EN_REG; VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity MUL is port(start,clock,reset_b:in std_logic; end MUL; MD:in std_logic_vector(28 downto 0); MQ:in std_logic_vector(26 downto 0); ANS:out std_logic_vector(55 downto 0)); VHDL1/3

83 architecture MUL of MUL is signal MQ_S_OUT:std_logic; signal JK_FF_K_IN:std_logic; signal JK_FF_Q_OUT:std_logic; signal MD_Q_OUT:std_logic_vector(28 downto 0); signal ADDER32_A_IN:std_logic_vector(28 downto 0); signal ADDER32_OUT:std_logic_vector(29 downto 0); signal CNT16_OUT:std_logic_vector(4 downto 0); signal ACC_D_IN:std_logic_vector(56 downto 0); signal ACC_Q_OUT:std_logic_vector(56 downto 0); component ADDER32 port(a,b:in std_logic_vector(28 downto 0); cin:in std_logic :='0'; s:out std_logic_vector(28 downto 0); cout:out std_logic); component REG_MD port(load,clk:in std_logic; D:in std_logic_vector(28 downto 0); Q:out std_logic_vector(28 downto 0)); component EN_REG port(reset,en,clr,clk:in std_logic; D:in std_logic_vector(56 downto 0); Q:out std_logic_vector(56 downto 0)); component BIT_SHIFT port(sin:in std_logic :='0'; EN,LOAD,CLK:in std_logic; D:in std_logic_vector(26 downto 0); SOUT:out std_logic); component RS_SYJKFF VHDL2/3

84 port(reset_b:in std_logic; SET_B:in std_logic := '1'; J,K,CLK:in std_logic; Q,Q_B:out std_logic); component EN_CNT16 port(en,clk,clr_sy,clr_usy:in std_logic; Q:out std_logic_vector(4 downto 0)); ADDER32_A_IN <= MD_Q_OUT and (MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT & MQ_S_OUT); ACC_D_IN <= ADDER32_OUT & ACC_Q_OUT(27 downto 1); JK_FF_K_IN <= CNT16_OUT(4) and CNT16_OUT(3) and not CNT16_OUT(2) and CNT16_OUT(1) and CNT16_OUT(0); ANS <= ACC_Q_OUT(55 downto 0); U_MD:REG_MD port map(start,clock,md,md_q_out); U_ADDER:ADDER32 port map(adder32_a_in, ACC_Q_OUT(56 downto 28),open,ADDER32_OUT(28 downto 0), ADDER32_OUT(29)); ACC:EN_REG port map(reset_b,jk_ff_q_out,start,clock, ACC_D_IN,ACC_Q_OUT); U_MQ:BIT_SHIFT port map (open,jk_ff_q_out,start,clock, MQ,MQ_S_OUT); JK_FF:RS_SYJKFF port map(reset_b,open,start,jk_ff_k_in, CLOCK,JK_FF_Q_OUT,open); CNT16:EN_CNT16 port map(jk_ff_q_out,clock,start, end MUL; VHDL3/3 RESET_B,CNT16_OUT);

85 library ieee; use ieee.std_logic_1164.all; entity EN_REG4 is port(d:in std_logic_vector(26 downto 0); Q:out std_logic_vector(26 downto 0); EN,CLK:in std_logic); end EN_REG4; architecture EN_REG4 of EN_REG4 is process(clk) if(clk'event and CLK = '1') then if(en = '1') then Q <= D; end if; end if; end process; end EN_REG4; VHDL1/1 library ieee; use ieee.std_logic_1164.all; entity EN_SIN_POUT_SHIFT is port(sin:in std_logic; Q:out std_logic_vector(26 downto 0); EN,PS,CLK:in std_logic); end EN_SIN_POUT_SHIFT; VHDL1/2

86 architecture EN_SIN_POUT_SHIFT of EN_SIN_POUT_SHIFT is signal SFT_BUF : std_logic_vector(26 downto 0); Q <= SFT_BUF; process (CLK) if(clk'event and CLK = '1') then if(ps = '1') then SFT_BUF(0) <= '1'; elsif(en = '1') then SFT_BUF <= SFT_BUF(25 downto 0) & SIN; end if; end if; end process; end EN_SIN_POUT_SHIFT; VHDL2/2 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity ADD_SUB is port(a,b:in std_logic_vector(27 downto 0); SUB:in std_logic; S:out std_logic_vector(27 downto 0); CY_BR:out std_logic ); end ADD_SUB; architecture ADD_SUB of ADD_SUB is signal TOTAL:std_logic_vector(28 downto 0); VHDL1/2

87 process(a,b,sub) if(sub = '1') then TOTAL <= ('0' & A) - ('0' & B); else TOTAL <= ('0' & A) + ('0' & B); end if; end process; S <= TOTAL(27 downto 0); CY_BR <= TOTAL(28); end ADD_SUB; VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity SEL5 is port(a,b:in std_logic_vector(27 downto 0); O:out std_logic_vector(27 downto 0); SEL:in std_logic ); end SEL5; architecture SEL5 of SEL5 is process(a,b,sel) if(sel = '1') then O <= A; else 1/2

88 O <= B; end if; end process; end SEL5; 2/2 library ieee; use ieee.std_logic_1164.all; entity SEL12 is port(a,b:in std_logic_vector(55 downto 0); O:out std_logic_vector(55 downto 0); SEL:in std_logic ); end SEL12; architecture SEL12 of SEL12 is process(a,b,sel) if(sel = '1') then O <= A; else O <= B; end if; end process; end SEL12; 2/2

89 library ieee; use ieee.std_logic_1164.all; entity EN_REG13 is port(d:in std_logic_vector(56 downto 0); Q:out std_logic_vector(56 downto 0); RESET,EN,CLK:in std_logic); end EN_REG13; architecture EN_REG13 of EN_REG13 is process(reset,clk) if(reset = '0') then Q <=(others => '0'); elsif(clk'event and CLK = '1') then if(en = '1') then Q <= D; end if; end if; end process; end EN_REG13; 1/1 library ieee; use ieee.std_logic_1164.all; entity DIV is port (DD:in std_logic_vector(28 downto 0); DQ:in std_logic_vector(26 downto 0); VHDL1/5

90 ANS:out std_logic_vector(28 downto 0); ARE:out std_logic_vector(26 downto 0); START, CLOCK, RESET_B:in std_logic ; ER:out std_logic); end DIV; architecture DIV of DIV is signal DQ_E_OUT:std_logic; signal E_JK_FF_J_IN:std_logic; signal STR:std_logic; signal DQ_SEL_IN:std_logic; signal ACC_SEL_IN:std_logic; signal ACC_EN:std_logic; signal JK_FF_K_IN:std_logic; signal JK_FF_Q_OUT:std_logic; signal ANS_SIN:std_logic; signal ANS_EN:std_logic; signal LAST:std_logic; signal DQ_Q_OUT:std_logic_vector(26 downto 0); signal DQ_SEL_A_IN:std_logic_vector(27 downto 0); signal DQ_SEL_B_IN:std_logic_vector(27 downto 0); signal DQ_SEL_OUT:std_logic_vector(27 downto 0); signal ADD_SUB_B_IN:std_logic_vector(27 downto 0); signal ADD_SUB_OUT:std_logic_vector(28 downto 0); signal ACC_SEL_A_IN:std_logic_vector(55 downto 0); signal ACC_SEL_B_IN:std_logic_vector(55 downto 0); signal ACC_D_IN:std_logic_vector(56 downto 0); signal ACC_Q_OUT:std_logic_vector(56 downto 0); signal ANS_Q_OUT:std_logic_vector(28 downto 0); signal CNT16_OUT:std_logic_vector(4 downto 0); component ADD_SUB port(a,b:in std_logic_vector(27 downto 0); SUB:in std_logic; VHDL2/5

91 S:out std_logic_vector(27 downto 0); CY_BR:out std_logic); component EN_REG4 port(d:in std_logic_vector(26 downto 0); Q:out std_logic_vector(26 downto 0); EN,CLK:in std_logic); component EN_REG13 port(d:in std_logic_vector(56 downto 0); Q:out std_logic_vector(56 downto 0); RESET,EN,CLK:in std_logic); component EN_SIN_POUT_SHIFT port(sin:in std_logic; Q:out std_logic_vector(28 downto 0); EN,PS,CLK:in std_logic); component RS_SYJKFF port(reset_b:in std_logic; SET_B:in std_logic := '1'; J:in std_logic; K:in std_logic := '0'; CLK:in std_logic; Q, Q_B:out std_logic); component EN_CNT16 port(q:out std_logic_vector(4 downto 0); EN,CLK,CLR_SY,CLR_USY:in std_logic); component SEL5 port(a,b:in std_logic_vector(27 downto 0); O:out std_logic_vector(27 downto 0); VHDL3/5

92 SEL:in std_logic); component SEL12 port(a,b:in std_logic_vector(55 downto 0); O:out std_logic_vector(55 downto 0); SEL:in std_logic); DQ_E_OUT <= not DQ(26) and not DQ(25) and not DQ(24) and not DQ(23) and not DQ(22) and not DQ(21) and not DQ(20) and not DQ(19) and not DQ(18) and not DQ(17) and not DQ(16) and not DQ(15) and not DQ(14) and not DQ(13) and not DQ(12) and not DQ(11) and not DQ(10) and not DQ(9) and DQ(8) and not DQ(7) and not DQ(6) and not DQ(5) and not DQ(4) and not DQ(3) and not DQ(2) and not DQ(1) and not DQ(0); E_JK_FF_J_IN <= DQ_E_OUT and START; STR <= START and (not DQ_E_OUT); DQ_SEL_IN <= not JK_FF_K_IN; ACC_SEL_IN <= not STR; ACC_EN1 <= STR or JK_FF_Q_OUT; JK_FF_K_IN <= CNT16_OUT( 4 ) and CNT16_OUT( 3 ) and not CNT16_OUT( 2 ) and CNT16_OUT( 1 ) and CNT16_OUT( 0 ); LAST <= not ( JK_FF_K_IN and ANS_Q_OUT( 0 )); DQ_SEL_A_IN <= '0' & DQ_Q_OUT; DQ_SEL_B_IN <= DQ_Q_OUT & '0'; ADD_SUB_B_IN <= DQ_SEL_OUT and ( LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST & LAST& LAST & LAST & LAST & LAST& LAST & LAST & LAST & LAST& LAST & LAST & LAST & LAST& LAST & LAST & LAST & LAST ); ACC_SEL_A_IN <= ADD_SUB_OUT( 26 downto 0 ) & ACC_Q_OUT( 25 downto 0 ) & '0'; ACC_SEL_B_IN <= DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD(28)& DD; ACC_D_IN( 54 ) <= ADD_SUB_OUT( 27 ); VHDL4/5

93 ANS <= ANS_Q_OUT; ANS_SIN <= ANS_Q_OUT(0) xor ADD_SUB_OUT(28); ANS_EN <= not JK_FF_K_IN and JK_FF_Q_OUT; ARE <= ACC_Q_OUT(54 downto 28); U_ADD_SUB:ADD_SUB port map(acc_q_out(53 downto 26), ADD_SUB_B_IN,ANS_Q_OUT(0),ADD_SUB_OUT(27 downto 0), ADD_SUB_OUT(28)); U_DQ:EN_REG4 port map(dq,dq_q_out,str,clock ); ACC:EN_REG13 port map(acc_d_in,acc_q_out,reset_b, ACC_EN1,CLOCK ); U_ANS:EN_SIN_POUT_SHIFT port map(ans_sin,ans_q_out, ANS_EN,STR,CLOCK); JK_FF:RS_SYJKFF port map(reset_b, open, STR, JK_FF_K_IN, CLOCK,JK_FF_Q_OUT,open); E_JK_FF:RS_SYJKFF port map(reset_b,open,e_jk_ff_j_in, open,clock,er,open); CNT16:EN_CNT16 port map(cnt16_out,jk_ff_q_out,clock, STR,RESET_B); DQ_SEL: SEL5 port map(dq_sel_a_in,dq_sel_b_in, DQ_SEL_OUT,DQ_SEL_IN); ACC_SEL:SEL12 port map(acc_sel_a_in,acc_sel_b_in, ACC_D_IN(53 downto 0),ACC_SEL_IN); end DIV; VHDL5/5 library ieee; use ieee.std_logic_1164.all; entity DEC_TO_BIN is port(dec:in std_logic_vector(9 downto 0); 10 2 VHDL1/2

94 BIN:out std_logic_vector(3 downto 0)); end DEC_TO_BIN; architecture DEC_TO_BIN of DEC_TO_BIN is process(dec) case DEC is when " " => BIN <= "0000"; when " " => BIN <= "0001"; when " " => BIN <= "0010"; when " " => BIN <= "0011"; when " " => BIN <= "0100"; when " " => BIN <= "0101"; when " " => BIN <= "0110"; when " " => BIN <= "0111"; when " " => BIN <= "1000"; when " " => BIN <= "1001"; when others => BIN <= "0000"; end case; end process; end DEC_TO_BIN; 10 2 VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity REG_A is port(en,reset_b,clk:in std_logic; PIN:in std_logic_vector(26 downto 0); VHDL1/2

95 end REG_A; Q:out std_logic_vector(26 downto 0)); architecture REG_A of REG_A is process(clk,reset_b) if(reset_b = '0') then Q <= (others => '0'); elsif (CLK'event and CLK = '1') then if(en = '1') then Q <= PIN; end if; end if; end process; end REG_A; VHDL2/2 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity cnv_adder is port (A:in std_logic_vector(26 downto 0); B:in std_logic_vector(3 downto 0); S:out std_logic_vector(26 downto 0); O:out std_logic); end cnv_adder; architecture cnv_adder of cnv_adder is VHDL1/2

96 signal ADDER_OUT:std_logic_vector(27 downto 0); ADDER_OUT <= ('0' & A ) + ( '0' & B ); S <= ADDER_OUT(26 downto 0); O <= ADDER_OUT(27); end cnv_adder; VHDL2/2 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity CNV_MUL is port(md:in std_logic_vector(23 downto 0); ANS:out std_logic_vector(26 downto 0); MO:out std_logic); end CNV_MUL; architecture CNV_MUL of CNV_MUL is signal MUL_OUT:std_logic_vector(27 downto 0); MUL_OUT <= MD * "1010"; ANS <= MUL_OUT(26 downto 0); MO <= MUL_OUT(27); end CNV_MUL; 10 VHDL1/1

97 library ieee; use ieee.std_logic_1164.all; entity INPUT_SEL is port(a,b:in std_logic_vector(26 downto 0); O:out std_logic_vector(26 downto 0); SEL:in std_logic); end INPUT_SEL; architecture INPUT_SEL of INPUT_SEL is process(a,b,sel) if(sel = '1') then O <= A; else O <= B; end if; end process; end INPUT_SEL; VHDL1/1 library ieee; use ieee.std_logic_1164.all; entity REGA is port(deci:in std_logic_vector(9 downto 0); KEKKA:out std_logic_vector(26 downto 0); REG_EN,IN_SEL,RST,CLK:in std_logic); end REGA; 2 VHDL1/3

98 signal BCD:std_logic_vector(3 downto 0); signal ADDER_OUT:std_logic_vector(26 downto 0); signal REG_A_IN:std_logic_vector(26 downto 0); signal REG_A_OUT:std_logic_vector(26 downto 0); signal MUL_OUT:std_logic_vector(26 downto 0); component DEC_TO_BIN is port(dec:in std_logic_vector(9 downto 0); BIN:out std_logic_vector(3 downto 0)); component REG_A is port(en,reset_b,clk:in std_logic; PIN:in std_logic_vector(26 downto 0); Q:out std_logic_vector(26 downto 0)); component cnv_mul is port(md:in std_logic_vector(23 downto 0); ANS:out std_logic_vector(26 downto 0); MO:out std_logic); component cnv_adder is port(a:in std_logic_vector(26 downto 0); B:in std_logic_vector(3 downto 0); S:out std_logic_vector(26 downto 0)); component INPUT_SEL is port(a,b:in std_logic_vector(26 downto 0); O:out std_logic_vector(26 downto 0); SEL:in std_logic); KEKKA <= REG_A_OUT; U_ENC:DEC_TO_BIN port map(deci,bcd); 2 VHDL2/3

99 U_REG_A:REG_A port map(reg_en,rst,clk,reg_a_in, REG_A_OUT); U_MUL:cnv_mul port map(reg_a_out(23 downto 0), MUL_OUT,open); U_ADD:cnv_adder port map(mul_out,bcd,adder_out); U_SEL:INPUT_SEL port map(adder_out, " " & BCD,REG_A_IN,IN_SEL); end REGA; 2 VHDL3/3 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity REG_B is port(reset_b,clk:in std_logic; PIN:in std_logic_vector(28 downto 0); Q:out std_logic_vector(28 downto 0)); end REG_B; architecture REG_B of REG_B is process(clk,reset_b) if(reset_b = '0') then Q <= (others => '0'); elsif (CLK'event and CLK = '1') then Q <= PIN; end if; end process; end REG_B; VHDL1/1

100 library ieee; use ieee.std_logic_1164.all; entity ASMD_SEL is port(a,s,m,d:in std_logic_vector(28 downto 0); O:out std_logic_vector(28 downto 0); SEL:in std_logic_vector(1 downto 0)); end ASMD_SEL; architecture ASMD_SEL of ASMD_SEL is process(a,s,m,d,sel) if(sel = "00") then O <= A; elsif(sel = "01") then O <= S; elsif(sel = "10") then O <= M; elsif(sel = "11") then O <= D; end if; end process; end ASMD_SEL; VHDL1/1 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; 2 VHDL1/2

101 entity hosu_adder is port (A:in std_logic_vector(26 downto 0); B,CLK:in std_logic; S:out std_logic_vector(26 downto 0)); end hosu_adder; architecture hosu_adder of hosu_adder is process(clk) if(clk'event and CLK = '1') then S <= A + B; end if; end process; end hosu_adder; 2 VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity hosu is port(pin:in std_logic_vector(27 downto 0); Q:out std_logic_vector(26 downto 0); CLK:in std_logic); end hosu; architecture hosu of hosu is signal ADDER_IN:std_logic_vector(26 downto 0); component hosu_adder is port (A:in std_logic_vector(26 downto 0); 2 VHDL1/2

102 B,CLK:in std_logic; S:out std_logic_vector(26 downto 0)); ADDER_IN <= PIN(26 downto 0) xor (PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) & PIN(27) PIN(27) & PIN(27) &PIN(27)); U_ADD:hosu_adder port map(adder_in,pin(27),clk,q); end hosu; 2 VHDL2/2 library ieee; use ieee.std_logic_1164.all; entity REGB is port(asmd:in std_logic_vector(1 downto 0); REGA_OUT:in std_logic_vector(26 downto 0); REGB_OUT:out std_logic_vector(26 downto 0); TO_STATE:out std_logic_vector(28 downto 0); CLK,REG_RST,ADD_EN,SUB_EN,MUL_EN,DIV_EN:in std_logic; ERR:out std_logic); end REGB; architecture REGB of REGB is signal REG_B_IN:std_logic_vector(28 downto 0); signal REG_B_OUT:std_logic_vector(28 downto 0); signal HOSU_OUT:std_logic_vector(26 downto 0); signal ADDER_OUT:std_logic_vector(28 downto 0); VHDL1/3

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 =

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 = VHDL 2 1 VHDL 1 VHDL FPGA VHDL 2 HDL VHDL 2.1 D 1 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; regs.vhdl entity regs is clk, rst : in std_logic; clear : in std_logic; we

More information

VHDL

VHDL VHDL 1030192 15 2 10 1 1 2 2 2.1 2 2.2 5 2.3 11 2.3.1 12 2.3.2 12 2.4 12 2.4.1 12 2.4.2 13 2.5 13 2.5.1 13 2.5.2 14 2.6 15 2.6.1 15 2.6.2 16 3 IC 17 3.1 IC 17 3.2 T T L 17 3.3 C M O S 20 3.4 21 i 3.5 21

More information

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

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 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

More information

論理設計の基礎

論理設計の基礎 . ( ) IC (Programmable Logic Device, PLD) VHDL 2. IC PLD 2.. PLD PLD PLD SIC PLD PLD CPLD(Complex PLD) FPG(Field Programmable Gate rray) 2.2. PLD PLD PLD I/O I/O : PLD D PLD Cp D / Q 3. VHDL 3.. HDL (Hardware

More information

スライド 1

スライド 1 1 1. 2 2. 3 isplever 4 5 6 7 8 9 VHDL 10 VHDL 4 Decode cnt = "1010" High Low DOUT CLK 25MHz 50MHz clk_inst Cnt[3:0] RST 2 4 1010 11 library ieee; library xp; use xp.components.all; use ieee.std_logic_1164.all;

More information

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

TECH_I Vol.25 改訂新版PCIデバイス設計入門 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity n is port( ); end entity n; architecture RTL of nis begin when : process begin end process :process begin end process

More information

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

Microsoft PowerPoint - 集積回路工学_ ppt[読み取り専用] 2007.11.12 集積回路工学 Matsuzawa Lab 1 集積回路工学 東京工業大学 大学院理工学研究科 電子物理工学専攻 2007.11.12 集積回路工学 Matsuzawa Lab 2 1. 1. ハードウェア記述言語 (VHDL で回路を設計 ) HDL 設計の手順や基本用語を学ぶ RTL とは? Register Transfer Level レジスタ間の転送関係を表現したレベル慣例的に以下のことを行う

More information

フリップフロップ

フリップフロップ 第 3 章フリップ フロップ 大阪大学大学院情報科学研究科 今井正治 imai@ist.osaka-u.ac.jp http://www-ise1.ist.osaka-u.ac.jp/~imai/ 2005/10/17 2006, Masaharu Imai 1 講義内容 フリップ フロップの基本原理 RS フリップ フロップ D ラッチ D フリップ フロップ JK フリップ フロップ T フリップ

More information

Unconventional HDL Programming ( version) 1

Unconventional HDL Programming ( version) 1 Unconventional HDL Programming (20090425 version) 1 1 Introduction HDL HDL Hadware Description Language printf printf (C ) HDL 1 HDL HDL HDL HDL HDL HDL 1 2 2 2.1 VHDL 1 library ieee; 2 use ieee.std_logic_1164.all;

More information

Microsoft Word - 実験4_FPGA実験2_2015

Microsoft Word - 実験4_FPGA実験2_2015 FPGA の実験 Ⅱ 1. 目的 (1)FPGA を用いて組合せ回路や順序回路を設計する方法を理解する (2) スイッチや表示器の動作を理解し 入出力信号を正しく扱う 2. スケジュール項目 FPGAの実験 Ⅱ( その1) FPGAの実験 Ⅱ( その2) FPGAの実験 Ⅱ( その3) FPGAの実験 Ⅱ( その4) FPGAの実験 Ⅱ( その5) FPGAの実験 Ⅱ( その6) FPGAの実験 Ⅱ(

More information

Microsoft PowerPoint LC_15.ppt

Microsoft PowerPoint LC_15.ppt ( 第 15 回 ) 鹿間信介摂南大学理工学部電気電子工学科 特別講義 : 言語を使った設計 (2) 2.1 HDL 設計入門 2.2 FPGA ボードの設計デモ配布資料 VHDL の言語構造と基本文法 2.1 HDL 設計入門 EDAツール : メンター社製品が有名 FPGAベンダーのSW 1 1 仕様設計 にも簡易機能あり 2 3 2 HDLコード記述 3 論理シミュレーション 4 4 論理合成

More information

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

- VHDL 演習 ( 組み合せ論理回路 ) 回路 半加算器 (half adder,fig.-) 全加算器を構成する要素である半加算器を作成する i) リスト - のコードを理解してから, コンパイル, ダウンロードする ii) 実験基板上のスイッチ W, が, の入力,LED, が, の出力とな 第 回 VHDL 演習組み合せ論理回路 VHDL に関する演習を行う 今回は, 組み合せ論理回路の記述について学ぶ - 論理回路の VHDL 記述の基本 同時処理文を並べることで記述できる 部品の接続関係を記述 順番は関係ない process 文の内部では, 順次処理文を使う process 文 つで, つの同時処理文になる順次処理文は, 回路の動作を 逐次処理的 に ( 手続き処理型プログラム言語のように

More information

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

問 2. タイミングチャート以下に示す VHDL コードで記述されている回路に関するタイミングチャートを完成させよ ) レジスタの動作 use IEEE.std_logic_64.all; entity RegN is generic (N : integer := 8 port ( CLK, EN 第 8 回中間試験前の演習 問.VHDL ソースコードを読む () 次の VHDL のソースコードが記述しているゲート回路の回路図を示せ. use IEEE.STD_LOGIC_64.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Logic is port ( A : in std_logic_vector(3

More information

VBI VBI FM FM FM FM FM DARC DARC

VBI VBI FM FM FM FM FM DARC DARC 14 2 7 2.1 2.1.1 2.1.2 2.1.3 2.1.3.1 VBI 2.1.3.2 VBI 2.1.4 2.1.5 2.1.6 10 2.FM 11 2.2.1 FM 11 2.2.2 FM 11 2.2.3FM 13 2.2.4 FM DARC 14 2.2.4.1 DARC 14 2.2.4.2 DARC 14 17 3.1 17 3.1.1 parity 17 3.1.2 18

More information

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

エンティティ : インタフェースを定義 entity HLFDD is port (, : in std_logic ;, : out std_logic ) ; end HLFDD ; アーキテクチャ : エンティティの実現 architecture RH1 of HLFDD is <= xor VHDL を使った PLD 設計のすすめ PLD 利用のメリット 小型化 高集積化 回路の修正が容易 VHDL 設計のメリット 汎用の設計になる ( どこのデバイスにも搭載可能 ) 1/16 2001/7/13 大久保弘崇 http://www.aichi-pu.ac.jp/ist/~ohkubo/ 2/16 設計の再利用が促進 MIL 記号の D での設計との比較 Verilog-HDL などでも別に同じ

More information

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

回路 7 レジスタ ( 同期イネーブル及び非同期リセット付 ) 入力データを保持するのに用いる記憶素子 使用用途として, マイクロプロセッサ内部で演算や実行状態の保持に用いられる Fig4-2 のレジスタは, クロック信号の立ち上がり時かつ 信号が 1 のときに外部からの 1 ビットデータ R をレ 第 4 回 VHDL 演習 2 プロセス文とステートマシン プロセス文を用いるステートマシンの記述について学ぶ 回路 6 バイナリカウンタ (Fig.4-1) バイナリカウンタを設計し, クロック信号に同期して動作する同期式回路の動作を学ぶ ⅰ) リスト 4-1 のコードを理解してから, コンパイル, ダウンロードする ⅱ) 実験基板上のディップスイッチを用いて, 発生するクロック周波数を 1Hz

More information

スライド 1

スライド 1 isplever CLASIC 1.2 Startup Manual for MACH4000 Rev.1.0 isplever_ CLASIC Startup_for_MACH4000_Rev01.ppt Page: 1 1. Page 3 2. Lattice isplever Design Flow Page 4 3. Page 5 3-1 Page 6 3-2 Page 7 3-3 Page

More information

untitled

untitled Verilog HDL Verilog HDL VerilogHDL veriloghdl / CPLD , 1bit 2 MUX 5 D,E) always) module MUX(out, a, b, sel); output out; input a, b, sel; A) IF module MUX(out, a, b, sel); output out; input a, b, sel;

More information

<4D F736F F D2091B28BC68CA48B8695F18D902E646F63>

<4D F736F F D2091B28BC68CA48B8695F18D902E646F63> 卒業研究報告 題目 LED ディスプレイ用動画表示制御回路の設計と製作 指導教員 矢野政顕教授 報告者学籍番号 : 1060237 氏名 : 田中振宇 平成 18 年 2 月 21 日 高知工科大学電子 光システム工学科 目次 第 1 章はじめに 1 第 2 章 LED ディスプレイ 2 2-1 LED(Light Emitting Diode) 2 2-1-1 LED の発光原理 2 2-1-2

More information

------------------------------------------------------------------------------------------------------- 1 --------------------------------------------

------------------------------------------------------------------------------------------------------- 1 -------------------------------------------- ------------------------------------------------------------------------------------------------------- 1 -------------------------------------------------------------------------- 2 -----------------------------------------------------------------------------

More information

untitled

untitled 13 Verilog HDL 16 CPU CPU IP 16 1023 2 reg[ msb: lsb] [ ]; reg [15:0] MEM [0:1023]; //16 1024 16 1 16 2 FF 1 address 8 64 `resetall `timescale 1ns/10ps module mem8(address, readdata,writedata, write, read);

More information

PeakVHDL Max+Plus VGA VG

PeakVHDL Max+Plus VGA VG 2001 PC 9720002 14 2 7 4 1 5 1.1... 5 1.2... 5 1.3... 6 1.4... 6 2 7 2.1... 7 2.2... 8 2.2.1... 8 2.3... 9 2.3.1 PeakVHDL... 9 2.3.2 Max+Plus2... 9 3 VGA 10 3.1... 10 3.2 VGA... 10 3.3 VGA... 11 3.4 VGA...

More information

RSA FA FA AND Booth FA FA RSA 3 4 5

RSA FA FA AND Booth FA FA RSA 3 4 5 RSA High-Speed Multiplication for RSA ode using Redundant Binary System 6585 6 6 RSA FA FA AND Booth FA FA RSA 3 4 5 This paper summarizes High-Speed Multiplication for RSA ode using Redundant Binary System,

More information

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

2ALU 以下はデータ幅 4ビットの ALU の例 加算, 減算,AND,OR の4つの演算を実行する 実際のプロセッサの ALU は, もっと多種類の演算が可能 リスト 7-2 ALU の VHDL 記述 M use IEEE.STD_LOGIC_1164.ALL; 00 : 加算 use IEE 差し替え版 第 7 回マイクロプロセッサの VHDL 記述 マイクロプロセッサ全体および主要な内部ユニットの,VHDL 記述の例を示す. 1)MPU(Micro Processor Uit) Module 1MPU のエンティティ記述とコントローラの例以下は, 簡単な MPU の VHDL 記述の例である ただし, アーキテクチャ部分は, 命令読み込みと実行の状態遷移のみを実現したステートマシンである

More information

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

デザインパフォーマンス向上のためのHDLコーディング法 WP231 (1.1) 2006 1 6 HDL FPGA TL TL 100MHz 400MHz HDL FPGA FPGA 2005 2006 Xilinx, Inc. All rights reserved. XILINX, the Xilinx logo, and other designated brands included herein are trademarks of Xilinx,

More information

Kazutoshi Kobayashi (kobayasi kit.ac.jp)

Kazutoshi Kobayashi (kobayasi kit.ac.jp) Kazutoshi Kobayashi (kobayasi kit.ac.jp) 2009 11 24-25 1 1 1.1.................................. 1 1.2,............................ 1 2 2 2.1 FPGA.................... 2 2.2 Verilog-HDL........................

More information

, FPGA Verilog-HDL

, FPGA Verilog-HDL Kazutoshi Kobayashi (kobayasi@kuee.kyoto-u.ac.jp) 2007 12 19-20 1 1 1.1...................................... 1 1.2,................................. 1 2 2 2.1 FPGA......................... 2 2.2 Verilog-HDL.............................

More information

卒業研究報告.PDF

卒業研究報告.PDF 3 2 9 . 2. MOS 2. MOS 2 3. 3. 3.2 3.3 3.4 3.5 3.5. 3.5.2 2 3.5.3 LED 3.6 3.7 3.8 3.9 i 4. 8bitCPU 4. 4.2 4.2. 4.2.2 2 3 4 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3 HDL 4.3. ALU 2 ALU 3 4 5 6 7 8 4.3.2

More information

電卓の設計 1

電卓の設計 1 電卓の設計 1 FPGA Express と MAXPLUS2 に よる FPGA 設計 FPGA EXPRESS RTL circuit.edf circuit.acf RTL MAXPLUS2 FPGA circuit.acf circuit.sof, ttf, pof SRAM 2 どうして電卓なの? その場で 10 キーを使って動かせる プロセッサだと プログラムを考えたり メモリとのインタフェースが必要

More information

VLD Kazutoshi Kobayashi

VLD Kazutoshi Kobayashi VLD Kazutoshi Kobayashi (kobayasi@kuee.kyoto-u.ac.jp) 2005 8 26-29 1, Verilog-HDL, Verilog-HDL. Verilog-HDL,, FPGA,, HDL,. 1.1, 1. (a) (b) (c) FPGA (d). 2. 10,, Verilog-HDL, FPGA,. 1.2,,,, html. % netscape

More information

LSI LSI 2

LSI LSI 2 LSI LSI 2 P=CV 2 F 3 4 5 EDA Electric Design Automation) LSI CAD Computer Aided Design) Verilog Verify Logic VHDL VHSIC Description Language) SystemC C SFL Structured Functional description Language) NTT

More information

Verilog HDL による回路設計記述

Verilog HDL による回路設計記述 Verilog HDL 3 2019 4 1 / 24 ( ) (RTL) (HDL) RTL HDL アルゴリズム 動作合成 論理合成 論理回路 配置 配線 ハードウェア記述言語 シミュレーション レイアウト 2 / 24 HDL VHDL: IEEE Std 1076-1987 Ada IEEE Std 1164-1991 Verilog HDL: 1984 IEEE Std 1364-1995

More information

VHDL

VHDL VHDL 4 4 3 3 6 6 6 9 4 8 5 9 5 5 6 9 3 3 3 35 36 37 38 FIRIIR A/D D/A NOSCOS LSI FIR IIR x a x a a ; ; H a H T j e T j e T j T a j T a T j T a e a H e H T j sin cos sin cos T j I T j R T a e H T a e H

More information

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

3 SIMPLE ver 3.2: SIMPLE (SIxteen-bit MicroProcessor for Laboratory Experiment) 1 16 SIMPLE SIMPLE 2 SIMPLE 2.1 SIMPLE (main memo 3 SIMPLE ver 3.2: 20190404 1 3 SIMPLE (SIxteen-bit MicroProcessor for Laboratory Experiment) 1 16 SIMPLE SIMPLE 2 SIMPLE 2.1 SIMPLE 1 16 16 (main memory) 16 64KW a (C )*(a) (register) 8 r[0], r[1],...,

More information

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

推奨されるHDLコーディング構文 6. HDL QII51007-6.0.0 HDL HDL HDL HDL HDL Quartus II Volume 1 Design Recommendations for Altera Devices Quartus II EDA HDL Quartus II Volume 1 Altera Corporation 6 1 Quartus II Volume 1 LPM DSP LVDS PLL

More information

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

.,. 0. (MSB). =2, =1/2.,. MSB LSB, LSB MSB. MSB 0 LSB 0 0 P , 0 (MSB) =2, =1/2, MSB LSB, LSB MSB MSB 0 LSB 0 0 P61 231 1 (100, 100 3 ) 2 10 0 1 1 0 0 1 0 0 100 (64+32+4) 2 10 100 2 5, ( ), & 3 (hardware), (software) (firmware), hardware, software 4 wired logic

More information

論理回路設計

論理回路設計 2018 年度前期集中講義 論理回路設計 - 実習 :VHDL によるデジタル回路設計 講座の目的実習を通して 専門分野の問題発見 解決の能力を修得する - LSI 設計の基礎知識を得る - 言語 :VHDLによる設計手法を実習する - EDAツールの操作を経験する - FPGAを搭載した評価ボードで動作を確認する 東京理科大学 基礎工学部電子応用工学科 ( 非常勤講師 ) 藤岡督也 1 /80 集中講義の日程

More information

FPGA と LUPO その1

FPGA と LUPO その1 FPGA Lecture for LUPO and GTO Vol. 1 2010, 31 August (revised 2013, 19 November) H. Baba Contents FPGA の概要 LUPO の基本的な使い方 New Project Read and Write 基本的な Behavioral VHDL simulation Firmware のダウンロード FPGA

More information

COINS 5 2.1

COINS 5 2.1 COINS (0501699) 20 21 2 5 1 3 1.1....................................... 3 1.2..................................... 4 1.3....................................... 4 2 COINS 5 2.1 COINS..................................

More information

LSI LSI

LSI LSI EDA EDA Electric Design Automation LSI LSI FPGA Field Programmable Gate Array 2 1 1 2 3 4 Verilog HDL FPGA 1 2 2 2 5 Verilog HDL EDA 2 10 BCD: Binary Coded Decimal 3 1 BCD 2 2 1 1 LSI 2 Verilog HDL 3 EDA

More information

? FPGA FPGA FPGA : : : ? ( ) (FFT) ( ) (Localization) ? : 0. 1 2 3 0. 4 5 6 7 3 8 6 1 5 4 9 2 0. 0 5 6 0 8 8 ( ) ? : LU Ax = b LU : Ax = 211 410 221 x 1 x 2 x 3 = 1 0 0 21 1 2 1 0 0 1 2 x = LUx = b 1 31

More information

論理回路設計

論理回路設計 2017 年度前期集中講義 論理回路設計 - 実習 :VHDL によるデジタル回路設計 - 講座の目的実習を通して 専門分野の問題発見 解決の能力を修得する - LSI 設計の基礎知識を得る - 言語 :VHDLによる設計手法を実習する - EDAツールの操作を経験する - FPGAを搭載した評価ボードで動作を確認する 東京理科大学 基礎工学部電子応用工学科 ( 非常勤講師 ) 藤岡督也 1 /76

More information

Microsoft Word - 卒業論文.doc

Microsoft Word - 卒業論文.doc 卒業研究論文 (2009 年 2 月 ) CPLD によるミニゲーム集の制作 ソフトウェア情報学部 ソフトウェア情報学科 和島研究室 ソ 17001 相坂俊 1. 背景... 4 2. 開発環境... 4 2.1 ハードウェア... 4 2.1.1 CPLD... 4 2.1.2 Terasic-Blaster... 6 2.1.3 フラットケーブル... 6 2.2 ソフトウェア... 7 2.2.1

More information

PLDとFPGA

PLDとFPGA PLDFPGA 2002/12 PLDFPGA PLD:Programmable Logic Device FPGA:Field Programmable Gate Array Field: Gate Array: LSI MPGA:Mask Programmable Gate Array» FPGA:»» 2 FPGA FPGALSI FPGA FPGA Altera, Xilinx FPGA DVD

More information

starc_verilog_hdl pptx

starc_verilog_hdl pptx !!!!!!! ! 2.10.6.! RTL : 1! 1 2! 3.2.5.! : ! 1.7. FPGA 1 FPGA FPGA 1.5.2! 3.1.2.! 3! 3.3.1. DFT! LSI :! 2 : ! ON FPGA!!! FPGA! FPGA! !!!!! ! Verilog HDL 6 9 4! Xilinx ISE!!! RTL! CPU !! 20!! C! VHDL! Xilinx

More information

1, Verilog-HDL, Verilog-HDL Verilog-HDL,, FPGA,, HDL, 11, 1 (a) (b) (c) FPGA (d) 2 10,, Verilog-HDL, FPGA, 12,,,, html % netscape file://home/users11/

1, Verilog-HDL, Verilog-HDL Verilog-HDL,, FPGA,, HDL, 11, 1 (a) (b) (c) FPGA (d) 2 10,, Verilog-HDL, FPGA, 12,,,, html % netscape file://home/users11/ 1 Kazutoshi Kobayashi kobayasi@ieeeorg 2002 12 10-11 1, Verilog-HDL, Verilog-HDL Verilog-HDL,, FPGA,, HDL, 11, 1 (a) (b) (c) FPGA (d) 2 10,, Verilog-HDL, FPGA, 12,,,, html % netscape file://home/users11/kobayasi/kobayasi/refresh/indexhtml,,

More information

NAND FF,,

NAND FF,, 1. 1.1. NAND FF,, 1.2. 2. 1 3. アドレス ( 番地 ) 0 99 1 3 2 4 3 20 4 2 5 20 4. 8bit(0255) 7(3+4) 16 8 命令表 (0~255) コード内容 ( 機械語 ) ( 次の番地の内容 )+( 次の次の番地の内 99 容 ) の結果を次の次の次に書いてある番地に格納 2STOP A0A7, A8A15 D0D7 2 4.2.

More information

Design at a higher level

Design at a higher level Meropa FAST 97 98 10 HLS, Mapping, Timing, HDL, GUI, Chip design Cadence, Synopsys, Sente, Triquest Ericsson, LSI Logic 1980 RTL RTL gates Applicability of design methodologies given constant size of

More information

橡ソート手順比較

橡ソート手順比較 PAGE:1 [Page] 20 1 20 20 QuickSort 21 QuickSort 21 21 22 QuickSort 22 QuickSort 22 23 0 23 QuickSort 23 QuickSort 24 Order 25 25 26 26 7 26 QuickSort 27 PAGE:2 PAGE:3 program sort; { { type item = record

More information

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

VHDL-AMS Department of Electrical Engineering, Doshisha University, Tatara, Kyotanabe, Kyoto, Japan TOYOTA Motor Corporation, Susono, Shizuok VHDL-AMS 1-3 1200 Department of Electrical Engineering, Doshisha University, Tatara, Kyotanabe, Kyoto, Japan TOYOTA Motor Corporation, Susono, Shizuoka, Japan E-mail: tkato@mail.doshisha.ac.jp E-mail:

More information

計数工学実験/システム情報工学実験第一 「ディジタル回路の基礎」

計数工学実験/システム情報工学実験第一 「ディジタル回路の基礎」 計数工学実験 / システム情報工学実験第一 ディジタル回路の基礎 ( 全 3 回 ) システム 8 研 三輪忍 参考資料 五島正裕 : ディジタル回路 ( 科目コード 400060) 講義資料 ( ググれば出てくる ) 高木直史 : 論理回路, 昭晃堂 Altera: Cyclone II FPGA スターター開発ボードリファレンス マニュアル Altera: Introduction to Quartus

More information

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

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 2.5. Verilog 19 Z= X + Y - Z A+B LD 0 0001 0000 ADD 1 0110 0001 SUB 2 0111 0010 ST 2 1000 0010 (X

More information

1 8 Z80 Z GBA ASIC 2 WINDOWS C 1

1 8 Z80 Z GBA ASIC 2 WINDOWS C 1 1 8 Z80 Z80 20 8080 GBA ASIC 2 WINDOWS C 1 2.1 Z-80 A 0 - A 15 CPU Z80 D 0- D 7 I/O Z80 1: 1 (1) CPU CPU Z80 CPU Z80 AND,OR,NOT, (2) CPU (3) I/O () Z80 (4) 2 Z80 I/O 16 16 A 0, A 1,, A 15 (5) Z80I/O 8

More information

ハードウェア・ イーサIPコアを解読する

ハードウェア・ イーサIPコアを解読する ハードウェア イーサ IP コアを理解する 2017 年 8 月 14 日 なひたふ for seccamp 17 いきなりですが 最初に 10GbEther のコードを解析します cosmok-10gbe-test cosmok-10gbe-test.srcs sources_1 new top.vhd というのを開いてください 動作環境 XILINX の Kintex-7 XC7K160T を搭載したボードに

More information

論理回路設計

論理回路設計 2016 年度前期集中講義 論理回路設計 - 実習 :VHDL によるデジタル回路設計 - 講座の目的実習を通して 専門分野の問題発見 解決の能力を修得する - LSI 設計の基礎知識を得る - 言語 :VHDLによる設計手法を実習する - EDAツールの操作を経験する - FPGAを搭載した評価ボードで動作を確認する 東京理科大学 基礎工学部電子応用工学科 ( 非常勤講師 ) 藤岡督也 1 /100

More information

IO IO IO IO IO IO IO 8 8 8 7 279 289 299 309 319 329 339 349 359 369777 Z3 16024 0 1 051 050 051 050 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 JW-262S49 00 08 6 53 No. ON 7 5 4 3 2 1

More information

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

「FPGAを用いたプロセッサ検証システムの製作」 FPGA 2210010149-5 2005 2 21 RISC Verilog-HDL FPGA (celoxica RC100 ) LSI LSI HDL CAD HDL 3 HDL FPGA MPU i 1. 1 2. 3 2.1 HDL FPGA 3 2.2 5 2.3 6 2.3.1 FPGA 6 2.3.2 Flash Memory 6 2.3.3 Flash Memory 7 2.3.4

More information

del.dvi

del.dvi (2013, c ) http://istksckwanseiacjp/ ishiura/lc/ 1 2, 8, 16 2 10 (2 ) 11 2, 8, 16 10 (decimal) 1192 10 = 1 10 3 + 1 10 2 + 9 10 1 + 2 10 0 (a n 1 a n 2 a 1 a 0 ) 10 = 8 (octal) n 1 i=0 a i 10 i 710 8 =

More information

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

回路設計 WEBラボ:10ビットのプチDACをRTLで動かしてみる(おまけソースつき) 10 ビットのプチ DAC を RTL で動かしてみる ( おまけソースつき ) 著者 : 石井聡 はじめに このところ デジタル コンサート ホール というもので楽しみ始めました ( 音だけで楽しんでいます ) チケット購入は週間視聴コースからで PayPal でも決済できます http://www.digitalconcerthall.com/ さて AD5611 という 10bit DAC があります

More information

MAX1213N EV.J

MAX1213N EV.J 19-0610; Rev 0; 7/06 DESIGNATION QTY DESCRIPTION C1 C9, C13, C15, C16, C18, C19, C20, C35 C39, C49, C52 22 C10, C27, C28, C40 4 C11, C30 2 C12, C17, C58 C71 0 C14, C33 2 C21 C24 4 C25, C26, C51, C53, C54,

More information

main.dvi

main.dvi CAD 2001 12 1 1, Verilog-HDL, Verilog-HDL. Verilog-HDL,, FPGA,, HDL,. 1.1, 1. (a) (b) (c) FPGA (d). 2. 10,, Verilog-HDL, FPGA,. 1.2,,,, html. % netscape ref0177/html/index.html.,, View Encoding Japanese

More information

目次 はじめに 1 第 1 章ゲームの内容 テトリス ルール 2 第 2 章設計方法 設計の概要 FPGA について VHDL について LCD SRAM 設計の流れ 5 第 3 章ゲーム

目次 はじめに 1 第 1 章ゲームの内容 テトリス ルール 2 第 2 章設計方法 設計の概要 FPGA について VHDL について LCD SRAM 設計の流れ 5 第 3 章ゲーム 卒業研究報告 題目 FPGA と LCD を用いたゲームマシンの設計 指導教員 橘昌良助教授 報告者 笠原拓二 提出日平成 18 年 2 月 20 日 高知工科大学電子 光システム工学科 1 目次 はじめに 1 第 1 章ゲームの内容 2 1.1 テトリス 2 1.2 ルール 2 第 2 章設計方法 3 2.1 設計の概要 3 2.1.1 FPGA について 4 2.1.2 VHDL について 4

More information

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

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 No. IB028901 Nov. 2016 1. 11 TOS7200 2. 14 3. 19 4. 23 5. 39 6. 49 7. 51 TOS7200 CD-ROM DUT PC 1.0X p.15 NEMA5-15 125 Vac/10 A [85-AA-0003] 1 2.5 m : CEE7/7 : 250Vac/10 A [85-AA-0005] : GB1002 : 250Vac/10A

More information

橡点検記録(集約).PDF

橡点検記録(集約).PDF 942.8.8.8.7 671 86 11 1 9 9 9 1 1,792 7,23 2,483 1,324 2,198 7,23 82 7,23 6,327 9,22 9,713 8,525 8,554 9,22. 8,554. 1,79 9,713 95 947 8,525.. 944 671 81 7 17 1,29 1,225 1,241 1,25 1,375 9.3 23,264 25,

More information

Nios II 簡易チュートリアル

Nios II 簡易チュートリアル Nios II Ver. 7.1 2007 10 1. Nios II Nios II JTAG UART LED 8 PIO LED < > Quartus II SOPC Builder Nios II Quartus II.sof Nios II IDE Stratix II 2S60 RoHS Nios II Quartus II http://www.altera.com/literature/lit-nio2.jsp

More information

untitled

untitled 1 CMOS 0.35um CMOS, 3V CMOS 2 RF CMOS RF CMOS RF CMOS RFCMOS (ADC Fabless 3 RF CMOS 1990 Abidi (UCLA): Fabless RF CMOS CMOS 90% 4 5 f T [GHz] 450 400 350 300 250 200 150 Technology loadmap L[nm] f T [GHz]

More information

main.dvi

main.dvi 20 II 7. 1 409, 3255 e-mail: namba@faculty.chiba-u.jp 2 1 1 1 4 2 203 2 1 1 1 5 503 1 3 1 2 2 Web http://www.icsd2.tj.chiba-u.jp/~namba/lecture/ 1 2 1 5 501 1,, \,", 2000 7. : 1 1 CPU CPU 1 Intel Pentium

More information

コンピュータ概論

コンピュータ概論 4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For

More information

EDSF2006_ PDF

EDSF2006_ PDF /SystemC SystemC FPFA 1 Techno Repo LSI / 2 Techno Repo 3 Techno Repo 4 Techno Repo DesignPrototyper 5 Techno Repo 6 Techno Repo 7 Techno Repo 8 Techno Repo 9 Techno Repo C/C++ C/C++/SystemC IP (Verilog-HDL/

More information

Handsout3.ppt

Handsout3.ppt 論理の合成 HDLからの合成 n HDLから初期回路を合成する u レジスタの分離 u 二段 ( 多段 ) 論理回路への変形 n 二段論理回路の分割 n 多段論理回路への変形 n 多段論理回路の最適化 n テクノロジマッピング u 面積, 速度, 消費電力を考慮したライブラリの割当 1 レジスタの分離 process (clk) begin if clk event and clk = 1 then

More information

13金子敬一.indd

13金子敬一.indd 1 1 Journal of Multimedia Aided Education Research, 2004, No. 1, 115122 ED21 1 2 2 WWW 158 34 Decker 3 ED21 ED21 1 ED21 1 CS 1 2 ED213 4 5 ED21 ED21 ED21 ED9900 9 EL21 EE21 EC21 ED9900 JavaApplet JavaApplet

More information

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

TULを用いたVisual ScalerとTDCの開発 TUL を用いた Visual Scaler と TDC の開発 2009/3/23 原子核物理 4 年 永尾翔 目次 目的と内容 開発環境 J-Lab におけるハイパー核分光 Visual Scaler TDC まとめ & 今後 目的と内容 目的 TUL, QuartusⅡ を用いて実験におけるトリガーを組めるようになる Digital Logic を組んでみる 内容 特徴 TUL,QuartusⅡ

More information

プリント

プリント 1 2 3 4 End 1 2 End End 5 6 NEW PIN NEW PIN 1 1 PIN CONF 2 PIN 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

More information

パズルをSugar制約ソルバーで解く

パズルをSugar制約ソルバーで解く Sugar 1 2 3 1 CSPSAT 2008 8 21 Sugar 1 2 3 Sugar Sugar (CSP) (SAT ) (encode) SAT SAT order encoding direct encoding support encoding http://bachistckobe-uacjp/sugar/ Web Sugar 1 2 3 Sugar SAT (COP) MAX-CSP

More information

スライド 1

スライド 1 東北大学工学部機械知能 航空工学科 2016 年度 5 セメスター クラス C3 D1 D2 D3 計算機工学 10. 組合せ回路 ( 教科書 3.4~3.5 節 ) 大学院情報科学研究科 鏡慎吾 http://www.ic.is.tohoku.ac.jp/~swk/lecture/ 組合せ論理回路 x1 x2 xn 組合せ論理回路 y1 y2 ym y i = f i (x 1, x 2,, x

More information

橡ボーダーライン.PDF

橡ボーダーライン.PDF 1 ( ) ( ) 2 3 4 ( ) 5 6 7 8 9 10 11 12 13 14 ( ) 15 16 17 18 19 20 ( ) 21 22 23 24 ( ) 25 26 27 28 29 30 ( ) 31 To be or not to be 32 33 34 35 36 37 38 ( ) 39 40 41 42 43 44 45 46 47 48 ( ) 49 50 51 52

More information

Report Template

Report Template MachXO2 EFB(Embedded Function Block) 1 目次 1 このドキュメントの概要 3 2 EFB の構成 4 3 EFB とハードマクロの生成と注意事項 5 3.1 EFB Enables タブの設定... 5 3.2 I2C タブの設定... 6 3.3 SPI タブの設定... 7 3.4 Timer/Counter タブの設定... 9 4 Wishbone から

More information

Xilinx XAPP485 Spartan-3E FPGA における最大レート 666Mbps でのデシリアライズ、アプリケーション ノート

Xilinx XAPP485 Spartan-3E FPGA における最大レート 666Mbps でのデシリアライズ、アプリケーション ノート XAPP485 (v1.1) 2006 11 10 R : Spartan-3E FPGA Spartan-3E FPGA 666Mbps 1:7 : Nick Sawyer (v1.1) Spartan -3E 666 / (Mbps) 1:7 Spartan-3E 4 5 666Mbps 1/7 Spartan-3E FPGA DCM ( ) DFS ( ) 3.5 DDR ( ) 1:7 DDR

More information

MAP2496.PDF

MAP2496.PDF Audiophile 2496 24 Bit 96 khz 4 in/ 4 out PCI Digital Recording Interface with MIDI 2 M-AUDIO 3 PCI 1. INS1&2 IN1 IN2 2. OUTS1&2 OUT1 OUT2 3. 15 D-sub S/PDIF MIDI 4. S/PDIF S/PDIF DAT MD A/D S/PDIF 5.

More information

only my information

only my information 1 only my information 2010 17 Special thanks 17 2006 2010 60 90 A4 2 1 1 CD 2 3 A B A B A 1/4 B B 3/4 1. 2. A 3 A 3. B 3 B http://www.edu.c.utokyo.ac.jp/edu/information.html only my information 2 2006

More information

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

MAX IIデバイスのIEEE (JTAG)バウンダリ・スキャン・テスト 3. MAX II IEEE 49. JTAG MII54-.6 PCB PCB Bed-of-nails PCB 98 Joint Test Action Group JTAG IEEE Std. 49. BST PCB BST 3 3. IEEE Std. 49. Serial Data In Boundary-Scan Cell IC Pin Signal Serial Data Out Core

More information

fft 高速フーリエ変換 Data Sheet

fft 高速フーリエ変換 Data Sheet fft 997 ver.3 Data Sheet fftfftmegacore FLEX K twiddle Deciatio i Frequecy FFT twiddle MegaCore fft DSP MegaCore fft fft data_left_i_re[] data_left_i_i[] we_left add_left[] clock start_fft twiddle_re[]

More information

スライド 1

スライド 1 東北大学工学部機械知能 航空工学科 2018 年度クラス C3 D1 D2 D3 情報科学基礎 I 10. 組合せ回路 ( 教科書 3.4~3.5 節 ) 大学院情報科学研究科 鏡慎吾 http://www.ic.is.tohoku.ac.jp/~swk/lecture/ 組合せ論理回路 x1 x2 xn 組合せ論理回路 y1 y2 ym y i = f i (x 1, x 2,, x n ), i

More information

My関数の作成演習問題集

My関数の作成演習問題集 Excel Sum,Average,Max 330 BMI Excel My Excel VBA Visual BASIC Editor AltF11 Visual BASIC Editor My Function Function -1- Function ( As Single, As Single) As Double Function Funciton Funciton As Single

More information

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2 September 2016 1 Windows Cygwin Mac *1 Emacs Ruby 1 1.1 ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2 ~/16:00:20> ls 2 2 ls ls -a ~/16:00:20> ls -a

More information

橡卒論.PDF

橡卒論.PDF 1329 1 1 2 2 2.1 2 2.1.1 1 2 2.1.2 2 4 2.1.3 3 6 2.2 8 2.2.1 8 2.2.2 12 2.3Booth 13 3 16 3.1 16 3.1.1Robertson 16 3.1.2Booth 18 3.2 19 3.2.1 19 3.2.2Wallace tree 21 3.3 25 3.4 27 3.4.1 4 27 3.4.22 Booth

More information

( ) ( ) HPC SPH FPGA Web http://galaxy.u-aizu.ac.jp/trac/note/ : 1 4 : 2 6 : 3 6 GPU : ~ 100 1000 : ~ 1000-100000 Google : ~ 10000 : ~ 100000000 GPU, Cell, FPGA GRAPE-DR/GRAPE-MP ( ) GPU GPU : Matsumoto,

More information

( )

( ) ( ) Page 2 Page 3 0 = 1 = Page 4 1 0 13 = 8 + 4 + 1 = 2 3 1 + 2 2 1 + 2 1 0 + 2 0 1 = 1101 ( ) b n 1 b n 2 b 0 (b n 1,,b 0 {0,1}) = 2 n 1 b n 1 + 2 n 2 b n 2 + + 2 0 b 0 n n bit( ) Page 5 n n n {}}{{}}{

More information

ディジタルシステム設計

ディジタルシステム設計 Z80 Z80 Z80 Z80 ROM RAM I/O 8255 8251 Z80PIO Z80CTC Z80SIO R C L Tr OP TTL MCB Z MC Z Z80 Z80 TMPZ84015BF KL5C8012 64180 H8 H8 PIC Microchip Technology PIC Z80 F A A' ALU B D H C E L IX IY SP PC C E L

More information

橡Taro9-生徒の活動.PDF

橡Taro9-生徒の活動.PDF 3 1 4 1 20 30 2 2 3-1- 1 2-2- -3- 18 1200 1 4-4- -5- 15 5 25 5-6- 1 4 2 1 10 20 2 3-7- 1 2 3 150 431 338-8- 2 3 100 4 5 6 7 1-9- 1291-10 - -11 - 10 1 35 2 3 1866 68 4 1871 1873 5 6-12 - 1 2 3 4 1 4-13

More information

DL1010.PDF

DL1010.PDF Delta 1010 24 Bit/96 khz PCI Digital I/O Card 2 M-AUDIO 3 Rack Unit 1. Power LED LED MIDI LED LED MIDI Delta 1010 MIDI MIDI LED LED MIDI Delta 1010 MIDI MIDI MIDI MIDI MIDI MTC Delta 1010 MIDI MIDI MIDI

More information

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

ディジタル電子回路 設計演習課題 Arch 研究室スキルアップ講座 NEXYS4 による 24 時間時計 仕様書および設計例 1 実験ボード (NEXYS4) 外観 ダウンロード (USB) ケーブル接続端子 FPGA:Xilinx 社製 Artix7 XC7A100T-CSG324 7 セグメント LED8 個 LED16 個 リセット SW スライドスイッチ (16 個 ) 押しボタンスイッチ (5 個 ) 2 実験ボードブロック図

More information

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

Arria GXデバイスのIEEE (JTAG)バウンダリ・スキャン・テスト 3. Arria GX IEEE 49. (JTAG) AGX523-. PCB PCB Bed-of-nails PCB 98 Joint Test Action Group (JTAG) IEEE Std. 49. (BST) PCB BST 3 3. IEEE Std. 49. Serial Data In Boundary-Scan Cell IC Pin Signal Serial Data

More information

IEEE (JTAG) Boundary-Scan Testing for Stratix II & Stratix II GX Devices

IEEE (JTAG) Boundary-Scan Testing for Stratix II & Stratix II GX Devices 4. Stratix II Stratix II GX IEEE 49. (JTAG) SII529-3. PCB PCB Bed-of-nails PCB 98 Joint Test Action Group (JTAG) IEEE Std. 49. (BST) PCB BST 4-4-. IEEE Std. 49. Serial Data In Boundary-Scan Cell IC Pin

More information

Power Calculator

Power Calculator 1 4... 4... 4... 5 6... 6... 6 isplever... 6... 7... 8... 8... 8 (NCD)... 9 (.vcd)... 10... 11...11... 12 Power Summary... 16 Logic Block... 19 Clocks... 20 I/O... 20 I/O Term... 21 Block RAM... 22 DSP...

More information