2015年12月16日 星期三

上機考試內容

module top; 

wire A, B, C, D, F, N1, N2 ,N4, F1, F2, F3, F4, G1, G2, G3, G4, A1, A2, A3, A4;
system_clock #800 clock1(A); 
system_clock #400 clock2(B);
system_clock #200 clock3(C); 
system_clock #100 clock4(D);

nand (N1, A, A);
nand (N2, B, B);
nand (N4, D, D);
nand (F1, D, N2, N1);
nand (F2, N4, B, N1);
nand (F3, D, C, A);
nand (F4, C, N4, A);
nand (G4, F4, F4);
nand (G3, F2, F2);
nand (G2, F3, F3);
nand (G1, F1, F1);
nand (A1, G1, G1);
nand (A2, G2, G2);
nand (A3, G3, G3);
nand (A4, G4, G4);
nand (F, A1, A2, A3, A4);


endmodule 

module system_clock(clk); 
parameter PERIOD=100; 
output clk; 
reg clk; 

initial clk=0; 

always 
 begin 
#(PERIOD/2) clk=~clk; 
 end 

always@(posedge clk)
 if($time>800)$stop; 

endmodule


2015年12月2日 星期三

第10次上課 上機考練習 12/2

module top; 

wire A, B, C, D, F
system_clock #800 clock1(A); 
system_clock #400 clock2(B);
system_clock #200 clock3(C); 
system_clock #100 clock4(D);

or o1(F, F4, F3, F2, F1);
not n1(A1,A);
not n2(B1,B);
not n3(C1,C);
not n4(D1,D);
and a1(F4, A, C1, D1);
and a2(F2, A1, B1, D);
and a3(F3, B, C1, D1);
and a4(F1, C, D);

endmodule 

module system_clock(clk); 
parameter PERIOD=100; 
output clk; 
reg clk; 

initial clk=0; 

always 
 begin 
#(PERIOD/2) clk=~clk; 
 end 

always@(posedge clk)
 if($time>800)$stop; 

endmodule 

and or not

module top; 

wire A, B, C, D, F , N1, N2, N3, N4, F1, F2, F3, F4, G1, G2, G3, G4, A1, A2, A3, A4
system_clock #800 clock1(A); 
system_clock #400 clock2(B);
system_clock #200 clock3(C); 
system_clock #100 clock4(D);


nand na1(F4, A, N3, N4);
nand na2(F2, N1, N2, D);
nand na3(F3, B, N3, N4);
nand na4(F1, C, D);
nand na5(G1, F4, F4);
nand na6(G2, F2, F2);
nand na7(G3, F3, F3);
nand na8(G4, F1, F1);
nand na9(N1, A, A);
nand na10(N2, B, B);
nand na11(N3, C, C);
nand na12(N4, D, D);
nand na13(A1, G1, G1);
nand na14(A2, G2, G2);
nand na15(A3, G3, G3);
nand na16(A4, G4, G4);
nand na17(F, A1, A2, A3, A4);


endmodule 

module system_clock(clk); 
parameter PERIOD=100; 
output clk; 
reg clk; 

initial clk=0; 

always 
 begin 
#(PERIOD/2) clk=~clk; 
 end 

always@(posedge clk)
 if($time>800)$stop; 

endmodule

全NAND
module top; 

wire A, B, C, D, F;
system_clock #800 clock1(A); 
system_clock #400 clock2(B);
system_clock #200 clock3(C); 
system_clock #100 clock4(D);

nor (A1, A, A);
nor (B1, B, B);
nor (C1, C, C);
nor (D1, D, D);
nor (A2, A, A);
nor (C2, C1, C1);
nor (D2, D1, D1);
nor (F4, A2, C2, D2);
nor (A3, A1, A1);
nor (B2, B1, B1);
nor (D3, D, D);
nor (F2, A3, B2, D3);
nor (B3, B, B);
nor (C3, C1, C1);
nor (D4, D1, D1);
nor (F3, B3, C3, D4);
nor (C4, C, C);
nor (D5, D, D);
nor (F1, C4, D5);
nor (F5, F1, F2, F3, F4);
nor (F, F5, F5);


endmodule 

module system_clock(clk); 
parameter PERIOD=100; 
output clk; 
reg clk; 

initial clk=0; 

always 
 begin 
#(PERIOD/2) clk=~clk; 
 end 

always@(posedge clk)
 if($time>800)$stop; 

endmodule 
全NOR

2015年11月25日 星期三

第9次上課 3位元加法器 11/25


























module fulladder (sum, c_out, a, b, c_in);
wire s1, c1, c2;
output sum;
output c_out;
input a, b, c_in;
xor g1(s1, a, b);
xor g2(sum, s1, c_in);
and g3(c1, a,b);
and g4(c2, s1, c_in) ;
xor g5(c_out, c2, c1) ;

endmodule

module adder3(sum, c_out, a, b, c_in);
wire [2:0] c;
output [2:0] sum;
output c_out;
input [2:0] a;
input [2:0] b;
input c_in;
fulladder fa1(sum[0], c[1], a[0], b[0], c_in) ;
fulladder fa2(sum[1], c[2], a[1], b[1], c[1]) ;
fulladder fa3(sum[2], c_out, a[2], b[2], c[2]) ;


endmodule

module main;
reg [2:0] a;
reg [2:0] b;
wire [2:0] sum;
wire c_out;

adder3 DUT (sum, c_out, a, b, 1'b0);

initial
begin
  a = 4'b0101;
  b = 4'b0000;
end

always #50 begin
  b=b+1;
  $monitor("%dns monitor: a=%d b=%d sum=%d", $stime, a, b, sum);
end

initial #2000 $finish;

endmodule

感謝朱巖提供

2015年11月18日 星期三

第八次上課 一位元全加法器

module top; 

wire C_in, A, B, C_out, sum;
system_clock #400 clock1(C_in);
system_clock #200 clock2(A); 
system_clock #100 clock3(B);


and a1(OUT1, A, B);
and a2(OUT3, C_in, OUT2);
xor x1(OUT2, A, B);
xor x2(sum, OUT2, C_in);
or o1(C_out, OUT3, OUT1);

endmodule 

module system_clock(clk); 
parameter PERIOD=100; 
output clk; 
reg clk; 

initial clk=0; 

always 
 begin 
#(PERIOD/2) clk=~clk; 
 end 

always@(posedge clk)
 if($time>400)$stop; 

endmodule 


























module test_adder1;

 reg a,b;
 reg carry_in ;
 wire sum;
 wire carry_out;

 adder1_behavorial A1(carry_out, sum, a, b, carry_in);

 initial
  begin

    carry_in = 0; a = 0; b = 0;
    # 100 if ( carry_out != 0 | sum !== 0)
                $display(" 0+0+0=00 sum is WRONG!");
              else
                $display(" 0+0+0=00 sum is RIGHT!");
    carry_in = 0; a = 0; b = 1;
    # 100 if ( carry_out != 0 | sum !== 1)
               $display(" 0+0+1=01 sum is WRONG!");
              else
               $display(" 0+0+1=01 sum is RIGHT!");
    carry_in = 0; a = 1; b = 0;
    # 100 if ( carry_out != 0 | sum !== 1)
                $display(" 0+1+0=01 sum is WRONG!");
              else
                $display(" 0+1+0=01 sum is RIGHT!");
    carry_in = 0; a = 1; b = 1;
    # 100 if ( carry_out != 1 | sum !== 0)
                $display(" 0+1+1=10 sum is WRONG!");
              else
                $display(" 0+1+1=10 sum is RIGHT!");
    carry_in = 1; a = 0; b = 0;
    # 100 if ( carry_out != 0 | sum !== 1)
                $display(" 1+0+0=01 sum is WRONG!");
              else
                $display(" 1+0+0=01 sum is RIGHT!");
    carry_in = 1; a = 0; b = 1;
    # 100 if ( carry_out != 1 | sum !== 0)
                $display(" 1+0+1=10 sum is WRONG!");
              else
                $display(" 1+0+1=10 sum is RIGHT!");
    carry_in = 1; a = 1; b = 0;
    # 100 if ( carry_out != 1 | sum !== 0)
                $display(" 1+1+0=10 sum is WRONG!");
              else
                $display(" 1+1+0=10 sum is RIGHT!");
    carry_in = 1; a = 1; b = 1;
    # 100 if ( carry_out != 1 | sum !== 1)
               $display(" 1+1+1=11 sum is WRONG!");
              else
               $display(" 1+1+1=11 sum is RIGHT!");
    $finish;
  end
endmodule



module adder1_behavorial (carry_out, sum, a, b, carry_in);
 input a, b, carry_in;
 output carry_out, sum;
  assign sum = (~a&b&~carry_in)|(~carry_in&a&~b)|(a&b&carry_in)|(~a&~b&carry_in);
  assign carry_out = a&carry_in|a&b|b&carry_in;
endmodule


這次上課很有趣

2015年11月4日 星期三

第七次上課用for迴圈替代 11/4




module top;
  integer ib,ia,is;
  reg  b,a,s;
  wire out;

  mux_behavioral mux1(out,a,b,s);

  initial
    begin
      for (is=0; is<=1; is = is+1)
       begin
         s = is;
          for (ia=0; ia<=1; ia = ia+1)
           begin
            a = ia;
             for (ib=0; ib<=1; ib = ib+1)
              begin
               b = ib;
                 #10 $display("s=%d a=%d b=%d  out=%d",a,b,s,out);
               end
            end
        end
    end
endmodule

module mux_behavioral(OUT, A, B, SEL);
 output OUT;
 input A,B, SEL;
 wire  A,B, SEL;
 reg    OUT;

  always @(A or B or SEL)
   OUT = (A & SEL)|(B & ~SEL );
endmodule

module top;
  integer id,ic,ib,ia,is;
  reg  d,c,b,a,s;
  wire out1,out2;

  mux_behavioral mux1(out1,a,b,s);
  mux_behavioral mux1(out2,c,d,s);

  initial
    begin
      for (is=0; is<=1; is = is+1)
       begin
         s = is;
          for (ia=0; ia<=1; ia = ia+1)
           begin
            a = ia;
             for (ib=0; ib<=1; ib = ib+1)
              begin
               b = ib;
                for (ic=0; ic<=1; ic = ic+1)
                 begin
                  c = ic;
                   for (id=0; id<=1; id = id+1)
                    begin
                     d = id;             
                      #10 $display("s=%d a=%d b=%d c=%d d=%d out1=%d out2=%d",a,b,c,d,s,out1,out2);
                     end
                  end
               end
            end
        end
    end
endmodule

module mux_behavioral(OUT, A, B, SEL);
 output OUT;
 input A,B, SEL;
 wire  A,B, SEL;
 reg    OUT;

  always @(A or B or SEL)
   OUT = (A & SEL)|(B & ~SEL );
endmodule

2015年10月21日 星期三

第5次上課01


























這次三位元多工器想了很久
最後被小賀一語點醒夢中人
恍然大悟阿

2015年10月7日 星期三

第三次上課 課堂上用


























第三次上課 課堂用
真值表寫錯了
改過以後就一樣了





第三次上課


























第三次上課  這次難度上升很多
花費了不少時間在寫真值表
一堆的0跟1

2015年9月30日 星期三

第二次上課追加


第二次上課 系統時脈


























第二次上課就學會新的事物
剛開始不知道該怎麼寫 跟同學討論了一下
決定自己改改看一次
寫出來運算後也不知道是不是對的
去找會的同學幫忙看過以後知道是對的
感覺到自己學會了新的東西

2015年9月23日 星期三

第一次上課 SynaptiCAD

第一次上課  學會保護自己的智慧財產權(?
還好不會太難 希望可以順利學會這門學科



2015年9月16日 星期三

AMD

AMD 更新了 ARM based SoC 的 roadmap,其中AMD 將會在推出 20nm 製程的 ARM Cortex-A57 架構 SoC,它將結合 AMD Radeon 的 GCN 架構 GPU 在內。此外,這款 ARM based SoC 的 PIN 將能與 AMD 下世代的 x86 架構 SoC 相容,同時「Project SkyBridge」將會是 AMD 首款支援 Android 系統的平台。
比較讓人驚豔的部分可能是,AMD 是如何讓 ARM 與 x86 架構 SoC 在 PIN 部分達到相容,當然可以想像,目前市場可能不會放在 Server,而是在 embedded 以及消費端兩個市場。















2016 年的 AMD 除了將推出全新的 x86 架構處理器外,在 ARM 部分也將會發表首款客製化的 64 bit ARMv8 CPU,其代號將會為「K12」。

「K12」細節目前尚未確認,因此究竟維持在 20nm,仰或是推進到 16nm,甚至是 14nm FinFet 都沒有任何定案,只是應用方面卻是相當肯定的,這包含了 Server、embedded 以及半客製化市場(semi-custom),至於智慧型手機部分依舊不是 AMD 鎖定的目標市場。

AMD 同時也釋出類似早前 Mantle 的核心圖,圖中可以稍微了解到這家公司未來主要在建立 IP,核心會是 Radeon GPU、x86 架構以及 ARM based CPU。

在核心之上,將會有各種不同附加 IP 來支援,而最外面則是實際應用,包含了 Windows、Linux 以及 Android 作業系統,同時 DirectX、OpenGL、OpenCL 以及 Mantle 等都會納入支援中。


CIC 數位IC設計認證內容

CIC為國內IC設計人員培訓及認證的專責機構, 具有全國最完整之IC設計環境與實作訓練教室; 中心更擁有全方位IC設計領域專業講師教授群, 必能提升您的職場競爭力與IC設計之專業能力。


目標

設立宗旨為「培育積體電路晶片及系統設計人才、提昇積體電路晶片及系統設計技術」,能強化我國積體電路晶片及系統設計能力。主要任務為:
(一) 建立積體電路晶片及系統設計環境。 
(二) 提供積體電路晶片及系統設計雛型品之實作與測試服務。 
(三) 推展積體電路晶片及系統設計之「產、學、研」合作研究,並將學術界之研究成果落實推廣至產業界。 
(四) 推動國內外積體電路晶片及系統設計相關技術之合作與交流。

教育訓練及推廣

  為培訓晶片及系統設計人才,中心每年利用寒暑假期針對各種不同設計方式對學術界分別開設Full Custom IC design、Cell-Based IC design、FPGA design、RF/MM design、CMOS MEMS、IC Testing、SoC design及 Embedded Software開發等訓練課程。除學術界訓練課程之外,亦開設E-Learning訓練課程,以減低人才培訓的成本,縮短學習曲線。另外也邀請國內外專家學者開設進階的訓練課程及研討會。此外中心定期出版相關刊物,供學術界與業界參考。為使各種資訊交流更為便利有效,本中心設有網站(http://www.cic.org.tw) 以提供技術諮詢與交流、晶片設計軟體申請與下載、 晶片製作申請與製程資料下載、儀器設備預約、上課報名… 等各類服務。另外也出版Enews、年報、各種訓練教材、晶片設計成果論文集、研討會論文集等出版品供各界參考使用。

學科筆試
以數位電路邏輯設計概念(包含大專院校教科書 之 Digital System, Logic Design, Logic Synthesis and Verification, VLSI Testing…等)、Verilog 語法 以及數位 IC 設計 EDA 工具流程為主;


內容包含:
1. Logic design
2. Verilog coding
3. Logic Synthesis
4. Logic Verification
5. Testing
6. Power & Timing Analysis

術科實作:
科實作評分之 4 個主要項目為:
(A) Verilog coding 須符合題目所要求之功能規格
(B) Verilog coding 須通過主辦單位所提供之 nLint rule 檢查
(C)邏輯合成後之 gate-level simulation 驗證完全無誤
(D)電路合成軟體時序分析驗證須符合題目所要求 之規格